From f451c5613dc5cd96240ea23cb8b744c3c03d4b5b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 13 Sep 2022 20:08:32 +0000 Subject: [PATCH 1/2] docs: update comments for image annotator OCR models PiperOrigin-RevId: 474070246 Source-Link: https://github.com/googleapis/googleapis/commit/346e2f2a106ed0ff8863b11a3b1ec32cd40b9cf1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/50b34515fa89525989021be4b6989d49059d8d26 Copy-Tag: eyJwIjoiamF2YS12aXNpb24vLk93bEJvdC55YW1sIiwiaCI6IjUwYjM0NTE1ZmE4OTUyNTk4OTAyMWJlNGI2OTg5ZDQ5MDU5ZDhkMjYifQ== --- .../cloud/vision/v1/ImageAnnotatorClient.java | 715 ++ .../vision/v1/ImageAnnotatorSettings.java | 276 + .../cloud/vision/v1/ProductSearchClient.java | 3873 +++++++++ .../vision/v1/ProductSearchSettings.java | 448 + .../cloud/vision/v1/gapic_metadata.json | 96 + .../google/cloud/vision/v1/package-info.java | 79 + .../GrpcImageAnnotatorCallableFactory.java | 113 + .../v1/stub/GrpcImageAnnotatorStub.java | 313 + .../GrpcProductSearchCallableFactory.java | 113 + .../vision/v1/stub/GrpcProductSearchStub.java | 826 ++ ...HttpJsonImageAnnotatorCallableFactory.java | 105 + .../v1/stub/HttpJsonImageAnnotatorStub.java | 442 + .../HttpJsonProductSearchCallableFactory.java | 105 + .../v1/stub/HttpJsonProductSearchStub.java | 1266 +++ .../vision/v1/stub/ImageAnnotatorStub.java | 88 + .../v1/stub/ImageAnnotatorStubSettings.java | 530 ++ .../vision/v1/stub/ProductSearchStub.java | 191 + .../v1/stub/ProductSearchStubSettings.java | 1187 +++ .../v1/ImageAnnotatorClientHttpJsonTest.java | 267 + .../vision/v1/ImageAnnotatorClientTest.java | 257 + .../cloud/vision/v1/MockImageAnnotator.java | 59 + .../vision/v1/MockImageAnnotatorImpl.java | 147 + .../cloud/vision/v1/MockProductSearch.java | 59 + .../vision/v1/MockProductSearchImpl.java | 461 + .../v1/ProductSearchClientHttpJsonTest.java | 1991 +++++ .../vision/v1/ProductSearchClientTest.java | 1775 ++++ .../cloud/vision/v1/ImageAnnotatorGrpc.java | 635 ++ .../cloud/vision/v1/ProductSearchGrpc.java | 2280 +++++ .../v1/AddProductToProductSetRequest.java | 789 ++ ...ddProductToProductSetRequestOrBuilder.java | 57 + .../cloud/vision/v1/AnnotateFileRequest.java | 1651 ++++ .../v1/AnnotateFileRequestOrBuilder.java | 163 + .../cloud/vision/v1/AnnotateFileResponse.java | 1461 ++++ .../v1/AnnotateFileResponseOrBuilder.java | 125 + .../cloud/vision/v1/AnnotateImageRequest.java | 1346 +++ .../v1/AnnotateImageRequestOrBuilder.java | 107 + .../vision/v1/AnnotateImageResponse.java | 5055 +++++++++++ .../v1/AnnotateImageResponseOrBuilder.java | 512 ++ .../vision/v1/AsyncAnnotateFileRequest.java | 1580 ++++ .../v1/AsyncAnnotateFileRequestOrBuilder.java | 134 + .../vision/v1/AsyncAnnotateFileResponse.java | 665 ++ .../AsyncAnnotateFileResponseOrBuilder.java | 36 + .../v1/AsyncBatchAnnotateFilesRequest.java | 1089 +++ ...yncBatchAnnotateFilesRequestOrBuilder.java | 87 + .../v1/AsyncBatchAnnotateFilesResponse.java | 895 ++ ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 + .../v1/AsyncBatchAnnotateImagesRequest.java | 1323 +++ ...ncBatchAnnotateImagesRequestOrBuilder.java | 114 + .../v1/AsyncBatchAnnotateImagesResponse.java | 665 ++ ...cBatchAnnotateImagesResponseOrBuilder.java | 36 + .../vision/v1/BatchAnnotateFilesRequest.java | 1110 +++ .../BatchAnnotateFilesRequestOrBuilder.java | 92 + .../vision/v1/BatchAnnotateFilesResponse.java | 895 ++ .../BatchAnnotateFilesResponseOrBuilder.java | 58 + .../vision/v1/BatchAnnotateImagesRequest.java | 1087 +++ .../BatchAnnotateImagesRequestOrBuilder.java | 87 + .../v1/BatchAnnotateImagesResponse.java | 872 ++ .../BatchAnnotateImagesResponseOrBuilder.java | 53 + .../vision/v1/BatchOperationMetadata.java | 1226 +++ .../v1/BatchOperationMetadataOrBuilder.java | 85 + .../com/google/cloud/vision/v1/Block.java | 1914 +++++ .../cloud/vision/v1/BlockOrBuilder.java | 178 + .../google/cloud/vision/v1/BoundingPoly.java | 1312 +++ .../vision/v1/BoundingPolyOrBuilder.java | 97 + .../com/google/cloud/vision/v1/ColorInfo.java | 835 ++ .../cloud/vision/v1/ColorInfoOrBuilder.java | 57 + .../cloud/vision/v1/CreateProductRequest.java | 1032 +++ .../v1/CreateProductRequestOrBuilder.java | 86 + .../vision/v1/CreateProductSetRequest.java | 1025 +++ .../v1/CreateProductSetRequestOrBuilder.java | 84 + .../v1/CreateReferenceImageRequest.java | 1044 +++ .../CreateReferenceImageRequestOrBuilder.java | 89 + .../com/google/cloud/vision/v1/CropHint.java | 845 ++ .../cloud/vision/v1/CropHintOrBuilder.java | 60 + .../cloud/vision/v1/CropHintsAnnotation.java | 872 ++ .../v1/CropHintsAnnotationOrBuilder.java | 53 + .../cloud/vision/v1/CropHintsParams.java | 696 ++ .../vision/v1/CropHintsParamsOrBuilder.java | 53 + .../cloud/vision/v1/DeleteProductRequest.java | 609 ++ .../v1/DeleteProductRequestOrBuilder.java | 33 + .../vision/v1/DeleteProductSetRequest.java | 609 ++ .../v1/DeleteProductSetRequestOrBuilder.java | 33 + .../v1/DeleteReferenceImageRequest.java | 609 ++ .../DeleteReferenceImageRequestOrBuilder.java | 33 + .../vision/v1/DominantColorsAnnotation.java | 872 ++ .../v1/DominantColorsAnnotationOrBuilder.java | 53 + .../cloud/vision/v1/EntityAnnotation.java | 2480 ++++++ .../vision/v1/EntityAnnotationOrBuilder.java | 258 + .../cloud/vision/v1/FaceAnnotation.java | 4334 ++++++++++ .../vision/v1/FaceAnnotationOrBuilder.java | 328 + .../com/google/cloud/vision/v1/Feature.java | 1153 +++ .../cloud/vision/v1/FeatureOrBuilder.java | 65 + .../cloud/vision/v1/GcsDestination.java | 714 ++ .../vision/v1/GcsDestinationOrBuilder.java | 63 + .../com/google/cloud/vision/v1/GcsSource.java | 602 ++ .../cloud/vision/v1/GcsSourceOrBuilder.java | 31 + .../google/cloud/vision/v1/GeometryProto.java | 90 + .../cloud/vision/v1/GetProductRequest.java | 609 ++ .../vision/v1/GetProductRequestOrBuilder.java | 33 + .../cloud/vision/v1/GetProductSetRequest.java | 609 ++ .../v1/GetProductSetRequestOrBuilder.java | 33 + .../vision/v1/GetReferenceImageRequest.java | 609 ++ .../v1/GetReferenceImageRequestOrBuilder.java | 33 + .../com/google/cloud/vision/v1/Image.java | 789 ++ .../vision/v1/ImageAnnotationContext.java | 681 ++ .../v1/ImageAnnotationContextOrBuilder.java | 40 + .../cloud/vision/v1/ImageAnnotatorProto.java | 756 ++ .../google/cloud/vision/v1/ImageContext.java | 1947 +++++ .../vision/v1/ImageContextOrBuilder.java | 213 + .../cloud/vision/v1/ImageOrBuilder.java | 56 + .../cloud/vision/v1/ImageProperties.java | 665 ++ .../vision/v1/ImagePropertiesOrBuilder.java | 36 + .../google/cloud/vision/v1/ImageSource.java | 880 ++ .../cloud/vision/v1/ImageSourceOrBuilder.java | 83 + .../vision/v1/ImportProductSetsGcsSource.java | 919 ++ .../ImportProductSetsGcsSourceOrBuilder.java | 121 + .../v1/ImportProductSetsInputConfig.java | 773 ++ ...ImportProductSetsInputConfigOrBuilder.java | 41 + .../vision/v1/ImportProductSetsRequest.java | 838 ++ .../v1/ImportProductSetsRequestOrBuilder.java | 58 + .../vision/v1/ImportProductSetsResponse.java | 1410 +++ .../ImportProductSetsResponseOrBuilder.java | 117 + .../google/cloud/vision/v1/InputConfig.java | 938 ++ .../cloud/vision/v1/InputConfigOrBuilder.java | 72 + .../google/cloud/vision/v1/LatLongRect.java | 901 ++ .../cloud/vision/v1/LatLongRectOrBuilder.java | 63 + .../google/cloud/vision/v1/Likelihood.java | 202 + .../vision/v1/ListProductSetsRequest.java | 848 ++ .../v1/ListProductSetsRequestOrBuilder.java | 61 + .../vision/v1/ListProductSetsResponse.java | 1045 +++ .../v1/ListProductSetsResponseOrBuilder.java | 75 + .../v1/ListProductsInProductSetRequest.java | 855 ++ ...tProductsInProductSetRequestOrBuilder.java | 63 + .../v1/ListProductsInProductSetResponse.java | 1045 +++ ...ProductsInProductSetResponseOrBuilder.java | 75 + .../cloud/vision/v1/ListProductsRequest.java | 855 ++ .../v1/ListProductsRequestOrBuilder.java | 63 + .../cloud/vision/v1/ListProductsResponse.java | 1045 +++ .../v1/ListProductsResponseOrBuilder.java | 75 + .../vision/v1/ListReferenceImagesRequest.java | 869 ++ .../ListReferenceImagesRequestOrBuilder.java | 67 + .../v1/ListReferenceImagesResponse.java | 1118 +++ .../ListReferenceImagesResponseOrBuilder.java | 83 + .../vision/v1/LocalizedObjectAnnotation.java | 1259 +++ .../LocalizedObjectAnnotationOrBuilder.java | 110 + .../google/cloud/vision/v1/LocationInfo.java | 665 ++ .../vision/v1/LocationInfoOrBuilder.java | 36 + .../google/cloud/vision/v1/LocationName.java | 192 + .../cloud/vision/v1/NormalizedVertex.java | 597 ++ .../vision/v1/NormalizedVertexOrBuilder.java | 29 + .../cloud/vision/v1/OperationMetadata.java | 1204 +++ .../vision/v1/OperationMetadataOrBuilder.java | 82 + .../google/cloud/vision/v1/OutputConfig.java | 777 ++ .../vision/v1/OutputConfigOrBuilder.java | 54 + .../java/com/google/cloud/vision/v1/Page.java | 1358 +++ .../google/cloud/vision/v1/PageOrBuilder.java | 112 + .../com/google/cloud/vision/v1/Paragraph.java | 1594 ++++ .../cloud/vision/v1/ParagraphOrBuilder.java | 159 + .../com/google/cloud/vision/v1/Position.java | 679 ++ .../cloud/vision/v1/PositionOrBuilder.java | 39 + .../com/google/cloud/vision/v1/Product.java | 2617 ++++++ .../google/cloud/vision/v1/ProductName.java | 223 + .../cloud/vision/v1/ProductOrBuilder.java | 194 + .../cloud/vision/v1/ProductSearchParams.java | 1390 +++ .../v1/ProductSearchParamsOrBuilder.java | 160 + .../cloud/vision/v1/ProductSearchProto.java | 132 + .../cloud/vision/v1/ProductSearchResults.java | 5384 ++++++++++++ .../v1/ProductSearchResultsOrBuilder.java | 145 + .../vision/v1/ProductSearchServiceProto.java | 637 ++ .../google/cloud/vision/v1/ProductSet.java | 1337 +++ .../cloud/vision/v1/ProductSetName.java | 223 + .../cloud/vision/v1/ProductSetOrBuilder.java | 129 + .../vision/v1/ProductSetPurgeConfig.java | 609 ++ .../v1/ProductSetPurgeConfigOrBuilder.java | 33 + .../com/google/cloud/vision/v1/Property.java | 842 ++ .../cloud/vision/v1/PropertyOrBuilder.java | 59 + .../cloud/vision/v1/PurgeProductsRequest.java | 1143 +++ .../v1/PurgeProductsRequestOrBuilder.java | 92 + .../cloud/vision/v1/ReferenceImage.java | 1372 +++ .../cloud/vision/v1/ReferenceImageName.java | 269 + .../vision/v1/ReferenceImageOrBuilder.java | 131 + .../RemoveProductFromProductSetRequest.java | 789 ++ ...ProductFromProductSetRequestOrBuilder.java | 57 + .../cloud/vision/v1/SafeSearchAnnotation.java | 1102 +++ .../v1/SafeSearchAnnotationOrBuilder.java | 118 + .../com/google/cloud/vision/v1/Symbol.java | 1317 +++ .../cloud/vision/v1/SymbolOrBuilder.java | 135 + .../cloud/vision/v1/TextAnnotation.java | 3812 +++++++++ .../vision/v1/TextAnnotationOrBuilder.java | 73 + .../cloud/vision/v1/TextAnnotationProto.java | 183 + .../cloud/vision/v1/TextDetectionParams.java | 767 ++ .../v1/TextDetectionParamsOrBuilder.java | 62 + .../cloud/vision/v1/UpdateProductRequest.java | 961 +++ .../v1/UpdateProductRequestOrBuilder.java | 78 + .../vision/v1/UpdateProductSetRequest.java | 937 ++ .../v1/UpdateProductSetRequestOrBuilder.java | 72 + .../com/google/cloud/vision/v1/Vertex.java | 591 ++ .../cloud/vision/v1/VertexOrBuilder.java | 29 + .../google/cloud/vision/v1/WebDetection.java | 7560 +++++++++++++++++ .../vision/v1/WebDetectionOrBuilder.java | 293 + .../cloud/vision/v1/WebDetectionParams.java | 510 ++ .../v1/WebDetectionParamsOrBuilder.java | 19 + .../cloud/vision/v1/WebDetectionProto.java | 116 + .../java/com/google/cloud/vision/v1/Word.java | 1617 ++++ .../google/cloud/vision/v1/WordOrBuilder.java | 164 + .../google/cloud/vision/v1/geometry.proto | 68 + .../cloud/vision/v1/image_annotator.proto | 1044 +++ .../cloud/vision/v1/product_search.proto | 124 + .../vision/v1/product_search_service.proto | 1022 +++ .../cloud/vision/v1/text_annotation.proto | 258 + .../cloud/vision/v1/web_detection.proto | 104 + .../AsyncAsyncBatchAnnotateFiles.java | 52 + .../AsyncAsyncBatchAnnotateFilesLRO.java | 53 + .../SyncAsyncBatchAnnotateFiles.java | 49 + ...tateFilesListasyncannotatefilerequest.java | 45 + .../AsyncAsyncBatchAnnotateImages.java | 54 + .../AsyncAsyncBatchAnnotateImagesLRO.java | 55 + .../SyncAsyncBatchAnnotateImages.java | 51 + ...sListannotateimagerequestOutputconfig.java | 48 + .../AsyncBatchAnnotateFiles.java | 52 + .../SyncBatchAnnotateFiles.java | 48 + ...hAnnotateFilesListannotatefilerequest.java | 44 + .../AsyncBatchAnnotateImages.java | 52 + .../SyncBatchAnnotateImages.java | 48 + ...nnotateImagesListannotateimagerequest.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncBatchAnnotateImages.java | 49 + .../AsyncAddProductToProductSet.java | 52 + .../SyncAddProductToProductSet.java | 48 + ...ToProductSetProductsetnameProductname.java | 44 + ...oductToProductSetProductsetnameString.java | 44 + ...dProductToProductSetStringProductname.java | 44 + ...yncAddProductToProductSetStringString.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../createproduct/AsyncCreateProduct.java | 51 + .../createproduct/SyncCreateProduct.java | 48 + ...reateProductLocationnameProductString.java | 44 + .../SyncCreateProductStringProductString.java | 44 + .../AsyncCreateProductSet.java | 52 + .../SyncCreateProductSet.java | 48 + ...roductSetLocationnameProductsetString.java | 44 + ...reateProductSetStringProductsetString.java | 44 + .../AsyncCreateReferenceImage.java | 52 + .../SyncCreateReferenceImage.java | 48 + ...eImageProductnameReferenceimageString.java | 45 + ...erenceImageStringReferenceimageString.java | 45 + .../deleteproduct/AsyncDeleteProduct.java | 49 + .../deleteproduct/SyncDeleteProduct.java | 46 + .../SyncDeleteProductProductname.java | 42 + .../SyncDeleteProductString.java | 42 + .../AsyncDeleteProductSet.java | 49 + .../SyncDeleteProductSet.java | 46 + .../SyncDeleteProductSetProductsetname.java | 42 + .../SyncDeleteProductSetString.java | 42 + .../AsyncDeleteReferenceImage.java | 52 + .../SyncDeleteReferenceImage.java | 48 + ...eleteReferenceImageReferenceimagename.java | 43 + .../SyncDeleteReferenceImageString.java | 44 + .../getproduct/AsyncGetProduct.java | 49 + .../getproduct/SyncGetProduct.java | 46 + .../getproduct/SyncGetProductProductname.java | 42 + .../getproduct/SyncGetProductString.java | 42 + .../getproductset/AsyncGetProductSet.java | 50 + .../getproductset/SyncGetProductSet.java | 46 + .../SyncGetProductSetProductsetname.java | 42 + .../SyncGetProductSetString.java | 42 + .../AsyncGetReferenceImage.java | 52 + .../SyncGetReferenceImage.java | 48 + ...ncGetReferenceImageReferenceimagename.java | 43 + .../SyncGetReferenceImageString.java | 44 + .../AsyncImportProductSets.java | 52 + .../AsyncImportProductSetsLRO.java | 53 + .../SyncImportProductSets.java | 49 + ...ationnameImportproductsetsinputconfig.java | 46 + ...etsStringImportproductsetsinputconfig.java | 45 + .../listproducts/AsyncListProducts.java | 54 + .../listproducts/AsyncListProductsPaged.java | 61 + .../listproducts/SyncListProducts.java | 50 + .../SyncListProductsLocationname.java | 44 + .../listproducts/SyncListProductsString.java | 44 + .../listproductsets/AsyncListProductSets.java | 54 + .../AsyncListProductSetsPaged.java | 62 + .../listproductsets/SyncListProductSets.java | 50 + .../SyncListProductSetsLocationname.java | 44 + .../SyncListProductSetsString.java | 44 + .../AsyncListProductsInProductSet.java | 54 + .../AsyncListProductsInProductSetPaged.java | 62 + .../SyncListProductsInProductSet.java | 50 + ...istProductsInProductSetProductsetname.java | 44 + .../SyncListProductsInProductSetString.java | 44 + .../AsyncListReferenceImages.java | 54 + .../AsyncListReferenceImagesPaged.java | 62 + .../SyncListReferenceImages.java | 50 + .../SyncListReferenceImagesProductname.java | 44 + .../SyncListReferenceImagesString.java | 44 + .../purgeproducts/AsyncPurgeProducts.java | 50 + .../purgeproducts/AsyncPurgeProductsLRO.java | 52 + .../purgeproducts/SyncPurgeProducts.java | 47 + .../SyncPurgeProductsLocationname.java | 42 + .../SyncPurgeProductsString.java | 42 + .../AsyncRemoveProductFromProductSet.java | 52 + .../SyncRemoveProductFromProductSet.java | 48 + ...omProductSetProductsetnameProductname.java | 44 + ...uctFromProductSetProductsetnameString.java | 44 + ...roductFromProductSetStringProductname.java | 44 + ...moveProductFromProductSetStringString.java | 44 + .../updateproduct/AsyncUpdateProduct.java | 50 + .../updateproduct/SyncUpdateProduct.java | 47 + .../SyncUpdateProductProductFieldmask.java | 43 + .../AsyncUpdateProductSet.java | 51 + .../SyncUpdateProductSet.java | 47 + ...ncUpdateProductSetProductsetFieldmask.java | 43 + .../SyncCreateProductSet.java | 45 + .../SyncBatchAnnotateImages.java | 49 + .../SyncCreateProductSet.java | 46 + .../v1p1beta1/ImageAnnotatorClient.java | 288 + .../v1p1beta1/ImageAnnotatorSettings.java | 209 + .../vision/v1p1beta1/gapic_metadata.json | 21 + .../cloud/vision/v1p1beta1/package-info.java | 43 + .../GrpcImageAnnotatorCallableFactory.java | 115 + .../stub/GrpcImageAnnotatorStub.java | 163 + ...HttpJsonImageAnnotatorCallableFactory.java | 105 + .../stub/HttpJsonImageAnnotatorStub.java | 199 + .../v1p1beta1/stub/ImageAnnotatorStub.java | 43 + .../stub/ImageAnnotatorStubSettings.java | 335 + .../ImageAnnotatorClientHttpJsonTest.java | 118 + .../v1p1beta1/ImageAnnotatorClientTest.java | 116 + .../vision/v1p1beta1/MockImageAnnotator.java | 59 + .../v1p1beta1/MockImageAnnotatorImpl.java | 82 + .../vision/v1p1beta1/ImageAnnotatorGrpc.java | 313 + .../v1p1beta1/AnnotateImageRequest.java | 1346 +++ .../AnnotateImageRequestOrBuilder.java | 107 + .../v1p1beta1/AnnotateImageResponse.java | 4108 +++++++++ .../AnnotateImageResponseOrBuilder.java | 406 + .../v1p1beta1/BatchAnnotateImagesRequest.java | 872 ++ .../BatchAnnotateImagesRequestOrBuilder.java | 53 + .../BatchAnnotateImagesResponse.java | 872 ++ .../BatchAnnotateImagesResponseOrBuilder.java | 53 + .../google/cloud/vision/v1p1beta1/Block.java | 1914 +++++ .../vision/v1p1beta1/BlockOrBuilder.java | 178 + .../cloud/vision/v1p1beta1/BoundingPoly.java | 872 ++ .../v1p1beta1/BoundingPolyOrBuilder.java | 53 + .../cloud/vision/v1p1beta1/ColorInfo.java | 835 ++ .../vision/v1p1beta1/ColorInfoOrBuilder.java | 57 + .../cloud/vision/v1p1beta1/CropHint.java | 845 ++ .../vision/v1p1beta1/CropHintOrBuilder.java | 60 + .../vision/v1p1beta1/CropHintsAnnotation.java | 872 ++ .../CropHintsAnnotationOrBuilder.java | 53 + .../vision/v1p1beta1/CropHintsParams.java | 696 ++ .../v1p1beta1/CropHintsParamsOrBuilder.java | 53 + .../v1p1beta1/DominantColorsAnnotation.java | 872 ++ .../DominantColorsAnnotationOrBuilder.java | 53 + .../vision/v1p1beta1/EntityAnnotation.java | 2468 ++++++ .../v1p1beta1/EntityAnnotationOrBuilder.java | 255 + .../vision/v1p1beta1/FaceAnnotation.java | 4300 ++++++++++ .../v1p1beta1/FaceAnnotationOrBuilder.java | 328 + .../cloud/vision/v1p1beta1/Feature.java | 1109 +++ .../vision/v1p1beta1/FeatureOrBuilder.java | 64 + .../cloud/vision/v1p1beta1/GeometryProto.java | 77 + .../google/cloud/vision/v1p1beta1/Image.java | 781 ++ .../vision/v1p1beta1/ImageAnnotatorProto.java | 475 ++ .../cloud/vision/v1p1beta1/ImageContext.java | 1711 ++++ .../v1p1beta1/ImageContextOrBuilder.java | 186 + .../vision/v1p1beta1/ImageOrBuilder.java | 54 + .../vision/v1p1beta1/ImageProperties.java | 665 ++ .../v1p1beta1/ImagePropertiesOrBuilder.java | 36 + .../cloud/vision/v1p1beta1/ImageSource.java | 859 ++ .../v1p1beta1/ImageSourceOrBuilder.java | 77 + .../cloud/vision/v1p1beta1/LatLongRect.java | 901 ++ .../v1p1beta1/LatLongRectOrBuilder.java | 63 + .../cloud/vision/v1p1beta1/Likelihood.java | 202 + .../cloud/vision/v1p1beta1/LocationInfo.java | 665 ++ .../v1p1beta1/LocationInfoOrBuilder.java | 36 + .../google/cloud/vision/v1p1beta1/Page.java | 1350 +++ .../cloud/vision/v1p1beta1/PageOrBuilder.java | 110 + .../cloud/vision/v1p1beta1/Paragraph.java | 1594 ++++ .../vision/v1p1beta1/ParagraphOrBuilder.java | 159 + .../cloud/vision/v1p1beta1/Position.java | 679 ++ .../vision/v1p1beta1/PositionOrBuilder.java | 39 + .../cloud/vision/v1p1beta1/Property.java | 842 ++ .../vision/v1p1beta1/PropertyOrBuilder.java | 59 + .../v1p1beta1/SafeSearchAnnotation.java | 1102 +++ .../SafeSearchAnnotationOrBuilder.java | 118 + .../google/cloud/vision/v1p1beta1/Symbol.java | 1317 +++ .../vision/v1p1beta1/SymbolOrBuilder.java | 135 + .../vision/v1p1beta1/TextAnnotation.java | 3814 +++++++++ .../v1p1beta1/TextAnnotationOrBuilder.java | 73 + .../vision/v1p1beta1/TextAnnotationProto.java | 187 + .../vision/v1p1beta1/TextDetectionParams.java | 767 ++ .../TextDetectionParamsOrBuilder.java | 62 + .../google/cloud/vision/v1p1beta1/Vertex.java | 591 ++ .../vision/v1p1beta1/VertexOrBuilder.java | 29 + .../cloud/vision/v1p1beta1/WebDetection.java | 7537 ++++++++++++++++ .../v1p1beta1/WebDetectionOrBuilder.java | 288 + .../vision/v1p1beta1/WebDetectionParams.java | 510 ++ .../WebDetectionParamsOrBuilder.java | 19 + .../vision/v1p1beta1/WebDetectionProto.java | 118 + .../google/cloud/vision/v1p1beta1/Word.java | 1617 ++++ .../cloud/vision/v1p1beta1/WordOrBuilder.java | 164 + .../cloud/vision/v1p1beta1/geometry.proto | 53 + .../vision/v1p1beta1/image_annotator.proto | 618 ++ .../vision/v1p1beta1/text_annotation.proto | 251 + .../vision/v1p1beta1/web_detection.proto | 103 + .../AsyncBatchAnnotateImages.java | 51 + .../SyncBatchAnnotateImages.java | 47 + ...nnotateImagesListannotateimagerequest.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncBatchAnnotateImages.java | 49 + .../SyncBatchAnnotateImages.java | 49 + .../v1p2beta1/ImageAnnotatorClient.java | 451 + .../v1p2beta1/ImageAnnotatorSettings.java | 238 + .../vision/v1p2beta1/gapic_metadata.json | 24 + .../cloud/vision/v1p2beta1/package-info.java | 43 + .../GrpcImageAnnotatorCallableFactory.java | 115 + .../stub/GrpcImageAnnotatorStub.java | 213 + ...HttpJsonImageAnnotatorCallableFactory.java | 105 + .../stub/HttpJsonImageAnnotatorStub.java | 293 + .../v1p2beta1/stub/ImageAnnotatorStub.java | 69 + .../stub/ImageAnnotatorStubSettings.java | 421 + .../ImageAnnotatorClientHttpJsonTest.java | 171 + .../v1p2beta1/ImageAnnotatorClientTest.java | 168 + .../vision/v1p2beta1/MockImageAnnotator.java | 59 + .../v1p2beta1/MockImageAnnotatorImpl.java | 104 + .../vision/v1p2beta1/ImageAnnotatorGrpc.java | 419 + .../v1p2beta1/AnnotateFileResponse.java | 1110 +++ .../AnnotateFileResponseOrBuilder.java | 80 + .../v1p2beta1/AnnotateImageRequest.java | 1346 +++ .../AnnotateImageRequestOrBuilder.java | 107 + .../v1p2beta1/AnnotateImageResponse.java | 4356 ++++++++++ .../AnnotateImageResponseOrBuilder.java | 436 + .../v1p2beta1/AsyncAnnotateFileRequest.java | 1580 ++++ .../AsyncAnnotateFileRequestOrBuilder.java | 134 + .../v1p2beta1/AsyncAnnotateFileResponse.java | 665 ++ .../AsyncAnnotateFileResponseOrBuilder.java | 36 + .../AsyncBatchAnnotateFilesRequest.java | 874 ++ ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 + .../AsyncBatchAnnotateFilesResponse.java | 895 ++ ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 + .../v1p2beta1/BatchAnnotateImagesRequest.java | 872 ++ .../BatchAnnotateImagesRequestOrBuilder.java | 53 + .../BatchAnnotateImagesResponse.java | 872 ++ .../BatchAnnotateImagesResponseOrBuilder.java | 53 + .../google/cloud/vision/v1p2beta1/Block.java | 1914 +++++ .../vision/v1p2beta1/BlockOrBuilder.java | 178 + .../cloud/vision/v1p2beta1/BoundingPoly.java | 1312 +++ .../v1p2beta1/BoundingPolyOrBuilder.java | 97 + .../cloud/vision/v1p2beta1/ColorInfo.java | 835 ++ .../vision/v1p2beta1/ColorInfoOrBuilder.java | 57 + .../cloud/vision/v1p2beta1/CropHint.java | 845 ++ .../vision/v1p2beta1/CropHintOrBuilder.java | 60 + .../vision/v1p2beta1/CropHintsAnnotation.java | 872 ++ .../CropHintsAnnotationOrBuilder.java | 53 + .../vision/v1p2beta1/CropHintsParams.java | 696 ++ .../v1p2beta1/CropHintsParamsOrBuilder.java | 53 + .../v1p2beta1/DominantColorsAnnotation.java | 872 ++ .../DominantColorsAnnotationOrBuilder.java | 53 + .../vision/v1p2beta1/EntityAnnotation.java | 2472 ++++++ .../v1p2beta1/EntityAnnotationOrBuilder.java | 256 + .../vision/v1p2beta1/FaceAnnotation.java | 4300 ++++++++++ .../v1p2beta1/FaceAnnotationOrBuilder.java | 328 + .../cloud/vision/v1p2beta1/Feature.java | 1119 +++ .../vision/v1p2beta1/FeatureOrBuilder.java | 65 + .../vision/v1p2beta1/GcsDestination.java | 672 ++ .../v1p2beta1/GcsDestinationOrBuilder.java | 51 + .../cloud/vision/v1p2beta1/GcsSource.java | 602 ++ .../vision/v1p2beta1/GcsSourceOrBuilder.java | 31 + .../cloud/vision/v1p2beta1/GeometryProto.java | 91 + .../google/cloud/vision/v1p2beta1/Image.java | 781 ++ .../v1p2beta1/ImageAnnotationContext.java | 681 ++ .../ImageAnnotationContextOrBuilder.java | 40 + .../vision/v1p2beta1/ImageAnnotatorProto.java | 645 ++ .../cloud/vision/v1p2beta1/ImageContext.java | 1711 ++++ .../v1p2beta1/ImageContextOrBuilder.java | 186 + .../vision/v1p2beta1/ImageOrBuilder.java | 54 + .../vision/v1p2beta1/ImageProperties.java | 665 ++ .../v1p2beta1/ImagePropertiesOrBuilder.java | 36 + .../cloud/vision/v1p2beta1/ImageSource.java | 880 ++ .../v1p2beta1/ImageSourceOrBuilder.java | 83 + .../cloud/vision/v1p2beta1/InputConfig.java | 838 ++ .../v1p2beta1/InputConfigOrBuilder.java | 58 + .../cloud/vision/v1p2beta1/LatLongRect.java | 901 ++ .../v1p2beta1/LatLongRectOrBuilder.java | 63 + .../cloud/vision/v1p2beta1/Likelihood.java | 202 + .../cloud/vision/v1p2beta1/LocationInfo.java | 665 ++ .../v1p2beta1/LocationInfoOrBuilder.java | 36 + .../vision/v1p2beta1/NormalizedVertex.java | 597 ++ .../v1p2beta1/NormalizedVertexOrBuilder.java | 29 + .../vision/v1p2beta1/OperationMetadata.java | 1204 +++ .../v1p2beta1/OperationMetadataOrBuilder.java | 82 + .../cloud/vision/v1p2beta1/OutputConfig.java | 773 ++ .../v1p2beta1/OutputConfigOrBuilder.java | 53 + .../google/cloud/vision/v1p2beta1/Page.java | 1358 +++ .../cloud/vision/v1p2beta1/PageOrBuilder.java | 112 + .../cloud/vision/v1p2beta1/Paragraph.java | 1594 ++++ .../vision/v1p2beta1/ParagraphOrBuilder.java | 159 + .../cloud/vision/v1p2beta1/Position.java | 679 ++ .../vision/v1p2beta1/PositionOrBuilder.java | 39 + .../cloud/vision/v1p2beta1/Property.java | 842 ++ .../vision/v1p2beta1/PropertyOrBuilder.java | 59 + .../v1p2beta1/SafeSearchAnnotation.java | 1102 +++ .../SafeSearchAnnotationOrBuilder.java | 118 + .../google/cloud/vision/v1p2beta1/Symbol.java | 1317 +++ .../vision/v1p2beta1/SymbolOrBuilder.java | 135 + .../vision/v1p2beta1/TextAnnotation.java | 3814 +++++++++ .../v1p2beta1/TextAnnotationOrBuilder.java | 73 + .../vision/v1p2beta1/TextAnnotationProto.java | 187 + .../vision/v1p2beta1/TextDetectionParams.java | 767 ++ .../TextDetectionParamsOrBuilder.java | 62 + .../google/cloud/vision/v1p2beta1/Vertex.java | 591 ++ .../vision/v1p2beta1/VertexOrBuilder.java | 29 + .../cloud/vision/v1p2beta1/WebDetection.java | 7537 ++++++++++++++++ .../v1p2beta1/WebDetectionOrBuilder.java | 288 + .../vision/v1p2beta1/WebDetectionParams.java | 510 ++ .../WebDetectionParamsOrBuilder.java | 19 + .../vision/v1p2beta1/WebDetectionProto.java | 118 + .../google/cloud/vision/v1p2beta1/Word.java | 1617 ++++ .../cloud/vision/v1p2beta1/WordOrBuilder.java | 164 + .../cloud/vision/v1p2beta1/geometry.proto | 67 + .../vision/v1p2beta1/image_annotator.proto | 794 ++ .../vision/v1p2beta1/text_annotation.proto | 258 + .../vision/v1p2beta1/web_detection.proto | 103 + .../AsyncAsyncBatchAnnotateFiles.java | 51 + .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 + .../SyncAsyncBatchAnnotateFiles.java | 48 + ...tateFilesListasyncannotatefilerequest.java | 45 + .../AsyncBatchAnnotateImages.java | 51 + .../SyncBatchAnnotateImages.java | 47 + ...nnotateImagesListannotateimagerequest.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncBatchAnnotateImages.java | 49 + .../SyncBatchAnnotateImages.java | 49 + .../v1p3beta1/ImageAnnotatorClient.java | 451 + .../v1p3beta1/ImageAnnotatorSettings.java | 238 + .../vision/v1p3beta1/ProductSearchClient.java | 3731 ++++++++ .../v1p3beta1/ProductSearchSettings.java | 427 + .../vision/v1p3beta1/gapic_metadata.json | 87 + .../cloud/vision/v1p3beta1/package-info.java | 77 + .../GrpcImageAnnotatorCallableFactory.java | 115 + .../stub/GrpcImageAnnotatorStub.java | 213 + .../GrpcProductSearchCallableFactory.java | 115 + .../v1p3beta1/stub/GrpcProductSearchStub.java | 787 ++ ...HttpJsonImageAnnotatorCallableFactory.java | 105 + .../stub/HttpJsonImageAnnotatorStub.java | 293 + .../HttpJsonProductSearchCallableFactory.java | 105 + .../stub/HttpJsonProductSearchStub.java | 1199 +++ .../v1p3beta1/stub/ImageAnnotatorStub.java | 69 + .../stub/ImageAnnotatorStubSettings.java | 434 + .../v1p3beta1/stub/ProductSearchStub.java | 183 + .../stub/ProductSearchStubSettings.java | 1120 +++ .../ImageAnnotatorClientHttpJsonTest.java | 171 + .../v1p3beta1/ImageAnnotatorClientTest.java | 168 + .../vision/v1p3beta1/MockImageAnnotator.java | 59 + .../v1p3beta1/MockImageAnnotatorImpl.java | 104 + .../vision/v1p3beta1/MockProductSearch.java | 59 + .../v1p3beta1/MockProductSearchImpl.java | 440 + .../ProductSearchClientHttpJsonTest.java | 1901 +++++ .../v1p3beta1/ProductSearchClientTest.java | 1691 ++++ .../vision/v1p3beta1/ImageAnnotatorGrpc.java | 419 + .../vision/v1p3beta1/ProductSearchGrpc.java | 2150 +++++ .../AddProductToProductSetRequest.java | 789 ++ ...ddProductToProductSetRequestOrBuilder.java | 57 + .../v1p3beta1/AnnotateFileResponse.java | 1110 +++ .../AnnotateFileResponseOrBuilder.java | 80 + .../v1p3beta1/AnnotateImageRequest.java | 1346 +++ .../AnnotateImageRequestOrBuilder.java | 107 + .../v1p3beta1/AnnotateImageResponse.java | 5055 +++++++++++ .../AnnotateImageResponseOrBuilder.java | 512 ++ .../v1p3beta1/AsyncAnnotateFileRequest.java | 1580 ++++ .../AsyncAnnotateFileRequestOrBuilder.java | 134 + .../v1p3beta1/AsyncAnnotateFileResponse.java | 665 ++ .../AsyncAnnotateFileResponseOrBuilder.java | 36 + .../AsyncBatchAnnotateFilesRequest.java | 874 ++ ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 + .../AsyncBatchAnnotateFilesResponse.java | 895 ++ ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 + .../v1p3beta1/BatchAnnotateImagesRequest.java | 872 ++ .../BatchAnnotateImagesRequestOrBuilder.java | 53 + .../BatchAnnotateImagesResponse.java | 872 ++ .../BatchAnnotateImagesResponseOrBuilder.java | 53 + .../v1p3beta1/BatchOperationMetadata.java | 1238 +++ .../BatchOperationMetadataOrBuilder.java | 88 + .../google/cloud/vision/v1p3beta1/Block.java | 1914 +++++ .../vision/v1p3beta1/BlockOrBuilder.java | 178 + .../cloud/vision/v1p3beta1/BoundingPoly.java | 1312 +++ .../v1p3beta1/BoundingPolyOrBuilder.java | 97 + .../cloud/vision/v1p3beta1/ColorInfo.java | 835 ++ .../vision/v1p3beta1/ColorInfoOrBuilder.java | 57 + .../v1p3beta1/CreateProductRequest.java | 1032 +++ .../CreateProductRequestOrBuilder.java | 86 + .../v1p3beta1/CreateProductSetRequest.java | 1025 +++ .../CreateProductSetRequestOrBuilder.java | 84 + .../CreateReferenceImageRequest.java | 1044 +++ .../CreateReferenceImageRequestOrBuilder.java | 89 + .../cloud/vision/v1p3beta1/CropHint.java | 845 ++ .../vision/v1p3beta1/CropHintOrBuilder.java | 60 + .../vision/v1p3beta1/CropHintsAnnotation.java | 872 ++ .../CropHintsAnnotationOrBuilder.java | 53 + .../vision/v1p3beta1/CropHintsParams.java | 696 ++ .../v1p3beta1/CropHintsParamsOrBuilder.java | 53 + .../v1p3beta1/DeleteProductRequest.java | 609 ++ .../DeleteProductRequestOrBuilder.java | 33 + .../v1p3beta1/DeleteProductSetRequest.java | 609 ++ .../DeleteProductSetRequestOrBuilder.java | 33 + .../DeleteReferenceImageRequest.java | 609 ++ .../DeleteReferenceImageRequestOrBuilder.java | 33 + .../v1p3beta1/DominantColorsAnnotation.java | 872 ++ .../DominantColorsAnnotationOrBuilder.java | 53 + .../vision/v1p3beta1/EntityAnnotation.java | 2472 ++++++ .../v1p3beta1/EntityAnnotationOrBuilder.java | 256 + .../vision/v1p3beta1/FaceAnnotation.java | 4300 ++++++++++ .../v1p3beta1/FaceAnnotationOrBuilder.java | 328 + .../cloud/vision/v1p3beta1/Feature.java | 1153 +++ .../vision/v1p3beta1/FeatureOrBuilder.java | 65 + .../vision/v1p3beta1/GcsDestination.java | 672 ++ .../v1p3beta1/GcsDestinationOrBuilder.java | 51 + .../cloud/vision/v1p3beta1/GcsSource.java | 602 ++ .../vision/v1p3beta1/GcsSourceOrBuilder.java | 31 + .../cloud/vision/v1p3beta1/GeometryProto.java | 91 + .../vision/v1p3beta1/GetProductRequest.java | 609 ++ .../v1p3beta1/GetProductRequestOrBuilder.java | 33 + .../v1p3beta1/GetProductSetRequest.java | 609 ++ .../GetProductSetRequestOrBuilder.java | 33 + .../v1p3beta1/GetReferenceImageRequest.java | 609 ++ .../GetReferenceImageRequestOrBuilder.java | 33 + .../google/cloud/vision/v1p3beta1/Image.java | 781 ++ .../v1p3beta1/ImageAnnotationContext.java | 681 ++ .../ImageAnnotationContextOrBuilder.java | 40 + .../vision/v1p3beta1/ImageAnnotatorProto.java | 671 ++ .../cloud/vision/v1p3beta1/ImageContext.java | 1947 +++++ .../v1p3beta1/ImageContextOrBuilder.java | 213 + .../vision/v1p3beta1/ImageOrBuilder.java | 54 + .../vision/v1p3beta1/ImageProperties.java | 665 ++ .../v1p3beta1/ImagePropertiesOrBuilder.java | 36 + .../cloud/vision/v1p3beta1/ImageSource.java | 880 ++ .../v1p3beta1/ImageSourceOrBuilder.java | 83 + .../v1p3beta1/ImportProductSetsGcsSource.java | 905 ++ .../ImportProductSetsGcsSourceOrBuilder.java | 117 + .../ImportProductSetsInputConfig.java | 773 ++ ...ImportProductSetsInputConfigOrBuilder.java | 41 + .../v1p3beta1/ImportProductSetsRequest.java | 838 ++ .../ImportProductSetsRequestOrBuilder.java | 58 + .../v1p3beta1/ImportProductSetsResponse.java | 1414 +++ .../ImportProductSetsResponseOrBuilder.java | 117 + .../cloud/vision/v1p3beta1/InputConfig.java | 838 ++ .../v1p3beta1/InputConfigOrBuilder.java | 58 + .../cloud/vision/v1p3beta1/LatLongRect.java | 901 ++ .../v1p3beta1/LatLongRectOrBuilder.java | 63 + .../cloud/vision/v1p3beta1/Likelihood.java | 202 + .../v1p3beta1/ListProductSetsRequest.java | 848 ++ .../ListProductSetsRequestOrBuilder.java | 61 + .../v1p3beta1/ListProductSetsResponse.java | 1045 +++ .../ListProductSetsResponseOrBuilder.java | 75 + .../ListProductsInProductSetRequest.java | 855 ++ ...tProductsInProductSetRequestOrBuilder.java | 63 + .../ListProductsInProductSetResponse.java | 1045 +++ ...ProductsInProductSetResponseOrBuilder.java | 75 + .../vision/v1p3beta1/ListProductsRequest.java | 855 ++ .../ListProductsRequestOrBuilder.java | 63 + .../v1p3beta1/ListProductsResponse.java | 1045 +++ .../ListProductsResponseOrBuilder.java | 75 + .../v1p3beta1/ListReferenceImagesRequest.java | 869 ++ .../ListReferenceImagesRequestOrBuilder.java | 67 + .../ListReferenceImagesResponse.java | 1118 +++ .../ListReferenceImagesResponseOrBuilder.java | 83 + .../v1p3beta1/LocalizedObjectAnnotation.java | 1259 +++ .../LocalizedObjectAnnotationOrBuilder.java | 110 + .../cloud/vision/v1p3beta1/LocationInfo.java | 665 ++ .../v1p3beta1/LocationInfoOrBuilder.java | 36 + .../cloud/vision/v1p3beta1/LocationName.java | 192 + .../vision/v1p3beta1/NormalizedVertex.java | 597 ++ .../v1p3beta1/NormalizedVertexOrBuilder.java | 29 + .../vision/v1p3beta1/OperationMetadata.java | 1204 +++ .../v1p3beta1/OperationMetadataOrBuilder.java | 82 + .../cloud/vision/v1p3beta1/OutputConfig.java | 777 ++ .../v1p3beta1/OutputConfigOrBuilder.java | 54 + .../google/cloud/vision/v1p3beta1/Page.java | 1358 +++ .../cloud/vision/v1p3beta1/PageOrBuilder.java | 112 + .../cloud/vision/v1p3beta1/Paragraph.java | 1594 ++++ .../vision/v1p3beta1/ParagraphOrBuilder.java | 159 + .../cloud/vision/v1p3beta1/Position.java | 679 ++ .../vision/v1p3beta1/PositionOrBuilder.java | 39 + .../cloud/vision/v1p3beta1/Product.java | 2548 ++++++ .../cloud/vision/v1p3beta1/ProductName.java | 223 + .../vision/v1p3beta1/ProductOrBuilder.java | 179 + .../vision/v1p3beta1/ProductSearchParams.java | 1390 +++ .../ProductSearchParamsOrBuilder.java | 160 + .../vision/v1p3beta1/ProductSearchProto.java | 135 + .../v1p3beta1/ProductSearchResults.java | 5384 ++++++++++++ .../ProductSearchResultsOrBuilder.java | 145 + .../v1p3beta1/ProductSearchServiceProto.java | 614 ++ .../cloud/vision/v1p3beta1/ProductSet.java | 1325 +++ .../vision/v1p3beta1/ProductSetName.java | 223 + .../vision/v1p3beta1/ProductSetOrBuilder.java | 126 + .../cloud/vision/v1p3beta1/Property.java | 842 ++ .../vision/v1p3beta1/PropertyOrBuilder.java | 59 + .../vision/v1p3beta1/ReferenceImage.java | 1372 +++ .../vision/v1p3beta1/ReferenceImageName.java | 269 + .../v1p3beta1/ReferenceImageOrBuilder.java | 131 + .../RemoveProductFromProductSetRequest.java | 789 ++ ...ProductFromProductSetRequestOrBuilder.java | 57 + .../v1p3beta1/SafeSearchAnnotation.java | 1102 +++ .../SafeSearchAnnotationOrBuilder.java | 118 + .../google/cloud/vision/v1p3beta1/Symbol.java | 1317 +++ .../vision/v1p3beta1/SymbolOrBuilder.java | 135 + .../vision/v1p3beta1/TextAnnotation.java | 3814 +++++++++ .../v1p3beta1/TextAnnotationOrBuilder.java | 73 + .../vision/v1p3beta1/TextAnnotationProto.java | 187 + .../vision/v1p3beta1/TextDetectionParams.java | 767 ++ .../TextDetectionParamsOrBuilder.java | 62 + .../v1p3beta1/UpdateProductRequest.java | 961 +++ .../UpdateProductRequestOrBuilder.java | 78 + .../v1p3beta1/UpdateProductSetRequest.java | 937 ++ .../UpdateProductSetRequestOrBuilder.java | 72 + .../google/cloud/vision/v1p3beta1/Vertex.java | 591 ++ .../vision/v1p3beta1/VertexOrBuilder.java | 29 + .../cloud/vision/v1p3beta1/WebDetection.java | 7537 ++++++++++++++++ .../v1p3beta1/WebDetectionOrBuilder.java | 288 + .../vision/v1p3beta1/WebDetectionParams.java | 510 ++ .../WebDetectionParamsOrBuilder.java | 19 + .../vision/v1p3beta1/WebDetectionProto.java | 118 + .../google/cloud/vision/v1p3beta1/Word.java | 1617 ++++ .../cloud/vision/v1p3beta1/WordOrBuilder.java | 164 + .../cloud/vision/v1p3beta1/geometry.proto | 68 + .../vision/v1p3beta1/image_annotator.proto | 833 ++ .../vision/v1p3beta1/product_search.proto | 124 + .../v1p3beta1/product_search_service.proto | 971 +++ .../vision/v1p3beta1/text_annotation.proto | 258 + .../vision/v1p3beta1/web_detection.proto | 103 + .../AsyncAsyncBatchAnnotateFiles.java | 51 + .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 + .../SyncAsyncBatchAnnotateFiles.java | 48 + ...tateFilesListasyncannotatefilerequest.java | 45 + .../AsyncBatchAnnotateImages.java | 51 + .../SyncBatchAnnotateImages.java | 47 + ...nnotateImagesListannotateimagerequest.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncBatchAnnotateImages.java | 49 + .../AsyncAddProductToProductSet.java | 52 + .../SyncAddProductToProductSet.java | 48 + ...ToProductSetProductsetnameProductname.java | 44 + ...oductToProductSetProductsetnameString.java | 44 + ...dProductToProductSetStringProductname.java | 44 + ...yncAddProductToProductSetStringString.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../createproduct/AsyncCreateProduct.java | 51 + .../createproduct/SyncCreateProduct.java | 48 + ...reateProductLocationnameProductString.java | 44 + .../SyncCreateProductStringProductString.java | 44 + .../AsyncCreateProductSet.java | 52 + .../SyncCreateProductSet.java | 48 + ...roductSetLocationnameProductsetString.java | 44 + ...reateProductSetStringProductsetString.java | 44 + .../AsyncCreateReferenceImage.java | 52 + .../SyncCreateReferenceImage.java | 48 + ...eImageProductnameReferenceimageString.java | 45 + ...erenceImageStringReferenceimageString.java | 45 + .../deleteproduct/AsyncDeleteProduct.java | 49 + .../deleteproduct/SyncDeleteProduct.java | 46 + .../SyncDeleteProductProductname.java | 42 + .../SyncDeleteProductString.java | 42 + .../AsyncDeleteProductSet.java | 49 + .../SyncDeleteProductSet.java | 46 + .../SyncDeleteProductSetProductsetname.java | 42 + .../SyncDeleteProductSetString.java | 42 + .../AsyncDeleteReferenceImage.java | 52 + .../SyncDeleteReferenceImage.java | 48 + ...eleteReferenceImageReferenceimagename.java | 43 + .../SyncDeleteReferenceImageString.java | 44 + .../getproduct/AsyncGetProduct.java | 49 + .../getproduct/SyncGetProduct.java | 46 + .../getproduct/SyncGetProductProductname.java | 42 + .../getproduct/SyncGetProductString.java | 42 + .../getproductset/AsyncGetProductSet.java | 50 + .../getproductset/SyncGetProductSet.java | 46 + .../SyncGetProductSetProductsetname.java | 42 + .../SyncGetProductSetString.java | 42 + .../AsyncGetReferenceImage.java | 52 + .../SyncGetReferenceImage.java | 48 + ...ncGetReferenceImageReferenceimagename.java | 43 + .../SyncGetReferenceImageString.java | 44 + .../AsyncImportProductSets.java | 52 + .../AsyncImportProductSetsLRO.java | 53 + .../SyncImportProductSets.java | 49 + ...ationnameImportproductsetsinputconfig.java | 46 + ...etsStringImportproductsetsinputconfig.java | 45 + .../listproducts/AsyncListProducts.java | 54 + .../listproducts/AsyncListProductsPaged.java | 61 + .../listproducts/SyncListProducts.java | 50 + .../SyncListProductsLocationname.java | 44 + .../listproducts/SyncListProductsString.java | 44 + .../listproductsets/AsyncListProductSets.java | 54 + .../AsyncListProductSetsPaged.java | 62 + .../listproductsets/SyncListProductSets.java | 50 + .../SyncListProductSetsLocationname.java | 44 + .../SyncListProductSetsString.java | 44 + .../AsyncListProductsInProductSet.java | 54 + .../AsyncListProductsInProductSetPaged.java | 62 + .../SyncListProductsInProductSet.java | 50 + ...istProductsInProductSetProductsetname.java | 44 + .../SyncListProductsInProductSetString.java | 44 + .../AsyncListReferenceImages.java | 54 + .../AsyncListReferenceImagesPaged.java | 62 + .../SyncListReferenceImages.java | 50 + .../SyncListReferenceImagesProductname.java | 44 + .../SyncListReferenceImagesString.java | 44 + .../AsyncRemoveProductFromProductSet.java | 52 + .../SyncRemoveProductFromProductSet.java | 48 + ...omProductSetProductsetnameProductname.java | 44 + ...uctFromProductSetProductsetnameString.java | 44 + ...roductFromProductSetStringProductname.java | 44 + ...moveProductFromProductSetStringString.java | 44 + .../updateproduct/AsyncUpdateProduct.java | 50 + .../updateproduct/SyncUpdateProduct.java | 47 + .../SyncUpdateProductProductFieldmask.java | 43 + .../AsyncUpdateProductSet.java | 51 + .../SyncUpdateProductSet.java | 47 + ...ncUpdateProductSetProductsetFieldmask.java | 43 + .../SyncCreateProductSet.java | 45 + .../SyncBatchAnnotateImages.java | 49 + .../SyncCreateProductSet.java | 46 + .../v1p4beta1/ImageAnnotatorClient.java | 706 ++ .../v1p4beta1/ImageAnnotatorSettings.java | 277 + .../vision/v1p4beta1/ProductSearchClient.java | 3874 +++++++++ .../v1p4beta1/ProductSearchSettings.java | 449 + .../vision/v1p4beta1/gapic_metadata.json | 96 + .../cloud/vision/v1p4beta1/package-info.java | 77 + .../GrpcImageAnnotatorCallableFactory.java | 115 + .../stub/GrpcImageAnnotatorStub.java | 291 + .../GrpcProductSearchCallableFactory.java | 115 + .../v1p4beta1/stub/GrpcProductSearchStub.java | 831 ++ ...HttpJsonImageAnnotatorCallableFactory.java | 105 + .../stub/HttpJsonImageAnnotatorStub.java | 428 + .../HttpJsonProductSearchCallableFactory.java | 105 + .../stub/HttpJsonProductSearchStub.java | 1269 +++ .../v1p4beta1/stub/ImageAnnotatorStub.java | 90 + .../stub/ImageAnnotatorStubSettings.java | 528 ++ .../v1p4beta1/stub/ProductSearchStub.java | 193 + .../stub/ProductSearchStubSettings.java | 1191 +++ .../ImageAnnotatorClientHttpJsonTest.java | 267 + .../v1p4beta1/ImageAnnotatorClientTest.java | 257 + .../vision/v1p4beta1/MockImageAnnotator.java | 59 + .../v1p4beta1/MockImageAnnotatorImpl.java | 147 + .../vision/v1p4beta1/MockProductSearch.java | 59 + .../v1p4beta1/MockProductSearchImpl.java | 461 + .../ProductSearchClientHttpJsonTest.java | 1991 +++++ .../v1p4beta1/ProductSearchClientTest.java | 1775 ++++ .../vision/v1p4beta1/ImageAnnotatorGrpc.java | 635 ++ .../vision/v1p4beta1/ProductSearchGrpc.java | 2300 +++++ .../AddProductToProductSetRequest.java | 789 ++ ...ddProductToProductSetRequestOrBuilder.java | 57 + .../vision/v1p4beta1/AnnotateFileRequest.java | 1651 ++++ .../AnnotateFileRequestOrBuilder.java | 163 + .../v1p4beta1/AnnotateFileResponse.java | 1461 ++++ .../AnnotateFileResponseOrBuilder.java | 125 + .../v1p4beta1/AnnotateImageRequest.java | 1346 +++ .../AnnotateImageRequestOrBuilder.java | 107 + .../v1p4beta1/AnnotateImageResponse.java | 5055 +++++++++++ .../AnnotateImageResponseOrBuilder.java | 512 ++ .../v1p4beta1/AsyncAnnotateFileRequest.java | 1580 ++++ .../AsyncAnnotateFileRequestOrBuilder.java | 134 + .../v1p4beta1/AsyncAnnotateFileResponse.java | 665 ++ .../AsyncAnnotateFileResponseOrBuilder.java | 36 + .../AsyncBatchAnnotateFilesRequest.java | 874 ++ ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 + .../AsyncBatchAnnotateFilesResponse.java | 895 ++ ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 + .../AsyncBatchAnnotateImagesRequest.java | 1108 +++ ...ncBatchAnnotateImagesRequestOrBuilder.java | 80 + .../AsyncBatchAnnotateImagesResponse.java | 665 ++ ...cBatchAnnotateImagesResponseOrBuilder.java | 36 + .../v1p4beta1/BatchAnnotateFilesRequest.java | 895 ++ .../BatchAnnotateFilesRequestOrBuilder.java | 58 + .../v1p4beta1/BatchAnnotateFilesResponse.java | 895 ++ .../BatchAnnotateFilesResponseOrBuilder.java | 58 + .../v1p4beta1/BatchAnnotateImagesRequest.java | 872 ++ .../BatchAnnotateImagesRequestOrBuilder.java | 53 + .../BatchAnnotateImagesResponse.java | 872 ++ .../BatchAnnotateImagesResponseOrBuilder.java | 53 + .../v1p4beta1/BatchOperationMetadata.java | 1238 +++ .../BatchOperationMetadataOrBuilder.java | 88 + .../google/cloud/vision/v1p4beta1/Block.java | 1914 +++++ .../vision/v1p4beta1/BlockOrBuilder.java | 178 + .../cloud/vision/v1p4beta1/BoundingPoly.java | 1312 +++ .../v1p4beta1/BoundingPolyOrBuilder.java | 97 + .../cloud/vision/v1p4beta1/Celebrity.java | 934 ++ .../vision/v1p4beta1/CelebrityOrBuilder.java | 71 + .../vision/v1p4beta1/CelebrityProto.java | 82 + .../cloud/vision/v1p4beta1/ColorInfo.java | 835 ++ .../vision/v1p4beta1/ColorInfoOrBuilder.java | 57 + .../v1p4beta1/CreateProductRequest.java | 1032 +++ .../CreateProductRequestOrBuilder.java | 86 + .../v1p4beta1/CreateProductSetRequest.java | 1025 +++ .../CreateProductSetRequestOrBuilder.java | 84 + .../CreateReferenceImageRequest.java | 1051 +++ .../CreateReferenceImageRequestOrBuilder.java | 91 + .../cloud/vision/v1p4beta1/CropHint.java | 845 ++ .../vision/v1p4beta1/CropHintOrBuilder.java | 60 + .../vision/v1p4beta1/CropHintsAnnotation.java | 872 ++ .../CropHintsAnnotationOrBuilder.java | 53 + .../vision/v1p4beta1/CropHintsParams.java | 696 ++ .../v1p4beta1/CropHintsParamsOrBuilder.java | 53 + .../v1p4beta1/DeleteProductRequest.java | 609 ++ .../DeleteProductRequestOrBuilder.java | 33 + .../v1p4beta1/DeleteProductSetRequest.java | 609 ++ .../DeleteProductSetRequestOrBuilder.java | 33 + .../DeleteReferenceImageRequest.java | 609 ++ .../DeleteReferenceImageRequestOrBuilder.java | 33 + .../v1p4beta1/DominantColorsAnnotation.java | 872 ++ .../DominantColorsAnnotationOrBuilder.java | 53 + .../vision/v1p4beta1/EntityAnnotation.java | 2480 ++++++ .../v1p4beta1/EntityAnnotationOrBuilder.java | 258 + .../vision/v1p4beta1/FaceAnnotation.java | 4832 +++++++++++ .../v1p4beta1/FaceAnnotationOrBuilder.java | 392 + .../v1p4beta1/FaceRecognitionParams.java | 728 ++ .../FaceRecognitionParamsOrBuilder.java | 66 + .../v1p4beta1/FaceRecognitionResult.java | 759 ++ .../FaceRecognitionResultOrBuilder.java | 49 + .../cloud/vision/v1p4beta1/Feature.java | 1153 +++ .../vision/v1p4beta1/FeatureOrBuilder.java | 65 + .../vision/v1p4beta1/GcsDestination.java | 714 ++ .../v1p4beta1/GcsDestinationOrBuilder.java | 63 + .../cloud/vision/v1p4beta1/GcsSource.java | 602 ++ .../vision/v1p4beta1/GcsSourceOrBuilder.java | 31 + .../cloud/vision/v1p4beta1/GeometryProto.java | 91 + .../vision/v1p4beta1/GetProductRequest.java | 609 ++ .../v1p4beta1/GetProductRequestOrBuilder.java | 33 + .../v1p4beta1/GetProductSetRequest.java | 609 ++ .../GetProductSetRequestOrBuilder.java | 33 + .../v1p4beta1/GetReferenceImageRequest.java | 609 ++ .../GetReferenceImageRequestOrBuilder.java | 33 + .../google/cloud/vision/v1p4beta1/Image.java | 781 ++ .../v1p4beta1/ImageAnnotationContext.java | 681 ++ .../ImageAnnotationContextOrBuilder.java | 40 + .../vision/v1p4beta1/ImageAnnotatorProto.java | 765 ++ .../cloud/vision/v1p4beta1/ImageContext.java | 2183 +++++ .../v1p4beta1/ImageContextOrBuilder.java | 240 + .../vision/v1p4beta1/ImageOrBuilder.java | 54 + .../vision/v1p4beta1/ImageProperties.java | 665 ++ .../v1p4beta1/ImagePropertiesOrBuilder.java | 36 + .../cloud/vision/v1p4beta1/ImageSource.java | 880 ++ .../v1p4beta1/ImageSourceOrBuilder.java | 83 + .../v1p4beta1/ImportProductSetsGcsSource.java | 933 ++ .../ImportProductSetsGcsSourceOrBuilder.java | 125 + .../ImportProductSetsInputConfig.java | 773 ++ ...ImportProductSetsInputConfigOrBuilder.java | 41 + .../v1p4beta1/ImportProductSetsRequest.java | 838 ++ .../ImportProductSetsRequestOrBuilder.java | 58 + .../v1p4beta1/ImportProductSetsResponse.java | 1414 +++ .../ImportProductSetsResponseOrBuilder.java | 117 + .../cloud/vision/v1p4beta1/InputConfig.java | 938 ++ .../v1p4beta1/InputConfigOrBuilder.java | 72 + .../cloud/vision/v1p4beta1/LatLongRect.java | 901 ++ .../v1p4beta1/LatLongRectOrBuilder.java | 63 + .../cloud/vision/v1p4beta1/Likelihood.java | 202 + .../v1p4beta1/ListProductSetsRequest.java | 848 ++ .../ListProductSetsRequestOrBuilder.java | 61 + .../v1p4beta1/ListProductSetsResponse.java | 1045 +++ .../ListProductSetsResponseOrBuilder.java | 75 + .../ListProductsInProductSetRequest.java | 855 ++ ...tProductsInProductSetRequestOrBuilder.java | 63 + .../ListProductsInProductSetResponse.java | 1045 +++ ...ProductsInProductSetResponseOrBuilder.java | 75 + .../vision/v1p4beta1/ListProductsRequest.java | 855 ++ .../ListProductsRequestOrBuilder.java | 63 + .../v1p4beta1/ListProductsResponse.java | 1045 +++ .../ListProductsResponseOrBuilder.java | 75 + .../v1p4beta1/ListReferenceImagesRequest.java | 869 ++ .../ListReferenceImagesRequestOrBuilder.java | 67 + .../ListReferenceImagesResponse.java | 1118 +++ .../ListReferenceImagesResponseOrBuilder.java | 83 + .../v1p4beta1/LocalizedObjectAnnotation.java | 1259 +++ .../LocalizedObjectAnnotationOrBuilder.java | 110 + .../cloud/vision/v1p4beta1/LocationInfo.java | 665 ++ .../v1p4beta1/LocationInfoOrBuilder.java | 36 + .../cloud/vision/v1p4beta1/LocationName.java | 192 + .../vision/v1p4beta1/NormalizedVertex.java | 597 ++ .../v1p4beta1/NormalizedVertexOrBuilder.java | 29 + .../vision/v1p4beta1/OperationMetadata.java | 1204 +++ .../v1p4beta1/OperationMetadataOrBuilder.java | 82 + .../cloud/vision/v1p4beta1/OutputConfig.java | 777 ++ .../v1p4beta1/OutputConfigOrBuilder.java | 54 + .../google/cloud/vision/v1p4beta1/Page.java | 1358 +++ .../cloud/vision/v1p4beta1/PageOrBuilder.java | 112 + .../cloud/vision/v1p4beta1/Paragraph.java | 1594 ++++ .../vision/v1p4beta1/ParagraphOrBuilder.java | 159 + .../cloud/vision/v1p4beta1/Position.java | 679 ++ .../vision/v1p4beta1/PositionOrBuilder.java | 39 + .../cloud/vision/v1p4beta1/Product.java | 2617 ++++++ .../cloud/vision/v1p4beta1/ProductName.java | 223 + .../vision/v1p4beta1/ProductOrBuilder.java | 194 + .../vision/v1p4beta1/ProductSearchParams.java | 1404 +++ .../ProductSearchParamsOrBuilder.java | 164 + .../vision/v1p4beta1/ProductSearchProto.java | 135 + .../v1p4beta1/ProductSearchResults.java | 5384 ++++++++++++ .../ProductSearchResultsOrBuilder.java | 145 + .../v1p4beta1/ProductSearchServiceProto.java | 649 ++ .../cloud/vision/v1p4beta1/ProductSet.java | 1337 +++ .../vision/v1p4beta1/ProductSetName.java | 223 + .../vision/v1p4beta1/ProductSetOrBuilder.java | 129 + .../v1p4beta1/ProductSetPurgeConfig.java | 609 ++ .../ProductSetPurgeConfigOrBuilder.java | 33 + .../cloud/vision/v1p4beta1/Property.java | 842 ++ .../vision/v1p4beta1/PropertyOrBuilder.java | 59 + .../v1p4beta1/PurgeProductsRequest.java | 1143 +++ .../PurgeProductsRequestOrBuilder.java | 92 + .../vision/v1p4beta1/ReferenceImage.java | 1372 +++ .../vision/v1p4beta1/ReferenceImageName.java | 269 + .../v1p4beta1/ReferenceImageOrBuilder.java | 131 + .../RemoveProductFromProductSetRequest.java | 796 ++ ...ProductFromProductSetRequestOrBuilder.java | 59 + .../v1p4beta1/SafeSearchAnnotation.java | 1102 +++ .../SafeSearchAnnotationOrBuilder.java | 118 + .../google/cloud/vision/v1p4beta1/Symbol.java | 1317 +++ .../vision/v1p4beta1/SymbolOrBuilder.java | 135 + .../vision/v1p4beta1/TextAnnotation.java | 3814 +++++++++ .../v1p4beta1/TextAnnotationOrBuilder.java | 73 + .../vision/v1p4beta1/TextAnnotationProto.java | 187 + .../vision/v1p4beta1/TextDetectionParams.java | 767 ++ .../TextDetectionParamsOrBuilder.java | 62 + .../v1p4beta1/UpdateProductRequest.java | 961 +++ .../UpdateProductRequestOrBuilder.java | 78 + .../v1p4beta1/UpdateProductSetRequest.java | 937 ++ .../UpdateProductSetRequestOrBuilder.java | 72 + .../google/cloud/vision/v1p4beta1/Vertex.java | 591 ++ .../vision/v1p4beta1/VertexOrBuilder.java | 29 + .../cloud/vision/v1p4beta1/WebDetection.java | 7560 +++++++++++++++++ .../v1p4beta1/WebDetectionOrBuilder.java | 293 + .../vision/v1p4beta1/WebDetectionParams.java | 510 ++ .../WebDetectionParamsOrBuilder.java | 19 + .../vision/v1p4beta1/WebDetectionProto.java | 118 + .../google/cloud/vision/v1p4beta1/Word.java | 1617 ++++ .../cloud/vision/v1p4beta1/WordOrBuilder.java | 164 + .../google/cloud/vision/v1p4beta1/face.proto | 60 + .../cloud/vision/v1p4beta1/geometry.proto | 70 + .../vision/v1p4beta1/image_annotator.proto | 967 +++ .../vision/v1p4beta1/product_search.proto | 127 + .../v1p4beta1/product_search_service.proto | 1039 +++ .../vision/v1p4beta1/text_annotation.proto | 260 + .../vision/v1p4beta1/web_detection.proto | 106 + .../AsyncAsyncBatchAnnotateFiles.java | 51 + .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 + .../SyncAsyncBatchAnnotateFiles.java | 48 + ...tateFilesListasyncannotatefilerequest.java | 45 + .../AsyncAsyncBatchAnnotateImages.java | 53 + .../AsyncAsyncBatchAnnotateImagesLRO.java | 54 + .../SyncAsyncBatchAnnotateImages.java | 50 + ...sListannotateimagerequestOutputconfig.java | 48 + .../AsyncBatchAnnotateFiles.java | 51 + .../SyncBatchAnnotateFiles.java | 47 + ...hAnnotateFilesListannotatefilerequest.java | 44 + .../AsyncBatchAnnotateImages.java | 51 + .../SyncBatchAnnotateImages.java | 47 + ...nnotateImagesListannotateimagerequest.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncBatchAnnotateImages.java | 49 + .../AsyncAddProductToProductSet.java | 52 + .../SyncAddProductToProductSet.java | 48 + ...ToProductSetProductsetnameProductname.java | 44 + ...oductToProductSetProductsetnameString.java | 44 + ...dProductToProductSetStringProductname.java | 44 + ...yncAddProductToProductSetStringString.java | 44 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../createproduct/AsyncCreateProduct.java | 51 + .../createproduct/SyncCreateProduct.java | 48 + ...reateProductLocationnameProductString.java | 44 + .../SyncCreateProductStringProductString.java | 44 + .../AsyncCreateProductSet.java | 52 + .../SyncCreateProductSet.java | 48 + ...roductSetLocationnameProductsetString.java | 44 + ...reateProductSetStringProductsetString.java | 44 + .../AsyncCreateReferenceImage.java | 52 + .../SyncCreateReferenceImage.java | 48 + ...eImageProductnameReferenceimageString.java | 45 + ...erenceImageStringReferenceimageString.java | 45 + .../deleteproduct/AsyncDeleteProduct.java | 49 + .../deleteproduct/SyncDeleteProduct.java | 46 + .../SyncDeleteProductProductname.java | 42 + .../SyncDeleteProductString.java | 42 + .../AsyncDeleteProductSet.java | 49 + .../SyncDeleteProductSet.java | 46 + .../SyncDeleteProductSetProductsetname.java | 42 + .../SyncDeleteProductSetString.java | 42 + .../AsyncDeleteReferenceImage.java | 52 + .../SyncDeleteReferenceImage.java | 48 + ...eleteReferenceImageReferenceimagename.java | 43 + .../SyncDeleteReferenceImageString.java | 44 + .../getproduct/AsyncGetProduct.java | 49 + .../getproduct/SyncGetProduct.java | 46 + .../getproduct/SyncGetProductProductname.java | 42 + .../getproduct/SyncGetProductString.java | 42 + .../getproductset/AsyncGetProductSet.java | 50 + .../getproductset/SyncGetProductSet.java | 46 + .../SyncGetProductSetProductsetname.java | 42 + .../SyncGetProductSetString.java | 42 + .../AsyncGetReferenceImage.java | 52 + .../SyncGetReferenceImage.java | 48 + ...ncGetReferenceImageReferenceimagename.java | 43 + .../SyncGetReferenceImageString.java | 44 + .../AsyncImportProductSets.java | 52 + .../AsyncImportProductSetsLRO.java | 53 + .../SyncImportProductSets.java | 49 + ...ationnameImportproductsetsinputconfig.java | 46 + ...etsStringImportproductsetsinputconfig.java | 45 + .../listproducts/AsyncListProducts.java | 54 + .../listproducts/AsyncListProductsPaged.java | 61 + .../listproducts/SyncListProducts.java | 50 + .../SyncListProductsLocationname.java | 44 + .../listproducts/SyncListProductsString.java | 44 + .../listproductsets/AsyncListProductSets.java | 54 + .../AsyncListProductSetsPaged.java | 62 + .../listproductsets/SyncListProductSets.java | 50 + .../SyncListProductSetsLocationname.java | 44 + .../SyncListProductSetsString.java | 44 + .../AsyncListProductsInProductSet.java | 54 + .../AsyncListProductsInProductSetPaged.java | 62 + .../SyncListProductsInProductSet.java | 50 + ...istProductsInProductSetProductsetname.java | 44 + .../SyncListProductsInProductSetString.java | 44 + .../AsyncListReferenceImages.java | 54 + .../AsyncListReferenceImagesPaged.java | 62 + .../SyncListReferenceImages.java | 50 + .../SyncListReferenceImagesProductname.java | 44 + .../SyncListReferenceImagesString.java | 44 + .../purgeproducts/AsyncPurgeProducts.java | 50 + .../purgeproducts/AsyncPurgeProductsLRO.java | 52 + .../purgeproducts/SyncPurgeProducts.java | 47 + .../SyncPurgeProductsLocationname.java | 42 + .../SyncPurgeProductsString.java | 42 + .../AsyncRemoveProductFromProductSet.java | 52 + .../SyncRemoveProductFromProductSet.java | 48 + ...omProductSetProductsetnameProductname.java | 44 + ...uctFromProductSetProductsetnameString.java | 44 + ...roductFromProductSetStringProductname.java | 44 + ...moveProductFromProductSetStringString.java | 44 + .../updateproduct/AsyncUpdateProduct.java | 50 + .../updateproduct/SyncUpdateProduct.java | 47 + .../SyncUpdateProductProductFieldmask.java | 43 + .../AsyncUpdateProductSet.java | 51 + .../SyncUpdateProductSet.java | 47 + ...ncUpdateProductSetProductsetFieldmask.java | 43 + .../SyncCreateProductSet.java | 45 + .../SyncBatchAnnotateImages.java | 49 + .../SyncCreateProductSet.java | 46 + 1159 files changed, 549113 insertions(+) create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java create mode 100644 owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java create mode 100644 owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto create mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto create mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto create mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java create mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java new file mode 100644 index 000000000000..e4052e59e0cc --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java @@ -0,0 +1,715 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.stub.ImageAnnotatorStub; +import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ImageAnnotatorClient implements BackgroundResource { + private final ImageAnnotatorSettings settings; + private final ImageAnnotatorStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ImageAnnotatorClient with default settings. */ + public static final ImageAnnotatorClient create() throws IOException { + return create(ImageAnnotatorSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) + throws IOException { + return new ImageAnnotatorClient(settings); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ImageAnnotatorSettings). + */ + public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { + return new ImageAnnotatorClient(stub); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ImageAnnotatorClient(ImageAnnotatorStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ImageAnnotatorSettings getSettings() { + return settings; + } + + public ImageAnnotatorStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages( + List requests) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { + return batchAnnotateImagesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateImagesCallable() { + return stub.batchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
+   * }
+   * }
+ * + * @param requests Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateFilesResponse batchAnnotateFiles(List requests) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateFilesRequest request =
+   *       BatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesRequest request) { + return batchAnnotateFilesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateFilesRequest request =
+   *       BatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateFilesCallable() { + return stub.batchAnnotateFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   AsyncBatchAnnotateImagesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get();
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @param outputConfig Required. The desired output location and metadata (e.g. format). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateImagesAsync( + List requests, OutputConfig outputConfig) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(requests) + .setOutputConfig(outputConfig) + .build(); + return asyncBatchAnnotateImagesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   AsyncBatchAnnotateImagesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest request) { + return asyncBatchAnnotateImagesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return stub.asyncBatchAnnotateImagesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateImagesCallable() { + return stub.asyncBatchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
+   * }
+   * }
+ * + * @param requests Required. Individual async file annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(List requests) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return asyncBatchAnnotateFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { + return asyncBatchAnnotateFilesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return stub.asyncBatchAnnotateFilesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setParent("parent-995424086")
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateFilesCallable() { + return stub.asyncBatchAnnotateFilesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java new file mode 100644 index 000000000000..1ca38b946c39 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java @@ -0,0 +1,276 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ImageAnnotatorSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings + batchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings + asyncBatchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateImagesOperationSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateFilesOperationSettings(); + } + + public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) + throws IOException { + return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageAnnotatorStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageAnnotatorStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageAnnotatorSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageAnnotatorStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageAnnotatorSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageAnnotatorStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); + } + + public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { + return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return getStubSettingsBuilder().batchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings.Builder + batchAnnotateFilesSettings() { + return getStubSettingsBuilder().batchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateImagesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); + } + + @Override + public ImageAnnotatorSettings build() throws IOException { + return new ImageAnnotatorSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java new file mode 100644 index 000000000000..07e14db991a5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java @@ -0,0 +1,3873 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.stub.ProductSearchStub; +import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different products + * into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named + * `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ProductSearchSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ProductSearchClient implements BackgroundResource { + private final ProductSearchSettings settings; + private final ProductSearchStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ProductSearchClient with default settings. */ + public static final ProductSearchClient create() throws IOException { + return create(ProductSearchSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ProductSearchClient create(ProductSearchSettings settings) + throws IOException { + return new ProductSearchClient(settings); + } + + /** + * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ProductSearchSettings). + */ + public static final ProductSearchClient create(ProductSearchStub stub) { + return new ProductSearchClient(stub); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ProductSearchClient(ProductSearchSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ProductSearchClient(ProductSearchStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ProductSearchSettings getSettings() { + return settings; + } + + public ProductSearchStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + LocationName parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + String parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ProductSet response = productSearchClient.createProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet(CreateProductSetRequest request) { + return createProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductSetCallable() { + return stub.createProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(LocationName parent) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(String parent) { + ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { + return listProductSetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ProductSet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsPagedCallable() { + return stub.listProductSetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductSetsResponse response =
+   *         productSearchClient.listProductSetsCallable().call(request);
+   *     for (ProductSet element : response.getProductSetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsCallable() { + return stub.listProductSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(ProductSetName name) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(String name) { + GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ProductSet response = productSearchClient.getProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(GetProductSetRequest request) { + return getProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductSetCallable() { + return stub.getProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
+   * }
+   * }
+ * + * @param productSet Required. The ProductSet resource which replaces the one on the server. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * path is `display_name`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(productSet) + .setUpdateMask(updateMask) + .build(); + return updateProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ProductSet response = productSearchClient.updateProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(UpdateProductSetRequest request) { + return updateProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.updateProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductSetCallable() { + return stub.updateProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(ProductSetName name) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(String name) { + DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   productSearchClient.deleteProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(DeleteProductSetRequest request) { + deleteProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductSetCallable() { + return stub.deleteProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(LocationName parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(String parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   Product response = productSearchClient.createProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(CreateProductRequest request) { + return createProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductCallable() { + return stub.createProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(LocationName parent) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(String parent) { + ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(ListProductsRequest request) { + return listProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsPagedCallable() { + return stub.listProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProductsCallable() { + return stub.listProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(ProductName name) { + GetProductRequest request = + GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(String name) { + GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   Product response = productSearchClient.getProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(GetProductRequest request) { + return getProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductCallable() { + return stub.getProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   Product product = Product.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Product response = productSearchClient.updateProduct(product, updateMask);
+   * }
+   * }
+ * + * @param product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * paths include `product_labels`, `display_name`, and `description`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(Product product, FieldMask updateMask) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); + return updateProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Product response = productSearchClient.updateProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(UpdateProductRequest request) { + return updateProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductCallable() { + return stub.updateProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(ProductName name) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(String name) { + DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.deleteProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(DeleteProductRequest request) { + deleteProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductCallable() { + return stub.deleteProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + ProductName parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + String parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { + return createReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createReferenceImageCallable() { + return stub.createReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(ReferenceImageName name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(String name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder().setName(name).build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   productSearchClient.deleteReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(DeleteReferenceImageRequest request) { + deleteReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteReferenceImageCallable() { + return stub.deleteReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder().setParent(parent).build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages( + ListReferenceImagesRequest request) { + return listReferenceImagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReferenceImage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesPagedCallable() { + return stub.listReferenceImagesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListReferenceImagesResponse response =
+   *         productSearchClient.listReferenceImagesCallable().call(request);
+   *     for (ReferenceImage element : response.getReferenceImagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesCallable() { + return stub.listReferenceImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(ReferenceImageName name) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(String name) { + GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { + return getReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReferenceImageCallable() { + return stub.getReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.addProductToProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(AddProductToProductSetRequest request) { + addProductToProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addProductToProductSetCallable() { + return stub.addProductToProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.removeProductFromProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { + removeProductFromProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeProductFromProductSetCallable() { + return stub.removeProductFromProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder().setName(name).build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet( + ListProductsInProductSetRequest request) { + return listProductsInProductSetPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetPagedCallable() { + return stub.listProductsInProductSetPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsInProductSetResponse response =
+   *         productSearchClient.listProductsInProductSetCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetCallable() { + return stub.listProductsInProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInputConfig(inputConfig) + .build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(ImportProductSetsRequest request) { + return importProductSetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportProductSetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return stub.importProductSetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.importProductSetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importProductSetsCallable() { + return stub.importProductSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   productSearchClient.purgeProductsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location in which the Products should be deleted. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync( + LocationName parent) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return purgeProductsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   productSearchClient.purgeProductsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location in which the Products should be deleted. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync(String parent) { + PurgeProductsRequest request = PurgeProductsRequest.newBuilder().setParent(parent).build(); + return purgeProductsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   productSearchClient.purgeProductsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync( + PurgeProductsRequest request) { + return purgeProductsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       productSearchClient.purgeProductsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + purgeProductsOperationCallable() { + return stub.purgeProductsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeProductsCallable() { + return stub.purgeProductsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListProductSetsPagedResponse + extends AbstractPagedListResponse< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductSetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductSetsPagedResponse(ListProductSetsPage page) { + super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductSetsPage + extends AbstractPage< + ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { + + private ListProductSetsPage( + PageContext context, + ListProductSetsResponse response) { + super(context, response); + } + + private static ListProductSetsPage createEmptyPage() { + return new ListProductSetsPage(null, null); + } + + @Override + protected ListProductSetsPage createPage( + PageContext context, + ListProductSetsResponse response) { + return new ListProductSetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductSetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + private ListProductSetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductSetsFixedSizeCollection createEmptyCollection() { + return new ListProductSetsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductSetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductSetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsPagedResponse + extends AbstractPagedListResponse< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsPagedResponse(ListProductsPage page) { + super(page, ListProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsPage + extends AbstractPage { + + private ListProductsPage( + PageContext context, + ListProductsResponse response) { + super(context, response); + } + + private static ListProductsPage createEmptyPage() { + return new ListProductsPage(null, null); + } + + @Override + protected ListProductsPage createPage( + PageContext context, + ListProductsResponse response) { + return new ListProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + private ListProductsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsFixedSizeCollection createEmptyCollection() { + return new ListProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReferenceImagesPagedResponse + extends AbstractPagedListResponse< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListReferenceImagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { + super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReferenceImagesPage + extends AbstractPage< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage> { + + private ListReferenceImagesPage( + PageContext + context, + ListReferenceImagesResponse response) { + super(context, response); + } + + private static ListReferenceImagesPage createEmptyPage() { + return new ListReferenceImagesPage(null, null); + } + + @Override + protected ListReferenceImagesPage createPage( + PageContext + context, + ListReferenceImagesResponse response) { + return new ListReferenceImagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReferenceImagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + private ListReferenceImagesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { + return new ListReferenceImagesFixedSizeCollection(null, 0); + } + + @Override + protected ListReferenceImagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsInProductSetPagedResponse + extends AbstractPagedListResponse< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsInProductSetPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { + super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsInProductSetPage + extends AbstractPage< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage> { + + private ListProductsInProductSetPage( + PageContext + context, + ListProductsInProductSetResponse response) { + super(context, response); + } + + private static ListProductsInProductSetPage createEmptyPage() { + return new ListProductsInProductSetPage(null, null); + } + + @Override + protected ListProductsInProductSetPage createPage( + PageContext + context, + ListProductsInProductSetResponse response) { + return new ListProductsInProductSetPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsInProductSetFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + private ListProductsInProductSetFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { + return new ListProductsInProductSetFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsInProductSetFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java new file mode 100644 index 000000000000..2ba924221d31 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java @@ -0,0 +1,448 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ProductSearchSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).purgeProductsSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return ((ProductSearchStubSettings) getStubSettings()).purgeProductsOperationSettings(); + } + + public static final ProductSearchSettings create(ProductSearchStubSettings stub) + throws IOException { + return new ProductSearchSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProductSearchStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProductSearchStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProductSearchStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProductSearchStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProductSearchSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ProductSearchStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProductSearchSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProductSearchStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProductSearchStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); + } + + public ProductSearchStubSettings.Builder getStubSettingsBuilder() { + return ((ProductSearchStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return getStubSettingsBuilder().createProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return getStubSettingsBuilder().listProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getStubSettingsBuilder().getProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return getStubSettingsBuilder().updateProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return getStubSettingsBuilder().deleteProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return getStubSettingsBuilder().createProductSettings(); + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return getStubSettingsBuilder().listProductsSettings(); + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getStubSettingsBuilder().getProductSettings(); + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return getStubSettingsBuilder().updateProductSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return getStubSettingsBuilder().deleteProductSettings(); + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return getStubSettingsBuilder().createReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return getStubSettingsBuilder().deleteReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return getStubSettingsBuilder().listReferenceImagesSettings(); + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getStubSettingsBuilder().getReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return getStubSettingsBuilder().addProductToProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return getStubSettingsBuilder().removeProductFromProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return getStubSettingsBuilder().listProductsInProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return getStubSettingsBuilder().importProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return getStubSettingsBuilder().importProductSetsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return getStubSettingsBuilder().purgeProductsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder + purgeProductsOperationSettings() { + return getStubSettingsBuilder().purgeProductsOperationSettings(); + } + + @Override + public ProductSearchSettings build() throws IOException { + return new ProductSearchSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json new file mode 100644 index 000000000000..1c4e22191430 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json @@ -0,0 +1,96 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.vision.v1", + "libraryPackage": "com.google.cloud.vision.v1", + "services": { + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "ImageAnnotatorClient", + "rpcs": { + "AsyncBatchAnnotateFiles": { + "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] + }, + "AsyncBatchAnnotateImages": { + "methods": ["asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesOperationCallable", "asyncBatchAnnotateImagesCallable"] + }, + "BatchAnnotateFiles": { + "methods": ["batchAnnotateFiles", "batchAnnotateFiles", "batchAnnotateFilesCallable"] + }, + "BatchAnnotateImages": { + "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] + } + } + } + } + }, + "ProductSearch": { + "clients": { + "grpc": { + "libraryClient": "ProductSearchClient", + "rpcs": { + "AddProductToProductSet": { + "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] + }, + "CreateProduct": { + "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] + }, + "CreateProductSet": { + "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] + }, + "CreateReferenceImage": { + "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] + }, + "DeleteProduct": { + "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] + }, + "DeleteProductSet": { + "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] + }, + "DeleteReferenceImage": { + "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] + }, + "GetProduct": { + "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] + }, + "GetProductSet": { + "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] + }, + "GetReferenceImage": { + "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] + }, + "ImportProductSets": { + "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] + }, + "ListProductSets": { + "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] + }, + "ListProducts": { + "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] + }, + "ListProductsInProductSet": { + "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] + }, + "ListReferenceImages": { + "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] + }, + "PurgeProducts": { + "methods": ["purgeProductsAsync", "purgeProductsAsync", "purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] + }, + "RemoveProductFromProductSet": { + "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] + }, + "UpdateProduct": { + "methods": ["updateProduct", "updateProduct", "updateProductCallable"] + }, + "UpdateProductSet": { + "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java new file mode 100644 index 000000000000..4604adec721f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java @@ -0,0 +1,79 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Cloud Vision API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= ImageAnnotatorClient ======================= + * + *

Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

Sample for ImageAnnotatorClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

======================= ProductSearchClient ======================= + * + *

Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different products + * into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named + * `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

Sample for ProductSearchClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.vision.v1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..48312a70ec58 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java new file mode 100644 index 000000000000..da274e8e871c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java @@ -0,0 +1,313 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.OperationMetadata; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { + private static final MethodDescriptor + batchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateFilesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + batchAnnotateFilesCallable; + private final UnaryCallable + asyncBatchAnnotateImagesCallable; + private final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageAnnotatorStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + batchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + asyncBatchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + asyncBatchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.batchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + batchAnnotateFilesTransportSettings, + settings.batchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateImagesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesOperationSettings(), + clientContext, + operationsStub); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + batchAnnotateFilesCallable() { + return batchAnnotateFilesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + return asyncBatchAnnotateImagesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return asyncBatchAnnotateImagesOperationCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java new file mode 100644 index 000000000000..85024d906c6e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java new file mode 100644 index 000000000000..03a93cca4b21 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java @@ -0,0 +1,826 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.ListProductSetsResponse; +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.ListProductsResponse; +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcProductSearchStub extends ProductSearchStub { + private static final MethodDescriptor + createProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProducts") + .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProduct") + .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProduct") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReferenceImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListReferenceImages") + .setRequestMarshaller( + ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addProductToProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/AddProductToProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeProductFromProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductsInProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ImportProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + purgeProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1.ProductSearch/PurgeProducts") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable + purgeProductsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new GrpcProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { + return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProductSearchStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProductSearchStub( + ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcProductSearchCallableFactory()); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product_set.name", String.valueOf(request.getProductSet().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product.name", String.valueOf(request.getProduct().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listReferenceImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings addProductToProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeProductFromProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductsInProductSetTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings importProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings purgeProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + operationsStub); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..7c06329ac3b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonImageAnnotatorCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java new file mode 100644 index 000000000000..da9cad9772af --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java @@ -0,0 +1,442 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) + .add(AsyncBatchAnnotateImagesResponse.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/images:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*}/images:annotate", + "/v1/{parent=projects/*}/images:annotate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/files:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*}/files:annotate", + "/v1/{parent=projects/*}/files:annotate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateFilesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/images:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate", + "/v1/{parent=projects/*}/images:asyncBatchAnnotate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateImagesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/files:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate", + "/v1/{parent=projects/*}/files:asyncBatchAnnotate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateFilesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + batchAnnotateFilesCallable; + private final UnaryCallable + asyncBatchAnnotateImagesCallable; + private final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonImageAnnotatorStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + batchAnnotateImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateImagesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.batchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + batchAnnotateFilesTransportSettings, + settings.batchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateImagesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchAnnotateImagesMethodDescriptor); + methodDescriptors.add(batchAnnotateFilesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateImagesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + batchAnnotateFilesCallable() { + return batchAnnotateFilesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + return asyncBatchAnnotateImagesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return asyncBatchAnnotateImagesOperationCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java new file mode 100644 index 000000000000..c7f302eca00f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonProductSearchCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java new file mode 100644 index 000000000000..89744b525d7f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java @@ -0,0 +1,1266 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.ListProductSetsResponse; +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.ListProductsResponse; +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonProductSearchStub extends ProductSearchStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(ImportProductSetsResponse.getDescriptor()) + .add(BatchOperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "productSetId", request.getProductSetId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductSets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProductSet") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{productSet.name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "productSet.name", request.getProductSet().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProductSet") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProduct") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "productId", request.getProductId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProducts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProduct") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProduct") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{product.name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "product.name", request.getProduct().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProduct") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateReferenceImage") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "referenceImageId", request.getReferenceImageId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("referenceImage", request.getReferenceImage(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteReferenceImage") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listReferenceImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListReferenceImages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetReferenceImage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + addProductToProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/AddProductToProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/productSets/*}:addProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + removeProductFromProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductsInProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/productSets/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/ImportProductSets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/productSets:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportProductSetsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + purgeProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1.ProductSearch/PurgeProducts") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/products:purge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (PurgeProductsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable + purgeProductsOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProductSearchStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProductSearchStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listReferenceImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + addProductToProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + removeProductFromProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductsInProductSetTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings importProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings purgeProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createProductSetMethodDescriptor); + methodDescriptors.add(listProductSetsMethodDescriptor); + methodDescriptors.add(getProductSetMethodDescriptor); + methodDescriptors.add(updateProductSetMethodDescriptor); + methodDescriptors.add(deleteProductSetMethodDescriptor); + methodDescriptors.add(createProductMethodDescriptor); + methodDescriptors.add(listProductsMethodDescriptor); + methodDescriptors.add(getProductMethodDescriptor); + methodDescriptors.add(updateProductMethodDescriptor); + methodDescriptors.add(deleteProductMethodDescriptor); + methodDescriptors.add(createReferenceImageMethodDescriptor); + methodDescriptors.add(deleteReferenceImageMethodDescriptor); + methodDescriptors.add(listReferenceImagesMethodDescriptor); + methodDescriptors.add(getReferenceImageMethodDescriptor); + methodDescriptors.add(addProductToProductSetMethodDescriptor); + methodDescriptors.add(removeProductFromProductSetMethodDescriptor); + methodDescriptors.add(listProductsInProductSetMethodDescriptor); + methodDescriptors.add(importProductSetsMethodDescriptor); + methodDescriptors.add(purgeProductsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java new file mode 100644 index 000000000000..dad41a2aa111 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java @@ -0,0 +1,88 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ImageAnnotatorStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + batchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); + } + + public UnaryCallable + batchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateFilesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateImagesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateImagesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java new file mode 100644 index 000000000000..86400478a0a2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java @@ -0,0 +1,530 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.OperationMetadata; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorStubSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ImageAnnotatorStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings + batchAnnotateImagesSettings; + private final UnaryCallSettings + batchAnnotateFilesSettings; + private final UnaryCallSettings + asyncBatchAnnotateImagesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings; + private final UnaryCallSettings + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings + batchAnnotateFilesSettings() { + return batchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings + asyncBatchAnnotateImagesSettings() { + return asyncBatchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return asyncBatchAnnotateImagesOperationSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + public ImageAnnotatorStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageAnnotatorStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonImageAnnotatorStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); + batchAnnotateFilesSettings = settingsBuilder.batchAnnotateFilesSettings().build(); + asyncBatchAnnotateImagesSettings = settingsBuilder.asyncBatchAnnotateImagesSettings().build(); + asyncBatchAnnotateImagesOperationSettings = + settingsBuilder.asyncBatchAnnotateImagesOperationSettings().build(); + asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); + asyncBatchAnnotateFilesOperationSettings = + settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); + } + + /** Builder for ImageAnnotatorStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + batchAnnotateImagesSettings; + private final UnaryCallSettings.Builder + batchAnnotateFilesSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateImagesOperationSettings = OperationCallSettings.newBuilder(); + asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, + batchAnnotateFilesSettings, + asyncBatchAnnotateImagesSettings, + asyncBatchAnnotateFilesSettings); + initDefaults(this); + } + + protected Builder(ImageAnnotatorStubSettings settings) { + super(settings); + + batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); + batchAnnotateFilesSettings = settings.batchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateImagesSettings = settings.asyncBatchAnnotateImagesSettings.toBuilder(); + asyncBatchAnnotateImagesOperationSettings = + settings.asyncBatchAnnotateImagesOperationSettings.toBuilder(); + asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateFilesOperationSettings = + settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, + batchAnnotateFilesSettings, + asyncBatchAnnotateImagesSettings, + asyncBatchAnnotateFilesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateImagesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateImagesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + builder + .asyncBatchAnnotateFilesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateFilesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings.Builder + batchAnnotateFilesSettings() { + return batchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings() { + return asyncBatchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return asyncBatchAnnotateImagesOperationSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + @Override + public ImageAnnotatorStubSettings build() throws IOException { + return new ImageAnnotatorStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java new file mode 100644 index 000000000000..c05b0f6c0f3a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java @@ -0,0 +1,191 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.ListProductSetsResponse; +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.ListProductsResponse; +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ProductSearchStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); + } + + public UnaryCallable + listProductSetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); + } + + public UnaryCallable listProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); + } + + public UnaryCallable getProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); + } + + public UnaryCallable updateProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); + } + + public UnaryCallable deleteProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); + } + + public UnaryCallable createProductCallable() { + throw new UnsupportedOperationException("Not implemented: createProductCallable()"); + } + + public UnaryCallable listProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); + } + + public UnaryCallable listProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); + } + + public UnaryCallable getProductCallable() { + throw new UnsupportedOperationException("Not implemented: getProductCallable()"); + } + + public UnaryCallable updateProductCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); + } + + public UnaryCallable deleteProductCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); + } + + public UnaryCallable createReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); + } + + public UnaryCallable deleteReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); + } + + public UnaryCallable + listReferenceImagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); + } + + public UnaryCallable + listReferenceImagesCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); + } + + public UnaryCallable getReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); + } + + public UnaryCallable addProductToProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); + } + + public UnaryCallable + removeProductFromProductSetCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeProductFromProductSetCallable()"); + } + + public UnaryCallable + listProductsInProductSetPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listProductsInProductSetPagedCallable()"); + } + + public UnaryCallable + listProductsInProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); + } + + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importProductSetsOperationCallable()"); + } + + public UnaryCallable importProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); + } + + public OperationCallable + purgeProductsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); + } + + public UnaryCallable purgeProductsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java new file mode 100644 index 000000000000..c5399f28adf5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java @@ -0,0 +1,1187 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.ListProductSetsResponse; +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.ListProductsResponse; +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
+ *     ProductSearchStubSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ProductSearchStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings createProductSetSettings; + private final PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings getProductSetSettings; + private final UnaryCallSettings updateProductSetSettings; + private final UnaryCallSettings deleteProductSetSettings; + private final UnaryCallSettings createProductSettings; + private final PagedCallSettings< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings getProductSettings; + private final UnaryCallSettings updateProductSettings; + private final UnaryCallSettings deleteProductSettings; + private final UnaryCallSettings + createReferenceImageSettings; + private final UnaryCallSettings deleteReferenceImageSettings; + private final PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings + getReferenceImageSettings; + private final UnaryCallSettings + addProductToProductSetSettings; + private final UnaryCallSettings + removeProductFromProductSetSettings; + private final PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings importProductSetsSettings; + private final OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + private final UnaryCallSettings purgeProductsSettings; + private final OperationCallSettings + purgeProductsOperationSettings; + + private static final PagedListDescriptor< + ListProductSetsRequest, ListProductSetsResponse, ProductSet> + LIST_PRODUCT_SETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductSetsRequest injectToken( + ListProductSetsRequest payload, String token) { + return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductSetsRequest injectPageSize( + ListProductSetsRequest payload, int pageSize) { + return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductSetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductSetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductSetsResponse payload) { + return payload.getProductSetsList() == null + ? ImmutableList.of() + : payload.getProductSetsList(); + } + }; + + private static final PagedListDescriptor + LIST_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsRequest injectToken(ListProductsRequest payload, String token) { + return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { + return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> + LIST_REFERENCE_IMAGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReferenceImagesRequest injectToken( + ListReferenceImagesRequest payload, String token) { + return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReferenceImagesRequest injectPageSize( + ListReferenceImagesRequest payload, int pageSize) { + return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReferenceImagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReferenceImagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReferenceImagesResponse payload) { + return payload.getReferenceImagesList() == null + ? ImmutableList.of() + : payload.getReferenceImagesList(); + } + }; + + private static final PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = + new PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsInProductSetRequest injectToken( + ListProductsInProductSetRequest payload, String token) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListProductsInProductSetRequest injectPageSize( + ListProductsInProductSetRequest payload, int pageSize) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListProductsInProductSetRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsInProductSetResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsInProductSetResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + LIST_PRODUCT_SETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductSetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); + return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + LIST_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); + return ListProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + LIST_REFERENCE_IMAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReferenceImagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); + return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListProductsInProductSetRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + pageContext = + PageContext.create( + callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); + return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return createProductSettings; + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return getProductSettings; + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return updateProductSettings; + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + + public ProductSearchStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProductSearchStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProductSearchStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createProductSetSettings = settingsBuilder.createProductSetSettings().build(); + listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); + getProductSetSettings = settingsBuilder.getProductSetSettings().build(); + updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); + deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); + createProductSettings = settingsBuilder.createProductSettings().build(); + listProductsSettings = settingsBuilder.listProductsSettings().build(); + getProductSettings = settingsBuilder.getProductSettings().build(); + updateProductSettings = settingsBuilder.updateProductSettings().build(); + deleteProductSettings = settingsBuilder.deleteProductSettings().build(); + createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); + deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); + listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); + getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); + addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); + removeProductFromProductSetSettings = + settingsBuilder.removeProductFromProductSetSettings().build(); + listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); + importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); + importProductSetsOperationSettings = + settingsBuilder.importProductSetsOperationSettings().build(); + purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); + purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); + } + + /** Builder for ProductSearchStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createProductSetSettings; + private final PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings.Builder getProductSetSettings; + private final UnaryCallSettings.Builder + updateProductSetSettings; + private final UnaryCallSettings.Builder + deleteProductSetSettings; + private final UnaryCallSettings.Builder createProductSettings; + private final PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings.Builder getProductSettings; + private final UnaryCallSettings.Builder updateProductSettings; + private final UnaryCallSettings.Builder deleteProductSettings; + private final UnaryCallSettings.Builder + createReferenceImageSettings; + private final UnaryCallSettings.Builder + deleteReferenceImageSettings; + private final PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings.Builder + getReferenceImageSettings; + private final UnaryCallSettings.Builder + addProductToProductSetSettings; + private final UnaryCallSettings.Builder + removeProductFromProductSetSettings; + private final PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings.Builder + importProductSetsSettings; + private final OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + private final UnaryCallSettings.Builder purgeProductsSettings; + private final OperationCallSettings.Builder + purgeProductsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); + getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); + getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listReferenceImagesSettings = + PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); + getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsInProductSetSettings = + PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); + importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importProductSetsOperationSettings = OperationCallSettings.newBuilder(); + purgeProductsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeProductsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings, + purgeProductsSettings); + initDefaults(this); + } + + protected Builder(ProductSearchStubSettings settings) { + super(settings); + + createProductSetSettings = settings.createProductSetSettings.toBuilder(); + listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); + getProductSetSettings = settings.getProductSetSettings.toBuilder(); + updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); + deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); + createProductSettings = settings.createProductSettings.toBuilder(); + listProductsSettings = settings.listProductsSettings.toBuilder(); + getProductSettings = settings.getProductSettings.toBuilder(); + updateProductSettings = settings.updateProductSettings.toBuilder(); + deleteProductSettings = settings.deleteProductSettings.toBuilder(); + createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); + deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); + listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); + getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); + addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); + removeProductFromProductSetSettings = + settings.removeProductFromProductSetSettings.toBuilder(); + listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); + importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); + importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); + purgeProductsSettings = settings.purgeProductsSettings.toBuilder(); + purgeProductsOperationSettings = settings.purgeProductsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings, + purgeProductsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .deleteProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .deleteProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .listReferenceImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .addProductToProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .removeProductFromProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .listProductsInProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .importProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .purgeProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .importProductSetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportProductSetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + builder + .purgeProductsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return createProductSettings; + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getProductSettings; + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return updateProductSettings; + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + + @Override + public ProductSearchStubSettings build() throws IOException { + return new ProductSearchStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java new file mode 100644 index 000000000000..2abdc0914849 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java @@ -0,0 +1,267 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1.stub.HttpJsonImageAnnotatorStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientHttpJsonTest { + private static MockHttpService mockService; + private static ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonImageAnnotatorStub.getMethodDescriptors(), + ImageAnnotatorSettings.getDefaultEndpoint()); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchAnnotateFilesTest() throws Exception { + BatchAnnotateFilesResponse expectedResponse = + BatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateFiles(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateImagesTest() throws Exception { + AsyncBatchAnnotateImagesResponse expectedResponse = + AsyncBatchAnnotateImagesResponse.newBuilder() + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateImagesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + AsyncBatchAnnotateImagesResponse actualResponse = + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java new file mode 100644 index 000000000000..717684683b5b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientTest { + private static MockImageAnnotator mockImageAnnotator; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageAnnotator = new MockImageAnnotator(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchAnnotateFilesTest() throws Exception { + BatchAnnotateFilesResponse expectedResponse = + BatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateFilesRequest actualRequest = ((BatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateFiles(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateImagesTest() throws Exception { + AsyncBatchAnnotateImagesResponse expectedResponse = + AsyncBatchAnnotateImagesResponse.newBuilder() + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateImagesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + AsyncBatchAnnotateImagesResponse actualResponse = + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateImagesRequest actualRequest = + ((AsyncBatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateFilesRequest actualRequest = + ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java new file mode 100644 index 000000000000..2d54e6ee4686 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotator implements MockGrpcService { + private final MockImageAnnotatorImpl serviceImpl; + + public MockImageAnnotator() { + serviceImpl = new MockImageAnnotatorImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java new file mode 100644 index 000000000000..5499e101268f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java @@ -0,0 +1,147 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { + private List requests; + private Queue responses; + + public MockImageAnnotatorImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchAnnotateImages( + BatchAnnotateImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateImagesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchAnnotateFiles( + BatchAnnotateFilesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateFilesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateFilesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateFilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateImages( + AsyncBatchAnnotateImagesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateFiles( + AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java new file mode 100644 index 000000000000..2afc19424292 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearch implements MockGrpcService { + private final MockProductSearchImpl serviceImpl; + + public MockProductSearch() { + serviceImpl = new MockProductSearchImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java new file mode 100644 index 000000000000..671446dafe57 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java @@ -0,0 +1,461 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1.ProductSearchGrpc.ProductSearchImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearchImpl extends ProductSearchImplBase { + private List requests; + private Queue responses; + + public MockProductSearchImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createProductSet( + CreateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductSets( + ListProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductSetsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductSetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductSetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProductSet( + GetProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProductSet( + UpdateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProductSet( + DeleteProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProduct( + CreateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProducts( + ListProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProduct(GetProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProduct( + UpdateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createReferenceImage( + CreateReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteReferenceImage( + DeleteReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReferenceImages( + ListReferenceImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReferenceImagesResponse) { + requests.add(request); + responseObserver.onNext(((ListReferenceImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReferenceImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getReferenceImage( + GetReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addProductToProductSet( + AddProductToProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeProductFromProductSet( + RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductsInProductSet( + ListProductsInProductSetRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsInProductSetResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsInProductSetResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsInProductSetResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importProductSets( + ImportProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void purgeProducts( + PurgeProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PurgeProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java new file mode 100644 index 000000000000..e28a2d68914e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java @@ -0,0 +1,1991 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1.stub.HttpJsonProductSearchStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientHttpJsonTest { + private static MockHttpService mockService; + private static ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProductSearchStub.getMethodDescriptors(), + ProductSearchSettings.getDefaultEndpoint()); + ProductSearchSettings settings = + ProductSearchSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeProductsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeProductsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java new file mode 100644 index 000000000000..aa5c5ef77e9a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java @@ -0,0 +1,1775 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientTest { + private static MockProductSearch mockProductSearch; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() { + mockProductSearch = new MockProductSearch(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProductSearchSettings settings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeProductsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeProductsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + String parent = "parent-995424086"; + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java new file mode 100644 index 000000000000..4ed54f5f8c89 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java @@ -0,0 +1,635 @@ +package com.google.cloud.vision.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Service that performs Google Cloud Vision API detection tasks over client
+ * images, such as face, landmark, logo, label, and text detection. The
+ * ImageAnnotator service returns detected entities from the images.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1/image_annotator.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", + requestType = com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, + responseType = com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) + .build(); + } + } + } + return getBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateFiles", + requestType = com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, + responseType = com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; + if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateFilesMethod = getBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateFiles")) + .build(); + } + } + } + return getBatchAnnotateFilesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateImages", + requestType = com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; + if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod = getAsyncBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateImages")) + .build(); + } + } + } + return getAsyncBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", + requestType = com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) + .build(); + } + } + } + return getAsyncBatchAnnotateFilesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + }; + return ImageAnnotatorStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageAnnotatorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + }; + return ImageAnnotatorBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ImageAnnotatorFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + }; + return ImageAnnotatorFutureStub.newStub(factory, channel); + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public void batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateFilesMethod(), responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public void asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1.BatchAnnotateImagesResponse>( + this, METHODID_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.BatchAnnotateFilesRequest, + com.google.cloud.vision.v1.BatchAnnotateFilesResponse>( + this, METHODID_BATCH_ANNOTATE_FILES))) + .addMethod( + getAsyncBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getAsyncBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) + .build(); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { + private ImageAnnotatorStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public void batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public void asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ImageAnnotatorBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.cloud.vision.v1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public com.google.cloud.vision.v1.BatchAnnotateFilesResponse batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateFilesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { + private ImageAnnotatorFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( + com.google.cloud.vision.v1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateFiles( + com.google.cloud.vision.v1.BatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateImages( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; + private static final int METHODID_BATCH_ANNOTATE_FILES = 1; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_IMAGES = 2; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ImageAnnotatorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_ANNOTATE_IMAGES: + serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1.BatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_ANNOTATE_FILES: + serviceImpl.batchAnnotateFiles((com.google.cloud.vision.v1.BatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_IMAGES: + serviceImpl.asyncBatchAnnotateImages((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_FILES: + serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageAnnotatorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageAnnotator"); + } + } + + private static final class ImageAnnotatorFileDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier { + ImageAnnotatorFileDescriptorSupplier() {} + } + + private static final class ImageAnnotatorMethodDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageAnnotatorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ImageAnnotatorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) + .addMethod(getBatchAnnotateImagesMethod()) + .addMethod(getBatchAnnotateFilesMethod()) + .addMethod(getAsyncBatchAnnotateImagesMethod()) + .addMethod(getAsyncBatchAnnotateFilesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java new file mode 100644 index 000000000000..313f6ffa7ead --- /dev/null +++ b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java @@ -0,0 +1,2280 @@ +package com.google.cloud.vision.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages Products and ProductSets of reference images for use in product
+ * search. It uses the following resource model:
+ * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
+ * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+ * products into groups to limit identification.
+ * In parallel,
+ * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
+ *   `projects/*/locations/*/products/*`
+ * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+ *   `projects/*/locations/*/products/*/referenceImages/*`
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1/product_search_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ProductSearchGrpc { + + private ProductSearchGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1.ProductSearch"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", + requestType = com.google.cloud.vision.v1.CreateProductSetRequest.class, + responseType = com.google.cloud.vision.v1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductSetMethod() { + io.grpc.MethodDescriptor getCreateProductSetMethod; + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) + .build(); + } + } + } + return getCreateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductSets", + requestType = com.google.cloud.vision.v1.ListProductSetsRequest.class, + responseType = com.google.cloud.vision.v1.ListProductSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductSetsMethod() { + io.grpc.MethodDescriptor getListProductSetsMethod; + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) + .build(); + } + } + } + return getListProductSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProductSet", + requestType = com.google.cloud.vision.v1.GetProductSetRequest.class, + responseType = com.google.cloud.vision.v1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductSetMethod() { + io.grpc.MethodDescriptor getGetProductSetMethod; + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) + .build(); + } + } + } + return getGetProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", + requestType = com.google.cloud.vision.v1.UpdateProductSetRequest.class, + responseType = com.google.cloud.vision.v1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { + io.grpc.MethodDescriptor getUpdateProductSetMethod; + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) + .build(); + } + } + } + return getUpdateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", + requestType = com.google.cloud.vision.v1.DeleteProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { + io.grpc.MethodDescriptor getDeleteProductSetMethod; + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) + .build(); + } + } + } + return getDeleteProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProduct", + requestType = com.google.cloud.vision.v1.CreateProductRequest.class, + responseType = com.google.cloud.vision.v1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductMethod() { + io.grpc.MethodDescriptor getCreateProductMethod; + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) + .build(); + } + } + } + return getCreateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProducts", + requestType = com.google.cloud.vision.v1.ListProductsRequest.class, + responseType = com.google.cloud.vision.v1.ListProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsMethod() { + io.grpc.MethodDescriptor getListProductsMethod; + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + ProductSearchGrpc.getListProductsMethod = getListProductsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) + .build(); + } + } + } + return getListProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProduct", + requestType = com.google.cloud.vision.v1.GetProductRequest.class, + responseType = com.google.cloud.vision.v1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductMethod() { + io.grpc.MethodDescriptor getGetProductMethod; + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + ProductSearchGrpc.getGetProductMethod = getGetProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) + .build(); + } + } + } + return getGetProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", + requestType = com.google.cloud.vision.v1.UpdateProductRequest.class, + responseType = com.google.cloud.vision.v1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductMethod() { + io.grpc.MethodDescriptor getUpdateProductMethod; + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) + .build(); + } + } + } + return getUpdateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", + requestType = com.google.cloud.vision.v1.DeleteProductRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductMethod() { + io.grpc.MethodDescriptor getDeleteProductMethod; + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) + .build(); + } + } + } + return getDeleteProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", + requestType = com.google.cloud.vision.v1.CreateReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { + io.grpc.MethodDescriptor getCreateReferenceImageMethod; + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) + .build(); + } + } + } + return getCreateReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", + requestType = com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { + io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) + .build(); + } + } + } + return getDeleteReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", + requestType = com.google.cloud.vision.v1.ListReferenceImagesRequest.class, + responseType = com.google.cloud.vision.v1.ListReferenceImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { + io.grpc.MethodDescriptor getListReferenceImagesMethod; + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) + .build(); + } + } + } + return getListReferenceImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", + requestType = com.google.cloud.vision.v1.GetReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { + io.grpc.MethodDescriptor getGetReferenceImageMethod; + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) + .build(); + } + } + } + return getGetReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", + requestType = com.google.cloud.vision.v1.AddProductToProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { + io.grpc.MethodDescriptor getAddProductToProductSetMethod; + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) + .build(); + } + } + } + return getAddProductToProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", + requestType = com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { + io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) + .build(); + } + } + } + return getRemoveProductFromProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", + requestType = com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, + responseType = com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { + io.grpc.MethodDescriptor getListProductsInProductSetMethod; + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) + .build(); + } + } + } + return getListProductsInProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", + requestType = com.google.cloud.vision.v1.ImportProductSetsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getImportProductSetsMethod() { + io.grpc.MethodDescriptor getImportProductSetsMethod; + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) + .build(); + } + } + } + return getImportProductSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getPurgeProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", + requestType = com.google.cloud.vision.v1.PurgeProductsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPurgeProductsMethod() { + io.grpc.MethodDescriptor getPurgeProductsMethod; + if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { + ProductSearchGrpc.getPurgeProductsMethod = getPurgeProductsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("PurgeProducts")) + .build(); + } + } + } + return getPurgeProductsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ProductSearchStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + }; + return ProductSearchStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProductSearchBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + }; + return ProductSearchBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ProductSearchFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + }; + return ProductSearchFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static abstract class ProductSearchImplBase implements io.grpc.BindableService { + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public void purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPurgeProductsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.CreateProductSetRequest, + com.google.cloud.vision.v1.ProductSet>( + this, METHODID_CREATE_PRODUCT_SET))) + .addMethod( + getListProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.ListProductSetsRequest, + com.google.cloud.vision.v1.ListProductSetsResponse>( + this, METHODID_LIST_PRODUCT_SETS))) + .addMethod( + getGetProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.GetProductSetRequest, + com.google.cloud.vision.v1.ProductSet>( + this, METHODID_GET_PRODUCT_SET))) + .addMethod( + getUpdateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.UpdateProductSetRequest, + com.google.cloud.vision.v1.ProductSet>( + this, METHODID_UPDATE_PRODUCT_SET))) + .addMethod( + getDeleteProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.DeleteProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT_SET))) + .addMethod( + getCreateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.CreateProductRequest, + com.google.cloud.vision.v1.Product>( + this, METHODID_CREATE_PRODUCT))) + .addMethod( + getListProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.ListProductsRequest, + com.google.cloud.vision.v1.ListProductsResponse>( + this, METHODID_LIST_PRODUCTS))) + .addMethod( + getGetProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.GetProductRequest, + com.google.cloud.vision.v1.Product>( + this, METHODID_GET_PRODUCT))) + .addMethod( + getUpdateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.UpdateProductRequest, + com.google.cloud.vision.v1.Product>( + this, METHODID_UPDATE_PRODUCT))) + .addMethod( + getDeleteProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.DeleteProductRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT))) + .addMethod( + getCreateReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.CreateReferenceImageRequest, + com.google.cloud.vision.v1.ReferenceImage>( + this, METHODID_CREATE_REFERENCE_IMAGE))) + .addMethod( + getDeleteReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.DeleteReferenceImageRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_REFERENCE_IMAGE))) + .addMethod( + getListReferenceImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.ListReferenceImagesRequest, + com.google.cloud.vision.v1.ListReferenceImagesResponse>( + this, METHODID_LIST_REFERENCE_IMAGES))) + .addMethod( + getGetReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.GetReferenceImageRequest, + com.google.cloud.vision.v1.ReferenceImage>( + this, METHODID_GET_REFERENCE_IMAGE))) + .addMethod( + getAddProductToProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.AddProductToProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) + .addMethod( + getRemoveProductFromProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) + .addMethod( + getListProductsInProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.ListProductsInProductSetRequest, + com.google.cloud.vision.v1.ListProductsInProductSetResponse>( + this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) + .addMethod( + getImportProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.ImportProductSetsRequest, + com.google.longrunning.Operation>( + this, METHODID_IMPORT_PRODUCT_SETS))) + .addMethod( + getPurgeProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1.PurgeProductsRequest, + com.google.longrunning.Operation>( + this, METHODID_PURGE_PRODUCTS))) + .build(); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { + private ProductSearchStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public void purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ProductSearchBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1.ProductSet createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1.ProductSet getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1.ProductSet updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.cloud.vision.v1.Product createProduct(com.google.cloud.vision.v1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1.ListProductsResponse listProducts(com.google.cloud.vision.v1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1.Product getProduct(com.google.cloud.vision.v1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.cloud.vision.v1.Product updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.cloud.vision.v1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportProductSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeProductsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { + private ProductSearchFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProductSet( + com.google.cloud.vision.v1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductSets( + com.google.cloud.vision.v1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProductSet( + com.google.cloud.vision.v1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProductSet( + com.google.cloud.vision.v1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProductSet( + com.google.cloud.vision.v1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProduct( + com.google.cloud.vision.v1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProducts( + com.google.cloud.vision.v1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProduct( + com.google.cloud.vision.v1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProduct( + com.google.cloud.vision.v1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProduct( + com.google.cloud.vision.v1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createReferenceImage( + com.google.cloud.vision.v1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( + com.google.cloud.vision.v1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listReferenceImages( + com.google.cloud.vision.v1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getReferenceImage( + com.google.cloud.vision.v1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( + com.google.cloud.vision.v1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( + com.google.cloud.vision.v1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture importProductSets( + com.google.cloud.vision.v1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
+     * progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture purgeProducts( + com.google.cloud.vision.v1.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PRODUCT_SET = 0; + private static final int METHODID_LIST_PRODUCT_SETS = 1; + private static final int METHODID_GET_PRODUCT_SET = 2; + private static final int METHODID_UPDATE_PRODUCT_SET = 3; + private static final int METHODID_DELETE_PRODUCT_SET = 4; + private static final int METHODID_CREATE_PRODUCT = 5; + private static final int METHODID_LIST_PRODUCTS = 6; + private static final int METHODID_GET_PRODUCT = 7; + private static final int METHODID_UPDATE_PRODUCT = 8; + private static final int METHODID_DELETE_PRODUCT = 9; + private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; + private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; + private static final int METHODID_LIST_REFERENCE_IMAGES = 12; + private static final int METHODID_GET_REFERENCE_IMAGE = 13; + private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; + private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; + private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; + private static final int METHODID_IMPORT_PRODUCT_SETS = 17; + private static final int METHODID_PURGE_PRODUCTS = 18; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ProductSearchImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRODUCT_SET: + serviceImpl.createProductSet((com.google.cloud.vision.v1.CreateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCT_SETS: + serviceImpl.listProductSets((com.google.cloud.vision.v1.ListProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT_SET: + serviceImpl.getProductSet((com.google.cloud.vision.v1.GetProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT_SET: + serviceImpl.updateProductSet((com.google.cloud.vision.v1.UpdateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT_SET: + serviceImpl.deleteProductSet((com.google.cloud.vision.v1.DeleteProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_PRODUCT: + serviceImpl.createProduct((com.google.cloud.vision.v1.CreateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS: + serviceImpl.listProducts((com.google.cloud.vision.v1.ListProductsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT: + serviceImpl.getProduct((com.google.cloud.vision.v1.GetProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT: + serviceImpl.updateProduct((com.google.cloud.vision.v1.UpdateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT: + serviceImpl.deleteProduct((com.google.cloud.vision.v1.DeleteProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REFERENCE_IMAGE: + serviceImpl.createReferenceImage((com.google.cloud.vision.v1.CreateReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REFERENCE_IMAGE: + serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1.DeleteReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REFERENCE_IMAGES: + serviceImpl.listReferenceImages((com.google.cloud.vision.v1.ListReferenceImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REFERENCE_IMAGE: + serviceImpl.getReferenceImage((com.google.cloud.vision.v1.GetReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: + serviceImpl.addProductToProductSet((com.google.cloud.vision.v1.AddProductToProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: + serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: + serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1.ListProductsInProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_PRODUCT_SETS: + serviceImpl.importProductSets((com.google.cloud.vision.v1.ImportProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_PRODUCTS: + serviceImpl.purgeProducts((com.google.cloud.vision.v1.PurgeProductsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProductSearchBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ProductSearch"); + } + } + + private static final class ProductSearchFileDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier { + ProductSearchFileDescriptorSupplier() {} + } + + private static final class ProductSearchMethodDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ProductSearchMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ProductSearchGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) + .addMethod(getCreateProductSetMethod()) + .addMethod(getListProductSetsMethod()) + .addMethod(getGetProductSetMethod()) + .addMethod(getUpdateProductSetMethod()) + .addMethod(getDeleteProductSetMethod()) + .addMethod(getCreateProductMethod()) + .addMethod(getListProductsMethod()) + .addMethod(getGetProductMethod()) + .addMethod(getUpdateProductMethod()) + .addMethod(getDeleteProductMethod()) + .addMethod(getCreateReferenceImageMethod()) + .addMethod(getDeleteReferenceImageMethod()) + .addMethod(getListReferenceImagesMethod()) + .addMethod(getGetReferenceImageMethod()) + .addMethod(getAddProductToProductSetMethod()) + .addMethod(getRemoveProductFromProductSetMethod()) + .addMethod(getListProductsInProductSetMethod()) + .addMethod(getImportProductSetsMethod()) + .addMethod(getPurgeProductsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java new file mode 100644 index 000000000000..a8a51a48fabd --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `AddProductToProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AddProductToProductSetRequest} + */ +public final class AddProductToProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AddProductToProductSetRequest) + AddProductToProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AddProductToProductSetRequest.newBuilder() to construct. + private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddProductToProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddProductToProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AddProductToProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1.AddProductToProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AddProductToProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1.AddProductToProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AddProductToProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `AddProductToProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AddProductToProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AddProductToProductSetRequest) + com.google.cloud.vision.v1.AddProductToProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1.AddProductToProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AddProductToProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AddProductToProductSetRequest build() { + com.google.cloud.vision.v1.AddProductToProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AddProductToProductSetRequest buildPartial() { + com.google.cloud.vision.v1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1.AddProductToProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AddProductToProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.AddProductToProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AddProductToProductSetRequest other) { + if (other == com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AddProductToProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AddProductToProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AddProductToProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AddProductToProductSetRequest) + private static final com.google.cloud.vision.v1.AddProductToProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AddProductToProductSetRequest(); + } + + public static com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddProductToProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AddProductToProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..3ccc82663e49 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface AddProductToProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AddProductToProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java new file mode 100644 index 000000000000..82f59e618332 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java @@ -0,0 +1,1651 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateFileRequest} + */ +public final class AnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateFileRequest) + AnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileRequest.newBuilder() to construct. + private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + pages_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + pages_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + pages_.addInt(input.readInt32()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + pages_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + pages_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + pages_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateFileRequest.class, com.google.cloud.vision.v1.AnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int PAGES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList pages_; + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + @java.lang.Override + public java.util.List + getPagesList() { + return pages_; + } + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + public int getPages(int index) { + return pages_.getInt(index); + } + private int pagesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (getPagesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(pagesMemoizedSerializedSize); + } + for (int i = 0; i < pages_.size(); i++) { + output.writeInt32NoTag(pages_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + { + int dataSize = 0; + for (int i = 0; i < pages_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(pages_.getInt(i)); + } + size += dataSize; + if (!getPagesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + pagesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AnnotateFileRequest other = (com.google.cloud.vision.v1.AnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateFileRequest) + com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateFileRequest.class, com.google.cloud.vision.v1.AnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + pages_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequest build() { + com.google.cloud.vision.v1.AnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1.AnnotateFileRequest result = new com.google.cloud.vision.v1.AnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + pages_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pages_ = pages_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1.AnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.protobuf.Internal.IntList pages_ = emptyIntList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pages_ = mutableCopy(pages_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + public java.util.List + getPagesList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(pages_) : pages_; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + public int getPagesCount() { + return pages_.size(); + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + public int getPages(int index) { + return pages_.getInt(index); + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param index The index to set the value at. + * @param value The pages to set. + * @return This builder for chaining. + */ + public Builder setPages( + int index, int value) { + ensurePagesIsMutable(); + pages_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param value The pages to add. + * @return This builder for chaining. + */ + public Builder addPages(int value) { + ensurePagesIsMutable(); + pages_.addInt(value); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param values The pages to add. + * @return This builder for chaining. + */ + public Builder addAllPages( + java.lang.Iterable values) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return This builder for chaining. + */ + public Builder clearPages() { + pages_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileRequest) + private static final com.google.cloud.vision.v1.AnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..f327adc50195 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + java.util.List getPagesList(); + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + int getPagesCount(); + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + int getPages(int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java new file mode 100644 index 000000000000..72ca9f8c8e26 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java @@ -0,0 +1,1461 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response to a single file annotation request. A file may contain one or more
+ * images, which individually have their own responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateFileResponse} + */ +public final class AnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateFileResponse) + AnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileResponse.newBuilder() to construct. + private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + case 24: { + + totalPages_ = input.readInt32(); + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateFileResponse.class, com.google.cloud.vision.v1.AnnotateFileResponse.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.InputConfig inputConfig_; + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int RESPONSES_FIELD_NUMBER = 2; + private java.util.List responses_; + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + public static final int TOTAL_PAGES_FIELD_NUMBER = 3; + private int totalPages_; + /** + *
+   * This field gives the total number of pages in the file.
+   * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + @java.lang.Override + public int getTotalPages() { + return totalPages_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(2, responses_.get(i)); + } + if (totalPages_ != 0) { + output.writeInt32(3, totalPages_); + } + if (error_ != null) { + output.writeMessage(4, getError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, responses_.get(i)); + } + if (totalPages_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, totalPages_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AnnotateFileResponse other = (com.google.cloud.vision.v1.AnnotateFileResponse) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (getTotalPages() + != other.getTotalPages()) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER; + hash = (53 * hash) + getTotalPages(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a single file annotation request. A file may contain one or more
+   * images, which individually have their own responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateFileResponse) + com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateFileResponse.class, com.google.cloud.vision.v1.AnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + totalPages_ = 0; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponse build() { + com.google.cloud.vision.v1.AnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1.AnnotateFileResponse result = new com.google.cloud.vision.v1.AnnotateFileResponse(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + result.totalPages_ = totalPages_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1.AnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + if (other.getTotalPages() != 0) { + setTotalPages(other.getTotalPages()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses(com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + + private int totalPages_ ; + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + @java.lang.Override + public int getTotalPages() { + return totalPages_; + } + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @param value The totalPages to set. + * @return This builder for chaining. + */ + public Builder setTotalPages(int value) { + + totalPages_ = value; + onChanged(); + return this; + } + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @return This builder for chaining. + */ + public Builder clearTotalPages() { + + totalPages_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileResponse) + private static final com.google.cloud.vision.v1.AnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..1ddb75d724bf --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1.InputConfig getInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); + + /** + *
+   * This field gives the total number of pages in the file.
+   * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + int getTotalPages(); + + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java new file mode 100644 index 000000000000..ea56a6e5930c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request for performing Google Cloud Vision API tasks over a user-provided
+ * image, with user-requested features, and with context information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.google.cloud.vision.v1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateImageRequest.class, com.google.cloud.vision.v1.AnnotateImageRequest.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.Image image_; + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return The image. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Image getImage() { + return image_ == null ? com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AnnotateImageRequest other = (com.google.cloud.vision.v1.AnnotateImageRequest) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for performing Google Cloud Vision API tasks over a user-provided
+   * image, with user-requested features, and with context information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageRequest) + com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateImageRequest.class, com.google.cloud.vision.v1.AnnotateImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AnnotateImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest build() { + com.google.cloud.vision.v1.AnnotateImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest buildPartial() { + com.google.cloud.vision.v1.AnnotateImageRequest result = new com.google.cloud.vision.v1.AnnotateImageRequest(this); + int from_bitField0_ = bitField0_; + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AnnotateImageRequest) { + return mergeFrom((com.google.cloud.vision.v1.AnnotateImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageRequest other) { + if (other == com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AnnotateImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AnnotateImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder> imageBuilder_; + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return The image. + */ + public com.google.cloud.vision.v1.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public Builder setImage(com.google.cloud.vision.v1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public Builder setImage( + com.google.cloud.vision.v1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public Builder mergeImage(com.google.cloud.vision.v1.Image value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.google.cloud.vision.v1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public com.google.cloud.vision.v1.Image.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + public com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageRequest) + private static final com.google.cloud.vision.v1.AnnotateImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageRequest(); + } + + public static com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java new file mode 100644 index 000000000000..7b911ccf595a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AnnotateImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + * @return The image. + */ + com.google.cloud.vision.v1.Image getImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1.Image image = 1; + */ + com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder(); + + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.Feature getFeatures(int index); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java new file mode 100644 index 000000000000..4a705032fadb --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java @@ -0,0 +1,5055 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response to an image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + faceAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.FaceAnnotation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + landmarkAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + logoAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labelAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + textAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.cloud.vision.v1.SafeSearchAnnotation.Builder subBuilder = null; + if (safeSearchAnnotation_ != null) { + subBuilder = safeSearchAnnotation_.toBuilder(); + } + safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1.SafeSearchAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(safeSearchAnnotation_); + safeSearchAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.cloud.vision.v1.ImageProperties.Builder subBuilder = null; + if (imagePropertiesAnnotation_ != null) { + subBuilder = imagePropertiesAnnotation_.toBuilder(); + } + imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1.ImageProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imagePropertiesAnnotation_); + imagePropertiesAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.google.cloud.vision.v1.CropHintsAnnotation.Builder subBuilder = null; + if (cropHintsAnnotation_ != null) { + subBuilder = cropHintsAnnotation_.toBuilder(); + } + cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1.CropHintsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsAnnotation_); + cropHintsAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1.TextAnnotation.Builder subBuilder = null; + if (fullTextAnnotation_ != null) { + subBuilder = fullTextAnnotation_.toBuilder(); + } + fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullTextAnnotation_); + fullTextAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.vision.v1.WebDetection.Builder subBuilder = null; + if (webDetection_ != null) { + subBuilder = webDetection_.toBuilder(); + } + webDetection_ = input.readMessage(com.google.cloud.vision.v1.WebDetection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetection_); + webDetection_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + com.google.cloud.vision.v1.ProductSearchResults.Builder subBuilder = null; + if (productSearchResults_ != null) { + subBuilder = productSearchResults_.toBuilder(); + } + productSearchResults_ = input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchResults_); + productSearchResults_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.google.cloud.vision.v1.ImageAnnotationContext.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.cloud.vision.v1.ImageAnnotationContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + localizedObjectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.LocalizedObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class); + } + + public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List faceAnnotations_; + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List getFaceAnnotationsList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List + getFaceAnnotationsOrBuilderList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public int getFaceAnnotationsCount() { + return faceAnnotations_.size(); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) { + return faceAnnotations_.get(index); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + return faceAnnotations_.get(index); + } + + public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List landmarkAnnotations_; + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List getLandmarkAnnotationsList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public int getLandmarkAnnotationsCount() { + return landmarkAnnotations_.size(); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) { + return landmarkAnnotations_.get(index); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + return landmarkAnnotations_.get(index); + } + + public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List logoAnnotations_; + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List getLogoAnnotationsList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List + getLogoAnnotationsOrBuilderList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public int getLogoAnnotationsCount() { + return logoAnnotations_.size(); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) { + return logoAnnotations_.get(index); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + return logoAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List labelAnnotations_; + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) { + return labelAnnotations_.get(index); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + return labelAnnotations_.get(index); + } + + public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; + private java.util.List localizedObjectAnnotations_; + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List getLocalizedObjectAnnotationsList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public int getLocalizedObjectAnnotationsCount() { + return localizedObjectAnnotations_.size(); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + return localizedObjectAnnotations_.get(index); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + return localizedObjectAnnotations_.get(index); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List textAnnotations_; + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List getTextAnnotationsList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + return textAnnotations_.get(index); + } + + public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_; + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + @java.lang.Override + public boolean hasFullTextAnnotation() { + return fullTextAnnotation_ != null; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + return getFullTextAnnotation(); + } + + public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_; + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + @java.lang.Override + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotation_ != null; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + return getSafeSearchAnnotation(); + } + + public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; + private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_; + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + @java.lang.Override + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ != null; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + return getImagePropertiesAnnotation(); + } + + public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; + private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_; + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + @java.lang.Override + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotation_ != null; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + return getCropHintsAnnotation(); + } + + public static final int WEB_DETECTION_FIELD_NUMBER = 13; + private com.google.cloud.vision.v1.WebDetection webDetection_; + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + @java.lang.Override + public boolean hasWebDetection() { + return webDetection_ != null; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return The webDetection. + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection getWebDetection() { + return webDetection_ == null ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + return getWebDetection(); + } + + public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; + private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_; + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + @java.lang.Override + public boolean hasProductSearchResults() { + return productSearchResults_ != null; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() { + return productSearchResults_ == null ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + return getProductSearchResults(); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CONTEXT_FIELD_NUMBER = 21; + private com.google.cloud.vision.v1.ImageAnnotationContext context_; + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return The context. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContext getContext() { + return context_ == null ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < faceAnnotations_.size(); i++) { + output.writeMessage(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + output.writeMessage(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + output.writeMessage(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + output.writeMessage(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + output.writeMessage(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + if (cropHintsAnnotation_ != null) { + output.writeMessage(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + output.writeMessage(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + output.writeMessage(13, getWebDetection()); + } + if (productSearchResults_ != null) { + output.writeMessage(14, getProductSearchResults()); + } + if (context_ != null) { + output.writeMessage(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + output.writeMessage(22, localizedObjectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < faceAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getError()); + } + if (cropHintsAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getWebDetection()); + } + if (productSearchResults_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getProductSearchResults()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, localizedObjectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AnnotateImageResponse other = (com.google.cloud.vision.v1.AnnotateImageResponse) obj; + + if (!getFaceAnnotationsList() + .equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList() + .equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList() + .equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList() + .equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList() + .equals(other.getLocalizedObjectAnnotationsList())) return false; + if (!getTextAnnotationsList() + .equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; + if (hasFullTextAnnotation()) { + if (!getFullTextAnnotation() + .equals(other.getFullTextAnnotation())) return false; + } + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; + if (hasSafeSearchAnnotation()) { + if (!getSafeSearchAnnotation() + .equals(other.getSafeSearchAnnotation())) return false; + } + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; + if (hasImagePropertiesAnnotation()) { + if (!getImagePropertiesAnnotation() + .equals(other.getImagePropertiesAnnotation())) return false; + } + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; + if (hasCropHintsAnnotation()) { + if (!getCropHintsAnnotation() + .equals(other.getCropHintsAnnotation())) return false; + } + if (hasWebDetection() != other.hasWebDetection()) return false; + if (hasWebDetection()) { + if (!getWebDetection() + .equals(other.getWebDetection())) return false; + } + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; + if (hasProductSearchResults()) { + if (!getProductSearchResults() + .equals(other.getProductSearchResults())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFaceAnnotationsCount() > 0) { + hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFaceAnnotationsList().hashCode(); + } + if (getLandmarkAnnotationsCount() > 0) { + hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); + } + if (getLogoAnnotationsCount() > 0) { + hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLogoAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (getLocalizedObjectAnnotationsCount() > 0) { + hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (hasFullTextAnnotation()) { + hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getFullTextAnnotation().hashCode(); + } + if (hasSafeSearchAnnotation()) { + hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); + } + if (hasImagePropertiesAnnotation()) { + hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); + } + if (hasCropHintsAnnotation()) { + hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsAnnotation().hashCode(); + } + if (hasWebDetection()) { + hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + getWebDetection().hashCode(); + } + if (hasProductSearchResults()) { + hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchResults().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageResponse) + com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AnnotateImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFaceAnnotationsFieldBuilder(); + getLandmarkAnnotationsFieldBuilder(); + getLogoAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getLocalizedObjectAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + faceAnnotationsBuilder_.clear(); + } + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + landmarkAnnotationsBuilder_.clear(); + } + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + logoAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelAnnotationsBuilder_.clear(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + textAnnotationsBuilder_.clear(); + } + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + if (webDetectionBuilder_ == null) { + webDetection_ = null; + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse build() { + com.google.cloud.vision.v1.AnnotateImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { + com.google.cloud.vision.v1.AnnotateImageResponse result = new com.google.cloud.vision.v1.AnnotateImageResponse(this); + int from_bitField0_ = bitField0_; + if (faceAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.faceAnnotations_ = faceAnnotations_; + } else { + result.faceAnnotations_ = faceAnnotationsBuilder_.build(); + } + if (landmarkAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.landmarkAnnotations_ = landmarkAnnotations_; + } else { + result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); + } + if (logoAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.logoAnnotations_ = logoAnnotations_; + } else { + result.logoAnnotations_ = logoAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.localizedObjectAnnotations_ = localizedObjectAnnotations_; + } else { + result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (fullTextAnnotationBuilder_ == null) { + result.fullTextAnnotation_ = fullTextAnnotation_; + } else { + result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); + } + if (safeSearchAnnotationBuilder_ == null) { + result.safeSearchAnnotation_ = safeSearchAnnotation_; + } else { + result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); + } + if (imagePropertiesAnnotationBuilder_ == null) { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; + } else { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); + } + if (cropHintsAnnotationBuilder_ == null) { + result.cropHintsAnnotation_ = cropHintsAnnotation_; + } else { + result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); + } + if (webDetectionBuilder_ == null) { + result.webDetection_ = webDetection_; + } else { + result.webDetection_ = webDetectionBuilder_.build(); + } + if (productSearchResultsBuilder_ == null) { + result.productSearchResults_ = productSearchResults_; + } else { + result.productSearchResults_ = productSearchResultsBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AnnotateImageResponse) { + return mergeFrom((com.google.cloud.vision.v1.AnnotateImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageResponse other) { + if (other == com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()) return this; + if (faceAnnotationsBuilder_ == null) { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotations_.isEmpty()) { + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.addAll(other.faceAnnotations_); + } + onChanged(); + } + } else { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotationsBuilder_.isEmpty()) { + faceAnnotationsBuilder_.dispose(); + faceAnnotationsBuilder_ = null; + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + faceAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFaceAnnotationsFieldBuilder() : null; + } else { + faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); + } + } + } + if (landmarkAnnotationsBuilder_ == null) { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotations_.isEmpty()) { + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.addAll(other.landmarkAnnotations_); + } + onChanged(); + } + } else { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotationsBuilder_.isEmpty()) { + landmarkAnnotationsBuilder_.dispose(); + landmarkAnnotationsBuilder_ = null; + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + landmarkAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarkAnnotationsFieldBuilder() : null; + } else { + landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); + } + } + } + if (logoAnnotationsBuilder_ == null) { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotations_.isEmpty()) { + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.addAll(other.logoAnnotations_); + } + onChanged(); + } + } else { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotationsBuilder_.isEmpty()) { + logoAnnotationsBuilder_.dispose(); + logoAnnotationsBuilder_ = null; + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + logoAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogoAnnotationsFieldBuilder() : null; + } else { + logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLabelAnnotationsFieldBuilder() : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotations_.isEmpty()) { + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); + } + onChanged(); + } + } else { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotationsBuilder_.isEmpty()) { + localizedObjectAnnotationsBuilder_.dispose(); + localizedObjectAnnotationsBuilder_ = null; + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + localizedObjectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocalizedObjectAnnotationsFieldBuilder() : null; + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); + } + } + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextAnnotationsFieldBuilder() : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (other.hasFullTextAnnotation()) { + mergeFullTextAnnotation(other.getFullTextAnnotation()); + } + if (other.hasSafeSearchAnnotation()) { + mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); + } + if (other.hasImagePropertiesAnnotation()) { + mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); + } + if (other.hasCropHintsAnnotation()) { + mergeCropHintsAnnotation(other.getCropHintsAnnotation()); + } + if (other.hasWebDetection()) { + mergeWebDetection(other.getWebDetection()); + } + if (other.hasProductSearchResults()) { + mergeProductSearchResults(other.getProductSearchResults()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AnnotateImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AnnotateImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List faceAnnotations_ = + java.util.Collections.emptyList(); + private void ensureFaceAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; + + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public java.util.List getFaceAnnotationsList() { + if (faceAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } else { + return faceAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public int getFaceAnnotationsCount() { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.size(); + } else { + return faceAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); + } else { + return faceAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations(com.google.cloud.vision.v1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder addAllFaceAnnotations( + java.lang.Iterable values) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, faceAnnotations_); + onChanged(); + } else { + faceAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder clearFaceAnnotations() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + faceAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public Builder removeFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.remove(index); + onChanged(); + } else { + faceAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Builder getFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); } else { + return faceAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsOrBuilderList() { + if (faceAnnotationsBuilder_ != null) { + return faceAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { + return getFaceAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsBuilderList() { + return getFaceAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder> + getFaceAnnotationsFieldBuilder() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder>( + faceAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + faceAnnotations_ = null; + } + return faceAnnotationsBuilder_; + } + + private java.util.List landmarkAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLandmarkAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; + + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List getLandmarkAnnotationsList() { + if (landmarkAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } else { + return landmarkAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public int getLandmarkAnnotationsCount() { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.size(); + } else { + return landmarkAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); + } else { + return landmarkAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addAllLandmarkAnnotations( + java.lang.Iterable values) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarkAnnotations_); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder clearLandmarkAnnotations() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + landmarkAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public Builder removeLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.remove(index); + onChanged(); + } else { + landmarkAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); } else { + return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + if (landmarkAnnotationsBuilder_ != null) { + return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsBuilderList() { + return getLandmarkAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> + getLandmarkAnnotationsFieldBuilder() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( + landmarkAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + landmarkAnnotations_ = null; + } + return landmarkAnnotationsBuilder_; + } + + private java.util.List logoAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLogoAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; + + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List getLogoAnnotationsList() { + if (logoAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } else { + return logoAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public int getLogoAnnotationsCount() { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.size(); + } else { + return logoAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); + } else { + return logoAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder addAllLogoAnnotations( + java.lang.Iterable values) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logoAnnotations_); + onChanged(); + } else { + logoAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder clearLogoAnnotations() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + logoAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public Builder removeLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.remove(index); + onChanged(); + } else { + logoAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder getLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); } else { + return logoAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsOrBuilderList() { + if (logoAnnotationsBuilder_ != null) { + return logoAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { + return getLogoAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsBuilderList() { + return getLogoAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> + getLogoAnnotationsFieldBuilder() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( + logoAnnotations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + logoAnnotations_ = null; + } + return logoAnnotationsBuilder_; + } + + private java.util.List labelAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; + + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public java.util.List getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder getLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private java.util.List localizedObjectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLocalizedObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; + + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List getLocalizedObjectAnnotationsList() { + if (localizedObjectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } else { + return localizedObjectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public int getLocalizedObjectAnnotationsCount() { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.size(); + } else { + return localizedObjectAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); + } else { + return localizedObjectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addAllLocalizedObjectAnnotations( + java.lang.Iterable values) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, localizedObjectAnnotations_); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder clearLocalizedObjectAnnotations() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder removeLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.remove(index); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); } else { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + if (localizedObjectAnnotationsBuilder_ != null) { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsBuilderList() { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder> + getLocalizedObjectAnnotationsFieldBuilder() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>( + localizedObjectAnnotations_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + localizedObjectAnnotations_ = null; + } + return localizedObjectAnnotationsBuilder_; + } + + private java.util.List textAnnotations_ = + java.util.Collections.emptyList(); + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(textAnnotations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; + + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public java.util.List getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder addAllTextAnnotations( + java.lang.Iterable values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder getTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + public boolean hasFullTextAnnotation() { + return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } else { + return fullTextAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullTextAnnotation_ = value; + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation( + com.google.cloud.vision.v1.TextAnnotation.Builder builderForValue) { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = builderForValue.build(); + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (fullTextAnnotation_ != null) { + fullTextAnnotation_ = + com.google.cloud.vision.v1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); + } else { + fullTextAnnotation_ = value; + } + onChanged(); + } else { + fullTextAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public Builder clearFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + onChanged(); + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1.TextAnnotation.Builder getFullTextAnnotationBuilder() { + + onChanged(); + return getFullTextAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + if (fullTextAnnotationBuilder_ != null) { + return fullTextAnnotationBuilder_.getMessageOrBuilder(); + } else { + return fullTextAnnotation_ == null ? + com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder> + getFullTextAnnotationFieldBuilder() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder>( + getFullTextAnnotation(), + getParentForChildren(), + isClean()); + fullTextAnnotation_ = null; + } + return fullTextAnnotationBuilder_; + } + + private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } else { + return safeSearchAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safeSearchAnnotation_ = value; + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation( + com.google.cloud.vision.v1.SafeSearchAnnotation.Builder builderForValue) { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = builderForValue.build(); + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (safeSearchAnnotation_ != null) { + safeSearchAnnotation_ = + com.google.cloud.vision.v1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); + } else { + safeSearchAnnotation_ = value; + } + onChanged(); + } else { + safeSearchAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder clearSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + onChanged(); + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { + + onChanged(); + return getSafeSearchAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + if (safeSearchAnnotationBuilder_ != null) { + return safeSearchAnnotationBuilder_.getMessageOrBuilder(); + } else { + return safeSearchAnnotation_ == null ? + com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder> + getSafeSearchAnnotationFieldBuilder() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>( + getSafeSearchAnnotation(), + getParentForChildren(), + isClean()); + safeSearchAnnotation_ = null; + } + return safeSearchAnnotationBuilder_; + } + + private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } else { + return imagePropertiesAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imagePropertiesAnnotation_ = value; + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation( + com.google.cloud.vision.v1.ImageProperties.Builder builderForValue) { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = builderForValue.build(); + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (imagePropertiesAnnotation_ != null) { + imagePropertiesAnnotation_ = + com.google.cloud.vision.v1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); + } else { + imagePropertiesAnnotation_ = value; + } + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public Builder clearImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + onChanged(); + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { + + onChanged(); + return getImagePropertiesAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + if (imagePropertiesAnnotationBuilder_ != null) { + return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); + } else { + return imagePropertiesAnnotation_ == null ? + com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder> + getImagePropertiesAnnotationFieldBuilder() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder>( + getImagePropertiesAnnotation(), + getParentForChildren(), + isClean()); + imagePropertiesAnnotation_ = null; + } + return imagePropertiesAnnotationBuilder_; + } + + private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } else { + return cropHintsAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsAnnotation_ = value; + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation( + com.google.cloud.vision.v1.CropHintsAnnotation.Builder builderForValue) { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = builderForValue.build(); + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (cropHintsAnnotation_ != null) { + cropHintsAnnotation_ = + com.google.cloud.vision.v1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); + } else { + cropHintsAnnotation_ = value; + } + onChanged(); + } else { + cropHintsAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder clearCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + onChanged(); + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { + + onChanged(); + return getCropHintsAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + if (cropHintsAnnotationBuilder_ != null) { + return cropHintsAnnotationBuilder_.getMessageOrBuilder(); + } else { + return cropHintsAnnotation_ == null ? + com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder> + getCropHintsAnnotationFieldBuilder() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder>( + getCropHintsAnnotation(), + getParentForChildren(), + isClean()); + cropHintsAnnotation_ = null; + } + return cropHintsAnnotationBuilder_; + } + + private com.google.cloud.vision.v1.WebDetection webDetection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder> webDetectionBuilder_; + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + public boolean hasWebDetection() { + return webDetectionBuilder_ != null || webDetection_ != null; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return The webDetection. + */ + public com.google.cloud.vision.v1.WebDetection getWebDetection() { + if (webDetectionBuilder_ == null) { + return webDetection_ == null ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; + } else { + return webDetectionBuilder_.getMessage(); + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public Builder setWebDetection(com.google.cloud.vision.v1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetection_ = value; + onChanged(); + } else { + webDetectionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public Builder setWebDetection( + com.google.cloud.vision.v1.WebDetection.Builder builderForValue) { + if (webDetectionBuilder_ == null) { + webDetection_ = builderForValue.build(); + onChanged(); + } else { + webDetectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public Builder mergeWebDetection(com.google.cloud.vision.v1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (webDetection_ != null) { + webDetection_ = + com.google.cloud.vision.v1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); + } else { + webDetection_ = value; + } + onChanged(); + } else { + webDetectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public Builder clearWebDetection() { + if (webDetectionBuilder_ == null) { + webDetection_ = null; + onChanged(); + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1.WebDetection.Builder getWebDetectionBuilder() { + + onChanged(); + return getWebDetectionFieldBuilder().getBuilder(); + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + if (webDetectionBuilder_ != null) { + return webDetectionBuilder_.getMessageOrBuilder(); + } else { + return webDetection_ == null ? + com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder> + getWebDetectionFieldBuilder() { + if (webDetectionBuilder_ == null) { + webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder>( + getWebDetection(), + getParentForChildren(), + isClean()); + webDetection_ = null; + } + return webDetectionBuilder_; + } + + private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + public boolean hasProductSearchResults() { + return productSearchResultsBuilder_ != null || productSearchResults_ != null; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + return productSearchResults_ == null ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } else { + return productSearchResultsBuilder_.getMessage(); + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchResults_ = value; + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults( + com.google.cloud.vision.v1.ProductSearchResults.Builder builderForValue) { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = builderForValue.build(); + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public Builder mergeProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (productSearchResults_ != null) { + productSearchResults_ = + com.google.cloud.vision.v1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); + } else { + productSearchResults_ = value; + } + onChanged(); + } else { + productSearchResultsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public Builder clearProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + onChanged(); + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Builder getProductSearchResultsBuilder() { + + onChanged(); + return getProductSearchResultsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + if (productSearchResultsBuilder_ != null) { + return productSearchResultsBuilder_.getMessageOrBuilder(); + } else { + return productSearchResults_ == null ? + com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder> + getProductSearchResultsFieldBuilder() { + if (productSearchResultsBuilder_ == null) { + productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder>( + getProductSearchResults(), + getParentForChildren(), + isClean()); + productSearchResults_ = null; + } + return productSearchResultsBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.vision.v1.ImageAnnotationContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder> contextBuilder_; + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return The context. + */ + public com.google.cloud.vision.v1.ImageAnnotationContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public Builder setContext(com.google.cloud.vision.v1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public Builder setContext( + com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public Builder mergeContext(com.google.cloud.vision.v1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.cloud.vision.v1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1.ImageAnnotationContext.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageResponse) + private static final com.google.cloud.vision.v1.AnnotateImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageResponse(); + } + + public static com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java new file mode 100644 index 000000000000..bb7b499d15fd --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java @@ -0,0 +1,512 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AnnotateImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + int getFaceAnnotationsCount(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsOrBuilderList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + int getLandmarkAnnotationsCount(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsOrBuilderList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + int getLogoAnnotationsCount(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsOrBuilderList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + int getLabelAnnotationsCount(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + int getLocalizedObjectAnnotationsCount(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsOrBuilderList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + int getTextAnnotationsCount(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + boolean hasFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); + + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + boolean hasSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); + + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + boolean hasImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); + + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + boolean hasCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); + + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + boolean hasWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return The webDetection. + */ + com.google.cloud.vision.v1.WebDetection getWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder(); + + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + boolean hasProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); + + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return The context. + */ + com.google.cloud.vision.v1.ImageAnnotationContext getContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java new file mode 100644 index 000000000000..56dd08ed0a71 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java @@ -0,0 +1,1580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * An offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileRequest} + */ +public final class AsyncAnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncAnnotateFileRequest) + AsyncAnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileRequest.newBuilder() to construct. + private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (outputConfig_ != null) { + output.writeMessage(4, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncAnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1.AsyncAnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncAnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncAnnotateFileRequest) + com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncAnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest build() { + com.google.cloud.vision.v1.AsyncAnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1.AsyncAnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncAnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1.AsyncAnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncAnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncAnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncAnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileRequest) + private static final com.google.cloud.vision.v1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncAnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..ef0dcf234962 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncAnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncAnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1.Feature features = 2; + */ + com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + com.google.cloud.vision.v1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java new file mode 100644 index 000000000000..012a4e6bf3a7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The response for a single offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileResponse} + */ +public final class AsyncAnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncAnnotateFileResponse) + AsyncAnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileResponse.newBuilder() to construct. + private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncAnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1.AsyncAnnotateFileResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncAnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response for a single offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncAnnotateFileResponse) + com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncAnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse build() { + com.google.cloud.vision.v1.AsyncAnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1.AsyncAnnotateFileResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncAnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1.AsyncAnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncAnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncAnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncAnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileResponse) + private static final com.google.cloud.vision.v1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncAnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..4fd2be4908db --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncAnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncAnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..c4b7a415f794 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java @@ -0,0 +1,1089 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Multiple async file annotation requests are batched into a single service
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} + */ +public final class AsyncBatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) + AsyncBatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. + private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple async file annotation requests are batched into a single service
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..983e9da91490 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncBatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); + + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..4ec8298c6aad --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response to an async batch file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} + */ +public final class AsyncBatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) + AsyncBatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. + private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..29a29014543a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncBatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..f72dad167b9f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java @@ -0,0 +1,1323 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request for async image annotation for a list of images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} + */ +public final class AsyncBatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) + AsyncBatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateImagesRequest.newBuilder() to construct. + private AsyncBatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOutputConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for async image annotation for a list of images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..0fa4ae93f847 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncBatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + com.google.cloud.vision.v1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..68726c318726 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response to an async batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} + */ +public final class AsyncBatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) + AsyncBatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateImagesResponse.newBuilder() to construct. + private AsyncBatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateImagesResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse other = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse result = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..7398872f2e8f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface AsyncBatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..6d3f945fc7a5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java @@ -0,0 +1,1110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A list of requests to annotate files using the BatchAnnotateFiles API.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesRequest} + */ +public final class BatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateFilesRequest) + BatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateFilesRequest.newBuilder() to construct. + private BatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateFileRequest.parser(), extensionRegistry)); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.BatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int PARENT_FIELD_NUMBER = 3; + private volatile java.lang.Object parent_; + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 3; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 3; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.BatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of requests to annotate files using the BatchAnnotateFiles API.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateFilesRequest) + com.google.cloud.vision.v1.BatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.BatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1.BatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1.BatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.BatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only one
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 3; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 3; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 3; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 3; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 3; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1.BatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..9d124d4cc779 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface BatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index); + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only one
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); + + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 3; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 3; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..3a17d52d3c00 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A list of file annotation responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesResponse} + */ +public final class BatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateFilesResponse) + BatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateFilesResponse.newBuilder() to construct. + private BatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.BatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BatchAnnotateFilesResponse other = (com.google.cloud.vision.v1.BatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of file annotation responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateFilesResponse) + com.google.cloud.vision.v1.BatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.BatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1.BatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1.BatchAnnotateFilesResponse result = new com.google.cloud.vision.v1.BatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1.BatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..e83b9af3a077 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface BatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..8716b59a3e4f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java @@ -0,0 +1,1087 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Multiple image annotation requests are batched into a single service call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesRequest} + */ +public final class BatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateImagesRequest) + BatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesRequest.newBuilder() to construct. + private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.BatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1.BatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple image annotation requests are batched into a single service call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateImagesRequest) + com.google.cloud.vision.v1.BatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.BatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1.BatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1.BatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Optional. Target project and location to make a call.
+     * Format: `projects/{project-id}/locations/{location-id}`.
+     * If no parent is specified, a region will be chosen automatically.
+     * Supported location-ids:
+     *     `us`: USA country only,
+     *     `asia`: East asia areas, like Japan, Taiwan,
+     *     `eu`: The European Union.
+     * Example: `projects/project-A/locations/eu`.
+     * 
+ * + * string parent = 4; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..0ccea96477e9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface BatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); + + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Optional. Target project and location to make a call.
+   * Format: `projects/{project-id}/locations/{location-id}`.
+   * If no parent is specified, a region will be chosen automatically.
+   * Supported location-ids:
+   *     `us`: USA country only,
+   *     `asia`: East asia areas, like Japan, Taiwan,
+   *     `eu`: The European Union.
+   * Example: `projects/project-A/locations/eu`.
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..c161fe3259fe --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response to a batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesResponse} + */ +public final class BatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateImagesResponse) + BatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesResponse.newBuilder() to construct. + private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.BatchAnnotateImagesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1.BatchAnnotateImagesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateImagesResponse) + com.google.cloud.vision.v1.BatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.BatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1.BatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1.BatchAnnotateImagesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..fc2c037c264f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface BatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java new file mode 100644 index 000000000000..4eda62dc0277 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java @@ -0,0 +1,1226 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Metadata for the batch operations such as the current state.
+ * This is included in the `metadata` field of the `Operation` returned by the
+ * `GetOperation` call of the `google::longrunning::Operations` service.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchOperationMetadata} + */ +public final class BatchOperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchOperationMetadata) + BatchOperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchOperationMetadata.newBuilder() to construct. + private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchOperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchOperationMetadata.class, com.google.cloud.vision.v1.BatchOperationMetadata.Builder.class); + } + + /** + *
+   * Enumerates the possible states that the batch request can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.BatchOperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + PROCESSING(1), + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + SUCCESSFUL(2), + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + public static final int PROCESSING_VALUE = 1; + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + public static final int SUCCESSFUL_VALUE = 2; + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return PROCESSING; + case 2: return SUCCESSFUL; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.BatchOperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.BatchOperationMetadata.State result = com.google.cloud.vision.v1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int SUBMIT_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp submitTime_; + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + @java.lang.Override + public boolean hasSubmitTime() { + return submitTime_ != null; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSubmitTime() { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + return getSubmitTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (submitTime_ != null) { + output.writeMessage(2, getSubmitTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (submitTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSubmitTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BatchOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BatchOperationMetadata other = (com.google.cloud.vision.v1.BatchOperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; + if (hasSubmitTime()) { + if (!getSubmitTime() + .equals(other.getSubmitTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasSubmitTime()) { + hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSubmitTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BatchOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata for the batch operations such as the current state.
+   * This is included in the `metadata` field of the `Operation` returned by the
+   * `GetOperation` call of the `google::longrunning::Operations` service.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BatchOperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchOperationMetadata) + com.google.cloud.vision.v1.BatchOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BatchOperationMetadata.class, com.google.cloud.vision.v1.BatchOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BatchOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (submitTimeBuilder_ == null) { + submitTime_ = null; + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BatchOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchOperationMetadata build() { + com.google.cloud.vision.v1.BatchOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchOperationMetadata buildPartial() { + com.google.cloud.vision.v1.BatchOperationMetadata result = new com.google.cloud.vision.v1.BatchOperationMetadata(this); + result.state_ = state_; + if (submitTimeBuilder_ == null) { + result.submitTime_ = submitTime_; + } else { + result.submitTime_ = submitTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BatchOperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1.BatchOperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BatchOperationMetadata other) { + if (other == com.google.cloud.vision.v1.BatchOperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasSubmitTime()) { + mergeSubmitTime(other.getSubmitTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BatchOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BatchOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.BatchOperationMetadata.State result = com.google.cloud.vision.v1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1.BatchOperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp submitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + public boolean hasSubmitTime() { + return submitTimeBuilder_ != null || submitTime_ != null; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + public com.google.protobuf.Timestamp getSubmitTime() { + if (submitTimeBuilder_ == null) { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } else { + return submitTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + submitTime_ = value; + onChanged(); + } else { + submitTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (submitTimeBuilder_ == null) { + submitTime_ = builderForValue.build(); + onChanged(); + } else { + submitTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (submitTime_ != null) { + submitTime_ = + com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); + } else { + submitTime_ = value; + } + onChanged(); + } else { + submitTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder clearSubmitTime() { + if (submitTimeBuilder_ == null) { + submitTime_ = null; + onChanged(); + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { + + onChanged(); + return getSubmitTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + if (submitTimeBuilder_ != null) { + return submitTimeBuilder_.getMessageOrBuilder(); + } else { + return submitTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSubmitTimeFieldBuilder() { + if (submitTimeBuilder_ == null) { + submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSubmitTime(), + getParentForChildren(), + isClean()); + submitTime_ = null; + } + return submitTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchOperationMetadata) + private static final com.google.cloud.vision.v1.BatchOperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchOperationMetadata(); + } + + public static com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..9b32e315c648 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface BatchOperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1.BatchOperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + boolean hasSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + com.google.protobuf.Timestamp getSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); + + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java new file mode 100644 index 000000000000..cf6fccb4ad72 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java @@ -0,0 +1,1914 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Logical element on the page.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Block} + */ +public final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Block) + BlockOrBuilder { +private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + paragraphs_ = java.util.Collections.emptyList(); + blockType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paragraphs_.add( + input.readMessage(com.google.cloud.vision.v1.Paragraph.parser(), extensionRegistry)); + break; + } + case 32: { + int rawValue = input.readEnum(); + + blockType_ = rawValue; + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Block.class, com.google.cloud.vision.v1.Block.Builder.class); + } + + /** + *
+   * Type of a block (text, image etc) as identified by OCR.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.Block.BlockType} + */ + public enum BlockType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + PICTURE(3), + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + RULER(4), + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + BARCODE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + public static final int PICTURE_VALUE = 3; + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + public static final int RULER_VALUE = 4; + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + public static final int BARCODE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TEXT; + case 2: return TABLE; + case 3: return PICTURE; + case 4: return RULER; + case 5: return BARCODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockType findValueByNumber(int number) { + return BlockType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.Block.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockType[] VALUES = values(); + + public static BlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Block.BlockType) + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 3; + private java.util.List paragraphs_; + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List getParagraphsList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + return paragraphs_.get(index); + } + + public static final int BLOCK_TYPE_FIELD_NUMBER = 4; + private int blockType_; + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override public com.google.cloud.vision.v1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Block.BlockType result = com.google.cloud.vision.v1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1.Block.BlockType.UNRECOGNIZED : result; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1.Block.BlockType.UNKNOWN.getNumber()) { + output.writeEnum(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1.Block.BlockType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Block)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Block other = (com.google.cloud.vision.v1.Block) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList() + .equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + blockType_; + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Logical element on the page.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Block) + com.google.cloud.vision.v1.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Block.class, com.google.cloud.vision.v1.Block.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getParagraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + paragraphsBuilder_.clear(); + } + blockType_ = 0; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Block getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Block.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Block build() { + com.google.cloud.vision.v1.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Block buildPartial() { + com.google.cloud.vision.v1.Block result = new com.google.cloud.vision.v1.Block(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + result.blockType_ = blockType_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Block) { + return mergeFrom((com.google.cloud.vision.v1.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Block other) { + if (other == com.google.cloud.vision.v1.Block.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParagraphsFieldBuilder() : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (other.blockType_ != 0) { + setBlockTypeValue(other.getBlockTypeValue()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List paragraphs_ = + java.util.Collections.emptyList(); + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(paragraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder> paragraphsBuilder_; + + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public java.util.List getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs(com.google.cloud.vision.v1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder addAllParagraphs( + java.lang.Iterable values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1.Paragraph.Builder getParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1.Paragraph.Builder addParagraphsBuilder() { + return getParagraphsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1.Paragraph.Builder addParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder>( + paragraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private int blockType_ = 0; + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @param value The enum numeric value on the wire for blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockTypeValue(int value) { + + blockType_ = value; + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Block.BlockType result = com.google.cloud.vision.v1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1.Block.BlockType.UNRECOGNIZED : result; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @param value The blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockType(com.google.cloud.vision.v1.Block.BlockType value) { + if (value == null) { + throw new NullPointerException(); + } + + blockType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return This builder for chaining. + */ + public Builder clearBlockType() { + + blockType_ = 0; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Block) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Block) + private static final com.google.cloud.vision.v1.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Block(); + } + + public static com.google.cloud.vision.v1.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java new file mode 100644 index 000000000000..69204f1d91d6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1.Paragraph getParagraphs(int index); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + int getParagraphsCount(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsOrBuilderList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( + int index); + + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + int getBlockTypeValue(); + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return The blockType. + */ + com.google.cloud.vision.v1.Block.BlockType getBlockType(); + + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java new file mode 100644 index 000000000000..bec9a6aca21d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java @@ -0,0 +1,1312 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A bounding polygon for the detected image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BoundingPoly} + */ +public final class BoundingPoly extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BoundingPoly) + BoundingPolyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage(com.google.cloud.vision.v1.Vertex.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + normalizedVertices_.add( + input.readMessage(com.google.cloud.vision.v1.NormalizedVertex.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BoundingPoly.class, com.google.cloud.vision.v1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List getVerticesList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + @java.lang.Override + public int getVerticesCount() { + return vertices_.size(); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( + int index) { + return vertices_.get(index); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; + private java.util.List normalizedVertices_; + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(2, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.BoundingPoly other = (com.google.cloud.vision.v1.BoundingPoly) obj; + + if (!getVerticesList() + .equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList() + .equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A bounding polygon for the detected image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.BoundingPoly} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BoundingPoly) + com.google.cloud.vision.v1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.BoundingPoly.class, com.google.cloud.vision.v1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + getNormalizedVerticesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly build() { + com.google.cloud.vision.v1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly buildPartial() { + com.google.cloud.vision.v1.BoundingPoly result = new com.google.cloud.vision.v1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.BoundingPoly) { + return mergeFrom((com.google.cloud.vision.v1.BoundingPoly)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.BoundingPoly other) { + if (other == com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVerticesFieldBuilder() : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNormalizedVerticesFieldBuilder() : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder> verticesBuilder_; + + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.vision.v1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.vision.v1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1.Vertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( + int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1.Vertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; + + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices(com.google.cloud.vision.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BoundingPoly) + private static final com.google.cloud.vision.v1.BoundingPoly DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BoundingPoly(); + } + + public static com.google.cloud.vision.v1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..ddae3582c7f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +public interface BoundingPolyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + java.util.List + getVerticesList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1.Vertex getVertices(int index); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( + int index); + + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + int getNormalizedVerticesCount(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java new file mode 100644 index 000000000000..87f32f0b4e5f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java @@ -0,0 +1,835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Color information consists of RGB channels, score, and the fraction of
+ * the image that the color occupies in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ColorInfo} + */ +public final class ColorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ColorInfo) + ColorInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ColorInfo.newBuilder() to construct. + private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 29: { + + pixelFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ColorInfo.class, com.google.cloud.vision.v1.ColorInfo.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private com.google.type.Color color_; + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return color_ != null; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return getColor(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; + private float pixelFraction_; + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != null) { + output.writeMessage(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + output.writeFloat(3, pixelFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, pixelFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ColorInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ColorInfo other = (com.google.cloud.vision.v1.ColorInfo) obj; + + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor() + .equals(other.getColor())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits( + other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPixelFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ColorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ColorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ColorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Color information consists of RGB channels, score, and the fraction of
+   * the image that the color occupies in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ColorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ColorInfo) + com.google.cloud.vision.v1.ColorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ColorInfo.class, com.google.cloud.vision.v1.ColorInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ColorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + score_ = 0F; + + pixelFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ColorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfo build() { + com.google.cloud.vision.v1.ColorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfo buildPartial() { + com.google.cloud.vision.v1.ColorInfo result = new com.google.cloud.vision.v1.ColorInfo(this); + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + result.score_ = score_; + result.pixelFraction_ = pixelFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ColorInfo) { + return mergeFrom((com.google.cloud.vision.v1.ColorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ColorInfo other) { + if (other == com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()) return this; + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getPixelFraction() != 0F) { + setPixelFraction(other.getPixelFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ColorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ColorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor( + com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.Color.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.google.type.Color.getDefaultInstance() : color_; + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + + private float score_ ; + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float pixelFraction_ ; + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @param value The pixelFraction to set. + * @return This builder for chaining. + */ + public Builder setPixelFraction(float value) { + + pixelFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearPixelFraction() { + + pixelFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ColorInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ColorInfo) + private static final com.google.cloud.vision.v1.ColorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ColorInfo(); + } + + public static com.google.cloud.vision.v1.ColorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java new file mode 100644 index 000000000000..307618578447 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ColorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ColorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + boolean hasColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + com.google.type.Color getColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + com.google.type.ColorOrBuilder getColorOrBuilder(); + + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + float getPixelFraction(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java new file mode 100644 index 000000000000..200a6be7bfb0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `CreateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateProductRequest} + */ +public final class CreateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateProductRequest) + CreateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductRequest.newBuilder() to construct. + private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductRequest() { + parent_ = ""; + productId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateProductRequest.class, com.google.cloud.vision.v1.CreateProductRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.Product product_; + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productId_; + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (product_ != null) { + output.writeMessage(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CreateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CreateProductRequest other = (com.google.cloud.vision.v1.CreateProductRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (!getProductId() + .equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CreateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateProductRequest) + com.google.cloud.vision.v1.CreateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateProductRequest.class, com.google.cloud.vision.v1.CreateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CreateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + productId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductRequest build() { + com.google.cloud.vision.v1.CreateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductRequest buildPartial() { + com.google.cloud.vision.v1.CreateProductRequest result = new com.google.cloud.vision.v1.CreateProductRequest(this); + result.parent_ = parent_; + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.productId_ = productId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CreateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1.CreateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductRequest other) { + if (other == com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CreateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CreateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private java.lang.Object productId_ = ""; + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductId() { + + productId_ = getDefaultInstance().getProductId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateProductRequest) + private static final com.google.cloud.vision.v1.CreateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateProductRequest(); + } + + public static com.google.cloud.vision.v1.CreateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java new file mode 100644 index 000000000000..3b68aa72eb73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface CreateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1.Product getProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java new file mode 100644 index 000000000000..64fffbb889f9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java @@ -0,0 +1,1025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `CreateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateProductSetRequest} + */ +public final class CreateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateProductSetRequest) + CreateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductSetRequest.newBuilder() to construct. + private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductSetRequest() { + parent_ = ""; + productSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productSetId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateProductSetRequest.class, com.google.cloud.vision.v1.CreateProductSetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productSetId_; + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + @java.lang.Override + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (productSet_ != null) { + output.writeMessage(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CreateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CreateProductSetRequest other = (com.google.cloud.vision.v1.CreateProductSetRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (!getProductSetId() + .equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductSetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CreateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateProductSetRequest) + com.google.cloud.vision.v1.CreateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateProductSetRequest.class, com.google.cloud.vision.v1.CreateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CreateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + productSetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductSetRequest build() { + com.google.cloud.vision.v1.CreateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductSetRequest buildPartial() { + com.google.cloud.vision.v1.CreateProductSetRequest result = new com.google.cloud.vision.v1.CreateProductSetRequest(this); + result.parent_ = parent_; + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + result.productSetId_ = productSetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CreateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.CreateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductSetRequest other) { + if (other == com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (!other.getProductSetId().isEmpty()) { + productSetId_ = other.productSetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CreateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CreateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private java.lang.Object productSetId_ = ""; + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSetId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductSetId() { + + productSetId_ = getDefaultInstance().getProductSetId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The bytes for productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSetId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateProductSetRequest) + private static final com.google.cloud.vision.v1.CreateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateProductSetRequest(); + } + + public static com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..ecea0a627053 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface CreateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + java.lang.String getProductSetId(); + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + com.google.protobuf.ByteString + getProductSetIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java new file mode 100644 index 000000000000..4f1050b14454 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java @@ -0,0 +1,1044 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `CreateReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateReferenceImageRequest} + */ +public final class CreateReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateReferenceImageRequest) + CreateReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateReferenceImageRequest.newBuilder() to construct. + private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateReferenceImageRequest() { + parent_ = ""; + referenceImageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1.ReferenceImage.Builder subBuilder = null; + if (referenceImage_ != null) { + subBuilder = referenceImage_.toBuilder(); + } + referenceImage_ = input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(referenceImage_); + referenceImage_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + referenceImageId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1.CreateReferenceImageRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.ReferenceImage referenceImage_; + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + @java.lang.Override + public boolean hasReferenceImage() { + return referenceImage_ != null; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage getReferenceImage() { + return referenceImage_ == null ? com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + return getReferenceImage(); + } + + public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object referenceImageId_; + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + @java.lang.Override + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (referenceImage_ != null) { + output.writeMessage(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (referenceImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CreateReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1.CreateReferenceImageRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; + if (hasReferenceImage()) { + if (!getReferenceImage() + .equals(other.getReferenceImage())) return false; + } + if (!getReferenceImageId() + .equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReferenceImage()) { + hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImage().hashCode(); + } + hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImageId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CreateReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CreateReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateReferenceImageRequest) + com.google.cloud.vision.v1.CreateReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1.CreateReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CreateReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + referenceImageId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateReferenceImageRequest build() { + com.google.cloud.vision.v1.CreateReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1.CreateReferenceImageRequest(this); + result.parent_ = parent_; + if (referenceImageBuilder_ == null) { + result.referenceImage_ = referenceImage_; + } else { + result.referenceImage_ = referenceImageBuilder_.build(); + } + result.referenceImageId_ = referenceImageId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CreateReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1.CreateReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CreateReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReferenceImage()) { + mergeReferenceImage(other.getReferenceImage()); + } + if (!other.getReferenceImageId().isEmpty()) { + referenceImageId_ = other.referenceImageId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CreateReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CreateReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.ReferenceImage referenceImage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImageBuilder_; + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + public boolean hasReferenceImage() { + return referenceImageBuilder_ != null || referenceImage_ != null; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + public com.google.cloud.vision.v1.ReferenceImage getReferenceImage() { + if (referenceImageBuilder_ == null) { + return referenceImage_ == null ? com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; + } else { + return referenceImageBuilder_.getMessage(); + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage(com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + referenceImage_ = value; + onChanged(); + } else { + referenceImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage( + com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImageBuilder_ == null) { + referenceImage_ = builderForValue.build(); + onChanged(); + } else { + referenceImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeReferenceImage(com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (referenceImage_ != null) { + referenceImage_ = + com.google.cloud.vision.v1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); + } else { + referenceImage_ = value; + } + onChanged(); + } else { + referenceImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearReferenceImage() { + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + onChanged(); + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImageBuilder() { + + onChanged(); + return getReferenceImageFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + if (referenceImageBuilder_ != null) { + return referenceImageBuilder_.getMessageOrBuilder(); + } else { + return referenceImage_ == null ? + com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> + getReferenceImageFieldBuilder() { + if (referenceImageBuilder_ == null) { + referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( + getReferenceImage(), + getParentForChildren(), + isClean()); + referenceImage_ = null; + } + return referenceImageBuilder_; + } + + private java.lang.Object referenceImageId_ = ""; + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + referenceImageId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return This builder for chaining. + */ + public Builder clearReferenceImageId() { + + referenceImageId_ = getDefaultInstance().getReferenceImageId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The bytes for referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + referenceImageId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateReferenceImageRequest) + private static final com.google.cloud.vision.v1.CreateReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..89ce28a96300 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface CreateReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + boolean hasReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + com.google.cloud.vision.v1.ReferenceImage getReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); + + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + java.lang.String getReferenceImageId(); + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + com.google.protobuf.ByteString + getReferenceImageIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java new file mode 100644 index 000000000000..1be5f6fa8eb5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java @@ -0,0 +1,845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Single crop hint that is used to generate a new crop when serving an image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHint} + */ +public final class CropHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHint) + CropHintOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHint.newBuilder() to construct. + private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHint() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + case 29: { + + importanceFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHint.class, com.google.cloud.vision.v1.CropHint.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; + private float importanceFraction_; + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + output.writeFloat(3, importanceFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, importanceFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CropHint)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CropHint other = (com.google.cloud.vision.v1.CropHint) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits( + other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImportanceFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CropHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CropHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Single crop hint that is used to generate a new crop when serving an image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHint) + com.google.cloud.vision.v1.CropHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHint.class, com.google.cloud.vision.v1.CropHint.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CropHint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + confidence_ = 0F; + + importanceFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHint getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CropHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHint build() { + com.google.cloud.vision.v1.CropHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHint buildPartial() { + com.google.cloud.vision.v1.CropHint result = new com.google.cloud.vision.v1.CropHint(this); + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.confidence_ = confidence_; + result.importanceFraction_ = importanceFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CropHint) { + return mergeFrom((com.google.cloud.vision.v1.CropHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CropHint other) { + if (other == com.google.cloud.vision.v1.CropHint.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getImportanceFraction() != 0F) { + setImportanceFraction(other.getImportanceFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CropHint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CropHint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float importanceFraction_ ; + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @param value The importanceFraction to set. + * @return This builder for chaining. + */ + public Builder setImportanceFraction(float value) { + + importanceFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearImportanceFraction() { + + importanceFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHint) + private static final com.google.cloud.vision.v1.CropHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHint(); + } + + public static com.google.cloud.vision.v1.CropHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java new file mode 100644 index 000000000000..7498b0f960f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface CropHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + float getImportanceFraction(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java new file mode 100644 index 000000000000..8cad055c6127 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Set of crop hints that are used to generate new crops when serving images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHintsAnnotation} + */ +public final class CropHintsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHintsAnnotation) + CropHintsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsAnnotation.newBuilder() to construct. + private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsAnnotation() { + cropHints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cropHints_.add( + input.readMessage(com.google.cloud.vision.v1.CropHint.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHintsAnnotation.class, com.google.cloud.vision.v1.CropHintsAnnotation.Builder.class); + } + + public static final int CROP_HINTS_FIELD_NUMBER = 1; + private java.util.List cropHints_; + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List getCropHintsList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List + getCropHintsOrBuilderList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + @java.lang.Override + public int getCropHintsCount() { + return cropHints_.size(); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHint getCropHints(int index) { + return cropHints_.get(index); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + return cropHints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cropHints_.size(); i++) { + output.writeMessage(1, cropHints_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cropHints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, cropHints_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CropHintsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CropHintsAnnotation other = (com.google.cloud.vision.v1.CropHintsAnnotation) obj; + + if (!getCropHintsList() + .equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCropHintsCount() > 0) { + hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CropHintsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of crop hints that are used to generate new crops when serving images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHintsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHintsAnnotation) + com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHintsAnnotation.class, com.google.cloud.vision.v1.CropHintsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CropHintsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCropHintsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotation build() { + com.google.cloud.vision.v1.CropHintsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotation buildPartial() { + com.google.cloud.vision.v1.CropHintsAnnotation result = new com.google.cloud.vision.v1.CropHintsAnnotation(this); + int from_bitField0_ = bitField0_; + if (cropHintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cropHints_ = cropHints_; + } else { + result.cropHints_ = cropHintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CropHintsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.CropHintsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CropHintsAnnotation other) { + if (other == com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()) return this; + if (cropHintsBuilder_ == null) { + if (!other.cropHints_.isEmpty()) { + if (cropHints_.isEmpty()) { + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCropHintsIsMutable(); + cropHints_.addAll(other.cropHints_); + } + onChanged(); + } + } else { + if (!other.cropHints_.isEmpty()) { + if (cropHintsBuilder_.isEmpty()) { + cropHintsBuilder_.dispose(); + cropHintsBuilder_ = null; + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + cropHintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCropHintsFieldBuilder() : null; + } else { + cropHintsBuilder_.addAllMessages(other.cropHints_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CropHintsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CropHintsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List cropHints_ = + java.util.Collections.emptyList(); + private void ensureCropHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(cropHints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder> cropHintsBuilder_; + + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public java.util.List getCropHintsList() { + if (cropHintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cropHints_); + } else { + return cropHintsBuilder_.getMessageList(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public int getCropHintsCount() { + if (cropHintsBuilder_ == null) { + return cropHints_.size(); + } else { + return cropHintsBuilder_.getCount(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1.CropHint getCropHints(int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); + } else { + return cropHintsBuilder_.getMessage(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.set(index, value); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.set(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder addCropHints(com.google.cloud.vision.v1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(index, value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + com.google.cloud.vision.v1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder addAllCropHints( + java.lang.Iterable values) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cropHints_); + onChanged(); + } else { + cropHintsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder clearCropHints() { + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public Builder removeCropHints(int index) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.remove(index); + onChanged(); + } else { + cropHintsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1.CropHint.Builder getCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().getBuilder(index); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); } else { + return cropHintsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsOrBuilderList() { + if (cropHintsBuilder_ != null) { + return cropHintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cropHints_); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1.CropHint.Builder addCropHintsBuilder() { + return getCropHintsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1.CropHint.Builder addCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsBuilderList() { + return getCropHintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder> + getCropHintsFieldBuilder() { + if (cropHintsBuilder_ == null) { + cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder>( + cropHints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cropHints_ = null; + } + return cropHintsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHintsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHintsAnnotation) + private static final com.google.cloud.vision.v1.CropHintsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHintsAnnotation(); + } + + public static com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java new file mode 100644 index 000000000000..68a189369f5f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface CropHintsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHintsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1.CropHint getCropHints(int index); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + int getCropHintsCount(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsOrBuilderList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java new file mode 100644 index 000000000000..cbfd884f6e69 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java @@ -0,0 +1,696 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Parameters for crop hints annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHintsParams} + */ +public final class CropHintsParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHintsParams) + CropHintsParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsParams.newBuilder() to construct. + private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsParams() { + aspectRatios_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + aspectRatios_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + aspectRatios_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHintsParams.class, com.google.cloud.vision.v1.CropHintsParams.Builder.class); + } + + public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList aspectRatios_; + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + @java.lang.Override + public java.util.List + getAspectRatiosList() { + return aspectRatios_; + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + private int aspectRatiosMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getAspectRatiosList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); + } + for (int i = 0; i < aspectRatios_.size(); i++) { + output.writeFloatNoTag(aspectRatios_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getAspectRatiosList().size(); + size += dataSize; + if (!getAspectRatiosList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + aspectRatiosMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.CropHintsParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.CropHintsParams other = (com.google.cloud.vision.v1.CropHintsParams) obj; + + if (!getAspectRatiosList() + .equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAspectRatiosCount() > 0) { + hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; + hash = (53 * hash) + getAspectRatiosList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.CropHintsParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.CropHintsParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHintsParams) + com.google.cloud.vision.v1.CropHintsParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.CropHintsParams.class, com.google.cloud.vision.v1.CropHintsParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.CropHintsParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParams build() { + com.google.cloud.vision.v1.CropHintsParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParams buildPartial() { + com.google.cloud.vision.v1.CropHintsParams result = new com.google.cloud.vision.v1.CropHintsParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aspectRatios_ = aspectRatios_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.CropHintsParams) { + return mergeFrom((com.google.cloud.vision.v1.CropHintsParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.CropHintsParams other) { + if (other == com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance()) return this; + if (!other.aspectRatios_.isEmpty()) { + if (aspectRatios_.isEmpty()) { + aspectRatios_ = other.aspectRatios_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAspectRatiosIsMutable(); + aspectRatios_.addAll(other.aspectRatios_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.CropHintsParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.CropHintsParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); + private void ensureAspectRatiosIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + public java.util.List + getAspectRatiosList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index to set the value at. + * @param value The aspectRatios to set. + * @return This builder for chaining. + */ + public Builder setAspectRatios( + int index, float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param value The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAspectRatios(float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.addFloat(value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param values The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAllAspectRatios( + java.lang.Iterable values) { + ensureAspectRatiosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aspectRatios_); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return This builder for chaining. + */ + public Builder clearAspectRatios() { + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHintsParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHintsParams) + private static final com.google.cloud.vision.v1.CropHintsParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHintsParams(); + } + + public static com.google.cloud.vision.v1.CropHintsParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java new file mode 100644 index 000000000000..0ca2ba5cd680 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface CropHintsParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHintsParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + java.util.List getAspectRatiosList(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + int getAspectRatiosCount(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + float getAspectRatios(int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java new file mode 100644 index 000000000000..477067b58043 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `DeleteProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteProductRequest} + */ +public final class DeleteProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteProductRequest) + DeleteProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductRequest.newBuilder() to construct. + private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteProductRequest.class, com.google.cloud.vision.v1.DeleteProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.DeleteProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.DeleteProductRequest other = (com.google.cloud.vision.v1.DeleteProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.DeleteProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteProductRequest) + com.google.cloud.vision.v1.DeleteProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteProductRequest.class, com.google.cloud.vision.v1.DeleteProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.DeleteProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductRequest build() { + com.google.cloud.vision.v1.DeleteProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductRequest buildPartial() { + com.google.cloud.vision.v1.DeleteProductRequest result = new com.google.cloud.vision.v1.DeleteProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.DeleteProductRequest) { + return mergeFrom((com.google.cloud.vision.v1.DeleteProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.DeleteProductRequest other) { + if (other == com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.DeleteProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.DeleteProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteProductRequest) + private static final com.google.cloud.vision.v1.DeleteProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteProductRequest(); + } + + public static com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java new file mode 100644 index 000000000000..852ae7f4f3a3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface DeleteProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java new file mode 100644 index 000000000000..6afc08ad89d3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `DeleteProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteProductSetRequest} + */ +public final class DeleteProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteProductSetRequest) + DeleteProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductSetRequest.newBuilder() to construct. + private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteProductSetRequest.class, com.google.cloud.vision.v1.DeleteProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.DeleteProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.DeleteProductSetRequest other = (com.google.cloud.vision.v1.DeleteProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.DeleteProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteProductSetRequest) + com.google.cloud.vision.v1.DeleteProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteProductSetRequest.class, com.google.cloud.vision.v1.DeleteProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.DeleteProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductSetRequest build() { + com.google.cloud.vision.v1.DeleteProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductSetRequest buildPartial() { + com.google.cloud.vision.v1.DeleteProductSetRequest result = new com.google.cloud.vision.v1.DeleteProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.DeleteProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.DeleteProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.DeleteProductSetRequest other) { + if (other == com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.DeleteProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.DeleteProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteProductSetRequest) + private static final com.google.cloud.vision.v1.DeleteProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteProductSetRequest(); + } + + public static com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..92d118085e94 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface DeleteProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java new file mode 100644 index 000000000000..81bd8ca3e3f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `DeleteReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteReferenceImageRequest} + */ +public final class DeleteReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteReferenceImageRequest) + DeleteReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteReferenceImageRequest.newBuilder() to construct. + private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1.DeleteReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.DeleteReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1.DeleteReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.DeleteReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DeleteReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteReferenceImageRequest) + com.google.cloud.vision.v1.DeleteReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1.DeleteReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.DeleteReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteReferenceImageRequest build() { + com.google.cloud.vision.v1.DeleteReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1.DeleteReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.DeleteReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1.DeleteReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.DeleteReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.DeleteReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteReferenceImageRequest) + private static final com.google.cloud.vision.v1.DeleteReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..4c96122eaa08 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface DeleteReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java new file mode 100644 index 000000000000..8e7857644e26 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Set of dominant colors and their corresponding scores.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DominantColorsAnnotation} + */ +public final class DominantColorsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DominantColorsAnnotation) + DominantColorsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DominantColorsAnnotation.newBuilder() to construct. + private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DominantColorsAnnotation() { + colors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DominantColorsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DominantColorsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + colors_.add( + input.readMessage(com.google.cloud.vision.v1.ColorInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DominantColorsAnnotation.class, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder.class); + } + + public static final int COLORS_FIELD_NUMBER = 1; + private java.util.List colors_; + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List getColorsList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List + getColorsOrBuilderList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + @java.lang.Override + public int getColorsCount() { + return colors_.size(); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfo getColors(int index) { + return colors_.get(index); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + return colors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < colors_.size(); i++) { + output.writeMessage(1, colors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < colors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, colors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.DominantColorsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.DominantColorsAnnotation other = (com.google.cloud.vision.v1.DominantColorsAnnotation) obj; + + if (!getColorsList() + .equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColorsCount() > 0) { + hash = (37 * hash) + COLORS_FIELD_NUMBER; + hash = (53 * hash) + getColorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.DominantColorsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of dominant colors and their corresponding scores.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.DominantColorsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DominantColorsAnnotation) + com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.DominantColorsAnnotation.class, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.DominantColorsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + colorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotation build() { + com.google.cloud.vision.v1.DominantColorsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotation buildPartial() { + com.google.cloud.vision.v1.DominantColorsAnnotation result = new com.google.cloud.vision.v1.DominantColorsAnnotation(this); + int from_bitField0_ = bitField0_; + if (colorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.colors_ = colors_; + } else { + result.colors_ = colorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.DominantColorsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.DominantColorsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.DominantColorsAnnotation other) { + if (other == com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance()) return this; + if (colorsBuilder_ == null) { + if (!other.colors_.isEmpty()) { + if (colors_.isEmpty()) { + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColorsIsMutable(); + colors_.addAll(other.colors_); + } + onChanged(); + } + } else { + if (!other.colors_.isEmpty()) { + if (colorsBuilder_.isEmpty()) { + colorsBuilder_.dispose(); + colorsBuilder_ = null; + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + colorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getColorsFieldBuilder() : null; + } else { + colorsBuilder_.addAllMessages(other.colors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.DominantColorsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.DominantColorsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List colors_ = + java.util.Collections.emptyList(); + private void ensureColorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(colors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder> colorsBuilder_; + + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public java.util.List getColorsList() { + if (colorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(colors_); + } else { + return colorsBuilder_.getMessageList(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public int getColorsCount() { + if (colorsBuilder_ == null) { + return colors_.size(); + } else { + return colorsBuilder_.getCount(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1.ColorInfo getColors(int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); + } else { + return colorsBuilder_.getMessage(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.set(index, value); + onChanged(); + } else { + colorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.set(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder addColors(com.google.cloud.vision.v1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(value); + onChanged(); + } else { + colorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(index, value); + onChanged(); + } else { + colorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder addColors( + com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder addAllColors( + java.lang.Iterable values) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, colors_); + onChanged(); + } else { + colorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder clearColors() { + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + colorsBuilder_.clear(); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public Builder removeColors(int index) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.remove(index); + onChanged(); + } else { + colorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1.ColorInfo.Builder getColorsBuilder( + int index) { + return getColorsFieldBuilder().getBuilder(index); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); } else { + return colorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public java.util.List + getColorsOrBuilderList() { + if (colorsBuilder_ != null) { + return colorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(colors_); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1.ColorInfo.Builder addColorsBuilder() { + return getColorsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1.ColorInfo.Builder addColorsBuilder( + int index) { + return getColorsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + public java.util.List + getColorsBuilderList() { + return getColorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder> + getColorsFieldBuilder() { + if (colorsBuilder_ == null) { + colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder>( + colors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + colors_ = null; + } + return colorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DominantColorsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DominantColorsAnnotation) + private static final com.google.cloud.vision.v1.DominantColorsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DominantColorsAnnotation(); + } + + public static com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DominantColorsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DominantColorsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java new file mode 100644 index 000000000000..751580bfc993 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface DominantColorsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DominantColorsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + java.util.List + getColorsList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1.ColorInfo getColors(int index); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + int getColorsCount(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + java.util.List + getColorsOrBuilderList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java new file mode 100644 index 000000000000..611df5324033 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java @@ -0,0 +1,2480 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Set of detected entity features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.EntityAnnotation} + */ +public final class EntityAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.EntityAnnotation) + EntityAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityAnnotation.newBuilder() to construct. + private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityAnnotation() { + mid_ = ""; + locale_ = ""; + description_ = ""; + locations_ = java.util.Collections.emptyList(); + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + locale_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + case 53: { + + topicality_ = input.readFloat(); + break; + } + case 58: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage(com.google.cloud.vision.v1.LocationInfo.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + properties_.add( + input.readMessage(com.google.cloud.vision.v1.Property.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.EntityAnnotation.class, com.google.cloud.vision.v1.EntityAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALE_FIELD_NUMBER = 2; + private volatile java.lang.Object locale_; + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + @java.lang.Override + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } + } + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1/image_annotator.proto;l=506 + * @return The confidence. + */ + @java.lang.Override + @java.lang.Deprecated public float getConfidence() { + return confidence_; + } + + public static final int TOPICALITY_FIELD_NUMBER = 6; + private float topicality_; + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 7; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int LOCATIONS_FIELD_NUMBER = 8; + private java.util.List locations_; + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfo getLocations(int index) { + return locations_.get(index); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + return locations_.get(index); + } + + public static final int PROPERTIES_FIELD_NUMBER = 9; + private java.util.List properties_; + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Property getProperties(int index) { + return properties_.get(index); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + output.writeFloat(6, topicality_); + } + if (boundingPoly_ != null) { + output.writeMessage(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(9, properties_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, topicality_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, properties_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.EntityAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.EntityAnnotation other = (com.google.cloud.vision.v1.EntityAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLocale() + .equals(other.getLocale())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits( + other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getLocationsList() + .equals(other.getLocationsList())) return false; + if (!getPropertiesList() + .equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLocale().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTopicality()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.EntityAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected entity features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.EntityAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.EntityAnnotation) + com.google.cloud.vision.v1.EntityAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.EntityAnnotation.class, com.google.cloud.vision.v1.EntityAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.EntityAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + locale_ = ""; + + description_ = ""; + + score_ = 0F; + + confidence_ = 0F; + + topicality_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + propertiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation build() { + com.google.cloud.vision.v1.EntityAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation buildPartial() { + com.google.cloud.vision.v1.EntityAnnotation result = new com.google.cloud.vision.v1.EntityAnnotation(this); + int from_bitField0_ = bitField0_; + result.mid_ = mid_; + result.locale_ = locale_; + result.description_ = description_; + result.score_ = score_; + result.confidence_ = confidence_; + result.topicality_ = topicality_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.EntityAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.EntityAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.EntityAnnotation other) { + if (other == com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLocale().isEmpty()) { + locale_ = other.locale_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getTopicality() != 0F) { + setTopicality(other.getTopicality()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPropertiesFieldBuilder() : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.EntityAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.EntityAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object mid_ = ""; + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object locale_ = ""; + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The locale. + */ + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The locale to set. + * @return This builder for chaining. + */ + public Builder setLocale( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locale_ = value; + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return This builder for chaining. + */ + public Builder clearLocale() { + + locale_ = getDefaultInstance().getLocale(); + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The bytes for locale to set. + * @return This builder for chaining. + */ + public Builder setLocaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locale_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1/image_annotator.proto;l=506 + * @return The confidence. + */ + @java.lang.Override + @java.lang.Deprecated public float getConfidence() { + return confidence_; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1/image_annotator.proto;l=506 + * @param value The confidence to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1/image_annotator.proto;l=506 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float topicality_ ; + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @param value The topicality to set. + * @return This builder for chaining. + */ + public Builder setTopicality(float value) { + + topicality_ = value; + onChanged(); + return this; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return This builder for chaining. + */ + public Builder clearTopicality() { + + topicality_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder> locationsBuilder_; + + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1.LocationInfo getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder addLocations(com.google.cloud.vision.v1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder addLocations( + com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1.LocationInfo.Builder getLocationsBuilder( + int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder( + int index) { + return getLocationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder>( + locations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List properties_ = + java.util.Collections.emptyList(); + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder> propertiesBuilder_; + + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public com.google.cloud.vision.v1.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder addProperties(com.google.cloud.vision.v1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder addProperties( + com.google.cloud.vision.v1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public com.google.cloud.vision.v1.Property.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public com.google.cloud.vision.v1.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public com.google.cloud.vision.v1.Property.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder>( + properties_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.EntityAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.EntityAnnotation) + private static final com.google.cloud.vision.v1.EntityAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.EntityAnnotation(); + } + + public static com.google.cloud.vision.v1.EntityAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.EntityAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java new file mode 100644 index 000000000000..0b2f042a7b76 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java @@ -0,0 +1,258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface EntityAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.EntityAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + java.lang.String getLocale(); + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + com.google.protobuf.ByteString + getLocaleBytes(); + + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1/image_annotator.proto;l=506 + * @return The confidence. + */ + @java.lang.Deprecated float getConfidence(); + + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + float getTopicality(); + + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + java.util.List + getLocationsList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1.LocationInfo getLocations(int index); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + int getLocationsCount(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + java.util.List + getLocationsOrBuilderList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( + int index); + + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + java.util.List + getPropertiesList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + com.google.cloud.vision.v1.Property getProperties(int index); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + int getPropertiesCount(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1.Property properties = 9; + */ + com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java new file mode 100644 index 000000000000..2781f2b24a2f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java @@ -0,0 +1,4334 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A face annotation object contains the results of face detection.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation} + */ +public final class FaceAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation) + FaceAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceAnnotation.newBuilder() to construct. + private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceAnnotation() { + landmarks_ = java.util.Collections.emptyList(); + joyLikelihood_ = 0; + sorrowLikelihood_ = 0; + angerLikelihood_ = 0; + surpriseLikelihood_ = 0; + underExposedLikelihood_ = 0; + blurredLikelihood_ = 0; + headwearLikelihood_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (fdBoundingPoly_ != null) { + subBuilder = fdBoundingPoly_.toBuilder(); + } + fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fdBoundingPoly_); + fdBoundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + landmarks_.add( + input.readMessage(com.google.cloud.vision.v1.FaceAnnotation.Landmark.parser(), extensionRegistry)); + break; + } + case 37: { + + rollAngle_ = input.readFloat(); + break; + } + case 45: { + + panAngle_ = input.readFloat(); + break; + } + case 53: { + + tiltAngle_ = input.readFloat(); + break; + } + case 61: { + + detectionConfidence_ = input.readFloat(); + break; + } + case 69: { + + landmarkingConfidence_ = input.readFloat(); + break; + } + case 72: { + int rawValue = input.readEnum(); + + joyLikelihood_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + sorrowLikelihood_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + angerLikelihood_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + surpriseLikelihood_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + underExposedLikelihood_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + blurredLikelihood_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + headwearLikelihood_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.FaceAnnotation.class, com.google.cloud.vision.v1.FaceAnnotation.Builder.class); + } + + public interface LandmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.FaceAnnotation.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType(); + + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return The position. + */ + com.google.cloud.vision.v1.Position getPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder(); + } + /** + *
+   * A face-specific landmark (for example, a face feature).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark} + */ + public static final class Landmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Landmark() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Landmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Landmark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + com.google.cloud.vision.v1.Position.Builder subBuilder = null; + if (position_ != null) { + subBuilder = position_.toBuilder(); + } + position_ = input.readMessage(com.google.cloud.vision.v1.Position.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(position_); + position_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class); + } + + /** + *
+     * Face landmark (feature) type.
+     * Left and right are defined from the vantage of the viewer of the image
+     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
+     * typically, is the person's right eye.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.FaceAnnotation.Landmark.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + UNKNOWN_LANDMARK(0), + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + LEFT_EYE(1), + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + RIGHT_EYE(2), + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + LEFT_OF_LEFT_EYEBROW(3), + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + RIGHT_OF_LEFT_EYEBROW(4), + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + LEFT_OF_RIGHT_EYEBROW(5), + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + RIGHT_OF_RIGHT_EYEBROW(6), + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + MIDPOINT_BETWEEN_EYES(7), + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + NOSE_TIP(8), + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + UPPER_LIP(9), + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + LOWER_LIP(10), + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + MOUTH_LEFT(11), + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + MOUTH_RIGHT(12), + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + MOUTH_CENTER(13), + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + NOSE_BOTTOM_RIGHT(14), + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + NOSE_BOTTOM_LEFT(15), + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + NOSE_BOTTOM_CENTER(16), + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + LEFT_EYE_TOP_BOUNDARY(17), + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + LEFT_EYE_RIGHT_CORNER(18), + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + LEFT_EYE_BOTTOM_BOUNDARY(19), + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + LEFT_EYE_LEFT_CORNER(20), + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + RIGHT_EYE_TOP_BOUNDARY(21), + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + RIGHT_EYE_RIGHT_CORNER(22), + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + RIGHT_EYE_BOTTOM_BOUNDARY(23), + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + RIGHT_EYE_LEFT_CORNER(24), + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + LEFT_EYEBROW_UPPER_MIDPOINT(25), + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + RIGHT_EYEBROW_UPPER_MIDPOINT(26), + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + LEFT_EAR_TRAGION(27), + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + RIGHT_EAR_TRAGION(28), + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + LEFT_EYE_PUPIL(29), + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + RIGHT_EYE_PUPIL(30), + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + FOREHEAD_GLABELLA(31), + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + CHIN_GNATHION(32), + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + CHIN_LEFT_GONION(33), + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + CHIN_RIGHT_GONION(34), + /** + *
+       * Left cheek center.
+       * 
+ * + * LEFT_CHEEK_CENTER = 35; + */ + LEFT_CHEEK_CENTER(35), + /** + *
+       * Right cheek center.
+       * 
+ * + * RIGHT_CHEEK_CENTER = 36; + */ + RIGHT_CHEEK_CENTER(36), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + public static final int UNKNOWN_LANDMARK_VALUE = 0; + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + public static final int LEFT_EYE_VALUE = 1; + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + public static final int RIGHT_EYE_VALUE = 2; + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + public static final int NOSE_TIP_VALUE = 8; + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + public static final int UPPER_LIP_VALUE = 9; + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + public static final int LOWER_LIP_VALUE = 10; + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + public static final int MOUTH_LEFT_VALUE = 11; + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + public static final int MOUTH_RIGHT_VALUE = 12; + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + public static final int MOUTH_CENTER_VALUE = 13; + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + public static final int NOSE_BOTTOM_LEFT_VALUE = 15; + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + public static final int NOSE_BOTTOM_CENTER_VALUE = 16; + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + public static final int LEFT_EAR_TRAGION_VALUE = 27; + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + public static final int RIGHT_EAR_TRAGION_VALUE = 28; + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + public static final int LEFT_EYE_PUPIL_VALUE = 29; + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + public static final int RIGHT_EYE_PUPIL_VALUE = 30; + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + public static final int FOREHEAD_GLABELLA_VALUE = 31; + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + public static final int CHIN_GNATHION_VALUE = 32; + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + public static final int CHIN_LEFT_GONION_VALUE = 33; + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + public static final int CHIN_RIGHT_GONION_VALUE = 34; + /** + *
+       * Left cheek center.
+       * 
+ * + * LEFT_CHEEK_CENTER = 35; + */ + public static final int LEFT_CHEEK_CENTER_VALUE = 35; + /** + *
+       * Right cheek center.
+       * 
+ * + * RIGHT_CHEEK_CENTER = 36; + */ + public static final int RIGHT_CHEEK_CENTER_VALUE = 36; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_LANDMARK; + case 1: return LEFT_EYE; + case 2: return RIGHT_EYE; + case 3: return LEFT_OF_LEFT_EYEBROW; + case 4: return RIGHT_OF_LEFT_EYEBROW; + case 5: return LEFT_OF_RIGHT_EYEBROW; + case 6: return RIGHT_OF_RIGHT_EYEBROW; + case 7: return MIDPOINT_BETWEEN_EYES; + case 8: return NOSE_TIP; + case 9: return UPPER_LIP; + case 10: return LOWER_LIP; + case 11: return MOUTH_LEFT; + case 12: return MOUTH_RIGHT; + case 13: return MOUTH_CENTER; + case 14: return NOSE_BOTTOM_RIGHT; + case 15: return NOSE_BOTTOM_LEFT; + case 16: return NOSE_BOTTOM_CENTER; + case 17: return LEFT_EYE_TOP_BOUNDARY; + case 18: return LEFT_EYE_RIGHT_CORNER; + case 19: return LEFT_EYE_BOTTOM_BOUNDARY; + case 20: return LEFT_EYE_LEFT_CORNER; + case 21: return RIGHT_EYE_TOP_BOUNDARY; + case 22: return RIGHT_EYE_RIGHT_CORNER; + case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; + case 24: return RIGHT_EYE_LEFT_CORNER; + case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; + case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; + case 27: return LEFT_EAR_TRAGION; + case 28: return RIGHT_EAR_TRAGION; + case 29: return LEFT_EYE_PUPIL; + case 30: return RIGHT_EYE_PUPIL; + case 31: return FOREHEAD_GLABELLA; + case 32: return CHIN_GNATHION; + case 33: return CHIN_LEFT_GONION; + case 34: return CHIN_RIGHT_GONION; + case 35: return LEFT_CHEEK_CENTER; + case 36: return RIGHT_CHEEK_CENTER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.FaceAnnotation.Landmark.Type) + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1.Position position_; + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return position_ != null; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return The position. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Position getPosition() { + return position_ == null ? com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() { + return getPosition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + output.writeEnum(3, type_); + } + if (position_ != null) { + output.writeMessage(4, getPosition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (position_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1.FaceAnnotation.Landmark) obj; + + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation.Landmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A face-specific landmark (for example, a face feature).
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation.Landmark) + com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.FaceAnnotation.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + if (positionBuilder_ == null) { + position_ = null; + } else { + position_ = null; + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark build() { + com.google.cloud.vision.v1.FaceAnnotation.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark buildPartial() { + com.google.cloud.vision.v1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1.FaceAnnotation.Landmark(this); + result.type_ = type_; + if (positionBuilder_ == null) { + result.position_ = position_; + } else { + result.position_ = positionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark) { + return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation.Landmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation.Landmark other) { + if (other == com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.FaceAnnotation.Landmark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.Position position_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder> positionBuilder_; + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return positionBuilder_ != null || position_ != null; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + * @return The position. + */ + public com.google.cloud.vision.v1.Position getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public Builder setPosition(com.google.cloud.vision.v1.Position value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + onChanged(); + } else { + positionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public Builder setPosition( + com.google.cloud.vision.v1.Position.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + onChanged(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public Builder mergePosition(com.google.cloud.vision.v1.Position value) { + if (positionBuilder_ == null) { + if (position_ != null) { + position_ = + com.google.cloud.vision.v1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); + } else { + position_ = value; + } + onChanged(); + } else { + positionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public Builder clearPosition() { + if (positionBuilder_ == null) { + position_ = null; + onChanged(); + } else { + position_ = null; + positionBuilder_ = null; + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public com.google.cloud.vision.v1.Position.Builder getPositionBuilder() { + + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1.Position position = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation.Landmark) + private static final com.google.cloud.vision.v1.FaceAnnotation.Landmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation.Landmark(); + } + + public static com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Landmark(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_; + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + @java.lang.Override + public boolean hasFdBoundingPoly() { + return fdBoundingPoly_ != null; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + return getFdBoundingPoly(); + } + + public static final int LANDMARKS_FIELD_NUMBER = 3; + private java.util.List landmarks_; + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + return landmarks_.get(index); + } + + public static final int ROLL_ANGLE_FIELD_NUMBER = 4; + private float rollAngle_; + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + + public static final int PAN_ANGLE_FIELD_NUMBER = 5; + private float panAngle_; + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + + public static final int TILT_ANGLE_FIELD_NUMBER = 6; + private float tiltAngle_; + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + + public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; + private float detectionConfidence_; + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + + public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; + private float landmarkingConfidence_; + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + + public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; + private int joyLikelihood_; + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; + private int sorrowLikelihood_; + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; + private int angerLikelihood_; + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; + private int surpriseLikelihood_; + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; + private int underExposedLikelihood_; + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; + private int blurredLikelihood_; + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; + private int headwearLikelihood_; + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + output.writeMessage(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + output.writeFloat(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + output.writeFloat(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + output.writeFloat(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + output.writeFloat(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + output.writeFloat(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(15, headwearLikelihood_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, headwearLikelihood_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.FaceAnnotation other = (com.google.cloud.vision.v1.FaceAnnotation) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; + if (hasFdBoundingPoly()) { + if (!getFdBoundingPoly() + .equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList() + .equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits( + other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits( + other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits( + other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits( + other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits( + other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (hasFdBoundingPoly()) { + hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getFdBoundingPoly().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRollAngle()); + hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPanAngle()); + hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTiltAngle()); + hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDetectionConfidence()); + hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLandmarkingConfidence()); + hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + joyLikelihood_; + hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + sorrowLikelihood_; + hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + angerLikelihood_; + hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + surpriseLikelihood_; + hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + underExposedLikelihood_; + hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + blurredLikelihood_; + hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + headwearLikelihood_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A face annotation object contains the results of face detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation) + com.google.cloud.vision.v1.FaceAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.FaceAnnotation.class, com.google.cloud.vision.v1.FaceAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.FaceAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLandmarksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + landmarksBuilder_.clear(); + } + rollAngle_ = 0F; + + panAngle_ = 0F; + + tiltAngle_ = 0F; + + detectionConfidence_ = 0F; + + landmarkingConfidence_ = 0F; + + joyLikelihood_ = 0; + + sorrowLikelihood_ = 0; + + angerLikelihood_ = 0; + + surpriseLikelihood_ = 0; + + underExposedLikelihood_ = 0; + + blurredLikelihood_ = 0; + + headwearLikelihood_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation build() { + com.google.cloud.vision.v1.FaceAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation buildPartial() { + com.google.cloud.vision.v1.FaceAnnotation result = new com.google.cloud.vision.v1.FaceAnnotation(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (fdBoundingPolyBuilder_ == null) { + result.fdBoundingPoly_ = fdBoundingPoly_; + } else { + result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + result.rollAngle_ = rollAngle_; + result.panAngle_ = panAngle_; + result.tiltAngle_ = tiltAngle_; + result.detectionConfidence_ = detectionConfidence_; + result.landmarkingConfidence_ = landmarkingConfidence_; + result.joyLikelihood_ = joyLikelihood_; + result.sorrowLikelihood_ = sorrowLikelihood_; + result.angerLikelihood_ = angerLikelihood_; + result.surpriseLikelihood_ = surpriseLikelihood_; + result.underExposedLikelihood_ = underExposedLikelihood_; + result.blurredLikelihood_ = blurredLikelihood_; + result.headwearLikelihood_ = headwearLikelihood_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.FaceAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation other) { + if (other == com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.hasFdBoundingPoly()) { + mergeFdBoundingPoly(other.getFdBoundingPoly()); + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarksFieldBuilder() : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (other.getRollAngle() != 0F) { + setRollAngle(other.getRollAngle()); + } + if (other.getPanAngle() != 0F) { + setPanAngle(other.getPanAngle()); + } + if (other.getTiltAngle() != 0F) { + setTiltAngle(other.getTiltAngle()); + } + if (other.getDetectionConfidence() != 0F) { + setDetectionConfidence(other.getDetectionConfidence()); + } + if (other.getLandmarkingConfidence() != 0F) { + setLandmarkingConfidence(other.getLandmarkingConfidence()); + } + if (other.joyLikelihood_ != 0) { + setJoyLikelihoodValue(other.getJoyLikelihoodValue()); + } + if (other.sorrowLikelihood_ != 0) { + setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); + } + if (other.angerLikelihood_ != 0) { + setAngerLikelihoodValue(other.getAngerLikelihoodValue()); + } + if (other.surpriseLikelihood_ != 0) { + setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); + } + if (other.underExposedLikelihood_ != 0) { + setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); + } + if (other.blurredLikelihood_ != 0) { + setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); + } + if (other.headwearLikelihood_ != 0) { + setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.FaceAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.FaceAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + public boolean hasFdBoundingPoly() { + return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } else { + return fdBoundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fdBoundingPoly_ = value; + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = builderForValue.build(); + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (fdBoundingPoly_ != null) { + fdBoundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); + } else { + fdBoundingPoly_ = value; + } + onChanged(); + } else { + fdBoundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder clearFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + onChanged(); + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getFdBoundingPolyBuilder() { + + onChanged(); + return getFdBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + if (fdBoundingPolyBuilder_ != null) { + return fdBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + return fdBoundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getFdBoundingPolyFieldBuilder() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getFdBoundingPoly(), + getParentForChildren(), + isClean()); + fdBoundingPoly_ = null; + } + return fdBoundingPolyBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; + + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks(com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().getBuilder(index); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { + return getLandmarksFieldBuilder().addBuilder( + com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksBuilderList() { + return getLandmarksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder> + getLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>( + landmarks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private float rollAngle_ ; + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @param value The rollAngle to set. + * @return This builder for chaining. + */ + public Builder setRollAngle(float value) { + + rollAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return This builder for chaining. + */ + public Builder clearRollAngle() { + + rollAngle_ = 0F; + onChanged(); + return this; + } + + private float panAngle_ ; + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @param value The panAngle to set. + * @return This builder for chaining. + */ + public Builder setPanAngle(float value) { + + panAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return This builder for chaining. + */ + public Builder clearPanAngle() { + + panAngle_ = 0F; + onChanged(); + return this; + } + + private float tiltAngle_ ; + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @param value The tiltAngle to set. + * @return This builder for chaining. + */ + public Builder setTiltAngle(float value) { + + tiltAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return This builder for chaining. + */ + public Builder clearTiltAngle() { + + tiltAngle_ = 0F; + onChanged(); + return this; + } + + private float detectionConfidence_ ; + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @param value The detectionConfidence to set. + * @return This builder for chaining. + */ + public Builder setDetectionConfidence(float value) { + + detectionConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return This builder for chaining. + */ + public Builder clearDetectionConfidence() { + + detectionConfidence_ = 0F; + onChanged(); + return this; + } + + private float landmarkingConfidence_ ; + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @param value The landmarkingConfidence to set. + * @return This builder for chaining. + */ + public Builder setLandmarkingConfidence(float value) { + + landmarkingConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return This builder for chaining. + */ + public Builder clearLandmarkingConfidence() { + + landmarkingConfidence_ = 0F; + onChanged(); + return this; + } + + private int joyLikelihood_ = 0; + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @param value The enum numeric value on the wire for joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihoodValue(int value) { + + joyLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @param value The joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + joyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return This builder for chaining. + */ + public Builder clearJoyLikelihood() { + + joyLikelihood_ = 0; + onChanged(); + return this; + } + + private int sorrowLikelihood_ = 0; + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @param value The enum numeric value on the wire for sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihoodValue(int value) { + + sorrowLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @param value The sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + sorrowLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return This builder for chaining. + */ + public Builder clearSorrowLikelihood() { + + sorrowLikelihood_ = 0; + onChanged(); + return this; + } + + private int angerLikelihood_ = 0; + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @param value The enum numeric value on the wire for angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihoodValue(int value) { + + angerLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @param value The angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + angerLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return This builder for chaining. + */ + public Builder clearAngerLikelihood() { + + angerLikelihood_ = 0; + onChanged(); + return this; + } + + private int surpriseLikelihood_ = 0; + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @param value The enum numeric value on the wire for surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihoodValue(int value) { + + surpriseLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @param value The surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + surpriseLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return This builder for chaining. + */ + public Builder clearSurpriseLikelihood() { + + surpriseLikelihood_ = 0; + onChanged(); + return this; + } + + private int underExposedLikelihood_ = 0; + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @param value The enum numeric value on the wire for underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihoodValue(int value) { + + underExposedLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @param value The underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + underExposedLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return This builder for chaining. + */ + public Builder clearUnderExposedLikelihood() { + + underExposedLikelihood_ = 0; + onChanged(); + return this; + } + + private int blurredLikelihood_ = 0; + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @param value The enum numeric value on the wire for blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihoodValue(int value) { + + blurredLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @param value The blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + blurredLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return This builder for chaining. + */ + public Builder clearBlurredLikelihood() { + + blurredLikelihood_ = 0; + onChanged(); + return this; + } + + private int headwearLikelihood_ = 0; + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @param value The enum numeric value on the wire for headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihoodValue(int value) { + + headwearLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @param value The headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihood(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + headwearLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return This builder for chaining. + */ + public Builder clearHeadwearLikelihood() { + + headwearLikelihood_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation) + private static final com.google.cloud.vision.v1.FaceAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation(); + } + + public static com.google.cloud.vision.v1.FaceAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java new file mode 100644 index 000000000000..dc8aa6f0a99a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java @@ -0,0 +1,328 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface FaceAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.FaceAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + boolean hasFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); + + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + int getLandmarksCount(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksOrBuilderList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index); + + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + float getRollAngle(); + + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + float getPanAngle(); + + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + float getTiltAngle(); + + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + float getDetectionConfidence(); + + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + float getLandmarkingConfidence(); + + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + int getJoyLikelihoodValue(); + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getJoyLikelihood(); + + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + int getSorrowLikelihoodValue(); + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getSorrowLikelihood(); + + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + int getAngerLikelihoodValue(); + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getAngerLikelihood(); + + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + int getSurpriseLikelihoodValue(); + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood(); + + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + int getUnderExposedLikelihoodValue(); + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood(); + + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + int getBlurredLikelihoodValue(); + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getBlurredLikelihood(); + + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + int getHeadwearLikelihoodValue(); + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java new file mode 100644 index 000000000000..1d4b2ce3ea69 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java @@ -0,0 +1,1153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The type of Google Cloud Vision API detection to perform, and the maximum
+ * number of results to return for that type. Multiple `Feature` objects can
+ * be specified in the `features` list.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + type_ = 0; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + maxResults_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Feature.class, com.google.cloud.vision.v1.Feature.Builder.class); + } + + /** + *
+   * Type of Google Cloud Vision API feature to be extracted.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.Feature.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + FACE_DETECTION(1), + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + LANDMARK_DETECTION(2), + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + LOGO_DETECTION(3), + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + LABEL_DETECTION(4), + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + TEXT_DETECTION(5), + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + DOCUMENT_TEXT_DETECTION(11), + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + SAFE_SEARCH_DETECTION(6), + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + IMAGE_PROPERTIES(7), + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + CROP_HINTS(9), + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + WEB_DETECTION(10), + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + PRODUCT_SEARCH(12), + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + OBJECT_LOCALIZATION(19), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + public static final int FACE_DETECTION_VALUE = 1; + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + public static final int LANDMARK_DETECTION_VALUE = 2; + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + public static final int LOGO_DETECTION_VALUE = 3; + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + public static final int LABEL_DETECTION_VALUE = 4; + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + public static final int TEXT_DETECTION_VALUE = 5; + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + public static final int SAFE_SEARCH_DETECTION_VALUE = 6; + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + public static final int IMAGE_PROPERTIES_VALUE = 7; + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + public static final int CROP_HINTS_VALUE = 9; + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + public static final int WEB_DETECTION_VALUE = 10; + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + public static final int PRODUCT_SEARCH_VALUE = 12; + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + public static final int OBJECT_LOCALIZATION_VALUE = 19; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return FACE_DETECTION; + case 2: return LANDMARK_DETECTION; + case 3: return LOGO_DETECTION; + case 4: return LABEL_DETECTION; + case 5: return TEXT_DETECTION; + case 11: return DOCUMENT_TEXT_DETECTION; + case 6: return SAFE_SEARCH_DETECTION; + case 7: return IMAGE_PROPERTIES; + case 9: return CROP_HINTS; + case 10: return WEB_DETECTION; + case 12: return PRODUCT_SEARCH; + case 19: return OBJECT_LOCALIZATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.Feature.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Feature.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Feature.Type result = com.google.cloud.vision.v1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.Feature.Type.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 2; + private int maxResults_; + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (maxResults_ != 0) { + output.writeInt32(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Feature)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Feature other = (com.google.cloud.vision.v1.Feature) obj; + + if (type_ != other.type_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The type of Google Cloud Vision API detection to perform, and the maximum
+   * number of results to return for that type. Multiple `Feature` objects can
+   * be specified in the `features` list.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Feature) + com.google.cloud.vision.v1.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Feature.class, com.google.cloud.vision.v1.Feature.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + maxResults_ = 0; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Feature getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Feature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Feature build() { + com.google.cloud.vision.v1.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Feature buildPartial() { + com.google.cloud.vision.v1.Feature result = new com.google.cloud.vision.v1.Feature(this); + result.type_ = type_; + result.maxResults_ = maxResults_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Feature) { + return mergeFrom((com.google.cloud.vision.v1.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Feature other) { + if (other == com.google.cloud.vision.v1.Feature.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Feature.Type result = com.google.cloud.vision.v1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.Feature.Type.UNRECOGNIZED : result; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1.Feature.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + + maxResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The bytes for model. + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Feature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Feature) + private static final com.google.cloud.vision.v1.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Feature(); + } + + public static com.google.cloud.vision.v1.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java new file mode 100644 index 000000000000..29ffa6b3370f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1.Feature.Type type = 1; + * @return The type. + */ + com.google.cloud.vision.v1.Feature.Type getType(); + + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + int getMaxResults(); + + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + java.lang.String getModel(); + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + com.google.protobuf.ByteString + getModelBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java new file mode 100644 index 000000000000..7cf322ab8ca2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java @@ -0,0 +1,714 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The Google Cloud Storage location where the output will be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GcsDestination.class, com.google.cloud.vision.v1.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.GcsDestination other = (com.google.cloud.vision.v1.GcsDestination) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the output will be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GcsDestination) + com.google.cloud.vision.v1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GcsDestination.class, com.google.cloud.vision.v1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.vision.v1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestination build() { + com.google.cloud.vision.v1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestination buildPartial() { + com.google.cloud.vision.v1.GcsDestination result = new com.google.cloud.vision.v1.GcsDestination(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.GcsDestination) { + return mergeFrom((com.google.cloud.vision.v1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.GcsDestination other) { + if (other == com.google.cloud.vision.v1.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsDestination) + private static final com.google.cloud.vision.v1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GcsDestination(); + } + + public static com.google.cloud.vision.v1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..014e9c47dd94 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java new file mode 100644 index 000000000000..25d804034de3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The Google Cloud Storage location where the input will be read from.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GcsSource} + */ +public final class GcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GcsSource) + GcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsSource() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GcsSource.class, com.google.cloud.vision.v1.GcsSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.GcsSource other = (com.google.cloud.vision.v1.GcsSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.GcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the input will be read from.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GcsSource) + com.google.cloud.vision.v1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GcsSource.class, com.google.cloud.vision.v1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsSource build() { + com.google.cloud.vision.v1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsSource buildPartial() { + com.google.cloud.vision.v1.GcsSource result = new com.google.cloud.vision.v1.GcsSource(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.GcsSource) { + return mergeFrom((com.google.cloud.vision.v1.GcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.GcsSource other) { + if (other == com.google.cloud.vision.v1.GcsSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsSource) + private static final com.google.cloud.vision.v1.GcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GcsSource(); + } + + public static com.google.cloud.vision.v1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..9fa8a6cfbb14 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface GcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java new file mode 100644 index 000000000000..9e1474097342 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +public final class GeometryProto { + private GeometryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Vertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Position_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Position_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%google/cloud/vision/v1/geometry.proto\022" + + "\026google.cloud.vision.v1\"\036\n\006Vertex\022\t\n\001x\030\001" + + " \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020NormalizedVertex\022\t\n\001x" + + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\207\001\n\014BoundingPoly\0220\n\010ve" + + "rtices\030\001 \003(\0132\036.google.cloud.vision.v1.Ve" + + "rtex\022E\n\023normalized_vertices\030\002 \003(\0132(.goog" + + "le.cloud.vision.v1.NormalizedVertex\"+\n\010P" + + "osition\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002" + + "Bu\n\032com.google.cloud.vision.v1B\rGeometry" + + "ProtoP\001Z + * Request message for the `GetProduct` method. + * + * + * Protobuf type {@code google.cloud.vision.v1.GetProductRequest} + */ +public final class GetProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetProductRequest) + GetProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductRequest.newBuilder() to construct. + private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetProductRequest.class, com.google.cloud.vision.v1.GetProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.GetProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.GetProductRequest other = (com.google.cloud.vision.v1.GetProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.GetProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GetProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetProductRequest) + com.google.cloud.vision.v1.GetProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetProductRequest.class, com.google.cloud.vision.v1.GetProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.GetProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductRequest build() { + com.google.cloud.vision.v1.GetProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductRequest buildPartial() { + com.google.cloud.vision.v1.GetProductRequest result = new com.google.cloud.vision.v1.GetProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.GetProductRequest) { + return mergeFrom((com.google.cloud.vision.v1.GetProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.GetProductRequest other) { + if (other == com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.GetProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.GetProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetProductRequest) + private static final com.google.cloud.vision.v1.GetProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetProductRequest(); + } + + public static com.google.cloud.vision.v1.GetProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java new file mode 100644 index 000000000000..349b4cc4527c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface GetProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java new file mode 100644 index 000000000000..3445cda98cb3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `GetProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GetProductSetRequest} + */ +public final class GetProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetProductSetRequest) + GetProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductSetRequest.newBuilder() to construct. + private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetProductSetRequest.class, com.google.cloud.vision.v1.GetProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.GetProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.GetProductSetRequest other = (com.google.cloud.vision.v1.GetProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.GetProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GetProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetProductSetRequest) + com.google.cloud.vision.v1.GetProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetProductSetRequest.class, com.google.cloud.vision.v1.GetProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.GetProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductSetRequest build() { + com.google.cloud.vision.v1.GetProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductSetRequest buildPartial() { + com.google.cloud.vision.v1.GetProductSetRequest result = new com.google.cloud.vision.v1.GetProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.GetProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.GetProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.GetProductSetRequest other) { + if (other == com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.GetProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.GetProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetProductSetRequest) + private static final com.google.cloud.vision.v1.GetProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetProductSetRequest(); + } + + public static com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..ed3fd80de169 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface GetProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java new file mode 100644 index 000000000000..ef3a3907efdc --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `GetReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GetReferenceImageRequest} + */ +public final class GetReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetReferenceImageRequest) + GetReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetReferenceImageRequest.newBuilder() to construct. + private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetReferenceImageRequest.class, com.google.cloud.vision.v1.GetReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.GetReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.GetReferenceImageRequest other = (com.google.cloud.vision.v1.GetReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.GetReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.GetReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetReferenceImageRequest) + com.google.cloud.vision.v1.GetReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.GetReferenceImageRequest.class, com.google.cloud.vision.v1.GetReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.GetReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetReferenceImageRequest build() { + com.google.cloud.vision.v1.GetReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1.GetReferenceImageRequest result = new com.google.cloud.vision.v1.GetReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.GetReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1.GetReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.GetReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.GetReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.GetReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetReferenceImageRequest) + private static final com.google.cloud.vision.v1.GetReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..6773f291faca --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface GetReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java new file mode 100644 index 000000000000..15e4d6653b5f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Client image to perform Google Cloud Vision API tasks over.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Image} + */ +public final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Image) + ImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + content_ = input.readBytes(); + break; + } + case 18: { + com.google.cloud.vision.v1.ImageSource.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(com.google.cloud.vision.v1.ImageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Image.class, com.google.cloud.vision.v1.Image.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateImages requests. It does
+   * not work for AsyncBatchAnnotateImages requests.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.ImageSource source_; + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return The source. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageSource getSource() { + return source_ == null ? com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Image)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Image other = (com.google.cloud.vision.v1.Image) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Client image to perform Google Cloud Vision API tasks over.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Image) + com.google.cloud.vision.v1.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Image.class, com.google.cloud.vision.v1.Image.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Image getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Image build() { + com.google.cloud.vision.v1.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Image buildPartial() { + com.google.cloud.vision.v1.Image result = new com.google.cloud.vision.v1.Image(this); + result.content_ = content_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Image) { + return mergeFrom((com.google.cloud.vision.v1.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Image other) { + if (other == com.google.cloud.vision.v1.Image.getDefaultInstance()) return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateImages requests. It does
+     * not work for AsyncBatchAnnotateImages requests.
+     * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateImages requests. It does
+     * not work for AsyncBatchAnnotateImages requests.
+     * 
+ * + * bytes content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateImages requests. It does
+     * not work for AsyncBatchAnnotateImages requests.
+     * 
+ * + * bytes content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.ImageSource source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder> sourceBuilder_; + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return The source. + */ + public com.google.cloud.vision.v1.ImageSource getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public Builder setSource(com.google.cloud.vision.v1.ImageSource value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public Builder setSource( + com.google.cloud.vision.v1.ImageSource.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public Builder mergeSource(com.google.cloud.vision.v1.ImageSource value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.vision.v1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1.ImageSource.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Image) + private static final com.google.cloud.vision.v1.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Image(); + } + + public static com.google.cloud.vision.v1.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java new file mode 100644 index 000000000000..9dafb6aeaf65 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java @@ -0,0 +1,681 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * If an image was produced from a file (e.g. a PDF), this message gives
+ * information about the source of that image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageAnnotationContext} + */ +public final class ImageAnnotationContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageAnnotationContext) + ImageAnnotationContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageAnnotationContext.newBuilder() to construct. + private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageAnnotationContext() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageAnnotationContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageAnnotationContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageAnnotationContext.class, com.google.cloud.vision.v1.ImageAnnotationContext.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImageAnnotationContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImageAnnotationContext other = (com.google.cloud.vision.v1.ImageAnnotationContext) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (getPageNumber() + != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImageAnnotationContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * If an image was produced from a file (e.g. a PDF), this message gives
+   * information about the source of that image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageAnnotationContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageAnnotationContext) + com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageAnnotationContext.class, com.google.cloud.vision.v1.ImageAnnotationContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImageAnnotationContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + pageNumber_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContext build() { + com.google.cloud.vision.v1.ImageAnnotationContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContext buildPartial() { + com.google.cloud.vision.v1.ImageAnnotationContext result = new com.google.cloud.vision.v1.ImageAnnotationContext(this); + result.uri_ = uri_; + result.pageNumber_ = pageNumber_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImageAnnotationContext) { + return mergeFrom((com.google.cloud.vision.v1.ImageAnnotationContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImageAnnotationContext other) { + if (other == com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImageAnnotationContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImageAnnotationContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageAnnotationContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageAnnotationContext) + private static final com.google.cloud.vision.v1.ImageAnnotationContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageAnnotationContext(); + } + + public static com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageAnnotationContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageAnnotationContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java new file mode 100644 index 000000000000..b078271c669b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ImageAnnotationContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageAnnotationContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + int getPageNumber(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java new file mode 100644 index 000000000000..9656bcb1ec9b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java @@ -0,0 +1,756 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public final class ImageAnnotatorProto { + private ImageAnnotatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImageSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Image_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_LocationInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Property_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_LatLongRect_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ColorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImageProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CropHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImageContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_InputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_GcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1/image_annotator" + + ".proto\022\026google.cloud.vision.v1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032%" + + "google/cloud/vision/v1/geometry.proto\032+g" + + "oogle/cloud/vision/v1/product_search.pro" + + "to\032,google/cloud/vision/v1/text_annotati" + + "on.proto\032*google/cloud/vision/v1/web_det" + + "ection.proto\032#google/longrunning/operati" + + "ons.proto\032\037google/protobuf/timestamp.pro" + + "to\032\027google/rpc/status.proto\032\027google/type" + + "/color.proto\032\030google/type/latlng.proto\"\207" + + "\003\n\007Feature\0222\n\004type\030\001 \001(\0162$.google.cloud." + + "vision.v1.Feature.Type\022\023\n\013max_results\030\002 " + + "\001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024\n\020TYPE_UNSP" + + "ECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022LANDMAR" + + "K_DETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003\022\023\n\017LAB" + + "EL_DETECTION\020\004\022\022\n\016TEXT_DETECTION\020\005\022\033\n\027DO" + + "CUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_SEARCH_D" + + "ETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022\016\n\nCROP" + + "_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022\n\016PRODUCT_S" + + "EARCH\020\014\022\027\n\023OBJECT_LOCALIZATION\020\023\"7\n\013Imag" + + "eSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timage_" + + "uri\030\002 \001(\t\"M\n\005Image\022\017\n\007content\030\001 \001(\014\0223\n\006s" + + "ource\030\002 \001(\0132#.google.cloud.vision.v1.Ima" + + "geSource\"\366\r\n\016FaceAnnotation\022;\n\rbounding_" + + "poly\030\001 \001(\0132$.google.cloud.vision.v1.Boun" + + "dingPoly\022>\n\020fd_bounding_poly\030\002 \001(\0132$.goo" + + "gle.cloud.vision.v1.BoundingPoly\022B\n\tland" + + "marks\030\003 \003(\0132/.google.cloud.vision.v1.Fac" + + "eAnnotation.Landmark\022\022\n\nroll_angle\030\004 \001(\002" + + "\022\021\n\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022" + + "\034\n\024detection_confidence\030\007 \001(\002\022\036\n\026landmar" + + "king_confidence\030\010 \001(\002\022:\n\016joy_likelihood\030" + + "\t \001(\0162\".google.cloud.vision.v1.Likelihoo" + + "d\022=\n\021sorrow_likelihood\030\n \001(\0162\".google.cl" + + "oud.vision.v1.Likelihood\022<\n\020anger_likeli" + + "hood\030\013 \001(\0162\".google.cloud.vision.v1.Like" + + "lihood\022?\n\023surprise_likelihood\030\014 \001(\0162\".go" + + "ogle.cloud.vision.v1.Likelihood\022D\n\030under" + + "_exposed_likelihood\030\r \001(\0162\".google.cloud" + + ".vision.v1.Likelihood\022>\n\022blurred_likelih" + + "ood\030\016 \001(\0162\".google.cloud.vision.v1.Likel" + + "ihood\022?\n\023headwear_likelihood\030\017 \001(\0162\".goo" + + "gle.cloud.vision.v1.Likelihood\032\350\007\n\010Landm" + + "ark\022B\n\004type\030\003 \001(\01624.google.cloud.vision." + + "v1.FaceAnnotation.Landmark.Type\0222\n\010posit" + + "ion\030\004 \001(\0132 .google.cloud.vision.v1.Posit" + + "ion\"\343\006\n\004Type\022\024\n\020UNKNOWN_LANDMARK\020\000\022\014\n\010LE" + + "FT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024LEFT_OF_LEFT_" + + "EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_EYEBROW\020\004\022\031\n\025" + + "LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026RIGHT_OF_RIGH" + + "T_EYEBROW\020\006\022\031\n\025MIDPOINT_BETWEEN_EYES\020\007\022\014" + + "\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t\022\r\n\tLOWER_LIP" + + "\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020\n\014M" + + "OUTH_CENTER\020\r\022\025\n\021NOSE_BOTTOM_RIGHT\020\016\022\024\n\020" + + "NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_BOTTOM_CENTER" + + "\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY\020\021\022\031\n\025LEFT_EY" + + "E_RIGHT_CORNER\020\022\022\034\n\030LEFT_EYE_BOTTOM_BOUN" + + "DARY\020\023\022\030\n\024LEFT_EYE_LEFT_CORNER\020\024\022\032\n\026RIGH" + + "T_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIGHT_EYE_RIGHT_" + + "CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTOM_BOUNDARY\020\027\022" + + "\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022\037\n\033LEFT_EYEBR" + + "OW_UPPER_MIDPOINT\020\031\022 \n\034RIGHT_EYEBROW_UPP" + + "ER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_TRAGION\020\033\022\025\n\021R" + + "IGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_EYE_PUPIL\020\035\022\023" + + "\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FOREHEAD_GLABELLA" + + "\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CHIN_LEFT_GONIO" + + "N\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\022\025\n\021LEFT_CHEEK" + + "_CENTER\020#\022\026\n\022RIGHT_CHEEK_CENTER\020$\"4\n\014Loc" + + "ationInfo\022$\n\007lat_lng\030\001 \001(\0132\023.google.type" + + ".LatLng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\253\002\n\020Entit" + + "yAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale\030\002 \001(\t" + + "\022\023\n\013description\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022\026\n\n" + + "confidence\030\005 \001(\002B\002\030\001\022\022\n\ntopicality\030\006 \001(\002" + + "\022;\n\rbounding_poly\030\007 \001(\0132$.google.cloud.v" + + "ision.v1.BoundingPoly\0227\n\tlocations\030\010 \003(\013" + + "2$.google.cloud.vision.v1.LocationInfo\0224" + + "\n\nproperties\030\t \003(\0132 .google.cloud.vision" + + ".v1.Property\"\231\001\n\031LocalizedObjectAnnotati" + + "on\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014" + + "\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022;\n\rbounding_" + + "poly\030\005 \001(\0132$.google.cloud.vision.v1.Boun" + + "dingPoly\"\231\002\n\024SafeSearchAnnotation\0221\n\005adu" + + "lt\030\001 \001(\0162\".google.cloud.vision.v1.Likeli" + + "hood\0221\n\005spoof\030\002 \001(\0162\".google.cloud.visio" + + "n.v1.Likelihood\0223\n\007medical\030\003 \001(\0162\".googl" + + "e.cloud.vision.v1.Likelihood\0224\n\010violence" + + "\030\004 \001(\0162\".google.cloud.vision.v1.Likeliho" + + "od\0220\n\004racy\030\t \001(\0162\".google.cloud.vision.v" + + "1.Likelihood\"a\n\013LatLongRect\022(\n\013min_lat_l" + + "ng\030\001 \001(\0132\023.google.type.LatLng\022(\n\013max_lat" + + "_lng\030\002 \001(\0132\023.google.type.LatLng\"U\n\tColor" + + "Info\022!\n\005color\030\001 \001(\0132\022.google.type.Color\022" + + "\r\n\005score\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"M" + + "\n\030DominantColorsAnnotation\0221\n\006colors\030\001 \003" + + "(\0132!.google.cloud.vision.v1.ColorInfo\"\\\n" + + "\017ImageProperties\022I\n\017dominant_colors\030\001 \001(" + + "\01320.google.cloud.vision.v1.DominantColor" + + "sAnnotation\"x\n\010CropHint\022;\n\rbounding_poly" + + "\030\001 \001(\0132$.google.cloud.vision.v1.Bounding" + + "Poly\022\022\n\nconfidence\030\002 \001(\002\022\033\n\023importance_f" + + "raction\030\003 \001(\002\"K\n\023CropHintsAnnotation\0224\n\n" + + "crop_hints\030\001 \003(\0132 .google.cloud.vision.v" + + "1.CropHint\"(\n\017CropHintsParams\022\025\n\raspect_" + + "ratios\030\001 \003(\002\"1\n\022WebDetectionParams\022\033\n\023in" + + "clude_geo_results\030\002 \001(\010\"c\n\023TextDetection" + + "Params\022.\n&enable_text_detection_confiden" + + "ce_score\030\t \001(\010\022\034\n\024advanced_ocr_options\030\013" + + " \003(\t\"\210\003\n\014ImageContext\022:\n\rlat_long_rect\030\001" + + " \001(\0132#.google.cloud.vision.v1.LatLongRec" + + "t\022\026\n\016language_hints\030\002 \003(\t\022B\n\021crop_hints_" + + "params\030\004 \001(\0132\'.google.cloud.vision.v1.Cr" + + "opHintsParams\022J\n\025product_search_params\030\005" + + " \001(\0132+.google.cloud.vision.v1.ProductSea" + + "rchParams\022H\n\024web_detection_params\030\006 \001(\0132" + + "*.google.cloud.vision.v1.WebDetectionPar" + + "ams\022J\n\025text_detection_params\030\014 \001(\0132+.goo" + + "gle.cloud.vision.v1.TextDetectionParams\"" + + "\264\001\n\024AnnotateImageRequest\022,\n\005image\030\001 \001(\0132" + + "\035.google.cloud.vision.v1.Image\0221\n\010featur" + + "es\030\002 \003(\0132\037.google.cloud.vision.v1.Featur" + + "e\022;\n\rimage_context\030\003 \001(\0132$.google.cloud." + + "vision.v1.ImageContext\":\n\026ImageAnnotatio" + + "nContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page_number\030\002 \001" + + "(\005\"\344\007\n\025AnnotateImageResponse\022@\n\020face_ann" + + "otations\030\001 \003(\0132&.google.cloud.vision.v1." + + "FaceAnnotation\022F\n\024landmark_annotations\030\002" + + " \003(\0132(.google.cloud.vision.v1.EntityAnno" + + "tation\022B\n\020logo_annotations\030\003 \003(\0132(.googl" + + "e.cloud.vision.v1.EntityAnnotation\022C\n\021la" + + "bel_annotations\030\004 \003(\0132(.google.cloud.vis" + + "ion.v1.EntityAnnotation\022W\n\034localized_obj" + + "ect_annotations\030\026 \003(\01321.google.cloud.vis" + + "ion.v1.LocalizedObjectAnnotation\022B\n\020text" + + "_annotations\030\005 \003(\0132(.google.cloud.vision" + + ".v1.EntityAnnotation\022D\n\024full_text_annota" + + "tion\030\014 \001(\0132&.google.cloud.vision.v1.Text" + + "Annotation\022L\n\026safe_search_annotation\030\006 \001" + + "(\0132,.google.cloud.vision.v1.SafeSearchAn" + + "notation\022L\n\033image_properties_annotation\030" + + "\010 \001(\0132\'.google.cloud.vision.v1.ImageProp" + + "erties\022J\n\025crop_hints_annotation\030\013 \001(\0132+." + + "google.cloud.vision.v1.CropHintsAnnotati" + + "on\022;\n\rweb_detection\030\r \001(\0132$.google.cloud" + + ".vision.v1.WebDetection\022L\n\026product_searc" + + "h_results\030\016 \001(\0132,.google.cloud.vision.v1" + + ".ProductSearchResults\022!\n\005error\030\t \001(\0132\022.g" + + "oogle.rpc.Status\022?\n\007context\030\025 \001(\0132..goog" + + "le.cloud.vision.v1.ImageAnnotationContex" + + "t\"q\n\032BatchAnnotateImagesRequest\022C\n\010reque" + + "sts\030\001 \003(\0132,.google.cloud.vision.v1.Annot" + + "ateImageRequestB\003\340A\002\022\016\n\006parent\030\004 \001(\t\"_\n\033" + + "BatchAnnotateImagesResponse\022@\n\tresponses" + + "\030\001 \003(\0132-.google.cloud.vision.v1.Annotate" + + "ImageResponse\"\317\001\n\023AnnotateFileRequest\0229\n" + + "\014input_config\030\001 \001(\0132#.google.cloud.visio" + + "n.v1.InputConfig\0221\n\010features\030\002 \003(\0132\037.goo" + + "gle.cloud.vision.v1.Feature\022;\n\rimage_con" + + "text\030\003 \001(\0132$.google.cloud.vision.v1.Imag" + + "eContext\022\r\n\005pages\030\004 \003(\005\"\313\001\n\024AnnotateFile" + + "Response\0229\n\014input_config\030\001 \001(\0132#.google." + + "cloud.vision.v1.InputConfig\022@\n\tresponses" + + "\030\002 \003(\0132-.google.cloud.vision.v1.Annotate" + + "ImageResponse\022\023\n\013total_pages\030\003 \001(\005\022!\n\005er" + + "ror\030\004 \001(\0132\022.google.rpc.Status\"o\n\031BatchAn" + + "notateFilesRequest\022B\n\010requests\030\001 \003(\0132+.g" + + "oogle.cloud.vision.v1.AnnotateFileReques" + + "tB\003\340A\002\022\016\n\006parent\030\003 \001(\t\"]\n\032BatchAnnotateF" + + "ilesResponse\022?\n\tresponses\030\001 \003(\0132,.google" + + ".cloud.vision.v1.AnnotateFileResponse\"\202\002" + + "\n\030AsyncAnnotateFileRequest\0229\n\014input_conf" + + "ig\030\001 \001(\0132#.google.cloud.vision.v1.InputC" + + "onfig\0221\n\010features\030\002 \003(\0132\037.google.cloud.v" + + "ision.v1.Feature\022;\n\rimage_context\030\003 \001(\0132" + + "$.google.cloud.vision.v1.ImageContext\022;\n" + + "\routput_config\030\004 \001(\0132$.google.cloud.visi" + + "on.v1.OutputConfig\"X\n\031AsyncAnnotateFileR" + + "esponse\022;\n\routput_config\030\001 \001(\0132$.google." + + "cloud.vision.v1.OutputConfig\"\270\001\n\037AsyncBa" + + "tchAnnotateImagesRequest\022C\n\010requests\030\001 \003" + + "(\0132,.google.cloud.vision.v1.AnnotateImag" + + "eRequestB\003\340A\002\022@\n\routput_config\030\002 \001(\0132$.g" + + "oogle.cloud.vision.v1.OutputConfigB\003\340A\002\022" + + "\016\n\006parent\030\004 \001(\t\"_\n AsyncBatchAnnotateIma" + + "gesResponse\022;\n\routput_config\030\001 \001(\0132$.goo" + + "gle.cloud.vision.v1.OutputConfig\"y\n\036Asyn" + + "cBatchAnnotateFilesRequest\022G\n\010requests\030\001" + + " \003(\01320.google.cloud.vision.v1.AsyncAnnot" + + "ateFileRequestB\003\340A\002\022\016\n\006parent\030\004 \001(\t\"g\n\037A" + + "syncBatchAnnotateFilesResponse\022D\n\trespon" + + "ses\030\001 \003(\01321.google.cloud.vision.v1.Async" + + "AnnotateFileResponse\"h\n\013InputConfig\0225\n\ng" + + "cs_source\030\001 \001(\0132!.google.cloud.vision.v1" + + ".GcsSource\022\017\n\007content\030\003 \001(\014\022\021\n\tmime_type" + + "\030\002 \001(\t\"c\n\014OutputConfig\022?\n\017gcs_destinatio" + + "n\030\001 \001(\0132&.google.cloud.vision.v1.GcsDest" + + "ination\022\022\n\nbatch_size\030\002 \001(\005\"\030\n\tGcsSource" + + "\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestination\022\013\n\003uri\030\001" + + " \001(\t\"\210\002\n\021OperationMetadata\022>\n\005state\030\001 \001(" + + "\0162/.google.cloud.vision.v1.OperationMeta" + + "data.State\022/\n\013create_time\030\005 \001(\0132\032.google" + + ".protobuf.Timestamp\022/\n\013update_time\030\006 \001(\013" + + "2\032.google.protobuf.Timestamp\"Q\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUN" + + "NING\020\002\022\010\n\004DONE\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikel" + + "ihood\022\013\n\007UNKNOWN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n" + + "\010UNLIKELY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n" + + "\013VERY_LIKELY\020\0052\365\n\n\016ImageAnnotator\022\223\002\n\023Ba" + + "tchAnnotateImages\0222.google.cloud.vision." + + "v1.BatchAnnotateImagesRequest\0323.google.c" + + "loud.vision.v1.BatchAnnotateImagesRespon" + + "se\"\222\001\202\323\344\223\002\200\001\"\023/v1/images:annotate:\001*Z8\"3" + + "/v1/{parent=projects/*/locations/*}/imag" + + "es:annotate:\001*Z,\"\'/v1/{parent=projects/*" + + "}/images:annotate:\001*\332A\010requests\022\214\002\n\022Batc" + + "hAnnotateFiles\0221.google.cloud.vision.v1." + + "BatchAnnotateFilesRequest\0322.google.cloud" + + ".vision.v1.BatchAnnotateFilesResponse\"\216\001" + + "\202\323\344\223\002}\"\022/v1/files:annotate:\001*Z7\"2/v1/{pa" + + "rent=projects/*/locations/*}/files:annot" + + "ate:\001*Z+\"&/v1/{parent=projects/*}/files:" + + "annotate:\001*\332A\010requests\022\353\002\n\030AsyncBatchAnn" + + "otateImages\0227.google.cloud.vision.v1.Asy" + + "ncBatchAnnotateImagesRequest\032\035.google.lo" + + "ngrunning.Operation\"\366\001\202\323\344\223\002\236\001\"\035/v1/image" + + "s:asyncBatchAnnotate:\001*ZB\"=/v1/{parent=p" + + "rojects/*/locations/*}/images:asyncBatch" + + "Annotate:\001*Z6\"1/v1/{parent=projects/*}/i" + + "mages:asyncBatchAnnotate:\001*\332A\026requests,o" + + "utput_config\312A5\n AsyncBatchAnnotateImage" + + "sResponse\022\021OperationMetadata\022\327\002\n\027AsyncBa" + + "tchAnnotateFiles\0226.google.cloud.vision.v" + + "1.AsyncBatchAnnotateFilesRequest\032\035.googl" + + "e.longrunning.Operation\"\344\001\202\323\344\223\002\233\001\"\034/v1/f" + + "iles:asyncBatchAnnotate:\001*ZA\" + * Image context and/or feature-specific parameters. + * + * + * Protobuf type {@code google.cloud.vision.v1.ImageContext} + */ +public final class ImageContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageContext) + ImageContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageContext.newBuilder() to construct. + private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageContext() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.LatLongRect.Builder subBuilder = null; + if (latLongRect_ != null) { + subBuilder = latLongRect_.toBuilder(); + } + latLongRect_ = input.readMessage(com.google.cloud.vision.v1.LatLongRect.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLongRect_); + latLongRect_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + case 34: { + com.google.cloud.vision.v1.CropHintsParams.Builder subBuilder = null; + if (cropHintsParams_ != null) { + subBuilder = cropHintsParams_.toBuilder(); + } + cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1.CropHintsParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsParams_); + cropHintsParams_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.cloud.vision.v1.ProductSearchParams.Builder subBuilder = null; + if (productSearchParams_ != null) { + subBuilder = productSearchParams_.toBuilder(); + } + productSearchParams_ = input.readMessage(com.google.cloud.vision.v1.ProductSearchParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchParams_); + productSearchParams_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.vision.v1.WebDetectionParams.Builder subBuilder = null; + if (webDetectionParams_ != null) { + subBuilder = webDetectionParams_.toBuilder(); + } + webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1.WebDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetectionParams_); + webDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1.TextDetectionParams.Builder subBuilder = null; + if (textDetectionParams_ != null) { + subBuilder = textDetectionParams_.toBuilder(); + } + textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1.TextDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionParams_); + textDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageContext.class, com.google.cloud.vision.v1.ImageContext.Builder.class); + } + + public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.LatLongRect latLongRect_; + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + @java.lang.Override + public boolean hasLatLongRect() { + return latLongRect_ != null; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRect getLatLongRect() { + return latLongRect_ == null ? com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + return getLatLongRect(); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList languageHints_; + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_; + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_; + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + @java.lang.Override + public boolean hasCropHintsParams() { + return cropHintsParams_ != null; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParams getCropHintsParams() { + return cropHintsParams_ == null ? com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + return getCropHintsParams(); + } + + public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_; + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + @java.lang.Override + public boolean hasProductSearchParams() { + return productSearchParams_ != null; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams() { + return productSearchParams_ == null ? com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + return getProductSearchParams(); + } + + public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_; + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + @java.lang.Override + public boolean hasWebDetectionParams() { + return webDetectionParams_ != null; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams() { + return webDetectionParams_ == null ? com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + return getWebDetectionParams(); + } + + public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1.TextDetectionParams textDetectionParams_; + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + @java.lang.Override + public boolean hasTextDetectionParams() { + return textDetectionParams_ != null; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams() { + return textDetectionParams_ == null ? com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + return getTextDetectionParams(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLongRect_ != null) { + output.writeMessage(1, getLatLongRect()); + } + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); + } + if (cropHintsParams_ != null) { + output.writeMessage(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + output.writeMessage(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + output.writeMessage(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + output.writeMessage(12, getTextDetectionParams()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLongRect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLongRect()); + } + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + if (cropHintsParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTextDetectionParams()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImageContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImageContext other = (com.google.cloud.vision.v1.ImageContext) obj; + + if (hasLatLongRect() != other.hasLatLongRect()) return false; + if (hasLatLongRect()) { + if (!getLatLongRect() + .equals(other.getLatLongRect())) return false; + } + if (!getLanguageHintsList() + .equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; + if (hasCropHintsParams()) { + if (!getCropHintsParams() + .equals(other.getCropHintsParams())) return false; + } + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; + if (hasProductSearchParams()) { + if (!getProductSearchParams() + .equals(other.getProductSearchParams())) return false; + } + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; + if (hasWebDetectionParams()) { + if (!getWebDetectionParams() + .equals(other.getWebDetectionParams())) return false; + } + if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; + if (hasTextDetectionParams()) { + if (!getTextDetectionParams() + .equals(other.getTextDetectionParams())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLongRect()) { + hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; + hash = (53 * hash) + getLatLongRect().hashCode(); + } + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + if (hasCropHintsParams()) { + hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsParams().hashCode(); + } + if (hasProductSearchParams()) { + hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchParams().hashCode(); + } + if (hasWebDetectionParams()) { + hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getWebDetectionParams().hashCode(); + } + if (hasTextDetectionParams()) { + hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImageContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImageContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Image context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageContext) + com.google.cloud.vision.v1.ImageContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageContext.class, com.google.cloud.vision.v1.ImageContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImageContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImageContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext build() { + com.google.cloud.vision.v1.ImageContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext buildPartial() { + com.google.cloud.vision.v1.ImageContext result = new com.google.cloud.vision.v1.ImageContext(this); + int from_bitField0_ = bitField0_; + if (latLongRectBuilder_ == null) { + result.latLongRect_ = latLongRect_; + } else { + result.latLongRect_ = latLongRectBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + if (cropHintsParamsBuilder_ == null) { + result.cropHintsParams_ = cropHintsParams_; + } else { + result.cropHintsParams_ = cropHintsParamsBuilder_.build(); + } + if (productSearchParamsBuilder_ == null) { + result.productSearchParams_ = productSearchParams_; + } else { + result.productSearchParams_ = productSearchParamsBuilder_.build(); + } + if (webDetectionParamsBuilder_ == null) { + result.webDetectionParams_ = webDetectionParams_; + } else { + result.webDetectionParams_ = webDetectionParamsBuilder_.build(); + } + if (textDetectionParamsBuilder_ == null) { + result.textDetectionParams_ = textDetectionParams_; + } else { + result.textDetectionParams_ = textDetectionParamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImageContext) { + return mergeFrom((com.google.cloud.vision.v1.ImageContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImageContext other) { + if (other == com.google.cloud.vision.v1.ImageContext.getDefaultInstance()) return this; + if (other.hasLatLongRect()) { + mergeLatLongRect(other.getLatLongRect()); + } + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + if (other.hasCropHintsParams()) { + mergeCropHintsParams(other.getCropHintsParams()); + } + if (other.hasProductSearchParams()) { + mergeProductSearchParams(other.getProductSearchParams()); + } + if (other.hasWebDetectionParams()) { + mergeWebDetectionParams(other.getWebDetectionParams()); + } + if (other.hasTextDetectionParams()) { + mergeTextDetectionParams(other.getTextDetectionParams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImageContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImageContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.LatLongRect latLongRect_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder> latLongRectBuilder_; + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + public boolean hasLatLongRect() { + return latLongRectBuilder_ != null || latLongRect_ != null; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + public com.google.cloud.vision.v1.LatLongRect getLatLongRect() { + if (latLongRectBuilder_ == null) { + return latLongRect_ == null ? com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; + } else { + return latLongRectBuilder_.getMessage(); + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect(com.google.cloud.vision.v1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLongRect_ = value; + onChanged(); + } else { + latLongRectBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect( + com.google.cloud.vision.v1.LatLongRect.Builder builderForValue) { + if (latLongRectBuilder_ == null) { + latLongRect_ = builderForValue.build(); + onChanged(); + } else { + latLongRectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public Builder mergeLatLongRect(com.google.cloud.vision.v1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (latLongRect_ != null) { + latLongRect_ = + com.google.cloud.vision.v1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); + } else { + latLongRect_ = value; + } + onChanged(); + } else { + latLongRectBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public Builder clearLatLongRect() { + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + onChanged(); + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1.LatLongRect.Builder getLatLongRectBuilder() { + + onChanged(); + return getLatLongRectFieldBuilder().getBuilder(); + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + if (latLongRectBuilder_ != null) { + return latLongRectBuilder_.getMessageOrBuilder(); + } else { + return latLongRect_ == null ? + com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder> + getLatLongRectFieldBuilder() { + if (latLongRectBuilder_ == null) { + latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder>( + getLatLongRect(), + getParentForChildren(), + isClean()); + latLongRect_ = null; + } + return latLongRectBuilder_; + } + + private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints( + java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languageHints_); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + public boolean hasCropHintsParams() { + return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + public com.google.cloud.vision.v1.CropHintsParams getCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + return cropHintsParams_ == null ? com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } else { + return cropHintsParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams(com.google.cloud.vision.v1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsParams_ = value; + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams( + com.google.cloud.vision.v1.CropHintsParams.Builder builderForValue) { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = builderForValue.build(); + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public Builder mergeCropHintsParams(com.google.cloud.vision.v1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (cropHintsParams_ != null) { + cropHintsParams_ = + com.google.cloud.vision.v1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); + } else { + cropHintsParams_ = value; + } + onChanged(); + } else { + cropHintsParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public Builder clearCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + onChanged(); + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1.CropHintsParams.Builder getCropHintsParamsBuilder() { + + onChanged(); + return getCropHintsParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + if (cropHintsParamsBuilder_ != null) { + return cropHintsParamsBuilder_.getMessageOrBuilder(); + } else { + return cropHintsParams_ == null ? + com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder> + getCropHintsParamsFieldBuilder() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder>( + getCropHintsParams(), + getParentForChildren(), + isClean()); + cropHintsParams_ = null; + } + return cropHintsParamsBuilder_; + } + + private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + public boolean hasProductSearchParams() { + return productSearchParamsBuilder_ != null || productSearchParams_ != null; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + public com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + return productSearchParams_ == null ? com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } else { + return productSearchParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams(com.google.cloud.vision.v1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchParams_ = value; + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams( + com.google.cloud.vision.v1.ProductSearchParams.Builder builderForValue) { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = builderForValue.build(); + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public Builder mergeProductSearchParams(com.google.cloud.vision.v1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (productSearchParams_ != null) { + productSearchParams_ = + com.google.cloud.vision.v1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); + } else { + productSearchParams_ = value; + } + onChanged(); + } else { + productSearchParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public Builder clearProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + onChanged(); + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1.ProductSearchParams.Builder getProductSearchParamsBuilder() { + + onChanged(); + return getProductSearchParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + if (productSearchParamsBuilder_ != null) { + return productSearchParamsBuilder_.getMessageOrBuilder(); + } else { + return productSearchParams_ == null ? + com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder> + getProductSearchParamsFieldBuilder() { + if (productSearchParamsBuilder_ == null) { + productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder>( + getProductSearchParams(), + getParentForChildren(), + isClean()); + productSearchParams_ = null; + } + return productSearchParamsBuilder_; + } + + private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + public boolean hasWebDetectionParams() { + return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + public com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + return webDetectionParams_ == null ? com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } else { + return webDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams(com.google.cloud.vision.v1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetectionParams_ = value; + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams( + com.google.cloud.vision.v1.WebDetectionParams.Builder builderForValue) { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public Builder mergeWebDetectionParams(com.google.cloud.vision.v1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (webDetectionParams_ != null) { + webDetectionParams_ = + com.google.cloud.vision.v1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); + } else { + webDetectionParams_ = value; + } + onChanged(); + } else { + webDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public Builder clearWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + onChanged(); + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { + + onChanged(); + return getWebDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + if (webDetectionParamsBuilder_ != null) { + return webDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return webDetectionParams_ == null ? + com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder> + getWebDetectionParamsFieldBuilder() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder>( + getWebDetectionParams(), + getParentForChildren(), + isClean()); + webDetectionParams_ = null; + } + return webDetectionParamsBuilder_; + } + + private com.google.cloud.vision.v1.TextDetectionParams textDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + public boolean hasTextDetectionParams() { + return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + public com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + return textDetectionParams_ == null ? com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } else { + return textDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams(com.google.cloud.vision.v1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionParams_ = value; + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams( + com.google.cloud.vision.v1.TextDetectionParams.Builder builderForValue) { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public Builder mergeTextDetectionParams(com.google.cloud.vision.v1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (textDetectionParams_ != null) { + textDetectionParams_ = + com.google.cloud.vision.v1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); + } else { + textDetectionParams_ = value; + } + onChanged(); + } else { + textDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public Builder clearTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + onChanged(); + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { + + onChanged(); + return getTextDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + if (textDetectionParamsBuilder_ != null) { + return textDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return textDetectionParams_ == null ? + com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder> + getTextDetectionParamsFieldBuilder() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder>( + getTextDetectionParams(), + getParentForChildren(), + isClean()); + textDetectionParams_ = null; + } + return textDetectionParamsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageContext) + private static final com.google.cloud.vision.v1.ImageContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageContext(); + } + + public static com.google.cloud.vision.v1.ImageContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java new file mode 100644 index 000000000000..239bae6176fc --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java @@ -0,0 +1,213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ImageContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + boolean hasLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + com.google.cloud.vision.v1.LatLongRect getLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder(); + + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + java.util.List + getLanguageHintsList(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString + getLanguageHintsBytes(int index); + + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + boolean hasCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + com.google.cloud.vision.v1.CropHintsParams getCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); + + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + boolean hasProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); + + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + boolean hasWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); + + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + boolean hasTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java new file mode 100644 index 000000000000..282193096be4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateImages requests. It does
+   * not work for AsyncBatchAnnotateImages requests.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + * @return The source. + */ + com.google.cloud.vision.v1.ImageSource getSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1.ImageSource source = 2; + */ + com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java new file mode 100644 index 000000000000..bd3ff4ccd000 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Stores image properties, such as dominant colors.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageProperties} + */ +public final class ImageProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageProperties) + ImagePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageProperties.newBuilder() to construct. + private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageProperties() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.DominantColorsAnnotation.Builder subBuilder = null; + if (dominantColors_ != null) { + subBuilder = dominantColors_.toBuilder(); + } + dominantColors_ = input.readMessage(com.google.cloud.vision.v1.DominantColorsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dominantColors_); + dominantColors_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageProperties.class, com.google.cloud.vision.v1.ImageProperties.Builder.class); + } + + public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_; + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + @java.lang.Override + public boolean hasDominantColors() { + return dominantColors_ != null; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors() { + return dominantColors_ == null ? com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + return getDominantColors(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dominantColors_ != null) { + output.writeMessage(1, getDominantColors()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dominantColors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDominantColors()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImageProperties)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImageProperties other = (com.google.cloud.vision.v1.ImageProperties) obj; + + if (hasDominantColors() != other.hasDominantColors()) return false; + if (hasDominantColors()) { + if (!getDominantColors() + .equals(other.getDominantColors())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDominantColors()) { + hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; + hash = (53 * hash) + getDominantColors().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImageProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores image properties, such as dominant colors.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageProperties) + com.google.cloud.vision.v1.ImagePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageProperties.class, com.google.cloud.vision.v1.ImageProperties.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImageProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageProperties getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImageProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageProperties build() { + com.google.cloud.vision.v1.ImageProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageProperties buildPartial() { + com.google.cloud.vision.v1.ImageProperties result = new com.google.cloud.vision.v1.ImageProperties(this); + if (dominantColorsBuilder_ == null) { + result.dominantColors_ = dominantColors_; + } else { + result.dominantColors_ = dominantColorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImageProperties) { + return mergeFrom((com.google.cloud.vision.v1.ImageProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImageProperties other) { + if (other == com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()) return this; + if (other.hasDominantColors()) { + mergeDominantColors(other.getDominantColors()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImageProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImageProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + public boolean hasDominantColors() { + return dominantColorsBuilder_ != null || dominantColors_ != null; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + public com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors() { + if (dominantColorsBuilder_ == null) { + return dominantColors_ == null ? com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } else { + return dominantColorsBuilder_.getMessage(); + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors(com.google.cloud.vision.v1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dominantColors_ = value; + onChanged(); + } else { + dominantColorsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors( + com.google.cloud.vision.v1.DominantColorsAnnotation.Builder builderForValue) { + if (dominantColorsBuilder_ == null) { + dominantColors_ = builderForValue.build(); + onChanged(); + } else { + dominantColorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder mergeDominantColors(com.google.cloud.vision.v1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (dominantColors_ != null) { + dominantColors_ = + com.google.cloud.vision.v1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); + } else { + dominantColors_ = value; + } + onChanged(); + } else { + dominantColorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder clearDominantColors() { + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + onChanged(); + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { + + onChanged(); + return getDominantColorsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + if (dominantColorsBuilder_ != null) { + return dominantColorsBuilder_.getMessageOrBuilder(); + } else { + return dominantColors_ == null ? + com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder> + getDominantColorsFieldBuilder() { + if (dominantColorsBuilder_ == null) { + dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder>( + getDominantColors(), + getParentForChildren(), + isClean()); + dominantColors_ = null; + } + return dominantColorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageProperties) + private static final com.google.cloud.vision.v1.ImageProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageProperties(); + } + + public static com.google.cloud.vision.v1.ImageProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java new file mode 100644 index 000000000000..f12aab933d94 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ImagePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + boolean hasDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java new file mode 100644 index 000000000000..6e281845eef1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java @@ -0,0 +1,880 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * External image source (Google Cloud Storage or web URL image location).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageSource} + */ +public final class ImageSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageSource) + ImageSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageSource.newBuilder() to construct. + private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageSource() { + gcsImageUri_ = ""; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + gcsImageUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageSource.class, com.google.cloud.vision.v1.ImageSource.Builder.class); + } + + public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsImageUri_; + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + @java.lang.Override + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } + } + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImageSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImageSource other = (com.google.cloud.vision.v1.ImageSource) obj; + + if (!getGcsImageUri() + .equals(other.getGcsImageUri())) return false; + if (!getImageUri() + .equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsImageUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImageSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImageSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * External image source (Google Cloud Storage or web URL image location).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImageSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageSource) + com.google.cloud.vision.v1.ImageSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImageSource.class, com.google.cloud.vision.v1.ImageSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImageSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + gcsImageUri_ = ""; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImageSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageSource build() { + com.google.cloud.vision.v1.ImageSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageSource buildPartial() { + com.google.cloud.vision.v1.ImageSource result = new com.google.cloud.vision.v1.ImageSource(this); + result.gcsImageUri_ = gcsImageUri_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImageSource) { + return mergeFrom((com.google.cloud.vision.v1.ImageSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImageSource other) { + if (other == com.google.cloud.vision.v1.ImageSource.getDefaultInstance()) return this; + if (!other.getGcsImageUri().isEmpty()) { + gcsImageUri_ = other.gcsImageUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImageSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImageSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsImageUri_ = ""; + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsImageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return This builder for chaining. + */ + public Builder clearGcsImageUri() { + + gcsImageUri_ = getDefaultInstance().getGcsImageUri(); + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The bytes for gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageSource) + private static final com.google.cloud.vision.v1.ImageSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageSource(); + } + + public static com.google.cloud.vision.v1.ImageSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImageSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java new file mode 100644 index 000000000000..448e857e8b49 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface ImageSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + java.lang.String getGcsImageUri(); + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + com.google.protobuf.ByteString + getGcsImageUriBytes(); + + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString + getImageUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java new file mode 100644 index 000000000000..204c5af64820 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java @@ -0,0 +1,919 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The Google Cloud Storage location for a csv file which preserves a list of
+ * ImportProductSetRequests in each line.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsGcsSource} + */ +public final class ImportProductSetsGcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsGcsSource) + ImportProductSetsGcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsGcsSource.newBuilder() to construct. + private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsGcsSource() { + csvFileUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsGcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsGcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + csvFileUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder.class); + } + + public static final int CSV_FILE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object csvFileUri_; + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1.Product.product_category], and the
+   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+   * space (" "). You can update the `display_name` later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + @java.lang.Override + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } + } + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1.Product.product_category], and the
+   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+   * space (" "). You can update the `display_name` later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsGcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1.ImportProductSetsGcsSource) obj; + + if (!getCsvFileUri() + .equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCsvFileUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsGcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list of
+   * ImportProductSetRequests in each line.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsGcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsGcsSource) + com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImportProductSetsGcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + csvFileUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource build() { + com.google.cloud.vision.v1.ImportProductSetsGcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource buildPartial() { + com.google.cloud.vision.v1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1.ImportProductSetsGcsSource(this); + result.csvFileUri_ = csvFileUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImportProductSetsGcsSource) { + return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsGcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsGcsSource other) { + if (other == com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance()) return this; + if (!other.getCsvFileUri().isEmpty()) { + csvFileUri_ = other.csvFileUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImportProductSetsGcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object csvFileUri_ = ""; + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1.Product.product_category], and the
+     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+     * space (" "). You can update the `display_name` later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1.Product.product_category], and the
+     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+     * space (" "). You can update the `display_name` later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1.Product.product_category], and the
+     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+     * space (" "). You can update the `display_name` later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @param value The csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + csvFileUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1.Product.product_category], and the
+     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+     * space (" "). You can update the `display_name` later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCsvFileUri() { + + csvFileUri_ = getDefaultInstance().getCsvFileUri(); + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1.Product.product_category], and the
+     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+     * space (" "). You can update the `display_name` later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @param value The bytes for csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + csvFileUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsGcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsGcsSource) + private static final com.google.cloud.vision.v1.ImportProductSetsGcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsGcsSource(); + } + + public static com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsGcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsGcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java new file mode 100644 index 000000000000..18bba94c3c66 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ImportProductSetsGcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsGcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1.Product.product_category], and the
+   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+   * space (" "). You can update the `display_name` later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + java.lang.String getCsvFileUri(); + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1.Product.product_category], and the
+   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
+   * space (" "). You can update the `display_name` later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + com.google.protobuf.ByteString + getCsvFileUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java new file mode 100644 index 000000000000..157735a09c98 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The input content for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsInputConfig} + */ +public final class ImportProductSetsInputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsInputConfig) + ImportProductSetsInputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsInputConfig.newBuilder() to construct. + private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsInputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.cloud.vision.v1.ImportProductSetsGcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: return GCS_SOURCE; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsInputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1.ImportProductSetsInputConfig) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsInputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The input content for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsInputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsInputConfig) + com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImportProductSetsInputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfig build() { + com.google.cloud.vision.v1.ImportProductSetsInputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfig buildPartial() { + com.google.cloud.vision.v1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1.ImportProductSetsInputConfig(this); + if (sourceCase_ == 1) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImportProductSetsInputConfig) { + return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsInputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsInputConfig other) { + if (other == com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case GCS_SOURCE: { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImportProductSetsInputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 && + source_ != com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance()) { + source_ = com.google.cloud.vision.v1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder>( + (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged();; + return gcsSourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsInputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsInputConfig) + private static final com.google.cloud.vision.v1.ImportProductSetsInputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsInputConfig(); + } + + public static com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsInputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsInputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java new file mode 100644 index 000000000000..7ef471af6068 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ImportProductSetsInputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsInputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); + + public com.google.cloud.vision.v1.ImportProductSetsInputConfig.SourceCase getSourceCase(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java new file mode 100644 index 000000000000..360a45d3b62e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsRequest} + */ +public final class ImportProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsRequest) + ImportProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsRequest.newBuilder() to construct. + private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1.ImportProductSetsInputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsRequest.class, com.google.cloud.vision.v1.ImportProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_; + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inputConfig_ != null) { + output.writeMessage(2, getInputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImportProductSetsRequest other = (com.google.cloud.vision.v1.ImportProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsRequest) + com.google.cloud.vision.v1.ImportProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsRequest.class, com.google.cloud.vision.v1.ImportProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImportProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsRequest build() { + com.google.cloud.vision.v1.ImportProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsRequest buildPartial() { + com.google.cloud.vision.v1.ImportProductSetsRequest result = new com.google.cloud.vision.v1.ImportProductSetsRequest(this); + result.parent_ = parent_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImportProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsRequest other) { + if (other == com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImportProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig(com.google.cloud.vision.v1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsRequest) + private static final com.google.cloud.vision.v1.ImportProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsRequest(); + } + + public static com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..9f1b2089d171 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ImportProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java new file mode 100644 index 000000000000..05d0ef3a950e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java @@ -0,0 +1,1410 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response message for the `ImportProductSets` method.
+ * This message is returned by the
+ * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
+ * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsResponse} + */ +public final class ImportProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsResponse) + ImportProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsResponse.newBuilder() to construct. + private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsResponse() { + referenceImages_ = java.util.Collections.emptyList(); + statuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + statuses_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsResponse.class, com.google.cloud.vision.v1.ImportProductSetsResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int STATUSES_FIELD_NUMBER = 2; + private java.util.List statuses_; + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List getStatusesList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List + getStatusesOrBuilderList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public int getStatusesCount() { + return statuses_.size(); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.Status getStatuses(int index) { + return statuses_.get(index); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + return statuses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + output.writeMessage(2, statuses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, statuses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ImportProductSetsResponse other = (com.google.cloud.vision.v1.ImportProductSetsResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (!getStatusesList() + .equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + if (getStatusesCount() > 0) { + hash = (37 * hash) + STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getStatusesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ImportProductSets` method.
+   * This message is returned by the
+   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
+   * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsResponse) + com.google.cloud.vision.v1.ImportProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ImportProductSetsResponse.class, com.google.cloud.vision.v1.ImportProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ImportProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + getStatusesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + statusesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ImportProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsResponse build() { + com.google.cloud.vision.v1.ImportProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsResponse buildPartial() { + com.google.cloud.vision.v1.ImportProductSetsResponse result = new com.google.cloud.vision.v1.ImportProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + if (statusesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.statuses_ = statuses_; + } else { + result.statuses_ = statusesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ImportProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsResponse other) { + if (other == com.google.cloud.vision.v1.ImportProductSetsResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (statusesBuilder_ == null) { + if (!other.statuses_.isEmpty()) { + if (statuses_.isEmpty()) { + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatusesIsMutable(); + statuses_.addAll(other.statuses_); + } + onChanged(); + } + } else { + if (!other.statuses_.isEmpty()) { + if (statusesBuilder_.isEmpty()) { + statusesBuilder_.dispose(); + statusesBuilder_ = null; + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + statusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStatusesFieldBuilder() : null; + } else { + statusesBuilder_.addAllMessages(other.statuses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ImportProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private java.util.List statuses_ = + java.util.Collections.emptyList(); + private void ensureStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(statuses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; + + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List getStatusesList() { + if (statusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(statuses_); + } else { + return statusesBuilder_.getMessageList(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public int getStatusesCount() { + if (statusesBuilder_ == null) { + return statuses_.size(); + } else { + return statusesBuilder_.getCount(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status getStatuses(int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); + } else { + return statusesBuilder_.getMessage(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.set(index, value); + onChanged(); + } else { + statusesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.set(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses(com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(value); + onChanged(); + } else { + statusesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(index, value); + onChanged(); + } else { + statusesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addAllStatuses( + java.lang.Iterable values) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, statuses_); + onChanged(); + } else { + statusesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder clearStatuses() { + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + statusesBuilder_.clear(); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder removeStatuses(int index) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.remove(index); + onChanged(); + } else { + statusesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder getStatusesBuilder( + int index) { + return getStatusesFieldBuilder().getBuilder(index); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); } else { + return statusesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesOrBuilderList() { + if (statusesBuilder_ != null) { + return statusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(statuses_); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder() { + return getStatusesFieldBuilder().addBuilder( + com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder( + int index) { + return getStatusesFieldBuilder().addBuilder( + index, com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesBuilderList() { + return getStatusesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusesFieldBuilder() { + if (statusesBuilder_ == null) { + statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + statuses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + statuses_ = null; + } + return statusesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsResponse) + private static final com.google.cloud.vision.v1.ImportProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsResponse(); + } + + public static com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..1a85174ad21d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ImportProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.Status getStatuses(int index); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + int getStatusesCount(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesOrBuilderList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java new file mode 100644 index 000000000000..83a3d8017477 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java @@ -0,0 +1,938 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The desired input location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.InputConfig} + */ +public final class InputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.InputConfig) + InputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputConfig() { + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.GcsSource.Builder subBuilder = null; + if (gcsSource_ != null) { + subBuilder = gcsSource_.toBuilder(); + } + gcsSource_ = input.readMessage(com.google.cloud.vision.v1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsSource_); + gcsSource_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: { + + content_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.InputConfig.class, com.google.cloud.vision.v1.InputConfig.Builder.class); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.GcsSource gcsSource_; + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return gcsSource_ != null; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1.GcsSource getGcsSource() { + return gcsSource_ == null ? com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + return getGcsSource(); + } + + public static final int CONTENT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString content_; + /** + *
+   * File content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateFiles requests. It does
+   * not work for AsyncBatchAnnotateFiles requests.
+   * 
+ * + * bytes content = 3; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsSource_ != null) { + output.writeMessage(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + if (!content_.isEmpty()) { + output.writeBytes(3, content_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, content_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.InputConfig other = (com.google.cloud.vision.v1.InputConfig) obj; + + if (hasGcsSource() != other.hasGcsSource()) return false; + if (hasGcsSource()) { + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (!getMimeType() + .equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsSource()) { + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.InputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.InputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.InputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired input location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.InputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.InputConfig) + com.google.cloud.vision.v1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.InputConfig.class, com.google.cloud.vision.v1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + content_ = com.google.protobuf.ByteString.EMPTY; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig build() { + com.google.cloud.vision.v1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig buildPartial() { + com.google.cloud.vision.v1.InputConfig result = new com.google.cloud.vision.v1.InputConfig(this); + if (gcsSourceBuilder_ == null) { + result.gcsSource_ = gcsSource_; + } else { + result.gcsSource_ = gcsSourceBuilder_.build(); + } + result.content_ = content_; + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.InputConfig) { + return mergeFrom((com.google.cloud.vision.v1.InputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.InputConfig other) { + if (other == com.google.cloud.vision.v1.InputConfig.getDefaultInstance()) return this; + if (other.hasGcsSource()) { + mergeGcsSource(other.getGcsSource()); + } + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.GcsSource gcsSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + public boolean hasGcsSource() { + return gcsSourceBuilder_ != null || gcsSource_ != null; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + public com.google.cloud.vision.v1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + return gcsSource_ == null ? com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; + } else { + return gcsSourceBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + gcsSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (gcsSource_ != null) { + gcsSource_ = + com.google.cloud.vision.v1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); + } else { + gcsSource_ = value; + } + onChanged(); + } else { + gcsSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + onChanged(); + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1.GcsSource.Builder getGcsSourceBuilder() { + + onChanged(); + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (gcsSourceBuilder_ != null) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + return gcsSource_ == null ? + com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder>( + getGcsSource(), + getParentForChildren(), + isClean()); + gcsSource_ = null; + } + return gcsSourceBuilder_; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.InputConfig) + private static final com.google.cloud.vision.v1.InputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.InputConfig(); + } + + public static com.google.cloud.vision.v1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..d3a2ff9c3c66 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface InputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1.GcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + *
+   * File content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateFiles requests. It does
+   * not work for AsyncBatchAnnotateFiles requests.
+   * 
+ * + * bytes content = 3; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java new file mode 100644 index 000000000000..27a3a58eb0b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Rectangle determined by min and max `LatLng` pairs.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LatLongRect} + */ +public final class LatLongRect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LatLongRect) + LatLongRectOrBuilder { +private static final long serialVersionUID = 0L; + // Use LatLongRect.newBuilder() to construct. + private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LatLongRect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LatLongRect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LatLongRect( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (minLatLng_ != null) { + subBuilder = minLatLng_.toBuilder(); + } + minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minLatLng_); + minLatLng_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.type.LatLng.Builder subBuilder = null; + if (maxLatLng_ != null) { + subBuilder = maxLatLng_.toBuilder(); + } + maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxLatLng_); + maxLatLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LatLongRect.class, com.google.cloud.vision.v1.LatLongRect.Builder.class); + } + + public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng minLatLng_; + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + @java.lang.Override + public boolean hasMinLatLng() { + return minLatLng_ != null; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMinLatLng() { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + return getMinLatLng(); + } + + public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; + private com.google.type.LatLng maxLatLng_; + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + @java.lang.Override + public boolean hasMaxLatLng() { + return maxLatLng_ != null; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMaxLatLng() { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + return getMaxLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minLatLng_ != null) { + output.writeMessage(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + output.writeMessage(2, getMaxLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.LatLongRect)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.LatLongRect other = (com.google.cloud.vision.v1.LatLongRect) obj; + + if (hasMinLatLng() != other.hasMinLatLng()) return false; + if (hasMinLatLng()) { + if (!getMinLatLng() + .equals(other.getMinLatLng())) return false; + } + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; + if (hasMaxLatLng()) { + if (!getMaxLatLng() + .equals(other.getMaxLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinLatLng()) { + hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMinLatLng().hashCode(); + } + if (hasMaxLatLng()) { + hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMaxLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LatLongRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LatLongRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.LatLongRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rectangle determined by min and max `LatLng` pairs.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LatLongRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LatLongRect) + com.google.cloud.vision.v1.LatLongRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LatLongRect.class, com.google.cloud.vision.v1.LatLongRect.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.LatLongRect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRect getDefaultInstanceForType() { + return com.google.cloud.vision.v1.LatLongRect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRect build() { + com.google.cloud.vision.v1.LatLongRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRect buildPartial() { + com.google.cloud.vision.v1.LatLongRect result = new com.google.cloud.vision.v1.LatLongRect(this); + if (minLatLngBuilder_ == null) { + result.minLatLng_ = minLatLng_; + } else { + result.minLatLng_ = minLatLngBuilder_.build(); + } + if (maxLatLngBuilder_ == null) { + result.maxLatLng_ = maxLatLng_; + } else { + result.maxLatLng_ = maxLatLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.LatLongRect) { + return mergeFrom((com.google.cloud.vision.v1.LatLongRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.LatLongRect other) { + if (other == com.google.cloud.vision.v1.LatLongRect.getDefaultInstance()) return this; + if (other.hasMinLatLng()) { + mergeMinLatLng(other.getMinLatLng()); + } + if (other.hasMaxLatLng()) { + mergeMaxLatLng(other.getMaxLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.LatLongRect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.LatLongRect) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng minLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + public boolean hasMinLatLng() { + return minLatLngBuilder_ != null || minLatLng_ != null; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + public com.google.type.LatLng getMinLatLng() { + if (minLatLngBuilder_ == null) { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } else { + return minLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minLatLng_ = value; + onChanged(); + } else { + minLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (minLatLngBuilder_ == null) { + minLatLng_ = builderForValue.build(); + onChanged(); + } else { + minLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder mergeMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (minLatLng_ != null) { + minLatLng_ = + com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); + } else { + minLatLng_ = value; + } + onChanged(); + } else { + minLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder clearMinLatLng() { + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + onChanged(); + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLng.Builder getMinLatLngBuilder() { + + onChanged(); + return getMinLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + if (minLatLngBuilder_ != null) { + return minLatLngBuilder_.getMessageOrBuilder(); + } else { + return minLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMinLatLngFieldBuilder() { + if (minLatLngBuilder_ == null) { + minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMinLatLng(), + getParentForChildren(), + isClean()); + minLatLng_ = null; + } + return minLatLngBuilder_; + } + + private com.google.type.LatLng maxLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + public boolean hasMaxLatLng() { + return maxLatLngBuilder_ != null || maxLatLng_ != null; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + public com.google.type.LatLng getMaxLatLng() { + if (maxLatLngBuilder_ == null) { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } else { + return maxLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxLatLng_ = value; + onChanged(); + } else { + maxLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = builderForValue.build(); + onChanged(); + } else { + maxLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder mergeMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (maxLatLng_ != null) { + maxLatLng_ = + com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); + } else { + maxLatLng_ = value; + } + onChanged(); + } else { + maxLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder clearMaxLatLng() { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + onChanged(); + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLng.Builder getMaxLatLngBuilder() { + + onChanged(); + return getMaxLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + if (maxLatLngBuilder_ != null) { + return maxLatLngBuilder_.getMessageOrBuilder(); + } else { + return maxLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMaxLatLngFieldBuilder() { + if (maxLatLngBuilder_ == null) { + maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMaxLatLng(), + getParentForChildren(), + isClean()); + maxLatLng_ = null; + } + return maxLatLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LatLongRect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LatLongRect) + private static final com.google.cloud.vision.v1.LatLongRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LatLongRect(); + } + + public static com.google.cloud.vision.v1.LatLongRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatLongRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatLongRect(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LatLongRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java new file mode 100644 index 000000000000..2ec9e67d4153 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface LatLongRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LatLongRect) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + boolean hasMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + com.google.type.LatLng getMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); + + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + boolean hasMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + com.google.type.LatLng getMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java new file mode 100644 index 000000000000..410f257d76f6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A bucketized representation of likelihood, which is intended to give clients
+ * highly stable results across model upgrades.
+ * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * It is very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + *
+   * It is unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * It is possible.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + *
+   * It is likely.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * It is very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * It is very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + *
+   * It is unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * It is possible.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + *
+   * It is likely.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * It is very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Likelihood) +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java new file mode 100644 index 000000000000..112401ca0773 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductSetsRequest} + */ +public final class ListProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductSetsRequest) + ListProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsRequest.newBuilder() to construct. + private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductSetsRequest.class, com.google.cloud.vision.v1.ListProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductSetsRequest other = (com.google.cloud.vision.v1.ListProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductSetsRequest) + com.google.cloud.vision.v1.ListProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductSetsRequest.class, com.google.cloud.vision.v1.ListProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsRequest build() { + com.google.cloud.vision.v1.ListProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsRequest buildPartial() { + com.google.cloud.vision.v1.ListProductSetsRequest result = new com.google.cloud.vision.v1.ListProductSetsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1.ListProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductSetsRequest other) { + if (other == com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductSetsRequest) + private static final com.google.cloud.vision.v1.ListProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductSetsRequest(); + } + + public static com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..f4edd0a25663 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java new file mode 100644 index 000000000000..109fba3047e7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductSetsResponse} + */ +public final class ListProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductSetsResponse) + ListProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsResponse.newBuilder() to construct. + private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsResponse() { + productSets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productSets_.add( + input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductSetsResponse.class, com.google.cloud.vision.v1.ListProductSetsResponse.Builder.class); + } + + public static final int PRODUCT_SETS_FIELD_NUMBER = 1; + private java.util.List productSets_; + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List getProductSetsList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List + getProductSetsOrBuilderList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + @java.lang.Override + public int getProductSetsCount() { + return productSets_.size(); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet getProductSets(int index) { + return productSets_.get(index); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + return productSets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < productSets_.size(); i++) { + output.writeMessage(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < productSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductSetsResponse other = (com.google.cloud.vision.v1.ListProductSetsResponse) obj; + + if (!getProductSetsList() + .equals(other.getProductSetsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductSetsCount() > 0) { + hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getProductSetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductSetsResponse) + com.google.cloud.vision.v1.ListProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductSetsResponse.class, com.google.cloud.vision.v1.ListProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductSetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productSetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsResponse build() { + com.google.cloud.vision.v1.ListProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsResponse buildPartial() { + com.google.cloud.vision.v1.ListProductSetsResponse result = new com.google.cloud.vision.v1.ListProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (productSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productSets_ = productSets_; + } else { + result.productSets_ = productSetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1.ListProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductSetsResponse other) { + if (other == com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance()) return this; + if (productSetsBuilder_ == null) { + if (!other.productSets_.isEmpty()) { + if (productSets_.isEmpty()) { + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductSetsIsMutable(); + productSets_.addAll(other.productSets_); + } + onChanged(); + } + } else { + if (!other.productSets_.isEmpty()) { + if (productSetsBuilder_.isEmpty()) { + productSetsBuilder_.dispose(); + productSetsBuilder_ = null; + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + productSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductSetsFieldBuilder() : null; + } else { + productSetsBuilder_.addAllMessages(other.productSets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List productSets_ = + java.util.Collections.emptyList(); + private void ensureProductSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(productSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetsBuilder_; + + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public java.util.List getProductSetsList() { + if (productSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productSets_); + } else { + return productSetsBuilder_.getMessageList(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public int getProductSetsCount() { + if (productSetsBuilder_ == null) { + return productSets_.size(); + } else { + return productSetsBuilder_.getCount(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1.ProductSet getProductSets(int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); + } else { + return productSetsBuilder_.getMessage(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.set(index, value); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.set(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder addProductSets(com.google.cloud.vision.v1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(value); + onChanged(); + } else { + productSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(index, value); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder addAllProductSets( + java.lang.Iterable values) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productSets_); + onChanged(); + } else { + productSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder clearProductSets() { + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productSetsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public Builder removeProductSets(int index) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.remove(index); + onChanged(); + } else { + productSetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1.ProductSet.Builder getProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); } else { + return productSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsOrBuilderList() { + if (productSetsBuilder_ != null) { + return productSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productSets_); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1.ProductSet.Builder addProductSetsBuilder() { + return getProductSetsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1.ProductSet.Builder addProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsBuilderList() { + return getProductSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> + getProductSetsFieldBuilder() { + if (productSetsBuilder_ == null) { + productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( + productSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productSets_ = null; + } + return productSetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductSetsResponse) + private static final com.google.cloud.vision.v1.ListProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductSetsResponse(); + } + + public static com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..3b90ee5b051f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1.ProductSet getProductSets(int index); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + int getProductSetsCount(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsOrBuilderList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java new file mode 100644 index 000000000000..30ed9b8d724f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetRequest} + */ +public final class ListProductsInProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsInProductSetRequest) + ListProductsInProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetRequest.newBuilder() to construct. + private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1.ListProductsInProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductsInProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1.ListProductsInProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsInProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsInProductSetRequest) + com.google.cloud.vision.v1.ListProductsInProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1.ListProductsInProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductsInProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetRequest build() { + com.google.cloud.vision.v1.ListProductsInProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetRequest buildPartial() { + com.google.cloud.vision.v1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1.ListProductsInProductSetRequest(this); + result.name_ = name_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductsInProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.ListProductsInProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsInProductSetRequest other) { + if (other == com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductsInProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsInProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsInProductSetRequest) + private static final com.google.cloud.vision.v1.ListProductsInProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsInProductSetRequest(); + } + + public static com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..ce0af1091cbb --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductsInProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsInProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java new file mode 100644 index 000000000000..c334154d9681 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetResponse} + */ +public final class ListProductsInProductSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsInProductSetResponse) + ListProductsInProductSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetResponse.newBuilder() to construct. + private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1.ListProductsInProductSetResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductsInProductSetResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1.ListProductsInProductSetResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsInProductSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsInProductSetResponse) + com.google.cloud.vision.v1.ListProductsInProductSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1.ListProductsInProductSetResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductsInProductSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetResponse build() { + com.google.cloud.vision.v1.ListProductsInProductSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetResponse buildPartial() { + com.google.cloud.vision.v1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1.ListProductsInProductSetResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductsInProductSetResponse) { + return mergeFrom((com.google.cloud.vision.v1.ListProductsInProductSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsInProductSetResponse other) { + if (other == com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductsInProductSetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsInProductSetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsInProductSetResponse) + private static final com.google.cloud.vision.v1.ListProductsInProductSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsInProductSetResponse(); + } + + public static com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java new file mode 100644 index 000000000000..ca45fbda570f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductsInProductSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsInProductSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + com.google.cloud.vision.v1.Product getProducts(int index); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java new file mode 100644 index 000000000000..9786c2fa4e3c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsRequest} + */ +public final class ListProductsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsRequest) + ListProductsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsRequest.newBuilder() to construct. + private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsRequest.class, com.google.cloud.vision.v1.ListProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductsRequest other = (com.google.cloud.vision.v1.ListProductsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsRequest) + com.google.cloud.vision.v1.ListProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsRequest.class, com.google.cloud.vision.v1.ListProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsRequest build() { + com.google.cloud.vision.v1.ListProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsRequest buildPartial() { + com.google.cloud.vision.v1.ListProductsRequest result = new com.google.cloud.vision.v1.ListProductsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductsRequest) { + return mergeFrom((com.google.cloud.vision.v1.ListProductsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsRequest other) { + if (other == com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsRequest) + private static final com.google.cloud.vision.v1.ListProductsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsRequest(); + } + + public static com.google.cloud.vision.v1.ListProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java new file mode 100644 index 000000000000..92a3172ac13f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java new file mode 100644 index 000000000000..7afa9a3edce8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsResponse} + */ +public final class ListProductsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsResponse) + ListProductsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsResponse.newBuilder() to construct. + private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsResponse.class, com.google.cloud.vision.v1.ListProductsResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListProductsResponse other = (com.google.cloud.vision.v1.ListProductsResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListProductsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsResponse) + com.google.cloud.vision.v1.ListProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListProductsResponse.class, com.google.cloud.vision.v1.ListProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListProductsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsResponse build() { + com.google.cloud.vision.v1.ListProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsResponse buildPartial() { + com.google.cloud.vision.v1.ListProductsResponse result = new com.google.cloud.vision.v1.ListProductsResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListProductsResponse) { + return mergeFrom((com.google.cloud.vision.v1.ListProductsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsResponse other) { + if (other == com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListProductsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListProductsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public com.google.cloud.vision.v1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsResponse) + private static final com.google.cloud.vision.v1.ListProductsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsResponse(); + } + + public static com.google.cloud.vision.v1.ListProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java new file mode 100644 index 000000000000..74ad193bccce --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListProductsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + com.google.cloud.vision.v1.Product getProducts(int index); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product products = 1; + */ + com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java new file mode 100644 index 000000000000..dafe7e985707 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java @@ -0,0 +1,869 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesRequest} + */ +public final class ListReferenceImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListReferenceImagesRequest) + ListReferenceImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesRequest.newBuilder() to construct. + private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1.ListReferenceImagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListReferenceImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1.ListReferenceImagesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListReferenceImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListReferenceImagesRequest) + com.google.cloud.vision.v1.ListReferenceImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1.ListReferenceImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListReferenceImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesRequest build() { + com.google.cloud.vision.v1.ListReferenceImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesRequest buildPartial() { + com.google.cloud.vision.v1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1.ListReferenceImagesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListReferenceImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1.ListReferenceImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListReferenceImagesRequest other) { + if (other == com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListReferenceImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListReferenceImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListReferenceImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListReferenceImagesRequest) + private static final com.google.cloud.vision.v1.ListReferenceImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListReferenceImagesRequest(); + } + + public static com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java new file mode 100644 index 000000000000..ab5516738917 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListReferenceImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListReferenceImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java new file mode 100644 index 000000000000..461df1425849 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java @@ -0,0 +1,1118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Response message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesResponse} + */ +public final class ListReferenceImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListReferenceImagesResponse) + ListReferenceImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesResponse.newBuilder() to construct. + private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesResponse() { + referenceImages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1.ListReferenceImagesResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ListReferenceImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1.ListReferenceImagesResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ListReferenceImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListReferenceImagesResponse) + com.google.cloud.vision.v1.ListReferenceImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1.ListReferenceImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ListReferenceImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + pageSize_ = 0; + + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesResponse build() { + com.google.cloud.vision.v1.ListReferenceImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesResponse buildPartial() { + com.google.cloud.vision.v1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1.ListReferenceImagesResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + result.pageSize_ = pageSize_; + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ListReferenceImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1.ListReferenceImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ListReferenceImagesResponse other) { + if (other == com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ListReferenceImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ListReferenceImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListReferenceImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListReferenceImagesResponse) + private static final com.google.cloud.vision.v1.ListReferenceImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListReferenceImagesResponse(); + } + + public static com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java new file mode 100644 index 000000000000..12ca5efbf063 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ListReferenceImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListReferenceImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java new file mode 100644 index 000000000000..98b863d750cc --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java @@ -0,0 +1,1259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Set of detected objects with bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LocalizedObjectAnnotation} + */ +public final class LocalizedObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LocalizedObjectAnnotation) + LocalizedObjectAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocalizedObjectAnnotation.newBuilder() to construct. + private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocalizedObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocalizedObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocalizedObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 42: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (boundingPoly_ != null) { + output.writeMessage(5, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.LocalizedObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1.LocalizedObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.LocalizedObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected objects with bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LocalizedObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LocalizedObjectAnnotation) + com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.LocalizedObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotation build() { + com.google.cloud.vision.v1.LocalizedObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotation buildPartial() { + com.google.cloud.vision.v1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1.LocalizedObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.LocalizedObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.LocalizedObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.LocalizedObjectAnnotation other) { + if (other == com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.LocalizedObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LocalizedObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LocalizedObjectAnnotation) + private static final com.google.cloud.vision.v1.LocalizedObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LocalizedObjectAnnotation(); + } + + public static com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalizedObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalizedObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java new file mode 100644 index 000000000000..b01ff6e37ecc --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface LocalizedObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LocalizedObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java new file mode 100644 index 000000000000..fd5f727d6923 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Detected entity location information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LocationInfo} + */ +public final class LocationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LocationInfo) + LocationInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LocationInfo.class, com.google.cloud.vision.v1.LocationInfo.Builder.class); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng latLng_; + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLng_ != null) { + output.writeMessage(1, getLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.LocationInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.LocationInfo other = (com.google.cloud.vision.v1.LocationInfo) obj; + + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng() + .equals(other.getLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.LocationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected entity location information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.LocationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LocationInfo) + com.google.cloud.vision.v1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.LocationInfo.class, com.google.cloud.vision.v1.LocationInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.LocationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfo build() { + com.google.cloud.vision.v1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfo buildPartial() { + com.google.cloud.vision.v1.LocationInfo result = new com.google.cloud.vision.v1.LocationInfo(this); + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.LocationInfo) { + return mergeFrom((com.google.cloud.vision.v1.LocationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.LocationInfo other) { + if (other == com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()) return this; + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.LocationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.LocationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = + com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getLatLng(), + getParentForChildren(), + isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LocationInfo) + private static final com.google.cloud.vision.v1.LocationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LocationInfo(); + } + + public static com.google.cloud.vision.v1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..1bb6cce34be0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface LocationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java new file mode 100644 index 000000000000..9cfc157d8e7b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java new file mode 100644 index 000000000000..8d8fc876e16f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java @@ -0,0 +1,597 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.NormalizedVertex} + */ +public final class NormalizedVertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.NormalizedVertex) + NormalizedVertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NormalizedVertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NormalizedVertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.NormalizedVertex.class, com.google.cloud.vision.v1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.NormalizedVertex other = (com.google.cloud.vision.v1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.NormalizedVertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.NormalizedVertex) + com.google.cloud.vision.v1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.NormalizedVertex.class, com.google.cloud.vision.v1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertex build() { + com.google.cloud.vision.v1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertex buildPartial() { + com.google.cloud.vision.v1.NormalizedVertex result = new com.google.cloud.vision.v1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.NormalizedVertex) { + return mergeFrom((com.google.cloud.vision.v1.NormalizedVertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.NormalizedVertex other) { + if (other == com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.NormalizedVertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.NormalizedVertex) + private static final com.google.cloud.vision.v1.NormalizedVertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.NormalizedVertex(); + } + + public static com.google.cloud.vision.v1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..048d88048df5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +public interface NormalizedVertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java new file mode 100644 index 000000000000..77182322e14e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java @@ -0,0 +1,1204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Contains metadata for the BatchAnnotateImages operation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.OperationMetadata.class, com.google.cloud.vision.v1.OperationMetadata.Builder.class); + } + + /** + *
+   * Batch operation states.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.OperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATED; + case 2: return RUNNING; + case 3: return DONE; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.OperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.OperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.OperationMetadata.State result = com.google.cloud.vision.v1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1.OperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.OperationMetadata other = (com.google.cloud.vision.v1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Contains metadata for the BatchAnnotateImages operation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.OperationMetadata) + com.google.cloud.vision.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.OperationMetadata.class, com.google.cloud.vision.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.OperationMetadata build() { + com.google.cloud.vision.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OperationMetadata buildPartial() { + com.google.cloud.vision.v1.OperationMetadata result = new com.google.cloud.vision.v1.OperationMetadata(this); + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.OperationMetadata other) { + if (other == com.google.cloud.vision.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.OperationMetadata.State result = com.google.cloud.vision.v1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1.OperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OperationMetadata) + private static final com.google.cloud.vision.v1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.OperationMetadata(); + } + + public static com.google.cloud.vision.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..4073376e776e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1.OperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java new file mode 100644 index 000000000000..b3c1c9b95a78 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java @@ -0,0 +1,777 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * The desired output location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.GcsDestination.Builder subBuilder = null; + if (gcsDestination_ != null) { + subBuilder = gcsDestination_.toBuilder(); + } + gcsDestination_ = input.readMessage(com.google.cloud.vision.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsDestination_); + gcsDestination_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + batchSize_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.OutputConfig.class, com.google.cloud.vision.v1.OutputConfig.Builder.class); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.GcsDestination gcsDestination_; + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return gcsDestination_ != null; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestination getGcsDestination() { + return gcsDestination_ == null ? com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + return getGcsDestination(); + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_; + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsDestination_ != null) { + output.writeMessage(1, getGcsDestination()); + } + if (batchSize_ != 0) { + output.writeInt32(2, batchSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsDestination_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsDestination()); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, batchSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.OutputConfig other = (com.google.cloud.vision.v1.OutputConfig) obj; + + if (hasGcsDestination() != other.hasGcsDestination()) return false; + if (hasGcsDestination()) { + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + } + if (getBatchSize() + != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsDestination()) { + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + } + hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired output location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.OutputConfig) + com.google.cloud.vision.v1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.OutputConfig.class, com.google.cloud.vision.v1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + batchSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig build() { + com.google.cloud.vision.v1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig buildPartial() { + com.google.cloud.vision.v1.OutputConfig result = new com.google.cloud.vision.v1.OutputConfig(this); + if (gcsDestinationBuilder_ == null) { + result.gcsDestination_ = gcsDestination_; + } else { + result.gcsDestination_ = gcsDestinationBuilder_.build(); + } + result.batchSize_ = batchSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.OutputConfig) { + return mergeFrom((com.google.cloud.vision.v1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.OutputConfig other) { + if (other == com.google.cloud.vision.v1.OutputConfig.getDefaultInstance()) return this; + if (other.hasGcsDestination()) { + mergeGcsDestination(other.getGcsDestination()); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.GcsDestination gcsDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return gcsDestinationBuilder_ != null || gcsDestination_ != null; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + public com.google.cloud.vision.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + return gcsDestination_ == null ? com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; + } else { + return gcsDestinationBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.vision.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsDestination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.vision.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.vision.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (gcsDestination_ != null) { + gcsDestination_ = + com.google.cloud.vision.v1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); + } else { + gcsDestination_ = value; + } + onChanged(); + } else { + gcsDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + onChanged(); + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1.GcsDestination.Builder getGcsDestinationBuilder() { + + onChanged(); + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (gcsDestinationBuilder_ != null) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + return gcsDestination_ == null ? + com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder>( + getGcsDestination(), + getParentForChildren(), + isClean()); + gcsDestination_ = null; + } + return gcsDestinationBuilder_; + } + + private int batchSize_ ; + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + + batchSize_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OutputConfig) + private static final com.google.cloud.vision.v1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.OutputConfig(); + } + + public static com.google.cloud.vision.v1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..1a8816b0f0a0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.vision.v1.GcsDestination getGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + int getBatchSize(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java new file mode 100644 index 000000000000..5df0266c8790 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java @@ -0,0 +1,1358 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Detected page from OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Page} + */ +public final class Page extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Page) + PageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Page() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Page(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blocks_.add( + input.readMessage(com.google.cloud.vision.v1.Block.parser(), extensionRegistry)); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Page.class, com.google.cloud.vision.v1.Page.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int BLOCKS_FIELD_NUMBER = 4; + private java.util.List blocks_; + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Page)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Page other = (com.google.cloud.vision.v1.Page) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getBlocksList() + .equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Page parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Page parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Page parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Page parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Page prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected page from OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Page} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Page) + com.google.cloud.vision.v1.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Page.class, com.google.cloud.vision.v1.Page.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + width_ = 0; + + height_ = 0; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Page getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Page build() { + com.google.cloud.vision.v1.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Page buildPartial() { + com.google.cloud.vision.v1.Page result = new com.google.cloud.vision.v1.Page(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + result.width_ = width_; + result.height_ = height_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Page) { + return mergeFrom((com.google.cloud.vision.v1.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Page other) { + if (other == com.google.cloud.vision.v1.Page.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Page) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private int width_ ; + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder> blocksBuilder_; + + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public com.google.cloud.vision.v1.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder addBlocks(com.google.cloud.vision.v1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder addBlocks( + com.google.cloud.vision.v1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public com.google.cloud.vision.v1.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public com.google.cloud.vision.v1.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public com.google.cloud.vision.v1.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Page) + private static final com.google.cloud.vision.v1.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Page(); + } + + public static com.google.cloud.vision.v1.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Page(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java new file mode 100644 index 000000000000..a14f99ddab34 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Page) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + int getHeight(); + + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + java.util.List + getBlocksList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + com.google.cloud.vision.v1.Block getBlocks(int index); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + int getBlocksCount(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1.Block blocks = 4; + */ + com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java new file mode 100644 index 000000000000..337437ebac6b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Structural unit of text representing a number of words in certain order.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Paragraph} + */ +public final class Paragraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Paragraph) + ParagraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Paragraph() { + words_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Paragraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Paragraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add( + input.readMessage(com.google.cloud.vision.v1.Word.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int WORDS_FIELD_NUMBER = 3; + private java.util.List words_; + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + @java.lang.Override + public java.util.List getWordsList() { + return words_; + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + @java.lang.Override + public java.util.List + getWordsOrBuilderList() { + return words_; + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + @java.lang.Override + public int getWordsCount() { + return words_.size(); + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Word getWords(int index) { + return words_.get(index); + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( + int index) { + return words_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + output.writeMessage(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Paragraph other = (com.google.cloud.vision.v1.Paragraph) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Paragraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Paragraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Paragraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Paragraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structural unit of text representing a number of words in certain order.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Paragraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Paragraph) + com.google.cloud.vision.v1.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Paragraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + wordsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Paragraph.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Paragraph build() { + com.google.cloud.vision.v1.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Paragraph buildPartial() { + com.google.cloud.vision.v1.Paragraph result = new com.google.cloud.vision.v1.Paragraph(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (wordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + } else { + result.words_ = wordsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Paragraph) { + return mergeFrom((com.google.cloud.vision.v1.Paragraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Paragraph other) { + if (other == com.google.cloud.vision.v1.Paragraph.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (wordsBuilder_ == null) { + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + } else { + if (!other.words_.isEmpty()) { + if (wordsBuilder_.isEmpty()) { + wordsBuilder_.dispose(); + wordsBuilder_ = null; + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + wordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWordsFieldBuilder() : null; + } else { + wordsBuilder_.addAllMessages(other.words_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Paragraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Paragraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List words_ = + java.util.Collections.emptyList(); + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(words_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder> wordsBuilder_; + + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public java.util.List getWordsList() { + if (wordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(words_); + } else { + return wordsBuilder_.getMessageList(); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public int getWordsCount() { + if (wordsBuilder_ == null) { + return words_.size(); + } else { + return wordsBuilder_.getCount(); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public com.google.cloud.vision.v1.Word getWords(int index) { + if (wordsBuilder_ == null) { + return words_.get(index); + } else { + return wordsBuilder_.getMessage(index); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + } else { + wordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.set(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder addWords(com.google.cloud.vision.v1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + } else { + wordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(index, value); + onChanged(); + } else { + wordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder addWords( + com.google.cloud.vision.v1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder addAllWords( + java.lang.Iterable values) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + } else { + wordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder clearWords() { + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wordsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public Builder removeWords(int index) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.remove(index); + onChanged(); + } else { + wordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public com.google.cloud.vision.v1.Word.Builder getWordsBuilder( + int index) { + return getWordsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( + int index) { + if (wordsBuilder_ == null) { + return words_.get(index); } else { + return wordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public java.util.List + getWordsOrBuilderList() { + if (wordsBuilder_ != null) { + return wordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(words_); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public com.google.cloud.vision.v1.Word.Builder addWordsBuilder() { + return getWordsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Word.getDefaultInstance()); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public com.google.cloud.vision.v1.Word.Builder addWordsBuilder( + int index) { + return getWordsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Word.getDefaultInstance()); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + public java.util.List + getWordsBuilderList() { + return getWordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder> + getWordsFieldBuilder() { + if (wordsBuilder_ == null) { + wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder>( + words_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + words_ = null; + } + return wordsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Paragraph) + private static final com.google.cloud.vision.v1.Paragraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Paragraph(); + } + + public static com.google.cloud.vision.v1.Paragraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Paragraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java new file mode 100644 index 000000000000..13c5555fb3f1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface ParagraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Paragraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + java.util.List + getWordsList(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + com.google.cloud.vision.v1.Word getWords(int index); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + int getWordsCount(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + java.util.List + getWordsOrBuilderList(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1.Word words = 3; + */ + com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java new file mode 100644 index 000000000000..49bd8fe649f6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A 3D position in the image, used primarily for Face detection landmarks.
+ * A valid Position must have both x and y coordinates.
+ * The position coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Position} + */ +public final class Position extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Position) + PositionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Position.newBuilder() to construct. + private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Position() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Position(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Position( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + case 29: { + + z_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Position.class, com.google.cloud.vision.v1.Position.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_; + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Position)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Position other = (com.google.cloud.vision.v1.Position) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Position parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Position parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Position parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Position parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Position parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Position parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Position parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Position parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Position parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Position parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Position parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Position parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 3D position in the image, used primarily for Face detection landmarks.
+   * A valid Position must have both x and y coordinates.
+   * The position coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Position} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Position) + com.google.cloud.vision.v1.PositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Position.class, com.google.cloud.vision.v1.Position.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Position.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + z_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Position getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Position.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Position build() { + com.google.cloud.vision.v1.Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Position buildPartial() { + com.google.cloud.vision.v1.Position result = new com.google.cloud.vision.v1.Position(this); + result.x_ = x_; + result.y_ = y_; + result.z_ = z_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Position) { + return mergeFrom((com.google.cloud.vision.v1.Position)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Position other) { + if (other == com.google.cloud.vision.v1.Position.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Position parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + onChanged(); + return this; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + + z_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Position) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Position) + private static final com.google.cloud.vision.v1.Position DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Position(); + } + + public static com.google.cloud.vision.v1.Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Position parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Position(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java new file mode 100644 index 000000000000..bac632247b7d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +public interface PositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Position) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); + + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + float getZ(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java new file mode 100644 index 000000000000..273e8c965d0e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java @@ -0,0 +1,2617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A Product contains ReferenceImages.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Product} + */ +public final class Product extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Product) + ProductOrBuilder { +private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Product() { + name_ = ""; + displayName_ = ""; + description_ = ""; + productCategory_ = ""; + productLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Product( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + productCategory_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productLabels_.add( + input.readMessage(com.google.cloud.vision.v1.Product.KeyValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Product.class, com.google.cloud.vision.v1.Product.Builder.class); + } + + public interface KeyValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Product.KeyValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + *
+   * A product label represented as a key-value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Product.KeyValue} + */ + public static final class KeyValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Product.KeyValue) + KeyValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyValue.newBuilder() to construct. + private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KeyValue() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KeyValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KeyValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Product.KeyValue.class, com.google.cloud.vision.v1.Product.KeyValue.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Product.KeyValue)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Product.KeyValue other = (com.google.cloud.vision.v1.Product.KeyValue) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Product.KeyValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A product label represented as a key-value pair.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Product.KeyValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Product.KeyValue) + com.google.cloud.vision.v1.Product.KeyValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Product.KeyValue.class, com.google.cloud.vision.v1.Product.KeyValue.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Product.KeyValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValue getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValue build() { + com.google.cloud.vision.v1.Product.KeyValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValue buildPartial() { + com.google.cloud.vision.v1.Product.KeyValue result = new com.google.cloud.vision.v1.Product.KeyValue(this); + result.key_ = key_; + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Product.KeyValue) { + return mergeFrom((com.google.cloud.vision.v1.Product.KeyValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Product.KeyValue other) { + if (other == com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Product.KeyValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Product.KeyValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Product.KeyValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Product.KeyValue) + private static final com.google.cloud.vision.v1.Product.KeyValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Product.KeyValue(); + } + + public static com.google.cloud.vision.v1.Product.KeyValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; + private volatile java.lang.Object productCategory_; + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+   * still supported, but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + @java.lang.Override + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } + } + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+   * still supported, but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; + private java.util.List productLabels_; + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List getProductLabelsList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List + getProductLabelsOrBuilderList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public int getProductLabelsCount() { + return productLabels_.size(); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index) { + return productLabels_.get(index); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + return productLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + output.writeMessage(5, productLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, productLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Product)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Product other = (com.google.cloud.vision.v1.Product) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getProductCategory() + .equals(other.getProductCategory())) return false; + if (!getProductLabelsList() + .equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getProductCategory().hashCode(); + if (getProductLabelsCount() > 0) { + hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getProductLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Product parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Product parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Product contains ReferenceImages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Product} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Product) + com.google.cloud.vision.v1.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Product.class, com.google.cloud.vision.v1.Product.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Product.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + productCategory_ = ""; + + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Product.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product build() { + com.google.cloud.vision.v1.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product buildPartial() { + com.google.cloud.vision.v1.Product result = new com.google.cloud.vision.v1.Product(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.productCategory_ = productCategory_; + if (productLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productLabels_ = productLabels_; + } else { + result.productLabels_ = productLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Product) { + return mergeFrom((com.google.cloud.vision.v1.Product)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Product other) { + if (other == com.google.cloud.vision.v1.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getProductCategory().isEmpty()) { + productCategory_ = other.productCategory_; + onChanged(); + } + if (productLabelsBuilder_ == null) { + if (!other.productLabels_.isEmpty()) { + if (productLabels_.isEmpty()) { + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductLabelsIsMutable(); + productLabels_.addAll(other.productLabels_); + } + onChanged(); + } + } else { + if (!other.productLabels_.isEmpty()) { + if (productLabelsBuilder_.isEmpty()) { + productLabelsBuilder_.dispose(); + productLabelsBuilder_ = null; + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + productLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductLabelsFieldBuilder() : null; + } else { + productLabelsBuilder_.addAllMessages(other.productLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Product parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Product) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object productCategory_ = ""; + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+     * still supported, but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+     * still supported, but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+     * still supported, but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productCategory_ = value; + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+     * still supported, but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearProductCategory() { + + productCategory_ = getDefaultInstance().getProductCategory(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+     * still supported, but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productCategory_ = value; + onChanged(); + return this; + } + + private java.util.List productLabels_ = + java.util.Collections.emptyList(); + private void ensureProductLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(productLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder> productLabelsBuilder_; + + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public java.util.List getProductLabelsList() { + if (productLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productLabels_); + } else { + return productLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public int getProductLabelsCount() { + if (productLabelsBuilder_ == null) { + return productLabels_.size(); + } else { + return productLabelsBuilder_.getCount(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); + } else { + return productLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.set(index, value); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels(com.google.cloud.vision.v1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(index, value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder addAllProductLabels( + java.lang.Iterable values) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productLabels_); + onChanged(); + } else { + productLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder clearProductLabels() { + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public Builder removeProductLabels(int index) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.remove(index); + onChanged(); + } else { + productLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1.Product.KeyValue.Builder getProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); } else { + return productLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsOrBuilderList() { + if (productLabelsBuilder_ != null) { + return productLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productLabels_); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder() { + return getProductLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsBuilderList() { + return getProductLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder> + getProductLabelsFieldBuilder() { + if (productLabelsBuilder_ == null) { + productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder>( + productLabels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productLabels_ = null; + } + return productLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Product) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Product) + private static final com.google.cloud.vision.v1.Product DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Product(); + } + + public static com.google.cloud.vision.v1.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Product(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java new file mode 100644 index 000000000000..08d513840cab --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + + @Deprecated + protected ProductName() { + project = null; + location = null; + product = null; + } + + private ProductName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductName of(String project, String location, String product) { + return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); + } + + public static String format(String project, String location, String product) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .build() + .toString(); + } + + public static ProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT.validatedMatch( + formattedString, "ProductName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT.instantiate( + "project", project, "location", location, "product", product); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductName that = ((ProductName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + return h; + } + + /** Builder for projects/{project}/locations/{location}/products/{product}. */ + public static class Builder { + private String project; + private String location; + private String product; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + private Builder(ProductName productName) { + this.project = productName.project; + this.location = productName.location; + this.product = productName.product; + } + + public ProductName build() { + return new ProductName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java new file mode 100644 index 000000000000..26524dc310d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java @@ -0,0 +1,194 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ProductOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Product) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+   * still supported, but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + java.lang.String getProductCategory(); + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
+   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
+   * still supported, but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + com.google.protobuf.ByteString + getProductCategoryBytes(); + + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + int getProductLabelsCount(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsOrBuilderList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java new file mode 100644 index 000000000000..57551f380aba --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java @@ -0,0 +1,1390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Parameters for a product search request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchParams} + */ +public final class ProductSearchParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchParams) + ProductSearchParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchParams.newBuilder() to construct. + private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchParams() { + productSet_ = ""; + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + productSet_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productCategories_.add(s); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 74: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchParams.class, com.google.cloud.vision.v1.ProductSearchParams.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 9; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 6; + private volatile java.lang.Object productSet_; + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + @java.lang.Override + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } + } + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList productCategories_; + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_; + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + + public static final int FILTER_FIELD_NUMBER = 8; + private volatile java.lang.Object filter_; + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); + } + for (int i = 0; i < productCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); + } + if (boundingPoly_ != null) { + output.writeMessage(9, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); + } + { + int dataSize = 0; + for (int i = 0; i < productCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getProductCategoriesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSearchParams other = (com.google.cloud.vision.v1.ProductSearchParams) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getProductSet() + .equals(other.getProductSet())) return false; + if (!getProductCategoriesList() + .equals(other.getProductCategoriesList())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + if (getProductCategoriesCount() > 0) { + hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getProductCategoriesList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchParams) + com.google.cloud.vision.v1.ProductSearchParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchParams.class, com.google.cloud.vision.v1.ProductSearchParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSearchParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + productSet_ = ""; + + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParams build() { + com.google.cloud.vision.v1.ProductSearchParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParams buildPartial() { + com.google.cloud.vision.v1.ProductSearchParams result = new com.google.cloud.vision.v1.ProductSearchParams(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.productSet_ = productSet_; + if (((bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productCategories_ = productCategories_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSearchParams) { + return mergeFrom((com.google.cloud.vision.v1.ProductSearchParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchParams other) { + if (other == com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (!other.getProductSet().isEmpty()) { + productSet_ = other.productSet_; + onChanged(); + } + if (!other.productCategories_.isEmpty()) { + if (productCategories_.isEmpty()) { + productCategories_ = other.productCategories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductCategoriesIsMutable(); + productCategories_.addAll(other.productCategories_); + } + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSearchParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSearchParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.lang.Object productSet_ = ""; + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSet_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProductSet() { + + productSet_ = getDefaultInstance().getProductSet(); + onChanged(); + return this; + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The bytes for productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSet_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProductCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_.getUnmodifiableView(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index to set the value at. + * @param value The productCategories to set. + * @return This builder for chaining. + */ + public Builder setProductCategories( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategories( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param values The productCategories to add. + * @return This builder for chaining. + */ + public Builder addAllProductCategories( + java.lang.Iterable values) { + ensureProductCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productCategories_); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return This builder for chaining. + */ + public Builder clearProductCategories() { + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The bytes of the productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategoriesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchParams) + private static final com.google.cloud.vision.v1.ProductSearchParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchParams(); + } + + public static com.google.cloud.vision.v1.ProductSearchParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java new file mode 100644 index 000000000000..cc978287f7a6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search.proto + +package com.google.cloud.vision.v1; + +public interface ProductSearchParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + java.lang.String getProductSet(); + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + com.google.protobuf.ByteString + getProductSetBytes(); + + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + java.util.List + getProductCategoriesList(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + int getProductCategoriesCount(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + java.lang.String getProductCategories(int index); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + com.google.protobuf.ByteString + getProductCategoriesBytes(int index); + + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java new file mode 100644 index 000000000000..6fc2214c343e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search.proto + +package com.google.cloud.vision.v1; + +public final class ProductSearchProto { + private ProductSearchProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/vision/v1/product_search." + + "proto\022\026google.cloud.vision.v1\032\031google/ap" + + "i/resource.proto\032%google/cloud/vision/v1" + + "/geometry.proto\0323google/cloud/vision/v1/" + + "product_search_service.proto\032\037google/pro" + + "tobuf/timestamp.proto\"\272\001\n\023ProductSearchP" + + "arams\022;\n\rbounding_poly\030\t \001(\0132$.google.cl" + + "oud.vision.v1.BoundingPoly\022:\n\013product_se" + + "t\030\006 \001(\tB%\372A\"\n vision.googleapis.com/Prod" + + "uctSet\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006fi" + + "lter\030\010 \001(\t\"\210\005\n\024ProductSearchResults\022.\n\ni" + + "ndex_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\022D\n\007results\030\005 \003(\01323.google.cloud.visi" + + "on.v1.ProductSearchResults.Result\022[\n\027pro" + + "duct_grouped_results\030\006 \003(\0132:.google.clou" + + "d.vision.v1.ProductSearchResults.Grouped" + + "Result\032X\n\006Result\0220\n\007product\030\001 \001(\0132\037.goog" + + "le.cloud.vision.v1.Product\022\r\n\005score\030\002 \001(" + + "\002\022\r\n\005image\030\003 \001(\t\032S\n\020ObjectAnnotation\022\013\n\003" + + "mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004name" + + "\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\355\001\n\rGroupedResult\022" + + ";\n\rbounding_poly\030\001 \001(\0132$.google.cloud.vi" + + "sion.v1.BoundingPoly\022D\n\007results\030\002 \003(\01323." + + "google.cloud.vision.v1.ProductSearchResu" + + "lts.Result\022Y\n\022object_annotations\030\003 \003(\0132=" + + ".google.cloud.vision.v1.ProductSearchRes" + + "ults.ObjectAnnotationBz\n\032com.google.clou" + + "d.vision.v1B\022ProductSearchProtoP\001Z + * Results for a product search request. + * + * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults} + */ +public final class ProductSearchResults extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults) + ProductSearchResultsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchResults.newBuilder() to construct. + private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchResults() { + results_ = java.util.Collections.emptyList(); + productGroupedResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchResults(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + productGroupedResults_.add( + input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.class, com.google.cloud.vision.v1.ProductSearchResults.Builder.class); + } + + public interface ResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.Result) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return The product. + */ + com.google.cloud.vision.v1.Product getProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + java.lang.String getImage(); + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + com.google.protobuf.ByteString + getImageBytes(); + } + /** + *
+   * Information about a product.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.Result} + */ + public static final class Result extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Result() { + image_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.Result.class, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.Product product_; + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object image_; + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + @java.lang.Override + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.Result)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSearchResults.Result other = (com.google.cloud.vision.v1.ProductSearchResults.Result) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getImage() + .equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about a product.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.Result} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.Result) + com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.Result.class, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSearchResults.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + score_ = 0F; + + image_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result build() { + com.google.cloud.vision.v1.ProductSearchResults.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result buildPartial() { + com.google.cloud.vision.v1.ProductSearchResults.Result result = new com.google.cloud.vision.v1.ProductSearchResults.Result(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.score_ = score_; + result.image_ = image_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.Result) { + return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.Result)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.Result other) { + if (other == com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSearchResults.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + * @return The product. + */ + public com.google.cloud.vision.v1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public Builder setProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public Builder setProduct( + com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1.Product product = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private float score_ ; + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object image_ = ""; + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The image. + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The bytes for image. + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The image to set. + * @return This builder for chaining. + */ + public Builder setImage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return This builder for chaining. + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The bytes for image to set. + * @return This builder for chaining. + */ + public Builder setImageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.Result) + private static final com.google.cloud.vision.v1.ProductSearchResults.Result DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.Result(); + } + + public static com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Prediction for what the object in the bounding box is.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} + */ + public static final class ObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) + ObjectAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectAnnotation.newBuilder() to construct. + private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Prediction for what the object in the bounding box is.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation build() { + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation buildPartial() { + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation other) { + if (other == com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) + private static final com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation(); + } + + public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupedResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.GroupedResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + int getResultsCount(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + int getObjectAnnotationsCount(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsOrBuilderList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index); + } + /** + *
+   * Information about the products similar to a single product in a query
+   * image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.GroupedResult} + */ + public static final class GroupedResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.GroupedResult) + GroupedResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupedResult.newBuilder() to construct. + private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupedResult() { + results_ = java.util.Collections.emptyList(); + objectAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GroupedResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupedResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + objectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int RESULTS_FIELD_NUMBER = 2; + private java.util.List results_; + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List objectAnnotations_; + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List getObjectAnnotationsList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List + getObjectAnnotationsOrBuilderList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public int getObjectAnnotationsCount() { + return objectAnnotations_.size(); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + return objectAnnotations_.get(index); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + return objectAnnotations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + output.writeMessage(3, objectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, objectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.GroupedResult)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getObjectAnnotationsList() + .equals(other.getObjectAnnotationsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getObjectAnnotationsCount() > 0) { + hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectAnnotationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about the products similar to a single product in a query
+     * image.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.GroupedResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.GroupedResult) + com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getObjectAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult build() { + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult buildPartial() { + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1.ProductSearchResults.GroupedResult(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (objectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.objectAnnotations_ = objectAnnotations_; + } else { + result.objectAnnotations_ = objectAnnotationsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) { + return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.GroupedResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult other) { + if (other == com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (objectAnnotationsBuilder_ == null) { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotations_.isEmpty()) { + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.addAll(other.objectAnnotations_); + } + onChanged(); + } + } else { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotationsBuilder_.isEmpty()) { + objectAnnotationsBuilder_.dispose(); + objectAnnotationsBuilder_ = null; + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + objectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getObjectAnnotationsFieldBuilder() : null; + } else { + objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder addResults(com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List objectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; + + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List getObjectAnnotationsList() { + if (objectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } else { + return objectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public int getObjectAnnotationsCount() { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.size(); + } else { + return objectAnnotationsBuilder_.getCount(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addAllObjectAnnotations( + java.lang.Iterable values) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectAnnotations_); + onChanged(); + } else { + objectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder clearObjectAnnotations() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder removeObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.remove(index); + onChanged(); + } else { + objectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); } else { + return objectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsOrBuilderList() { + if (objectAnnotationsBuilder_ != null) { + return objectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { + return getObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsBuilderList() { + return getObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder> + getObjectAnnotationsFieldBuilder() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder>( + objectAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + objectAnnotations_ = null; + } + return objectAnnotationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.GroupedResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.GroupedResult) + private static final com.google.cloud.vision.v1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.GroupedResult(); + } + + public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupedResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupedResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int INDEX_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int RESULTS_FIELD_NUMBER = 5; + private java.util.List results_; + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; + private java.util.List productGroupedResults_; + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List getProductGroupedResultsList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List + getProductGroupedResultsOrBuilderList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public int getProductGroupedResultsCount() { + return productGroupedResults_.size(); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + return productGroupedResults_.get(index); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + return productGroupedResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (indexTime_ != null) { + output.writeMessage(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + output.writeMessage(6, productGroupedResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, productGroupedResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSearchResults other = (com.google.cloud.vision.v1.ProductSearchResults) obj; + + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getProductGroupedResultsList() + .equals(other.getProductGroupedResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getProductGroupedResultsCount() > 0) { + hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductGroupedResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults) + com.google.cloud.vision.v1.ProductSearchResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSearchResults.class, com.google.cloud.vision.v1.ProductSearchResults.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSearchResults.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getProductGroupedResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults build() { + com.google.cloud.vision.v1.ProductSearchResults result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults buildPartial() { + com.google.cloud.vision.v1.ProductSearchResults result = new com.google.cloud.vision.v1.ProductSearchResults(this); + int from_bitField0_ = bitField0_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (productGroupedResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.productGroupedResults_ = productGroupedResults_; + } else { + result.productGroupedResults_ = productGroupedResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSearchResults) { + return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults other) { + if (other == com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()) return this; + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (productGroupedResultsBuilder_ == null) { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResults_.isEmpty()) { + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.addAll(other.productGroupedResults_); + } + onChanged(); + } + } else { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResultsBuilder_.isEmpty()) { + productGroupedResultsBuilder_.dispose(); + productGroupedResultsBuilder_ = null; + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + productGroupedResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductGroupedResultsFieldBuilder() : null; + } else { + productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSearchResults parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder addResults(com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List productGroupedResults_ = + java.util.Collections.emptyList(); + private void ensureProductGroupedResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; + + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List getProductGroupedResultsList() { + if (productGroupedResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } else { + return productGroupedResultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public int getProductGroupedResultsCount() { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.size(); + } else { + return productGroupedResultsBuilder_.getCount(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); + } else { + return productGroupedResultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addAllProductGroupedResults( + java.lang.Iterable values) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productGroupedResults_); + onChanged(); + } else { + productGroupedResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder clearProductGroupedResults() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder removeProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.remove(index); + onChanged(); + } else { + productGroupedResultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); } else { + return productGroupedResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsOrBuilderList() { + if (productGroupedResultsBuilder_ != null) { + return productGroupedResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { + return getProductGroupedResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsBuilderList() { + return getProductGroupedResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder> + getProductGroupedResultsFieldBuilder() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder>( + productGroupedResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + productGroupedResults_ = null; + } + return productGroupedResultsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults) + private static final com.google.cloud.vision.v1.ProductSearchResults DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults(); + } + + public static com.google.cloud.vision.v1.ProductSearchResults getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchResults(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSearchResults getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java new file mode 100644 index 000000000000..5c4e626f997d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search.proto + +package com.google.cloud.vision.v1; + +public interface ProductSearchResultsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + int getResultsCount(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + int getProductGroupedResultsCount(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsOrBuilderList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java new file mode 100644 index 000000000000..5cb92afd7630 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java @@ -0,0 +1,637 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public final class ProductSearchServiceProto { + private ProductSearchServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Product_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1/product_search_" + + "service.proto\022\026google.cloud.vision.v1\032\034g" + + "oogle/api/annotations.proto\032\027google/api/" + + "client.proto\032\037google/api/field_behavior." + + "proto\032\031google/api/resource.proto\032%google" + + "/cloud/vision/v1/geometry.proto\032#google/" + + "longrunning/operations.proto\032\033google/pro" + + "tobuf/empty.proto\032 google/protobuf/field" + + "_mask.proto\032\037google/protobuf/timestamp.p" + + "roto\032\027google/rpc/status.proto\"\253\002\n\007Produc" + + "t\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n" + + "\013description\030\003 \001(\t\022\035\n\020product_category\030\004" + + " \001(\tB\003\340A\005\022@\n\016product_labels\030\005 \003(\0132(.goog" + + "le.cloud.vision.v1.Product.KeyValue\032&\n\010K" + + "eyValue\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[" + + "\n\035vision.googleapis.com/Product\022:project" + + "s/{project}/locations/{location}/product" + + "s/{product}\"\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t" + + "\022\024\n\014display_name\030\002 \001(\t\0223\n\nindex_time\030\003 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022,\n\013i" + + "ndex_error\030\004 \001(\0132\022.google.rpc.StatusB\003\340A" + + "\003:h\352Ae\n vision.googleapis.com/ProductSet" + + "\022Aprojects/{project}/locations/{location" + + "}/productSets/{product_set}\"\376\001\n\016Referenc" + + "eImage\022\014\n\004name\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022A" + + "\n\016bounding_polys\030\003 \003(\0132$.google.cloud.vi" + + "sion.v1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision" + + ".googleapis.com/ReferenceImage\022\\projects" + + "/{project}/locations/{location}/products" + + "/{product}/referenceImages/{reference_im" + + "age}\"\234\001\n\024CreateProductRequest\0229\n\006parent\030" + + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + + "Location\0225\n\007product\030\002 \001(\0132\037.google.cloud" + + ".vision.v1.ProductB\003\340A\002\022\022\n\nproduct_id\030\003 " + + "\001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001 \001" + + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" + + "ation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\"b\n\024ListProductsResponse\0221\n\010products" + + "\030\001 \003(\0132\037.google.cloud.vision.v1.Product\022" + + "\027\n\017next_page_token\030\002 \001(\t\"H\n\021GetProductRe" + + "quest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vision.goog" + + "leapis.com/Product\"~\n\024UpdateProductReque" + + "st\0225\n\007product\030\001 \001(\0132\037.google.cloud.visio" + + "n.v1.ProductB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMask\"K\n\024DeleteProd" + + "uctRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vision" + + ".googleapis.com/Product\"\252\001\n\027CreateProduc" + + "tSetRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + + "ations.googleapis.com/Location\022<\n\013produc" + + "t_set\030\002 \001(\0132\".google.cloud.vision.v1.Pro" + + "ductSetB\003\340A\002\022\026\n\016product_set_id\030\003 \001(\t\"z\n\026" + + "ListProductSetsRequest\0229\n\006parent\030\001 \001(\tB)" + + "\340A\002\372A#\n!locations.googleapis.com/Locatio" + + "n\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\"l\n\027ListProductSetsResponse\0228\n\014product_s" + + "ets\030\001 \003(\0132\".google.cloud.vision.v1.Produ" + + "ctSet\022\027\n\017next_page_token\030\002 \001(\t\"N\n\024GetPro" + + "ductSetRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vi" + + "sion.googleapis.com/ProductSet\"\210\001\n\027Updat" + + "eProductSetRequest\022<\n\013product_set\030\001 \001(\0132" + + "\".google.cloud.vision.v1.ProductSetB\003\340A\002" + + "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMask\"Q\n\027DeleteProductSetRequest\0226\n\004" + + "name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.co" + + "m/ProductSet\"\266\001\n\033CreateReferenceImageReq" + + "uest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.goo" + + "gleapis.com/Product\022D\n\017reference_image\030\002" + + " \001(\0132&.google.cloud.vision.v1.ReferenceI" + + "mageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001(\t\"z\n" + + "\032ListReferenceImagesRequest\0225\n\006parent\030\001 " + + "\001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/Produ" + + "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"\213\001\n\033ListReferenceImagesResponse\022@\n\020ref" + + "erence_images\030\001 \003(\0132&.google.cloud.visio" + + "n.v1.ReferenceImage\022\021\n\tpage_size\030\002 \001(\005\022\027" + + "\n\017next_page_token\030\003 \001(\t\"V\n\030GetReferenceI" + + "mageRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$visio" + + "n.googleapis.com/ReferenceImage\"Y\n\033Delet" + + "eReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340A" + + "\002\372A&\n$vision.googleapis.com/ReferenceIma" + + "ge\"\217\001\n\035AddProductToProductSetRequest\0226\n\004" + + "name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.co" + + "m/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037\n\035v" + + "ision.googleapis.com/Product\"\224\001\n\"RemoveP" + + "roductFromProductSetRequest\0226\n\004name\030\001 \001(" + + "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + + "Set\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037\n\035vision.goo" + + "gleapis.com/Product\"\200\001\n\037ListProductsInPr" + + "oductSetRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n v" + + "ision.googleapis.com/ProductSet\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"n\n ListPr" + + "oductsInProductSetResponse\0221\n\010products\030\001" + + " \003(\0132\037.google.cloud.vision.v1.Product\022\027\n" + + "\017next_page_token\030\002 \001(\t\"2\n\032ImportProductS" + + "etsGcsSource\022\024\n\014csv_file_uri\030\001 \001(\t\"r\n\034Im" + + "portProductSetsInputConfig\022H\n\ngcs_source" + + "\030\001 \001(\01322.google.cloud.vision.v1.ImportPr" + + "oductSetsGcsSourceH\000B\010\n\006source\"\246\001\n\030Impor" + + "tProductSetsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" + + "\372A#\n!locations.googleapis.com/Location\022O" + + "\n\014input_config\030\002 \001(\01324.google.cloud.visi" + + "on.v1.ImportProductSetsInputConfigB\003\340A\002\"" + + "\203\001\n\031ImportProductSetsResponse\022@\n\020referen" + + "ce_images\030\001 \003(\0132&.google.cloud.vision.v1" + + ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + + "le.rpc.Status\"\227\002\n\026BatchOperationMetadata" + + "\022C\n\005state\030\001 \001(\01624.google.cloud.vision.v1" + + ".BatchOperationMetadata.State\022/\n\013submit_" + + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022," + + "\n\010end_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\016\n\n" + + "PROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006FAILED\020\003" + + "\022\r\n\tCANCELLED\020\004\"/\n\025ProductSetPurgeConfig" + + "\022\026\n\016product_set_id\030\001 \001(\t\"\337\001\n\024PurgeProduc" + + "tsRequest\022Q\n\030product_set_purge_config\030\002 " + + "\001(\0132-.google.cloud.vision.v1.ProductSetP" + + "urgeConfigH\000\022 \n\026delete_orphan_products\030\003" + + " \001(\010H\000\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\r\n\005force\030\004 \001(\010" + + "B\010\n\006target2\364\035\n\rProductSearch\022\321\001\n\020CreateP" + + "roductSet\022/.google.cloud.vision.v1.Creat" + + "eProductSetRequest\032\".google.cloud.vision" + + ".v1.ProductSet\"h\202\323\344\223\002>\"//v1/{parent=proj" + + "ects/*/locations/*}/productSets:\013product" + + "_set\332A!parent,product_set,product_set_id" + + "\022\264\001\n\017ListProductSets\022..google.cloud.visi" + + "on.v1.ListProductSetsRequest\032/.google.cl" + + "oud.vision.v1.ListProductSetsResponse\"@\202" + + "\323\344\223\0021\022//v1/{parent=projects/*/locations/" + + "*}/productSets\332A\006parent\022\241\001\n\rGetProductSe" + + "t\022,.google.cloud.vision.v1.GetProductSet" + + "Request\032\".google.cloud.vision.v1.Product" + + "Set\">\202\323\344\223\0021\022//v1/{name=projects/*/locati" + + "ons/*/productSets/*}\332A\004name\022\323\001\n\020UpdatePr" + + "oductSet\022/.google.cloud.vision.v1.Update" + + "ProductSetRequest\032\".google.cloud.vision." + + "v1.ProductSet\"j\202\323\344\223\002J2;/v1/{product_set." + + "name=projects/*/locations/*/productSets/" + + "*}:\013product_set\332A\027product_set,update_mas" + + "k\022\233\001\n\020DeleteProductSet\022/.google.cloud.vi" + + "sion.v1.DeleteProductSetRequest\032\026.google" + + ".protobuf.Empty\">\202\323\344\223\0021*//v1/{name=proje" + + "cts/*/locations/*/productSets/*}\332A\004name\022" + + "\271\001\n\rCreateProduct\022,.google.cloud.vision." + + "v1.CreateProductRequest\032\037.google.cloud.v" + + "ision.v1.Product\"Y\202\323\344\223\0027\",/v1/{parent=pr" + + "ojects/*/locations/*}/products:\007product\332" + + "A\031parent,product,product_id\022\250\001\n\014ListProd" + + "ucts\022+.google.cloud.vision.v1.ListProduc" + + "tsRequest\032,.google.cloud.vision.v1.ListP" + + "roductsResponse\"=\202\323\344\223\002.\022,/v1/{parent=pro" + + "jects/*/locations/*}/products\332A\006parent\022\225" + + "\001\n\nGetProduct\022).google.cloud.vision.v1.G" + + "etProductRequest\032\037.google.cloud.vision.v" + + "1.Product\";\202\323\344\223\002.\022,/v1/{name=projects/*/" + + "locations/*/products/*}\332A\004name\022\273\001\n\rUpdat" + + "eProduct\022,.google.cloud.vision.v1.Update" + + "ProductRequest\032\037.google.cloud.vision.v1." + + "Product\"[\202\323\344\223\002?24/v1/{product.name=proje" + + "cts/*/locations/*/products/*}:\007product\332A" + + "\023product,update_mask\022\222\001\n\rDeleteProduct\022," + + ".google.cloud.vision.v1.DeleteProductReq" + + "uest\032\026.google.protobuf.Empty\";\202\323\344\223\002.*,/v" + + "1/{name=projects/*/locations/*/products/" + + "*}\332A\004name\022\371\001\n\024CreateReferenceImage\0223.goo" + + "gle.cloud.vision.v1.CreateReferenceImage" + + "Request\032&.google.cloud.vision.v1.Referen" + + "ceImage\"\203\001\202\323\344\223\002Q\">/v1/{parent=projects/*" + + "/locations/*/products/*}/referenceImages" + + ":\017reference_image\332A)parent,reference_ima" + + "ge,reference_image_id\022\262\001\n\024DeleteReferenc" + + "eImage\0223.google.cloud.vision.v1.DeleteRe" + + "ferenceImageRequest\032\026.google.protobuf.Em" + + "pty\"M\202\323\344\223\002@*>/v1/{name=projects/*/locati" + + "ons/*/products/*/referenceImages/*}\332A\004na" + + "me\022\317\001\n\023ListReferenceImages\0222.google.clou" + + "d.vision.v1.ListReferenceImagesRequest\0323" + + ".google.cloud.vision.v1.ListReferenceIma" + + "gesResponse\"O\202\323\344\223\002@\022>/v1/{parent=project" + + "s/*/locations/*/products/*}/referenceIma" + + "ges\332A\006parent\022\274\001\n\021GetReferenceImage\0220.goo" + + "gle.cloud.vision.v1.GetReferenceImageReq" + + "uest\032&.google.cloud.vision.v1.ReferenceI" + + "mage\"M\202\323\344\223\002@\022>/v1/{name=projects/*/locat" + + "ions/*/products/*/referenceImages/*}\332A\004n" + + "ame\022\275\001\n\026AddProductToProductSet\0225.google." + + "cloud.vision.v1.AddProductToProductSetRe" + + "quest\032\026.google.protobuf.Empty\"T\202\323\344\223\002?\":/" + + "v1/{name=projects/*/locations/*/productS" + + "ets/*}:addProduct:\001*\332A\014name,product\022\312\001\n\033" + + "RemoveProductFromProductSet\022:.google.clo" + + "ud.vision.v1.RemoveProductFromProductSet" + + "Request\032\026.google.protobuf.Empty\"W\202\323\344\223\002B\"" + + "=/v1/{name=projects/*/locations/*/produc" + + "tSets/*}:removeProduct:\001*\332A\014name,product" + + "\022\326\001\n\030ListProductsInProductSet\0227.google.c" + + "loud.vision.v1.ListProductsInProductSetR" + + "equest\0328.google.cloud.vision.v1.ListProd" + + "uctsInProductSetResponse\"G\202\323\344\223\002:\0228/v1/{n" + + "ame=projects/*/locations/*/productSets/*" + + "}/products\332A\004name\022\364\001\n\021ImportProductSets\022" + + "0.google.cloud.vision.v1.ImportProductSe" + + "tsRequest\032\035.google.longrunning.Operation" + + "\"\215\001\202\323\344\223\002;\"6/v1/{parent=projects/*/locati" + + "ons/*}/productSets:import:\001*\332A\023parent,in" + + "put_config\312A3\n\031ImportProductSetsResponse" + + "\022\026BatchOperationMetadata\022\326\001\n\rPurgeProduc" + + "ts\022,.google.cloud.vision.v1.PurgeProduct" + + "sRequest\032\035.google.longrunning.Operation\"" + + "x\202\323\344\223\0027\"2/v1/{parent=projects/*/location" + + "s/*}/products:purge:\001*\332A\006parent\312A/\n\025goog" + + "le.protobuf.Empty\022\026BatchOperationMetadat" + + "a\032v\312A\025vision.googleapis.com\322A[https://ww" + + "w.googleapis.com/auth/cloud-platform,htt" + + "ps://www.googleapis.com/auth/cloud-visio" + + "nB\201\001\n\032com.google.cloud.vision.v1B\031Produc" + + "tSearchServiceProtoP\001Z + * A ProductSet contains Products. A ProductSet can contain a maximum of 1 + * million reference images. If the limit is exceeded, periodic indexing will + * fail. + * + * + * Protobuf type {@code google.cloud.vision.v1.ProductSet} + */ +public final class ProductSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSet) + ProductSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSet.newBuilder() to construct. + private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSet() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (indexError_ != null) { + subBuilder = indexError_.toBuilder(); + } + indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexError_); + indexError_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSet.class, com.google.cloud.vision.v1.ProductSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int INDEX_ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status indexError_; + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + @java.lang.Override + public boolean hasIndexError() { + return indexError_ != null; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + @java.lang.Override + public com.google.rpc.Status getIndexError() { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + return getIndexError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (indexTime_ != null) { + output.writeMessage(3, getIndexTime()); + } + if (indexError_ != null) { + output.writeMessage(4, getIndexError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIndexTime()); + } + if (indexError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIndexError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSet)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSet other = (com.google.cloud.vision.v1.ProductSet) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (hasIndexError() != other.hasIndexError()) return false; + if (hasIndexError()) { + if (!getIndexError() + .equals(other.getIndexError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (hasIndexError()) { + hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getIndexError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
+   * million reference images. If the limit is exceeded, periodic indexing will
+   * fail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSet) + com.google.cloud.vision.v1.ProductSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSet.class, com.google.cloud.vision.v1.ProductSet.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (indexErrorBuilder_ == null) { + indexError_ = null; + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet build() { + com.google.cloud.vision.v1.ProductSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet buildPartial() { + com.google.cloud.vision.v1.ProductSet result = new com.google.cloud.vision.v1.ProductSet(this); + result.name_ = name_; + result.displayName_ = displayName_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (indexErrorBuilder_ == null) { + result.indexError_ = indexError_; + } else { + result.indexError_ = indexErrorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSet) { + return mergeFrom((com.google.cloud.vision.v1.ProductSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSet other) { + if (other == com.google.cloud.vision.v1.ProductSet.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (other.hasIndexError()) { + mergeIndexError(other.getIndexError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private com.google.rpc.Status indexError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + public boolean hasIndexError() { + return indexErrorBuilder_ != null || indexError_ != null; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + public com.google.rpc.Status getIndexError() { + if (indexErrorBuilder_ == null) { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } else { + return indexErrorBuilder_.getMessage(); + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexError_ = value; + onChanged(); + } else { + indexErrorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError( + com.google.rpc.Status.Builder builderForValue) { + if (indexErrorBuilder_ == null) { + indexError_ = builderForValue.build(); + onChanged(); + } else { + indexErrorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (indexError_ != null) { + indexError_ = + com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); + } else { + indexError_ = value; + } + onChanged(); + } else { + indexErrorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexError() { + if (indexErrorBuilder_ == null) { + indexError_ = null; + onChanged(); + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getIndexErrorBuilder() { + + onChanged(); + return getIndexErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + if (indexErrorBuilder_ != null) { + return indexErrorBuilder_.getMessageOrBuilder(); + } else { + return indexError_ == null ? + com.google.rpc.Status.getDefaultInstance() : indexError_; + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getIndexErrorFieldBuilder() { + if (indexErrorBuilder_ == null) { + indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getIndexError(), + getParentForChildren(), + isClean()); + indexError_ = null; + } + return indexErrorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSet) + private static final com.google.cloud.vision.v1.ProductSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSet(); + } + + public static com.google.cloud.vision.v1.ProductSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java new file mode 100644 index 000000000000..50c2e485af8f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductSetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/productSets/{product_set}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String productSet; + + @Deprecated + protected ProductSetName() { + project = null; + location = null; + productSet = null; + } + + private ProductSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + productSet = Preconditions.checkNotNull(builder.getProductSet()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductSetName of(String project, String location, String productSet) { + return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); + } + + public static String format(String project, String location, String productSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProductSet(productSet) + .build() + .toString(); + } + + public static ProductSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_SET.validatedMatch( + formattedString, "ProductSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductSetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (productSet != null) { + fieldMapBuilder.put("product_set", productSet); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_SET.instantiate( + "project", project, "location", location, "product_set", productSet); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductSetName that = ((ProductSetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.productSet, that.productSet); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(productSet); + return h; + } + + /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ + public static class Builder { + private String project; + private String location; + private String productSet; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProductSet(String productSet) { + this.productSet = productSet; + return this; + } + + private Builder(ProductSetName productSetName) { + this.project = productSetName.project; + this.location = productSetName.location; + this.productSet = productSetName.productSet; + } + + public ProductSetName build() { + return new ProductSetName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java new file mode 100644 index 000000000000..e67969e951f4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ProductSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + boolean hasIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + com.google.rpc.Status getIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java new file mode 100644 index 000000000000..158a7d1a8ab7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Config to control which ProductSet contains the Products to be deleted.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSetPurgeConfig} + */ +public final class ProductSetPurgeConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSetPurgeConfig) + ProductSetPurgeConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSetPurgeConfig.newBuilder() to construct. + private ProductSetPurgeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSetPurgeConfig() { + productSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSetPurgeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSetPurgeConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + productSetId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder.class); + } + + public static final int PRODUCT_SET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object productSetId_; + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + @java.lang.Override + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } + } + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, productSetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, productSetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ProductSetPurgeConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ProductSetPurgeConfig other = (com.google.cloud.vision.v1.ProductSetPurgeConfig) obj; + + if (!getProductSetId() + .equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductSetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ProductSetPurgeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Config to control which ProductSet contains the Products to be deleted.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ProductSetPurgeConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSetPurgeConfig) + com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ProductSetPurgeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + productSetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig build() { + com.google.cloud.vision.v1.ProductSetPurgeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig buildPartial() { + com.google.cloud.vision.v1.ProductSetPurgeConfig result = new com.google.cloud.vision.v1.ProductSetPurgeConfig(this); + result.productSetId_ = productSetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ProductSetPurgeConfig) { + return mergeFrom((com.google.cloud.vision.v1.ProductSetPurgeConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ProductSetPurgeConfig other) { + if (other == com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance()) return this; + if (!other.getProductSetId().isEmpty()) { + productSetId_ = other.productSetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ProductSetPurgeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ProductSetPurgeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object productSetId_ = ""; + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @param value The productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSetId_ = value; + onChanged(); + return this; + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return This builder for chaining. + */ + public Builder clearProductSetId() { + + productSetId_ = getDefaultInstance().getProductSetId(); + onChanged(); + return this; + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @param value The bytes for productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSetId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSetPurgeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSetPurgeConfig) + private static final com.google.cloud.vision.v1.ProductSetPurgeConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSetPurgeConfig(); + } + + public static com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSetPurgeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSetPurgeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java new file mode 100644 index 000000000000..9909e1160c60 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ProductSetPurgeConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSetPurgeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + java.lang.String getProductSetId(); + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + com.google.protobuf.ByteString + getProductSetIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java new file mode 100644 index 000000000000..6f500cdd8c3f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A `Property` consists of a user-supplied name/value pair.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Property} + */ +public final class Property extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Property) + PropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Property() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: { + + uint64Value_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Property.class, com.google.cloud.vision.v1.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UINT64_VALUE_FIELD_NUMBER = 3; + private long uint64Value_; + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (uint64Value_ != 0L) { + output.writeUInt64(3, uint64Value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (uint64Value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, uint64Value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Property)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Property other = (com.google.cloud.vision.v1.Property) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getUint64Value() + != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint64Value()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Property parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Property parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Property parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Property parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Property parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Property parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Property parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Property parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Property prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `Property` consists of a user-supplied name/value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Property} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Property) + com.google.cloud.vision.v1.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Property.class, com.google.cloud.vision.v1.Property.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + uint64Value_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Property getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Property build() { + com.google.cloud.vision.v1.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Property buildPartial() { + com.google.cloud.vision.v1.Property result = new com.google.cloud.vision.v1.Property(this); + result.name_ = name_; + result.value_ = value_; + result.uint64Value_ = uint64Value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Property) { + return mergeFrom((com.google.cloud.vision.v1.Property)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Property other) { + if (other == com.google.cloud.vision.v1.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getUint64Value() != 0L) { + setUint64Value(other.getUint64Value()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private long uint64Value_ ; + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @param value The uint64Value to set. + * @return This builder for chaining. + */ + public Builder setUint64Value(long value) { + + uint64Value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return This builder for chaining. + */ + public Builder clearUint64Value() { + + uint64Value_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Property) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Property) + private static final com.google.cloud.vision.v1.Property DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Property(); + } + + public static com.google.cloud.vision.v1.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java new file mode 100644 index 000000000000..5f764c7d0c8b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface PropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Property) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + long getUint64Value(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java new file mode 100644 index 000000000000..8d70e226ff53 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java @@ -0,0 +1,1143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `PurgeProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.PurgeProductsRequest} + */ +public final class PurgeProductsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.PurgeProductsRequest) + PurgeProductsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use PurgeProductsRequest.newBuilder() to construct. + private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PurgeProductsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PurgeProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PurgeProductsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder subBuilder = null; + if (targetCase_ == 2) { + subBuilder = ((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.cloud.vision.v1.ProductSetPurgeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 2; + break; + } + case 24: { + target_ = input.readBool(); + targetCase_ = 3; + break; + } + case 32: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.PurgeProductsRequest.class, com.google.cloud.vision.v1.PurgeProductsRequest.Builder.class); + } + + private int targetCase_ = 0; + private java.lang.Object target_; + public enum TargetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRODUCT_SET_PURGE_CONFIG(2), + DELETE_ORPHAN_PRODUCTS(3), + TARGET_NOT_SET(0); + private final int value; + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 2: return PRODUCT_SET_PURGE_CONFIG; + case 3: return DELETE_ORPHAN_PRODUCTS; + case 0: return TARGET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public static final int PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER = 2; + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + @java.lang.Override + public boolean hasProductSetPurgeConfig() { + return targetCase_ == 2; + } + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig() { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + + public static final int DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER = 3; + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + @java.lang.Override + public boolean hasDeleteOrphanProducts() { + return targetCase_ == 3; + } + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + @java.lang.Override + public boolean getDeleteOrphanProducts() { + if (targetCase_ == 3) { + return (java.lang.Boolean) target_; + } + return false; + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 4; + private boolean force_; + /** + *
+   * The default value is false. Override this value to true to actually perform
+   * the purge.
+   * 
+ * + * bool force = 4; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (targetCase_ == 2) { + output.writeMessage(2, (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); + } + if (targetCase_ == 3) { + output.writeBool( + 3, (boolean)((java.lang.Boolean) target_)); + } + if (force_ != false) { + output.writeBool(4, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (targetCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); + } + if (targetCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 3, (boolean)((java.lang.Boolean) target_)); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.PurgeProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.PurgeProductsRequest other = (com.google.cloud.vision.v1.PurgeProductsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getForce() + != other.getForce()) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 2: + if (!getProductSetPurgeConfig() + .equals(other.getProductSetPurgeConfig())) return false; + break; + case 3: + if (getDeleteOrphanProducts() + != other.getDeleteOrphanProducts()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + switch (targetCase_) { + case 2: + hash = (37 * hash) + PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProductSetPurgeConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeleteOrphanProducts()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.PurgeProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `PurgeProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.PurgeProductsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.PurgeProductsRequest) + com.google.cloud.vision.v1.PurgeProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.PurgeProductsRequest.class, com.google.cloud.vision.v1.PurgeProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.PurgeProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + force_ = false; + + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.PurgeProductsRequest build() { + com.google.cloud.vision.v1.PurgeProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.PurgeProductsRequest buildPartial() { + com.google.cloud.vision.v1.PurgeProductsRequest result = new com.google.cloud.vision.v1.PurgeProductsRequest(this); + if (targetCase_ == 2) { + if (productSetPurgeConfigBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = productSetPurgeConfigBuilder_.build(); + } + } + if (targetCase_ == 3) { + result.target_ = target_; + } + result.parent_ = parent_; + result.force_ = force_; + result.targetCase_ = targetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.PurgeProductsRequest) { + return mergeFrom((com.google.cloud.vision.v1.PurgeProductsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.PurgeProductsRequest other) { + if (other == com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + switch (other.getTargetCase()) { + case PRODUCT_SET_PURGE_CONFIG: { + mergeProductSetPurgeConfig(other.getProductSetPurgeConfig()); + break; + } + case DELETE_ORPHAN_PRODUCTS: { + setDeleteOrphanProducts(other.getDeleteOrphanProducts()); + break; + } + case TARGET_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.PurgeProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.PurgeProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int targetCase_ = 0; + private java.lang.Object target_; + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder> productSetPurgeConfigBuilder_; + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + @java.lang.Override + public boolean hasProductSetPurgeConfig() { + return targetCase_ == 2; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig() { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } else { + if (targetCase_ == 2) { + return productSetPurgeConfigBuilder_.getMessage(); + } + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder setProductSetPurgeConfig(com.google.cloud.vision.v1.ProductSetPurgeConfig value) { + if (productSetPurgeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + productSetPurgeConfigBuilder_.setMessage(value); + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder setProductSetPurgeConfig( + com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder builderForValue) { + if (productSetPurgeConfigBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + productSetPurgeConfigBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder mergeProductSetPurgeConfig(com.google.cloud.vision.v1.ProductSetPurgeConfig value) { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2 && + target_ != com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance()) { + target_ = com.google.cloud.vision.v1.ProductSetPurgeConfig.newBuilder((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 2) { + productSetPurgeConfigBuilder_.mergeFrom(value); + } else { + productSetPurgeConfigBuilder_.setMessage(value); + } + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder clearProductSetPurgeConfig() { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + } + productSetPurgeConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder getProductSetPurgeConfigBuilder() { + return getProductSetPurgeConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { + if ((targetCase_ == 2) && (productSetPurgeConfigBuilder_ != null)) { + return productSetPurgeConfigBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder> + getProductSetPurgeConfigFieldBuilder() { + if (productSetPurgeConfigBuilder_ == null) { + if (!(targetCase_ == 2)) { + target_ = com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); + } + productSetPurgeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder>( + (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 2; + onChanged();; + return productSetPurgeConfigBuilder_; + } + + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + public boolean hasDeleteOrphanProducts() { + return targetCase_ == 3; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + public boolean getDeleteOrphanProducts() { + if (targetCase_ == 3) { + return (java.lang.Boolean) target_; + } + return false; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @param value The deleteOrphanProducts to set. + * @return This builder for chaining. + */ + public Builder setDeleteOrphanProducts(boolean value) { + targetCase_ = 3; + target_ = value; + onChanged(); + return this; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return This builder for chaining. + */ + public Builder clearDeleteOrphanProducts() { + if (targetCase_ == 3) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.PurgeProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.PurgeProductsRequest) + private static final com.google.cloud.vision.v1.PurgeProductsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.PurgeProductsRequest(); + } + + public static com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PurgeProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java new file mode 100644 index 000000000000..57400ff88ae9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface PurgeProductsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.PurgeProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + boolean hasProductSetPurgeConfig(); + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig(); + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder(); + + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + boolean hasDeleteOrphanProducts(); + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + boolean getDeleteOrphanProducts(); + + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The default value is false. Override this value to true to actually perform
+   * the purge.
+   * 
+ * + * bool force = 4; + * @return The force. + */ + boolean getForce(); + + public com.google.cloud.vision.v1.PurgeProductsRequest.TargetCase getTargetCase(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java new file mode 100644 index 000000000000..c3d62d2d07b8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java @@ -0,0 +1,1372 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A `ReferenceImage` represents a product image and its associated metadata,
+ * such as bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ReferenceImage} + */ +public final class ReferenceImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ReferenceImage) + ReferenceImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReferenceImage.newBuilder() to construct. + private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReferenceImage() { + name_ = ""; + uri_ = ""; + boundingPolys_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReferenceImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReferenceImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boundingPolys_.add( + input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ReferenceImage.class, com.google.cloud.vision.v1.ReferenceImage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; + private java.util.List boundingPolys_; + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List getBoundingPolysList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List + getBoundingPolysOrBuilderList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public int getBoundingPolysCount() { + return boundingPolys_.size(); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index) { + return boundingPolys_.get(index); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + return boundingPolys_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + output.writeMessage(3, boundingPolys_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, boundingPolys_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.ReferenceImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.ReferenceImage other = (com.google.cloud.vision.v1.ReferenceImage) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (!getBoundingPolysList() + .equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getBoundingPolysCount() > 0) { + hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPolysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ReferenceImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.ReferenceImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `ReferenceImage` represents a product image and its associated metadata,
+   * such as bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.ReferenceImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ReferenceImage) + com.google.cloud.vision.v1.ReferenceImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.ReferenceImage.class, com.google.cloud.vision.v1.ReferenceImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.ReferenceImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoundingPolysFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uri_ = ""; + + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage build() { + com.google.cloud.vision.v1.ReferenceImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage buildPartial() { + com.google.cloud.vision.v1.ReferenceImage result = new com.google.cloud.vision.v1.ReferenceImage(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uri_ = uri_; + if (boundingPolysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boundingPolys_ = boundingPolys_; + } else { + result.boundingPolys_ = boundingPolysBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.ReferenceImage) { + return mergeFrom((com.google.cloud.vision.v1.ReferenceImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.ReferenceImage other) { + if (other == com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (boundingPolysBuilder_ == null) { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolys_.isEmpty()) { + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundingPolysIsMutable(); + boundingPolys_.addAll(other.boundingPolys_); + } + onChanged(); + } + } else { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolysBuilder_.isEmpty()) { + boundingPolysBuilder_.dispose(); + boundingPolysBuilder_ = null; + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + boundingPolysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoundingPolysFieldBuilder() : null; + } else { + boundingPolysBuilder_.addAllMessages(other.boundingPolys_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.ReferenceImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.ReferenceImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.util.List boundingPolys_ = + java.util.Collections.emptyList(); + private void ensureBoundingPolysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(boundingPolys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolysBuilder_; + + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List getBoundingPolysList() { + if (boundingPolysBuilder_ == null) { + return java.util.Collections.unmodifiableList(boundingPolys_); + } else { + return boundingPolysBuilder_.getMessageList(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public int getBoundingPolysCount() { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.size(); + } else { + return boundingPolysBuilder_.getCount(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); + } else { + return boundingPolysBuilder_.getMessage(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, value); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addAllBoundingPolys( + java.lang.Iterable values) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boundingPolys_); + onChanged(); + } else { + boundingPolysBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearBoundingPolys() { + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.remove(index); + onChanged(); + } else { + boundingPolysBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); } else { + return boundingPolysBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysOrBuilderList() { + if (boundingPolysBuilder_ != null) { + return boundingPolysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boundingPolys_); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder() { + return getBoundingPolysFieldBuilder().addBuilder( + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysBuilderList() { + return getBoundingPolysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingPolysFieldBuilder() { + if (boundingPolysBuilder_ == null) { + boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + boundingPolys_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boundingPolys_ = null; + } + return boundingPolysBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ReferenceImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ReferenceImage) + private static final com.google.cloud.vision.v1.ReferenceImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ReferenceImage(); + } + + public static com.google.cloud.vision.v1.ReferenceImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReferenceImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReferenceImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.ReferenceImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java new file mode 100644 index 000000000000..de1c28eba0ab --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ReferenceImageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + private final String referenceImage; + + @Deprecated + protected ReferenceImageName() { + project = null; + location = null; + product = null; + referenceImage = null; + } + + private ReferenceImageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReferenceImageName of( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build(); + } + + public static String format( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build() + .toString(); + } + + public static ReferenceImageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( + formattedString, "ReferenceImageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("product"), + matchMap.get("reference_image")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ReferenceImageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + if (referenceImage != null) { + fieldMapBuilder.put("reference_image", referenceImage); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( + "project", + project, + "location", + location, + "product", + product, + "reference_image", + referenceImage); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReferenceImageName that = ((ReferenceImageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product) + && Objects.equals(this.referenceImage, that.referenceImage); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + h *= 1000003; + h ^= Objects.hashCode(referenceImage); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. + */ + public static class Builder { + private String project; + private String location; + private String product; + private String referenceImage; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + public Builder setReferenceImage(String referenceImage) { + this.referenceImage = referenceImage; + return this; + } + + private Builder(ReferenceImageName referenceImageName) { + this.project = referenceImageName.project; + this.location = referenceImageName.location; + this.product = referenceImageName.product; + this.referenceImage = referenceImageName.referenceImage; + } + + public ReferenceImageName build() { + return new ReferenceImageName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java new file mode 100644 index 000000000000..277ffca2e83c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface ReferenceImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ReferenceImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getBoundingPolysCount(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysOrBuilderList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java new file mode 100644 index 000000000000..0764b44491a2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `RemoveProductFromProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.RemoveProductFromProductSetRequest} + */ +public final class RemoveProductFromProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.RemoveProductFromProductSetRequest) + RemoveProductFromProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveProductFromProductSetRequest.newBuilder() to construct. + private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveProductFromProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveProductFromProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RemoveProductFromProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.RemoveProductFromProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `RemoveProductFromProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.RemoveProductFromProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.RemoveProductFromProductSetRequest) + com.google.cloud.vision.v1.RemoveProductFromProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest build() { + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest buildPartial() { + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1.RemoveProductFromProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.RemoveProductFromProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest other) { + if (other == com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.RemoveProductFromProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.RemoveProductFromProductSetRequest) + private static final com.google.cloud.vision.v1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.RemoveProductFromProductSetRequest(); + } + + public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveProductFromProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveProductFromProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..9948cf3c64da --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface RemoveProductFromProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.RemoveProductFromProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java new file mode 100644 index 000000000000..5875814d5817 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Set of features pertaining to the image, computed by computer vision
+ * methods over safe-search verticals (for example, adult, spoof, medical,
+ * violence).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.SafeSearchAnnotation} + */ +public final class SafeSearchAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.SafeSearchAnnotation) + SafeSearchAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use SafeSearchAnnotation.newBuilder() to construct. + private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SafeSearchAnnotation() { + adult_ = 0; + spoof_ = 0; + medical_ = 0; + violence_ = 0; + racy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SafeSearchAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SafeSearchAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + adult_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + spoof_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + medical_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + violence_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + racy_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.SafeSearchAnnotation.class, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder.class); + } + + public static final int ADULT_FIELD_NUMBER = 1; + private int adult_; + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SPOOF_FIELD_NUMBER = 2; + private int spoof_; + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int MEDICAL_FIELD_NUMBER = 3; + private int medical_; + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int VIOLENCE_FIELD_NUMBER = 4; + private int violence_; + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RACY_FIELD_NUMBER = 9; + private int racy_; + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override public com.google.cloud.vision.v1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adult_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, racy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adult_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, racy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.SafeSearchAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.SafeSearchAnnotation other = (com.google.cloud.vision.v1.SafeSearchAnnotation) obj; + + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADULT_FIELD_NUMBER; + hash = (53 * hash) + adult_; + hash = (37 * hash) + SPOOF_FIELD_NUMBER; + hash = (53 * hash) + spoof_; + hash = (37 * hash) + MEDICAL_FIELD_NUMBER; + hash = (53 * hash) + medical_; + hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; + hash = (53 * hash) + violence_; + hash = (37 * hash) + RACY_FIELD_NUMBER; + hash = (53 * hash) + racy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.SafeSearchAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of features pertaining to the image, computed by computer vision
+   * methods over safe-search verticals (for example, adult, spoof, medical,
+   * violence).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.SafeSearchAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.SafeSearchAnnotation) + com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.SafeSearchAnnotation.class, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.SafeSearchAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adult_ = 0; + + spoof_ = 0; + + medical_ = 0; + + violence_ = 0; + + racy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotation build() { + com.google.cloud.vision.v1.SafeSearchAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotation buildPartial() { + com.google.cloud.vision.v1.SafeSearchAnnotation result = new com.google.cloud.vision.v1.SafeSearchAnnotation(this); + result.adult_ = adult_; + result.spoof_ = spoof_; + result.medical_ = medical_; + result.violence_ = violence_; + result.racy_ = racy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.SafeSearchAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.SafeSearchAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.SafeSearchAnnotation other) { + if (other == com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()) return this; + if (other.adult_ != 0) { + setAdultValue(other.getAdultValue()); + } + if (other.spoof_ != 0) { + setSpoofValue(other.getSpoofValue()); + } + if (other.medical_ != 0) { + setMedicalValue(other.getMedicalValue()); + } + if (other.violence_ != 0) { + setViolenceValue(other.getViolenceValue()); + } + if (other.racy_ != 0) { + setRacyValue(other.getRacyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.SafeSearchAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.SafeSearchAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int adult_ = 0; + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @param value The enum numeric value on the wire for adult to set. + * @return This builder for chaining. + */ + public Builder setAdultValue(int value) { + + adult_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @param value The adult to set. + * @return This builder for chaining. + */ + public Builder setAdult(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + adult_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return This builder for chaining. + */ + public Builder clearAdult() { + + adult_ = 0; + onChanged(); + return this; + } + + private int spoof_ = 0; + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @param value The enum numeric value on the wire for spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoofValue(int value) { + + spoof_ = value; + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @param value The spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoof(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + spoof_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return This builder for chaining. + */ + public Builder clearSpoof() { + + spoof_ = 0; + onChanged(); + return this; + } + + private int medical_ = 0; + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @param value The enum numeric value on the wire for medical to set. + * @return This builder for chaining. + */ + public Builder setMedicalValue(int value) { + + medical_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @param value The medical to set. + * @return This builder for chaining. + */ + public Builder setMedical(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + medical_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return This builder for chaining. + */ + public Builder clearMedical() { + + medical_ = 0; + onChanged(); + return this; + } + + private int violence_ = 0; + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @param value The enum numeric value on the wire for violence to set. + * @return This builder for chaining. + */ + public Builder setViolenceValue(int value) { + + violence_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @param value The violence to set. + * @return This builder for chaining. + */ + public Builder setViolence(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + violence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return This builder for chaining. + */ + public Builder clearViolence() { + + violence_ = 0; + onChanged(); + return this; + } + + private int racy_ = 0; + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @param value The enum numeric value on the wire for racy to set. + * @return This builder for chaining. + */ + public Builder setRacyValue(int value) { + + racy_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @param value The racy to set. + * @return This builder for chaining. + */ + public Builder setRacy(com.google.cloud.vision.v1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + racy_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return This builder for chaining. + */ + public Builder clearRacy() { + + racy_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.SafeSearchAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.SafeSearchAnnotation) + private static final com.google.cloud.vision.v1.SafeSearchAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.SafeSearchAnnotation(); + } + + public static com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafeSearchAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SafeSearchAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java new file mode 100644 index 000000000000..482f3c3cc2f1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface SafeSearchAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.SafeSearchAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + int getAdultValue(); + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood adult = 1; + * @return The adult. + */ + com.google.cloud.vision.v1.Likelihood getAdult(); + + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + int getSpoofValue(); + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood spoof = 2; + * @return The spoof. + */ + com.google.cloud.vision.v1.Likelihood getSpoof(); + + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + int getMedicalValue(); + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood medical = 3; + * @return The medical. + */ + com.google.cloud.vision.v1.Likelihood getMedical(); + + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + int getViolenceValue(); + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood violence = 4; + * @return The violence. + */ + com.google.cloud.vision.v1.Likelihood getViolence(); + + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + int getRacyValue(); + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1.Likelihood racy = 9; + * @return The racy. + */ + com.google.cloud.vision.v1.Likelihood getRacy(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java new file mode 100644 index 000000000000..6b2fa642c87b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A single symbol representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Symbol} + */ +public final class Symbol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Symbol) + SymbolOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symbol() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symbol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Symbol.class, com.google.cloud.vision.v1.Symbol.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int TEXT_FIELD_NUMBER = 3; + private volatile java.lang.Object text_; + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Symbol)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Symbol other = (com.google.cloud.vision.v1.Symbol) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getText() + .equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Symbol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Symbol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Symbol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Symbol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Symbol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Symbol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single symbol representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Symbol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Symbol) + com.google.cloud.vision.v1.SymbolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Symbol.class, com.google.cloud.vision.v1.Symbol.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Symbol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + text_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Symbol getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Symbol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Symbol build() { + com.google.cloud.vision.v1.Symbol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Symbol buildPartial() { + com.google.cloud.vision.v1.Symbol result = new com.google.cloud.vision.v1.Symbol(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + result.text_ = text_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Symbol) { + return mergeFrom((com.google.cloud.vision.v1.Symbol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Symbol other) { + if (other == com.google.cloud.vision.v1.Symbol.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Symbol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Symbol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Symbol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Symbol) + private static final com.google.cloud.vision.v1.Symbol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Symbol(); + } + + public static com.google.cloud.vision.v1.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java new file mode 100644 index 000000000000..aaa4693159ec --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Symbol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java new file mode 100644 index 000000000000..4db8ca068034 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java @@ -0,0 +1,3812 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * TextAnnotation contains a structured representation of OCR extracted text.
+ * The hierarchy of an OCR extracted text structure is like this:
+ *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+ * Each structural component, starting from Page, may further have their own
+ * properties. Properties describe detected languages, breaks etc.. Please refer
+ * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more
+ * detail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation} + */ +public final class TextAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation) + TextAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextAnnotation() { + pages_ = java.util.Collections.emptyList(); + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pages_.add( + input.readMessage(com.google.cloud.vision.v1.Page.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.class, com.google.cloud.vision.v1.TextAnnotation.Builder.class); + } + + public interface DetectedLanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + } + /** + *
+   * Detected language for a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedLanguage} + */ + public static final class DetectedLanguage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedLanguage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) obj; + + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedLanguage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage build() { + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage buildPartial() { + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage(this); + result.languageCode_ = languageCode_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) { + return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage other) { + if (other == com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) + private static final com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage(); + } + + public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedLanguage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedBreakOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType(); + + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + boolean getIsPrefix(); + } + /** + *
+   * Detected start or end of a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak} + */ + public static final class DetectedBreak extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedBreak() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedBreak(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedBreak( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + isPrefix_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder.class); + } + + /** + *
+     * Enum to denote the type of break found. New line, space etc.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType} + */ + public enum BreakType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + SURE_SPACE(2), + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + EOL_SURE_SPACE(3), + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + HYPHEN(4), + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + LINE_BREAK(5), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + public static final int SURE_SPACE_VALUE = 2; + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + public static final int EOL_SURE_SPACE_VALUE = 3; + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + public static final int HYPHEN_VALUE = 4; + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + public static final int LINE_BREAK_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BreakType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BreakType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SPACE; + case 2: return SURE_SPACE; + case 3: return EOL_SURE_SPACE; + case 4: return HYPHEN; + case 5: return LINE_BREAK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BreakType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BreakType findValueByNumber(int number) { + return BreakType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); + } + + private static final BreakType[] VALUES = values(); + + public static BreakType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BreakType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + + public static final int IS_PREFIX_FIELD_NUMBER = 2; + private boolean isPrefix_; + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (isPrefix_ != false) { + output.writeBool(2, isPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (isPrefix_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedBreak)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) obj; + + if (type_ != other.type_) return false; + if (getIsPrefix() + != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPrefix()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected start or end of a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.DetectedBreak) + com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + isPrefix_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak build() { + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak buildPartial() { + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1.TextAnnotation.DetectedBreak(this); + result.type_ = type_; + result.isPrefix_ = isPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) { + return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.DetectedBreak)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak other) { + if (other == com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getIsPrefix() != false) { + setIsPrefix(other.getIsPrefix()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean isPrefix_ ; + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @param value The isPrefix to set. + * @return This builder for chaining. + */ + public Builder setIsPrefix(boolean value) { + + isPrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearIsPrefix() { + + isPrefix_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak) + private static final com.google.cloud.vision.v1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.DetectedBreak(); + } + + public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedBreak(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TextPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.TextProperty) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + int getDetectedLanguagesCount(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesOrBuilderList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index); + + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + boolean hasDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); + } + /** + *
+   * Additional information detected on the structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.TextProperty} + */ + public static final class TextProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.TextProperty) + TextPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextProperty.newBuilder() to construct. + private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextProperty() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextProperty(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextProperty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectedLanguages_.add( + input.readMessage(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder subBuilder = null; + if (detectedBreak_ != null) { + subBuilder = detectedBreak_.toBuilder(); + } + detectedBreak_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectedBreak_); + detectedBreak_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder.class); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; + private java.util.List detectedLanguages_; + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + return detectedLanguages_.get(index); + } + + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_; + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak() { + return detectedBreak_ == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + return getDetectedBreak(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectedBreak()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.TextProperty)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1.TextAnnotation.TextProperty) obj; + + if (!getDetectedLanguagesList() + .equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak() + .equals(other.getDetectedBreak())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.TextProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Additional information detected on the structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.TextProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.TextProperty) + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectedLanguagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectedLanguagesBuilder_.clear(); + } + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty build() { + com.google.cloud.vision.v1.TextAnnotation.TextProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty buildPartial() { + com.google.cloud.vision.v1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1.TextAnnotation.TextProperty(this); + int from_bitField0_ = bitField0_; + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (detectedBreakBuilder_ == null) { + result.detectedBreak_ = detectedBreak_; + } else { + result.detectedBreak_ = detectedBreakBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.TextAnnotation.TextProperty) { + return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.TextProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.TextProperty other) { + if (other == com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance()) return this; + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectedLanguagesFieldBuilder() : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.TextAnnotation.TextProperty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List detectedLanguages_ = + java.util.Collections.emptyList(); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; + + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return detectedBreakBuilder_ != null || detectedBreak_ != null; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + onChanged(); + } else { + detectedBreakBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak( + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + onChanged(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder mergeDetectedBreak(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (detectedBreak_ != null) { + detectedBreak_ = + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); + } else { + detectedBreak_ = value; + } + onChanged(); + } else { + detectedBreakBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder clearDetectedBreak() { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + onChanged(); + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { + + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null ? + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder>( + getDetectedBreak(), + getParentForChildren(), + isClean()); + detectedBreak_ = null; + } + return detectedBreakBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.TextProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.TextProperty) + private static final com.google.cloud.vision.v1.TextAnnotation.TextProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.TextProperty(); + } + + public static com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextProperty(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PAGES_FIELD_NUMBER = 1; + private java.util.List pages_; + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + @java.lang.Override + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Page getPages(int index) { + return pages_.get(index); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object text_; + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.TextAnnotation other = (com.google.cloud.vision.v1.TextAnnotation) obj; + + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * TextAnnotation contains a structured representation of OCR extracted text.
+   * The hierarchy of an OCR extracted text structure is like this:
+   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+   * Each structural component, starting from Page, may further have their own
+   * properties. Properties describe detected languages, breaks etc.. Please refer
+   * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more
+   * detail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation) + com.google.cloud.vision.v1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextAnnotation.class, com.google.cloud.vision.v1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pagesBuilder_.clear(); + } + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation build() { + com.google.cloud.vision.v1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation buildPartial() { + com.google.cloud.vision.v1.TextAnnotation result = new com.google.cloud.vision.v1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.TextAnnotation) { + return mergeFrom((com.google.cloud.vision.v1.TextAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation other) { + if (other == com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()) return this; + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder> pagesBuilder_; + + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public com.google.cloud.vision.v1.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder addPages(com.google.cloud.vision.v1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder addPages( + com.google.cloud.vision.v1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public com.google.cloud.vision.v1.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public com.google.cloud.vision.v1.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public com.google.cloud.vision.v1.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation) + private static final com.google.cloud.vision.v1.TextAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation(); + } + + public static com.google.cloud.vision.v1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..5a686b18b66c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface TextAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + java.util.List + getPagesList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + com.google.cloud.vision.v1.Page getPages(int index); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + int getPagesCount(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + java.util.List + getPagesOrBuilderList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1.Page pages = 1; + */ + com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( + int index); + + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java new file mode 100644 index 000000000000..5a8c2333e26c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java @@ -0,0 +1,183 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public final class TextAnnotationProto { + private TextAnnotationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Page_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Page_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Block_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Block_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Paragraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Word_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Word_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_Symbol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1/text_annotation" + + ".proto\022\026google.cloud.vision.v1\032%google/c" + + "loud/vision/v1/geometry.proto\"\226\004\n\016TextAn" + + "notation\022+\n\005pages\030\001 \003(\0132\034.google.cloud.v" + + "ision.v1.Page\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedL" + + "anguage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfid" + + "ence\030\002 \001(\002\032\325\001\n\rDetectedBreak\022L\n\004type\030\001 \001" + + "(\0162>.google.cloud.vision.v1.TextAnnotati" + + "on.DetectedBreak.BreakType\022\021\n\tis_prefix\030" + + "\002 \001(\010\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE" + + "\020\001\022\016\n\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n" + + "\n\006HYPHEN\020\004\022\016\n\nLINE_BREAK\020\005\032\261\001\n\014TextPrope" + + "rty\022S\n\022detected_languages\030\001 \003(\01327.google" + + ".cloud.vision.v1.TextAnnotation.Detected" + + "Language\022L\n\016detected_break\030\002 \001(\01324.googl" + + "e.cloud.vision.v1.TextAnnotation.Detecte" + + "dBreak\"\257\001\n\004Page\022E\n\010property\030\001 \001(\01323.goog" + + "le.cloud.vision.v1.TextAnnotation.TextPr" + + "operty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\022-\n" + + "\006blocks\030\004 \003(\0132\035.google.cloud.vision.v1.B" + + "lock\022\022\n\nconfidence\030\005 \001(\002\"\346\002\n\005Block\022E\n\010pr" + + "operty\030\001 \001(\01323.google.cloud.vision.v1.Te" + + "xtAnnotation.TextProperty\022:\n\014bounding_bo" + + "x\030\002 \001(\0132$.google.cloud.vision.v1.Boundin" + + "gPoly\0225\n\nparagraphs\030\003 \003(\0132!.google.cloud" + + ".vision.v1.Paragraph\022;\n\nblock_type\030\004 \001(\016" + + "2\'.google.cloud.vision.v1.Block.BlockTyp" + + "e\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007UN" + + "KNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE\020" + + "\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\317\001\n\tParagraph\022" + + "E\n\010property\030\001 \001(\01323.google.cloud.vision." + + "v1.TextAnnotation.TextProperty\022:\n\014boundi" + + "ng_box\030\002 \001(\0132$.google.cloud.vision.v1.Bo" + + "undingPoly\022+\n\005words\030\003 \003(\0132\034.google.cloud" + + ".vision.v1.Word\022\022\n\nconfidence\030\004 \001(\002\"\316\001\n\004" + + "Word\022E\n\010property\030\001 \001(\01323.google.cloud.vi" + + "sion.v1.TextAnnotation.TextProperty\022:\n\014b" + + "ounding_box\030\002 \001(\0132$.google.cloud.vision." + + "v1.BoundingPoly\022/\n\007symbols\030\003 \003(\0132\036.googl" + + "e.cloud.vision.v1.Symbol\022\022\n\nconfidence\030\004" + + " \001(\002\"\255\001\n\006Symbol\022E\n\010property\030\001 \001(\01323.goog" + + "le.cloud.vision.v1.TextAnnotation.TextPr" + + "operty\022:\n\014bounding_box\030\002 \001(\0132$.google.cl" + + "oud.vision.v1.BoundingPoly\022\014\n\004text\030\003 \001(\t" + + "\022\022\n\nconfidence\030\004 \001(\002B{\n\032com.google.cloud" + + ".vision.v1B\023TextAnnotationProtoP\001Z + * Parameters for text detections. This is used to control TEXT_DETECTION and + * DOCUMENT_TEXT_DETECTION features. + * + * + * Protobuf type {@code google.cloud.vision.v1.TextDetectionParams} + */ +public final class TextDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextDetectionParams) + TextDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextDetectionParams.newBuilder() to construct. + private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextDetectionParams() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 72: { + + enableTextDetectionConfidenceScore_ = input.readBool(); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + advancedOcrOptions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextDetectionParams.class, com.google.cloud.vision.v1.TextDetectionParams.Builder.class); + } + + public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; + private boolean enableTextDetectionConfidenceScore_; + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList advancedOcrOptions_; + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableTextDetectionConfidenceScore_ != false) { + output.writeBool(9, enableTextDetectionConfidenceScore_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTextDetectionConfidenceScore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, enableTextDetectionConfidenceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.TextDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.TextDetectionParams other = (com.google.cloud.vision.v1.TextDetectionParams) obj; + + if (getEnableTextDetectionConfidenceScore() + != other.getEnableTextDetectionConfidenceScore()) return false; + if (!getAdvancedOcrOptionsList() + .equals(other.getAdvancedOcrOptionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableTextDetectionConfidenceScore()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.TextDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for text detections. This is used to control TEXT_DETECTION and
+   * DOCUMENT_TEXT_DETECTION features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.TextDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextDetectionParams) + com.google.cloud.vision.v1.TextDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.TextDetectionParams.class, com.google.cloud.vision.v1.TextDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.TextDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableTextDetectionConfidenceScore_ = false; + + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParams build() { + com.google.cloud.vision.v1.TextDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParams buildPartial() { + com.google.cloud.vision.v1.TextDetectionParams result = new com.google.cloud.vision.v1.TextDetectionParams(this); + int from_bitField0_ = bitField0_; + result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; + if (((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.advancedOcrOptions_ = advancedOcrOptions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.TextDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1.TextDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.TextDetectionParams other) { + if (other == com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance()) return this; + if (other.getEnableTextDetectionConfidenceScore() != false) { + setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.TextDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.TextDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean enableTextDetectionConfidenceScore_ ; + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @param value The enableTextDetectionConfidenceScore to set. + * @return This builder for chaining. + */ + public Builder setEnableTextDetectionConfidenceScore(boolean value) { + + enableTextDetectionConfidenceScore_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return This builder for chaining. + */ + public Builder clearEnableTextDetectionConfidenceScore() { + + enableTextDetectionConfidenceScore_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdvancedOcrOptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_.getUnmodifiableView(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions( + java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, advancedOcrOptions_); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextDetectionParams) + private static final com.google.cloud.vision.v1.TextDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextDetectionParams(); + } + + public static com.google.cloud.vision.v1.TextDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.TextDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..2a652659af9e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface TextDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + boolean getEnableTextDetectionConfidenceScore(); + + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + java.util.List + getAdvancedOcrOptionsList(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java new file mode 100644 index 000000000000..98b42fb202e9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java @@ -0,0 +1,961 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `UpdateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.UpdateProductRequest} + */ +public final class UpdateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.UpdateProductRequest) + UpdateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductRequest.newBuilder() to construct. + private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.UpdateProductRequest.class, com.google.cloud.vision.v1.UpdateProductRequest.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.Product product_; + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.UpdateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.UpdateProductRequest other = (com.google.cloud.vision.v1.UpdateProductRequest) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.UpdateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.UpdateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.UpdateProductRequest) + com.google.cloud.vision.v1.UpdateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.UpdateProductRequest.class, com.google.cloud.vision.v1.UpdateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.UpdateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductRequest build() { + com.google.cloud.vision.v1.UpdateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductRequest buildPartial() { + com.google.cloud.vision.v1.UpdateProductRequest result = new com.google.cloud.vision.v1.UpdateProductRequest(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.UpdateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1.UpdateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.UpdateProductRequest other) { + if (other == com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.UpdateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.UpdateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.UpdateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.UpdateProductRequest) + private static final com.google.cloud.vision.v1.UpdateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.UpdateProductRequest(); + } + + public static com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java new file mode 100644 index 000000000000..7126cf1c1fed --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface UpdateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.UpdateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1.Product getProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java new file mode 100644 index 000000000000..92c5cb77ecd9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java @@ -0,0 +1,937 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Request message for the `UpdateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.UpdateProductSetRequest} + */ +public final class UpdateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.UpdateProductSetRequest) + UpdateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductSetRequest.newBuilder() to construct. + private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductSetRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.UpdateProductSetRequest.class, com.google.cloud.vision.v1.UpdateProductSetRequest.Builder.class); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (productSet_ != null) { + output.writeMessage(1, getProductSet()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProductSet()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.UpdateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.UpdateProductSetRequest other = (com.google.cloud.vision.v1.UpdateProductSetRequest) obj; + + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.UpdateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.UpdateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.UpdateProductSetRequest) + com.google.cloud.vision.v1.UpdateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.UpdateProductSetRequest.class, com.google.cloud.vision.v1.UpdateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.UpdateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductSetRequest build() { + com.google.cloud.vision.v1.UpdateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductSetRequest buildPartial() { + com.google.cloud.vision.v1.UpdateProductSetRequest result = new com.google.cloud.vision.v1.UpdateProductSetRequest(this); + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.UpdateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1.UpdateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.UpdateProductSetRequest other) { + if (other == com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance()) return this; + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.UpdateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.UpdateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.UpdateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.UpdateProductSetRequest) + private static final com.google.cloud.vision.v1.UpdateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.UpdateProductSetRequest(); + } + + public static com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..5b04f5d58185 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/product_search_service.proto + +package com.google.cloud.vision.v1; + +public interface UpdateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.UpdateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java new file mode 100644 index 000000000000..c121a38abf70 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Vertex} + */ +public final class Vertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Vertex) + VertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Vertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Vertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + x_ = input.readInt32(); + break; + } + case 16: { + + y_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Vertex.class, com.google.cloud.vision.v1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Vertex other = (com.google.cloud.vision.v1.Vertex) obj; + + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Vertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Vertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Vertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Vertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Vertex) + com.google.cloud.vision.v1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Vertex.class, com.google.cloud.vision.v1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Vertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Vertex build() { + com.google.cloud.vision.v1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Vertex buildPartial() { + com.google.cloud.vision.v1.Vertex result = new com.google.cloud.vision.v1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Vertex) { + return mergeFrom((com.google.cloud.vision.v1.Vertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Vertex other) { + if (other == com.google.cloud.vision.v1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Vertex) + private static final com.google.cloud.vision.v1.Vertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Vertex(); + } + + public static com.google.cloud.vision.v1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java new file mode 100644 index 000000000000..174b9650b559 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/geometry.proto + +package com.google.cloud.vision.v1; + +public interface VertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + int getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + int getY(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java new file mode 100644 index 000000000000..77a0f6ab3ef2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java @@ -0,0 +1,7560 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/web_detection.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Relevant information for the image from the Internet.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection} + */ +public final class WebDetection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection) + WebDetectionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetection.newBuilder() to construct. + private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetection() { + webEntities_ = java.util.Collections.emptyList(); + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + visuallySimilarImages_ = java.util.Collections.emptyList(); + bestGuessLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + webEntities_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebEntity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pagesWithMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebPage.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + visuallySimilarImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + bestGuessLabels_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebLabel.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.class, com.google.cloud.vision.v1.WebDetection.Builder.class); + } + + public interface WebEntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebEntity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Entity deduced from similar images on the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity} + */ + public static final class WebEntity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebEntity) + WebEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebEntity.newBuilder() to construct. + private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebEntity() { + entityId_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebEntity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebEntity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebEntity.class, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebEntity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetection.WebEntity other = (com.google.cloud.vision.v1.WebDetection.WebEntity) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebEntity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Entity deduced from similar images on the Internet.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebEntity) + com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebEntity.class, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetection.WebEntity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + score_ = 0F; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntity build() { + com.google.cloud.vision.v1.WebDetection.WebEntity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntity buildPartial() { + com.google.cloud.vision.v1.WebDetection.WebEntity result = new com.google.cloud.vision.v1.WebDetection.WebEntity(this); + result.entityId_ = entityId_; + result.score_ = score_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetection.WebEntity) { + return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebEntity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebEntity other) { + if (other == com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetection.WebEntity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebEntity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebEntity) + private static final com.google.cloud.vision.v1.WebDetection.WebEntity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebEntity(); + } + + public static com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebEntity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Metadata for online images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage} + */ + public static final class WebImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebImage) + WebImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebImage.newBuilder() to construct. + private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebImage() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebImage.class, com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetection.WebImage other = (com.google.cloud.vision.v1.WebDetection.WebImage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for online images.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebImage) + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebImage.class, com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetection.WebImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage build() { + com.google.cloud.vision.v1.WebDetection.WebImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage buildPartial() { + com.google.cloud.vision.v1.WebDetection.WebImage result = new com.google.cloud.vision.v1.WebDetection.WebImage(this); + result.url_ = url_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetection.WebImage) { + return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebImage other) { + if (other == com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetection.WebImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebImage) + private static final com.google.cloud.vision.v1.WebDetection.WebImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebImage(); + } + + public static com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebPageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebPage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + java.lang.String getPageTitle(); + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + com.google.protobuf.ByteString + getPageTitleBytes(); + + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + int getFullMatchingImagesCount(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + int getPartialMatchingImagesCount(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + } + /** + *
+   * Metadata for web pages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage} + */ + public static final class WebPage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebPage) + WebPageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebPage.newBuilder() to construct. + private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebPage() { + url_ = ""; + pageTitle_ = ""; + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebPage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebPage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageTitle_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebPage.class, com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PAGE_TITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pageTitle_; + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + @java.lang.Override + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } + } + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List fullMatchingImages_; + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; + private java.util.List partialMatchingImages_; + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(5, partialMatchingImages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, partialMatchingImages_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebPage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetection.WebPage other = (com.google.cloud.vision.v1.WebDetection.WebPage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getPageTitle() + .equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPageTitle().hashCode(); + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebPage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for web pages.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebPage) + com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebPage.class, com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetection.WebPage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + pageTitle_ = ""; + + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPage build() { + com.google.cloud.vision.v1.WebDetection.WebPage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() { + com.google.cloud.vision.v1.WebDetection.WebPage result = new com.google.cloud.vision.v1.WebDetection.WebPage(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + result.score_ = score_; + result.pageTitle_ = pageTitle_; + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetection.WebPage) { + return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebPage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebPage other) { + if (other == com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getPageTitle().isEmpty()) { + pageTitle_ = other.pageTitle_; + onChanged(); + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetection.WebPage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebPage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object pageTitle_ = ""; + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageTitle_ = value; + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return This builder for chaining. + */ + public Builder clearPageTitle() { + + pageTitle_ = getDefaultInstance().getPageTitle(); + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The bytes for pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageTitle_ = value; + onChanged(); + return this; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebPage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebPage) + private static final com.google.cloud.vision.v1.WebDetection.WebPage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebPage(); + } + + public static com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebPage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebPage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebLabel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + } + /** + *
+   * Label to provide extra metadata for the web detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel} + */ + public static final class WebLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebLabel) + WebLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLabel.newBuilder() to construct. + private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLabel() { + label_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebLabel.class, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebLabel)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetection.WebLabel other = (com.google.cloud.vision.v1.WebDetection.WebLabel) obj; + + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Label to provide extra metadata for the web detection.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebLabel) + com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.WebLabel.class, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetection.WebLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + label_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabel build() { + com.google.cloud.vision.v1.WebDetection.WebLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabel buildPartial() { + com.google.cloud.vision.v1.WebDetection.WebLabel result = new com.google.cloud.vision.v1.WebDetection.WebLabel(this); + result.label_ = label_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetection.WebLabel) { + return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebLabel other) { + if (other == com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetection.WebLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebLabel) + private static final com.google.cloud.vision.v1.WebDetection.WebLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebLabel(); + } + + public static com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int WEB_ENTITIES_FIELD_NUMBER = 1; + private java.util.List webEntities_; + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List getWebEntitiesList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List + getWebEntitiesOrBuilderList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public int getWebEntitiesCount() { + return webEntities_.size(); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) { + return webEntities_.get(index); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + return webEntities_.get(index); + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; + private java.util.List fullMatchingImages_; + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; + private java.util.List partialMatchingImages_; + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List pagesWithMatchingImages_; + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List getPagesWithMatchingImagesList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public int getPagesWithMatchingImagesCount() { + return pagesWithMatchingImages_.size(); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + return pagesWithMatchingImages_.get(index); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + return pagesWithMatchingImages_.get(index); + } + + public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; + private java.util.List visuallySimilarImages_; + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List getVisuallySimilarImagesList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public int getVisuallySimilarImagesCount() { + return visuallySimilarImages_.size(); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) { + return visuallySimilarImages_.get(index); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + return visuallySimilarImages_.get(index); + } + + public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; + private java.util.List bestGuessLabels_; + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List getBestGuessLabelsList() { + return bestGuessLabels_; + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List + getBestGuessLabelsOrBuilderList() { + return bestGuessLabels_; + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public int getBestGuessLabelsCount() { + return bestGuessLabels_.size(); + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) { + return bestGuessLabels_.get(index); + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + return bestGuessLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < webEntities_.size(); i++) { + output.writeMessage(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + output.writeMessage(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + output.writeMessage(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + output.writeMessage(8, bestGuessLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < webEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, bestGuessLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetection)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetection other = (com.google.cloud.vision.v1.WebDetection) obj; + + if (!getWebEntitiesList() + .equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList() + .equals(other.getPagesWithMatchingImagesList())) return false; + if (!getVisuallySimilarImagesList() + .equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList() + .equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWebEntitiesCount() > 0) { + hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getWebEntitiesList().hashCode(); + } + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + if (getPagesWithMatchingImagesCount() > 0) { + hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); + } + if (getVisuallySimilarImagesCount() > 0) { + hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); + } + if (getBestGuessLabelsCount() > 0) { + hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getBestGuessLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Relevant information for the image from the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection) + com.google.cloud.vision.v1.WebDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetection.class, com.google.cloud.vision.v1.WebDetection.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWebEntitiesFieldBuilder(); + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + getPagesWithMatchingImagesFieldBuilder(); + getVisuallySimilarImagesFieldBuilder(); + getBestGuessLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + webEntitiesBuilder_.clear(); + } + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + partialMatchingImagesBuilder_.clear(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + visuallySimilarImagesBuilder_.clear(); + } + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection build() { + com.google.cloud.vision.v1.WebDetection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection buildPartial() { + com.google.cloud.vision.v1.WebDetection result = new com.google.cloud.vision.v1.WebDetection(this); + int from_bitField0_ = bitField0_; + if (webEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.webEntities_ = webEntities_; + } else { + result.webEntities_ = webEntitiesBuilder_.build(); + } + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pagesWithMatchingImages_ = pagesWithMatchingImages_; + } else { + result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); + } + if (visuallySimilarImagesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.visuallySimilarImages_ = visuallySimilarImages_; + } else { + result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); + } + if (bestGuessLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bestGuessLabels_ = bestGuessLabels_; + } else { + result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetection) { + return mergeFrom((com.google.cloud.vision.v1.WebDetection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection other) { + if (other == com.google.cloud.vision.v1.WebDetection.getDefaultInstance()) return this; + if (webEntitiesBuilder_ == null) { + if (!other.webEntities_.isEmpty()) { + if (webEntities_.isEmpty()) { + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWebEntitiesIsMutable(); + webEntities_.addAll(other.webEntities_); + } + onChanged(); + } + } else { + if (!other.webEntities_.isEmpty()) { + if (webEntitiesBuilder_.isEmpty()) { + webEntitiesBuilder_.dispose(); + webEntitiesBuilder_ = null; + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + webEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWebEntitiesFieldBuilder() : null; + } else { + webEntitiesBuilder_.addAllMessages(other.webEntities_); + } + } + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImages_.isEmpty()) { + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); + } + onChanged(); + } + } else { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImagesBuilder_.isEmpty()) { + pagesWithMatchingImagesBuilder_.dispose(); + pagesWithMatchingImagesBuilder_ = null; + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + pagesWithMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesWithMatchingImagesFieldBuilder() : null; + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); + } + } + } + if (visuallySimilarImagesBuilder_ == null) { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImages_.isEmpty()) { + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.addAll(other.visuallySimilarImages_); + } + onChanged(); + } + } else { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImagesBuilder_.isEmpty()) { + visuallySimilarImagesBuilder_.dispose(); + visuallySimilarImagesBuilder_ = null; + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + visuallySimilarImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVisuallySimilarImagesFieldBuilder() : null; + } else { + visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); + } + } + } + if (bestGuessLabelsBuilder_ == null) { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabels_.isEmpty()) { + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.addAll(other.bestGuessLabels_); + } + onChanged(); + } + } else { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabelsBuilder_.isEmpty()) { + bestGuessLabelsBuilder_.dispose(); + bestGuessLabelsBuilder_ = null; + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + bestGuessLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBestGuessLabelsFieldBuilder() : null; + } else { + bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List webEntities_ = + java.util.Collections.emptyList(); + private void ensureWebEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(webEntities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; + + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List getWebEntitiesList() { + if (webEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webEntities_); + } else { + return webEntitiesBuilder_.getMessageList(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public int getWebEntitiesCount() { + if (webEntitiesBuilder_ == null) { + return webEntities_.size(); + } else { + return webEntitiesBuilder_.getCount(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); + } else { + return webEntitiesBuilder_.getMessage(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.set(index, value); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities(com.google.cloud.vision.v1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(index, value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addAllWebEntities( + java.lang.Iterable values) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, webEntities_); + onChanged(); + } else { + webEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder clearWebEntities() { + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + webEntitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public Builder removeWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.remove(index); + onChanged(); + } else { + webEntitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); } else { + return webEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesOrBuilderList() { + if (webEntitiesBuilder_ != null) { + return webEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webEntities_); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { + return getWebEntitiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesBuilderList() { + return getWebEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder> + getWebEntitiesFieldBuilder() { + if (webEntitiesBuilder_ == null) { + webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>( + webEntities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + webEntities_ = null; + } + return webEntitiesBuilder_; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + + private java.util.List pagesWithMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePagesWithMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; + + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List getPagesWithMatchingImagesList() { + if (pagesWithMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } else { + return pagesWithMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public int getPagesWithMatchingImagesCount() { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.size(); + } else { + return pagesWithMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); + } else { + return pagesWithMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addAllPagesWithMatchingImages( + java.lang.Iterable values) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pagesWithMatchingImages_); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder clearPagesWithMatchingImages() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder removePagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.remove(index); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); } else { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + if (pagesWithMatchingImagesBuilder_ != null) { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesBuilderList() { + return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder> + getPagesWithMatchingImagesFieldBuilder() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>( + pagesWithMatchingImages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pagesWithMatchingImages_ = null; + } + return pagesWithMatchingImagesBuilder_; + } + + private java.util.List visuallySimilarImages_ = + java.util.Collections.emptyList(); + private void ensureVisuallySimilarImagesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; + + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List getVisuallySimilarImagesList() { + if (visuallySimilarImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } else { + return visuallySimilarImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public int getVisuallySimilarImagesCount() { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.size(); + } else { + return visuallySimilarImagesBuilder_.getCount(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); + } else { + return visuallySimilarImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addAllVisuallySimilarImages( + java.lang.Iterable values) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, visuallySimilarImages_); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder clearVisuallySimilarImages() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + visuallySimilarImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder removeVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.remove(index); + onChanged(); + } else { + visuallySimilarImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); } else { + return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + if (visuallySimilarImagesBuilder_ != null) { + return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesBuilderList() { + return getVisuallySimilarImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> + getVisuallySimilarImagesFieldBuilder() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( + visuallySimilarImages_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + visuallySimilarImages_ = null; + } + return visuallySimilarImagesBuilder_; + } + + private java.util.List bestGuessLabels_ = + java.util.Collections.emptyList(); + private void ensureBestGuessLabelsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; + + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List getBestGuessLabelsList() { + if (bestGuessLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } else { + return bestGuessLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public int getBestGuessLabelsCount() { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.size(); + } else { + return bestGuessLabelsBuilder_.getCount(); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); + } else { + return bestGuessLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels(com.google.cloud.vision.v1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addAllBestGuessLabels( + java.lang.Iterable values) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bestGuessLabels_); + onChanged(); + } else { + bestGuessLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder clearBestGuessLabels() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder removeBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.remove(index); + onChanged(); + } else { + bestGuessLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); } else { + return bestGuessLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsOrBuilderList() { + if (bestGuessLabelsBuilder_ != null) { + return bestGuessLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { + return getBestGuessLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsBuilderList() { + return getBestGuessLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder> + getBestGuessLabelsFieldBuilder() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>( + bestGuessLabels_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + bestGuessLabels_ = null; + } + return bestGuessLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection) + private static final com.google.cloud.vision.v1.WebDetection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection(); + } + + public static com.google.cloud.vision.v1.WebDetection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java new file mode 100644 index 000000000000..62d8fc8fc4d5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java @@ -0,0 +1,293 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/web_detection.proto + +package com.google.cloud.vision.v1; + +public interface WebDetectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + int getWebEntitiesCount(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesOrBuilderList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index); + + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + int getFullMatchingImagesCount(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + int getPartialMatchingImagesCount(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + int getPagesWithMatchingImagesCount(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesOrBuilderList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index); + + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + int getVisuallySimilarImagesCount(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesOrBuilderList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index); + + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsList(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + int getBestGuessLabelsCount(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsOrBuilderList(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java new file mode 100644 index 000000000000..2dc32b410b24 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +/** + *
+ * Parameters for web detection request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetectionParams} + */ +public final class WebDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetectionParams) + WebDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetectionParams.newBuilder() to construct. + private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetectionParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + includeGeoResults_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetectionParams.class, com.google.cloud.vision.v1.WebDetectionParams.Builder.class); + } + + public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; + private boolean includeGeoResults_; + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (includeGeoResults_ != false) { + output.writeBool(2, includeGeoResults_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeGeoResults_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, includeGeoResults_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.WebDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.WebDetectionParams other = (com.google.cloud.vision.v1.WebDetectionParams) obj; + + if (getIncludeGeoResults() + != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeGeoResults()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.WebDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for web detection request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.WebDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetectionParams) + com.google.cloud.vision.v1.WebDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.WebDetectionParams.class, com.google.cloud.vision.v1.WebDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.WebDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + includeGeoResults_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParams build() { + com.google.cloud.vision.v1.WebDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParams buildPartial() { + com.google.cloud.vision.v1.WebDetectionParams result = new com.google.cloud.vision.v1.WebDetectionParams(this); + result.includeGeoResults_ = includeGeoResults_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.WebDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1.WebDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.WebDetectionParams other) { + if (other == com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance()) return this; + if (other.getIncludeGeoResults() != false) { + setIncludeGeoResults(other.getIncludeGeoResults()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.WebDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.WebDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeGeoResults_ ; + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @param value The includeGeoResults to set. + * @return This builder for chaining. + */ + public Builder setIncludeGeoResults(boolean value) { + + includeGeoResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeGeoResults() { + + includeGeoResults_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetectionParams) + private static final com.google.cloud.vision.v1.WebDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetectionParams(); + } + + public static com.google.cloud.vision.v1.WebDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.WebDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..f2f408b1c530 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/image_annotator.proto + +package com.google.cloud.vision.v1; + +public interface WebDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + boolean getIncludeGeoResults(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java new file mode 100644 index 000000000000..088cb3823b03 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/web_detection.proto + +package com.google.cloud.vision.v1; + +public final class WebDetectionProto { + private WebDetectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/vision/v1/web_detection.p" + + "roto\022\026google.cloud.vision.v1\"\324\006\n\014WebDete" + + "ction\022D\n\014web_entities\030\001 \003(\0132..google.clo" + + "ud.vision.v1.WebDetection.WebEntity\022K\n\024f" + + "ull_matching_images\030\002 \003(\0132-.google.cloud" + + ".vision.v1.WebDetection.WebImage\022N\n\027part" + + "ial_matching_images\030\003 \003(\0132-.google.cloud" + + ".vision.v1.WebDetection.WebImage\022P\n\032page" + + "s_with_matching_images\030\004 \003(\0132,.google.cl" + + "oud.vision.v1.WebDetection.WebPage\022N\n\027vi" + + "sually_similar_images\030\006 \003(\0132-.google.clo" + + "ud.vision.v1.WebDetection.WebImage\022H\n\021be" + + "st_guess_labels\030\010 \003(\0132-.google.cloud.vis" + + "ion.v1.WebDetection.WebLabel\032B\n\tWebEntit" + + "y\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\023\n\013d" + + "escription\030\003 \001(\t\032&\n\010WebImage\022\013\n\003url\030\001 \001(" + + "\t\022\r\n\005score\030\002 \001(\002\032\326\001\n\007WebPage\022\013\n\003url\030\001 \001(" + + "\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001(\t\022K\n\024" + + "full_matching_images\030\004 \003(\0132-.google.clou" + + "d.vision.v1.WebDetection.WebImage\022N\n\027par" + + "tial_matching_images\030\005 \003(\0132-.google.clou" + + "d.vision.v1.WebDetection.WebImage\0320\n\010Web" + + "Label\022\r\n\005label\030\001 \001(\t\022\025\n\rlanguage_code\030\002 " + + "\001(\tBy\n\032com.google.cloud.vision.v1B\021WebDe" + + "tectionProtoP\001Z + * A word representation. + * + * + * Protobuf type {@code google.cloud.vision.v1.Word} + */ +public final class Word extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Word) + WordOrBuilder { +private static final long serialVersionUID = 0L; + // Use Word.newBuilder() to construct. + private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Word() { + symbols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Word(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Word( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + symbols_.add( + input.readMessage(com.google.cloud.vision.v1.Symbol.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Word.class, com.google.cloud.vision.v1.Word.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int SYMBOLS_FIELD_NUMBER = 3; + private java.util.List symbols_; + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List getSymbolsList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List + getSymbolsOrBuilderList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1.Word)) { + return super.equals(obj); + } + com.google.cloud.vision.v1.Word other = (com.google.cloud.vision.v1.Word) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList() + .equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1.Word parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Word parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Word parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Word parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Word parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1.Word parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1.Word parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Word parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Word parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Word parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1.Word parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1.Word parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1.Word prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A word representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1.Word} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Word) + com.google.cloud.vision.v1.WordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1.Word.class, com.google.cloud.vision.v1.Word.Builder.class); + } + + // Construct using com.google.cloud.vision.v1.Word.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSymbolsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + symbolsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Word getDefaultInstanceForType() { + return com.google.cloud.vision.v1.Word.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1.Word build() { + com.google.cloud.vision.v1.Word result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Word buildPartial() { + com.google.cloud.vision.v1.Word result = new com.google.cloud.vision.v1.Word(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1.Word) { + return mergeFrom((com.google.cloud.vision.v1.Word)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1.Word other) { + if (other == com.google.cloud.vision.v1.Word.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymbolsFieldBuilder() : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1.Word parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1.Word) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(symbols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder> symbolsBuilder_; + + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public java.util.List getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder addSymbols(com.google.cloud.vision.v1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder addSymbols( + com.google.cloud.vision.v1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder addAllSymbols( + java.lang.Iterable values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder().addBuilder( + com.google.cloud.vision.v1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder>( + symbols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Word) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Word) + private static final com.google.cloud.vision.v1.Word DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Word(); + } + + public static com.google.cloud.vision.v1.Word getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Word parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Word(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1.Word getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java new file mode 100644 index 000000000000..0061a231c753 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1/text_annotation.proto + +package com.google.cloud.vision.v1; + +public interface WordOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Word) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + java.util.List + getSymbolsList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1.Symbol getSymbols(int index); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + int getSymbolsCount(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto new file mode 100644 index 000000000000..7e0d24c2f066 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// A bounding polygon for the detected image annotation. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; + + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 2; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto new file mode 100644 index 000000000000..6fed6112bec7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto @@ -0,0 +1,1044 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1/geometry.proto"; +import "google/cloud/vision/v1/product_search.proto"; +import "google/cloud/vision/v1/text_annotation.proto"; +import "google/cloud/vision/v1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1/images:annotate" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/images:annotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/images:annotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests"; + } + + // Service that performs image detection and annotation for a batch of files. + // Now only "application/pdf", "image/tiff" and "image/gif" are supported. + // + // This service will extract at most 5 (customers can specify which 5 in + // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + // file provided and perform detection and annotation for each image + // extracted. + rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) { + option (google.api.http) = { + post: "/v1/files:annotate" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/files:annotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/files:annotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests"; + } + + // Run asynchronous image detection and annotation for a list of images. + // + // Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + // + // This service will write image annotation outputs to json files in customer + // GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/images:asyncBatchAnnotate" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/images:asyncBatchAnnotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests,output_config"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateImagesResponse" + metadata_type: "OperationMetadata" + }; + } + + // Run asynchronous image detection and annotation for a list of generic + // files, such as PDF files, which may contain multiple pages and multiple + // images per page. Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/files:asyncBatchAnnotate" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=projects/*}/files:asyncBatchAnnotate" + body: "*" + } + }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; + } +} + +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely. + VERY_UNLIKELY = 1; + + // It is unlikely. + UNLIKELY = 2; + + // It is possible. + POSSIBLE = 3; + + // It is likely. + LIKELY = 4; + + // It is very likely. + VERY_LIKELY = 5; +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + string gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more + // info. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // Image content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + // + // Currently, this field only works for BatchAnnotateImages requests. It does + // not work for AsyncBatchAnnotateImages requests. + bytes content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + ImageSource source = 2; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + + // Left cheek center. + LEFT_CHEEK_CENTER = 35; + + // Right cheek center. + RIGHT_CHEEK_CENTER = 36; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5 [deprecated = true]; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Parameters for text detections. This is used to control TEXT_DETECTION and +// DOCUMENT_TEXT_DETECTION features. +message TextDetectionParams { + // By default, Cloud Vision API only includes confidence score for + // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + // score for TEXT_DETECTION as well. + bool enable_text_detection_confidence_score = 9; + + // A list of advanced OCR options to fine-tune OCR behavior. + repeated string advanced_ocr_options = 11; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. In most cases, an empty value + // yields the best results since it enables automatic language detection. For + // languages based on the Latin alphabet, setting `language_hints` is not + // needed. In rare cases, when the language of the text in the image is known, + // setting a hint will help get better results (although it will be a + // significant hindrance if the hint is wrong). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](https://cloud.google.com/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for product search. + ProductSearchParams product_search_params = 5; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; + + // Parameters for text detection and document text detection. + TextDetectionParams text_detection_params = 12; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features, and with context information. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If present, product search has completed successfully. + ProductSearchResults product_search_results = 14; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + ImageAnnotationContext context = 21; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. +message AnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Pages of the file to perform image annotation. + // + // Pages starts from 1, we assume the first page of the file is page 1. + // At most 5 pages are supported per request. Pages can be negative. + // + // Page 1 means the first page. + // Page 2 means the second page. + // Page -1 means the last page. + // Page -2 means the second to the last page. + // + // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + // + // If this field is empty, by default the service performs image annotation + // for the first 5 pages of the file. + repeated int32 pages = 4; +} + +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. This field will be + // empty if the `error` field is set. + repeated AnnotateImageResponse responses = 2; + + // This field gives the total number of pages in the file. + int32 total_pages = 3; + + // If set, represents the error message for the failed request. The + // `responses` field will not be set in this case. + google.rpc.Status error = 4; +} + +// A list of requests to annotate files using the BatchAnnotateFiles API. +message BatchAnnotateFilesRequest { + // Required. The list of file annotation requests. Right now we support only one + // AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 3; +} + +// A list of file annotation responses. +message BatchAnnotateFilesResponse { + // The list of file annotation responses, each response corresponding to each + // AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// Request for async image annotation for a list of images. +message AsyncBatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; +} + +// Response to an async batch image annotation request. +message AsyncBatchAnnotateImagesResponse { + // The output location and metadata from AsyncBatchAnnotateImagesRequest. + OutputConfig output_config = 1; +} + +// Multiple async file annotation requests are batched into a single service +// call. +message AsyncBatchAnnotateFilesRequest { + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Target project and location to make a call. + // + // Format: `projects/{project-id}/locations/{location-id}`. + // + // If no parent is specified, a region will be chosen automatically. + // + // Supported location-ids: + // `us`: USA country only, + // `asia`: East asia areas, like Japan, Taiwan, + // `eu`: The European Union. + // + // Example: `projects/project-A/locations/eu`. + string parent = 4; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // File content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + // + // Currently, this field only works for BatchAnnotateFiles requests. It does + // not work for AsyncBatchAnnotateFiles requests. + bytes content = 3; + + // The type of the file. Currently only "application/pdf", "image/tiff" and + // "image/gif" are supported. Wildcards are not supported. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file on + // Google Cloud Storage. + // The valid range is [1, 100]. If not specified, the default value is 20. + // + // For example, for one pdf file with 100 pages, 100 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a + // Google Cloud Storage object. Wildcards are not currently supported. + string uri = 1; +} + +// The Google Cloud Storage location where the output will be written to. +message GcsDestination { + // Google Cloud Storage URI prefix where the results will be stored. Results + // will be in JSON format and preceded by its corresponding input URI prefix. + // This field can either represent a gcs file prefix or gcs directory. In + // either case, the uri should be unique because in order to get all of the + // output files, you will need to do a wildcard gcs search on the uri prefix + // you provide. + // + // Examples: + // + // * File Prefix: gs://bucket-name/here/filenameprefix The output files + // will be created in gs://bucket-name/here/ and the names of the + // output files will begin with "filenameprefix". + // + // * Directory Prefix: gs://bucket-name/some/location/ The output files + // will be created in gs://bucket-name/some/location/ and the names of the + // output files could be anything because there was no filename prefix + // specified. + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto new file mode 100644 index 000000000000..a2a9850582b5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto @@ -0,0 +1,124 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +import "google/api/resource.proto"; +import "google/cloud/vision/v1/geometry.proto"; +import "google/cloud/vision/v1/product_search_service.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a product search request. +message ProductSearchParams { + // The bounding polygon around the area of interest in the image. + // If it is not specified, system discretion will be applied. + BoundingPoly bounding_poly = 9; + + // The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; + + // The list of product categories to search in. Currently, we only consider + // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + // "packagedgoods-v1", or "general-v1" should be specified. The legacy + // categories "homegoods", "apparel", and "toys" are still supported but will + // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + // or "toys-v2" for better product search accuracy. It is recommended to + // migrate existing products to these categories as well. + repeated string product_categories = 7; + + // The filtering expression. This can be used to restrict search results based + // on Product labels. We currently support an AND of OR of key-value + // expressions, where each expression within an OR must have the same key. An + // '=' should be used to connect the key and value. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // acceptable, but "(color = red OR brand = Google)" is not acceptable. + // "color: red" is not acceptable because it uses a ':' instead of an '='. + string filter = 8; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + + // Information about the products similar to a single product in a query + // image. + message GroupedResult { + // The bounding polygon around the product detected in the query image. + BoundingPoly bounding_poly = 1; + + // List of results, one for each product match. + repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; + } + + // Timestamp of the index which provided these results. Products added to the + // product set and products removed from the product set after this time are + // not reflected in the current results. + google.protobuf.Timestamp index_time = 2; + + // List of results, one for each product match. + repeated Result results = 5; + + // List of results grouped by products detected in the query image. Each entry + // corresponds to one bounding polygon in the query image, and contains the + // matching products specific to that region. There may be duplicate product + // matches in the union of all the per-product results. + repeated GroupedResult product_grouped_results = 6; +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto new file mode 100644 index 000000000000..65680d909681 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto @@ -0,0 +1,1022 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/vision/v1/geometry.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// Manages Products and ProductSets of reference images for use in product +// search. It uses the following resource model: +// +// - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named +// `projects/*/locations/*/productSets/*`, which acts as a way to put different +// products into groups to limit identification. +// +// In parallel, +// +// - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named +// `projects/*/locations/*/products/*` +// +// - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named +// `projects/*/locations/*/products/*/referenceImages/*` +service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/productSets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + option (google.api.method_signature) = "product_set,update_mask"; + } + + // Permanently deletes a ProductSet. Products and ReferenceImages in the + // ProductSet are not deleted. + // + // The actual image files are not deleted from Google Cloud Storage. + rpc DeleteProductSet(DeleteProductSetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/products" + body: "product" + }; + option (google.api.method_signature) = "parent,product,product_id"; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/products" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a Product resource. + // Only the `display_name`, `description`, and `labels` fields can be updated + // right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + option (google.api.method_signature) = "product,update_mask"; + } + + // Permanently deletes a product and its reference images. + // + // Metadata of the product and all its images will be deleted right away, but + // search queries against ProductSets containing the product may still work + // until all related caches are refreshed. + rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + // compatible with the parent product's product_category is detected. + // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + rpc CreateReferenceImage(CreateReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + option (google.api.method_signature) = "parent,reference_image,reference_image_id"; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // caches are refreshed. + // + // The actual image files are not deleted from Google Cloud Storage. + rpc DeleteReferenceImage(DeleteReferenceImageRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists reference images. + // + // Possible errors: + // + // * Returns NOT_FOUND if the parent product does not exist. + // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + // than 1. + rpc ListReferenceImages(ListReferenceImagesRequest) returns (ListReferenceImagesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Removes a Product from the specified ProductSet. + rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/productSets/*}/products" + }; + option (google.api.method_signature) = "name"; + } + + // Asynchronous API that imports a list of reference images to specified + // product sets based on a list of image information. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + // progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + // `Operation.response` contains `ImportProductSetsResponse`. (results) + // + // The input source of this method is a csv file on Google Cloud Storage. + // For the format of the csv file please see + // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + rpc ImportProductSets(ImportProductSetsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Asynchronous API to delete all Products in a ProductSet or all Products + // that are in no ProductSet. + // + // If a Product is a member of the specified ProductSet in addition to other + // ProductSets, the Product will still be deleted. + // + // It is recommended to not delete the specified ProductSet until after this + // operation has completed. It is also recommended to not add any of the + // Products involved in the batch delete to a new ProductSet while this + // operation is running because those Products may still end up deleted. + // + // It's not possible to undo the PurgeProducts operation. Therefore, it is + // recommended to keep the csv files used in ImportProductSets (if that was + // how you originally built the Product Set) before starting PurgeProducts, in + // case you need to re-import the data after deletion. + // + // If the plan is to purge all of the Products from a ProductSet and then + // re-use the empty ProductSet to re-import new Products into the empty + // ProductSet, you must wait until the PurgeProducts operation has finished + // for that ProductSet. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + // progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + rpc PurgeProducts(PurgeProductsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/products:purge" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "BatchOperationMetadata" + }; + } +} + +// A Product contains ReferenceImages. +message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + + // A product label represented as a key-value pair. + message KeyValue { + // The key of the label attached to the product. Cannot be empty and cannot + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // characters long. + string description = 3; + + // Immutable. The category for the product identified by the reference image. This should + // be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or + // "general-v1". The legacy categories "homegoods", "apparel", and "toys" are + // still supported, but these should not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 500 product_labels. + // + // Notice that the total number of distinct product_labels over all products + // in one ProductSet cannot exceed 1M, otherwise the product search pipeline + // will refuse to work for that ProductSet. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this timestamp is the default value + // "1970-01-01T00:00:00Z". + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If there was an error with indexing the product set, the field + // is populated. + // + // This field is ignored when creating a ProductSet. + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + + // The resource name of the reference image. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // Required. The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Bounding polygons around the areas of interest in the reference image. + // If this field is empty, the system will try to detect regions of + // interest. At most 10 bounding polygons will be used. + // + // The provided shape is converted into a non-rotated rectangle. Once + // converted, the small edge of the rectangle must be greater than or equal + // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + // is not). + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // Required. The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this Product. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // Required. The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProduct` method. +message GetProductRequest { + // Required. Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // Required. The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields + // to update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask paths include `product_labels`, `display_name`, and + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Required. Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // Required. The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this ProductSet. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // Required. The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_sets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Required. Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + // update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Required. Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // Required. Resource name of the product in which to create the reference image. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // Required. The reference image to create. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for the ReferenceImage to be added. If set, + // the server will attempt to use this value as the resource id. If it is + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Required. Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // Required. The resource name of the ReferenceImage to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // Required. The resource name of the reference image to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be added to this ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be removed from this ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // Required. The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // The URI must start with `gs://`. + // + // The format of the input csv file should be one image per line. + // In each line, there are 8 columns. + // + // 1. image-uri + // 2. image-id + // 3. product-set-id + // 4. product-id + // 5. product-category + // 6. product-display-name + // 7. labels + // 8. bounding-poly + // + // The `image-uri`, `product-set-id`, `product-id`, and `product-category` + // columns are required. All other columns are optional. + // + // If the `ProductSet` or `Product` specified by the `product-set-id` and + // `product-id` values does not exist, then the system will create a new + // `ProductSet` or `Product` for the image. In this case, the + // `product-display-name` column refers to + // [display_name][google.cloud.vision.v1.Product.display_name], the + // `product-category` column refers to + // [product_category][google.cloud.vision.v1.Product.product_category], and the + // `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. + // + // The `image-id` column is optional but must be unique if provided. If it is + // empty, the system will automatically assign a unique id to the image. + // + // The `product-display-name` column is optional. If it is empty, the system + // sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a + // space (" "). You can update the `display_name` later by using the API. + // + // If a `Product` with the specified `product-id` already exists, then the + // system ignores the `product-display-name`, `product-category`, and `labels` + // columns. + // + // The `labels` column (optional) is a line containing a list of + // comma-separated key-value pairs, in the following format: + // + // "key_1=value_1,key_2=value_2,...,key_n=value_n" + // + // The `bounding-poly` column (optional) identifies one region of + // interest from the image in the same manner as `CreateReferenceImage`. If + // you do not specify the `bounding-poly` column, then the system will try to + // detect regions of interest automatically. + // + // At most one `bounding-poly` column is allowed per line. If the image + // contains multiple regions of interest, add a line to the CSV file that + // includes the same product information, and the `bounding-poly` values for + // each region of interest. + // + // The `bounding-poly` column must contain an even number of comma-separated + // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + // non-negative integers for absolute bounding polygons, and float values + // in [0, 1] for normalized bounding polygons. + // + // The system will resize the image if the image resolution is too + // large to process (larger than 20MP). + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // Required. The project in which the ProductSets should be imported. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for the `ImportProductSets` method. +// +// This message is returned by the +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + google.protobuf.Timestamp submit_time = 2; + + // The time when the batch request is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + google.protobuf.Timestamp end_time = 3; +} + +// Config to control which ProductSet contains the Products to be deleted. +message ProductSetPurgeConfig { + // The ProductSet that contains the Products to delete. If a Product is a + // member of product_set_id in addition to other ProductSets, the Product will + // still be deleted. + string product_set_id = 1; +} + +// Request message for the `PurgeProducts` method. +message PurgeProductsRequest { + // The Products to delete. + oneof target { + // Specify which ProductSet contains the Products to be deleted. + ProductSetPurgeConfig product_set_purge_config = 2; + + // If delete_orphan_products is true, all Products that are not in any + // ProductSet will be deleted. + bool delete_orphan_products = 3; + } + + // Required. The project and location in which the Products should be deleted. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The default value is false. Override this value to true to actually perform + // the purge. + bool force = 4; +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto new file mode 100644 index 000000000000..9c07c322075c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto @@ -0,0 +1,258 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +import "google/cloud/vision/v1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol +// Each structural component, starting from Page, may further have their own +// properties. Properties describe detected languages, breaks etc.. Please refer +// to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more +// detail. +message TextAnnotation { + // Detected language for a structural component. + message DetectedLanguage { + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 1; + + // Confidence of detected language. Range [0, 1]. + float confidence = 2; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of all words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto new file mode 100644 index 000000000000..369a1350d40f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto @@ -0,0 +1,104 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1"; +option objc_class_prefix = "GCVN"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // The service's best guess as to the topic of the request image. + // Inferred from similar images on the open web. + repeated WebLabel best_guess_labels = 8; +} diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..407a0e08113b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFiles(); + } + + public static void asyncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java new file mode 100644 index 000000000000..81966ec0a228 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.OperationMetadata; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFilesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFilesLRO(); + } + + public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..bab83fd45aa6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] +import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFiles(); + } + + public static void syncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java new file mode 100644 index 000000000000..dd2f19273455 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] +import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); + } + + public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..fd4daac8174c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.OutputConfig; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateImages(); + } + + public static void asyncAsyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setParent("parent-995424086") + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java new file mode 100644 index 000000000000..d70f74735aad --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.OperationMetadata; +import com.google.cloud.vision.v1.OutputConfig; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateImagesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateImagesLRO(); + } + + public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setParent("parent-995424086") + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..3549656d6e8c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_sync] +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.OutputConfig; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateImages(); + } + + public static void syncAsyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setParent("parent-995424086") + .build(); + AsyncBatchAnnotateImagesResponse response = + imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java new file mode 100644 index 000000000000..9c176e661922 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.OutputConfig; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig(); + } + + public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + AsyncBatchAnnotateImagesResponse response = + imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..6c883b8837bf --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.AnnotateFileRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateFiles(); + } + + public static void asyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request); + // Do something. + BatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..844e709a2891 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_sync] +import com.google.cloud.vision.v1.AnnotateFileRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateFiles(); + } + + public static void syncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java new file mode 100644 index 000000000000..f924b8679def --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] +import com.google.cloud.vision.v1.AnnotateFileRequest; +import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateFilesListannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateFilesListannotatefilerequest(); + } + + public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..21abc33d3bec --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateImages(); + } + + public static void asyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); + // Do something. + BatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..2b85b47fdf9e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotateimages_sync] +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setParent("parent-995424086") + .build(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java new file mode 100644 index 000000000000..bce8ba646b2d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateImagesListannotateimagerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImagesListannotateimagerequest(); + } + + public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); + } + } +} +// [END vision_v1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c42fa0d1f913 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..ee7d1e93e5c4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.ImageAnnotatorSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a797d91056cb --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorclient_create_setendpoint_sync] +import com.google.cloud.vision.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..fae2c28c273c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_imageannotatorsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1.ImageAnnotatorSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java new file mode 100644 index 000000000000..bb216d3cbbc2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + asyncAddProductToProductSet(); + } + + public static void asyncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.addProductToProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java new file mode 100644 index 000000000000..b7854e68ba8a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_sync] +import com.google.cloud.vision.v1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSet(); + } + + public static void syncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.addProductToProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..7fcf26218819 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameProductname(); + } + + public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java new file mode 100644 index 000000000000..15b3dec173a0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameString(); + } + + public static void syncAddProductToProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java new file mode 100644 index 000000000000..c828036193da --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringProductname(); + } + + public static void syncAddProductToProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java new file mode 100644 index 000000000000..19acbd7d333e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_addproducttoproductset_stringstring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringString(); + } + + public static void syncAddProductToProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..58ee9ce5ba26 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSearchSettings; +import com.google.cloud.vision.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..6909f84839a1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSearchSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a21ddb568b2a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_create_setendpoint_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSearchSettings; +import com.google.cloud.vision.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java new file mode 100644 index 000000000000..965d12a07bf5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class AsyncCreateProduct { + + public static void main(String[] args) throws Exception { + asyncCreateProduct(); + } + + public static void asyncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + ApiFuture future = productSearchClient.createProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java new file mode 100644 index 000000000000..657f205da15e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproduct_sync] +import com.google.cloud.vision.v1.CreateProductRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncCreateProduct { + + public static void main(String[] args) throws Exception { + syncCreateProduct(); + } + + public static void syncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + Product response = productSearchClient.createProduct(request); + } + } +} +// [END vision_v1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java new file mode 100644 index 000000000000..9940be3768fd --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproduct_locationnameproductstring_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncCreateProductLocationnameProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductLocationnameProductString(); + } + + public static void syncCreateProductLocationnameProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java new file mode 100644 index 000000000000..5c761a24ad63 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproduct_stringproductstring_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncCreateProductStringProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductStringProductString(); + } + + public static void syncCreateProductStringProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java new file mode 100644 index 000000000000..78c5c6f68fd1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class AsyncCreateProductSet { + + public static void main(String[] args) throws Exception { + asyncCreateProductSet(); + } + + public static void asyncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ApiFuture future = + productSearchClient.createProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..1c21416a188e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproductset_sync] +import com.google.cloud.vision.v1.CreateProductSetRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ProductSet response = productSearchClient.createProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java new file mode 100644 index 000000000000..9af78ce034a6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncCreateProductSetLocationnameProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetLocationnameProductsetString(); + } + + public static void syncCreateProductSetLocationnameProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java new file mode 100644 index 000000000000..eb4eb7041b95 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createproductset_stringproductsetstring_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncCreateProductSetStringProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetStringProductsetString(); + } + + public static void syncCreateProductSetStringProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java new file mode 100644 index 000000000000..009d254512ed --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class AsyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + asyncCreateReferenceImage(); + } + + public static void asyncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ApiFuture future = + productSearchClient.createReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java new file mode 100644 index 000000000000..252d3d8efab9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createreferenceimage_sync] +import com.google.cloud.vision.v1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImage(); + } + + public static void syncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ReferenceImage response = productSearchClient.createReferenceImage(request); + } + } +} +// [END vision_v1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java new file mode 100644 index 000000000000..0353a7bacb91 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncCreateReferenceImageProductnameReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageProductnameReferenceimageString(); + } + + public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java new file mode 100644 index 000000000000..8d0cf94e9c67 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncCreateReferenceImageStringReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageStringReferenceimageString(); + } + + public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java new file mode 100644 index 000000000000..835c1a5467db --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteProduct { + + public static void main(String[] args) throws Exception { + asyncDeleteProduct(); + } + + public static void asyncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java new file mode 100644 index 000000000000..99b9976cad81 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproduct_sync] +import com.google.cloud.vision.v1.DeleteProductRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProduct { + + public static void main(String[] args) throws Exception { + syncDeleteProduct(); + } + + public static void syncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.deleteProduct(request); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java new file mode 100644 index 000000000000..2b61e965260e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproduct_productname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductProductname { + + public static void main(String[] args) throws Exception { + syncDeleteProductProductname(); + } + + public static void syncDeleteProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java new file mode 100644 index 000000000000..5d894b0247e8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproduct_string_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductString { + + public static void main(String[] args) throws Exception { + syncDeleteProductString(); + } + + public static void syncDeleteProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java new file mode 100644 index 000000000000..d9200e0d95b9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + asyncDeleteProductSet(); + } + + public static void asyncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java new file mode 100644 index 000000000000..efa36c27487b --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproductset_sync] +import com.google.cloud.vision.v1.DeleteProductSetRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + syncDeleteProductSet(); + } + + public static void syncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + productSearchClient.deleteProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java new file mode 100644 index 000000000000..df03f2d90350 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproductset_productsetname_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetProductsetname(); + } + + public static void syncDeleteProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java new file mode 100644 index 000000000000..2ea900242ca9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deleteproductset_string_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetString { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetString(); + } + + public static void syncDeleteProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java new file mode 100644 index 000000000000..19bfa911bfea --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deletereferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class AsyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + asyncDeleteReferenceImage(); + } + + public static void asyncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.deleteReferenceImageCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java new file mode 100644 index 000000000000..a77173f14d50 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deletereferenceimage_sync] +import com.google.cloud.vision.v1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImage(); + } + + public static void syncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + productSearchClient.deleteReferenceImage(request); + } + } +} +// [END vision_v1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..b6350460a8e0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageReferenceimagename(); + } + + public static void syncDeleteReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java new file mode 100644 index 000000000000..1e1afa25b8de --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_deletereferenceimage_string_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageString { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageString(); + } + + public static void syncDeleteReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java new file mode 100644 index 000000000000..c1887ad1f2b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class AsyncGetProduct { + + public static void main(String[] args) throws Exception { + asyncGetProduct(); + } + + public static void asyncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.getProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java new file mode 100644 index 000000000000..a7c67d8cdddd --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproduct_sync] +import com.google.cloud.vision.v1.GetProductRequest; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncGetProduct { + + public static void main(String[] args) throws Exception { + syncGetProduct(); + } + + public static void syncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + Product response = productSearchClient.getProduct(request); + } + } +} +// [END vision_v1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java new file mode 100644 index 000000000000..0cd545c6d15f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproduct_productname_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncGetProductProductname { + + public static void main(String[] args) throws Exception { + syncGetProductProductname(); + } + + public static void syncGetProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java new file mode 100644 index 000000000000..a5fff300c5ae --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproduct_string_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncGetProductString { + + public static void main(String[] args) throws Exception { + syncGetProductString(); + } + + public static void syncGetProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java new file mode 100644 index 000000000000..fedd368f0b9a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.ProductSetName; + +public class AsyncGetProductSet { + + public static void main(String[] args) throws Exception { + asyncGetProductSet(); + } + + public static void asyncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = + productSearchClient.getProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java new file mode 100644 index 000000000000..62662fae065c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproductset_sync] +import com.google.cloud.vision.v1.GetProductSetRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncGetProductSet { + + public static void main(String[] args) throws Exception { + syncGetProductSet(); + } + + public static void syncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ProductSet response = productSearchClient.getProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java new file mode 100644 index 000000000000..dc83c167595f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproductset_productsetname_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncGetProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncGetProductSetProductsetname(); + } + + public static void syncGetProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java new file mode 100644 index 000000000000..bef47bc37bd0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getproductset_string_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncGetProductSetString { + + public static void main(String[] args) throws Exception { + syncGetProductSetString(); + } + + public static void syncGetProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java new file mode 100644 index 000000000000..5dcfbd9e934c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.ReferenceImageName; + +public class AsyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + asyncGetReferenceImage(); + } + + public static void asyncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.getReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java new file mode 100644 index 000000000000..d11afa0d584f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getreferenceimage_sync] +import com.google.cloud.vision.v1.GetReferenceImageRequest; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.ReferenceImageName; + +public class SyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + syncGetReferenceImage(); + } + + public static void syncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ReferenceImage response = productSearchClient.getReferenceImage(request); + } + } +} +// [END vision_v1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..5173516b1e3a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.ReferenceImageName; + +public class SyncGetReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageReferenceimagename(); + } + + public static void syncGetReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java new file mode 100644 index 000000000000..fdf311488bd2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_getreferenceimage_string_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.cloud.vision.v1.ReferenceImageName; + +public class SyncGetReferenceImageString { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageString(); + } + + public static void syncGetReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java new file mode 100644 index 000000000000..18e9ff5c2827 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_importproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.longrunning.Operation; + +public class AsyncImportProductSets { + + public static void main(String[] args) throws Exception { + asyncImportProductSets(); + } + + public static void asyncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.importProductSetsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java new file mode 100644 index 000000000000..4de907415c16 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_importproductsets_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class AsyncImportProductSetsLRO { + + public static void main(String[] args) throws Exception { + asyncImportProductSetsLRO(); + } + + public static void asyncImportProductSetsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + OperationFuture future = + productSearchClient.importProductSetsOperationCallable().futureCall(request); + // Do something. + ImportProductSetsResponse response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java new file mode 100644 index 000000000000..71f4fe016382 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_importproductsets_sync] +import com.google.cloud.vision.v1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1.ImportProductSetsRequest; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncImportProductSets { + + public static void main(String[] args) throws Exception { + syncImportProductSets(); + } + + public static void syncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(request).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java new file mode 100644 index 000000000000..28713098bc0d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsLocationnameImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java new file mode 100644 index 000000000000..de3a679ccb18 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1.ImportProductSetsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncImportProductSetsStringImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsStringImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java new file mode 100644 index 000000000000..602d49902116 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class AsyncListProducts { + + public static void main(String[] args) throws Exception { + asyncListProducts(); + } + + public static void asyncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java new file mode 100644 index 000000000000..b3da88b93663 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproducts_paged_async] +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.ListProductsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.common.base.Strings; + +public class AsyncListProductsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsPaged(); + } + + public static void asyncListProductsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsResponse response = productSearchClient.listProductsCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java new file mode 100644 index 000000000000..1eb469ac4749 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproducts_sync] +import com.google.cloud.vision.v1.ListProductsRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncListProducts { + + public static void main(String[] args) throws Exception { + syncListProducts(); + } + + public static void syncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProducts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java new file mode 100644 index 000000000000..eb2a071ffda7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproducts_locationname_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncListProductsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductsLocationname(); + } + + public static void syncListProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java new file mode 100644 index 000000000000..93e2384a4624 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproducts_string_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; + +public class SyncListProductsString { + + public static void main(String[] args) throws Exception { + syncListProductsString(); + } + + public static void syncListProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java new file mode 100644 index 000000000000..0e2297fea556 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class AsyncListProductSets { + + public static void main(String[] args) throws Exception { + asyncListProductSets(); + } + + public static void asyncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductSetsPagedCallable().futureCall(request); + // Do something. + for (ProductSet element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java new file mode 100644 index 000000000000..15dad8ec89e0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsets_paged_async] +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.ListProductSetsResponse; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.common.base.Strings; + +public class AsyncListProductSetsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductSetsPaged(); + } + + public static void asyncListProductSetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductSetsResponse response = + productSearchClient.listProductSetsCallable().call(request); + for (ProductSet element : response.getProductSetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java new file mode 100644 index 000000000000..3c85346fad3a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsets_sync] +import com.google.cloud.vision.v1.ListProductSetsRequest; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncListProductSets { + + public static void main(String[] args) throws Exception { + syncListProductSets(); + } + + public static void syncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java new file mode 100644 index 000000000000..13340af5f61e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsets_locationname_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncListProductSetsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductSetsLocationname(); + } + + public static void syncListProductSetsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java new file mode 100644 index 000000000000..5462cffe9676 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsets_string_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; + +public class SyncListProductSetsString { + + public static void main(String[] args) throws Exception { + syncListProductSetsString(); + } + + public static void syncListProductSetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java new file mode 100644 index 000000000000..bca01700804f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsinproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; + +public class AsyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSet(); + } + + public static void asyncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java new file mode 100644 index 000000000000..42b373fcbcc1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsinproductset_paged_async] +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.common.base.Strings; + +public class AsyncListProductsInProductSetPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSetPaged(); + } + + public static void asyncListProductsInProductSetPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsInProductSetResponse response = + productSearchClient.listProductsInProductSetCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java new file mode 100644 index 000000000000..fbed3686e817 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsinproductset_sync] +import com.google.cloud.vision.v1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSet(); + } + + public static void syncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java new file mode 100644 index 000000000000..aacfe68e0c15 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsinproductset_productsetname_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncListProductsInProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetProductsetname(); + } + + public static void syncListProductsInProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java new file mode 100644 index 000000000000..465ef4f4b156 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listproductsinproductset_string_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; + +public class SyncListProductsInProductSetString { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetString(); + } + + public static void syncListProductsInProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java new file mode 100644 index 000000000000..bb444a7a3477 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listreferenceimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class AsyncListReferenceImages { + + public static void main(String[] args) throws Exception { + asyncListReferenceImages(); + } + + public static void asyncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listReferenceImagesPagedCallable().futureCall(request); + // Do something. + for (ReferenceImage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java new file mode 100644 index 000000000000..5b5fbeac144f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listreferenceimages_paged_async] +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; +import com.google.common.base.Strings; + +public class AsyncListReferenceImagesPaged { + + public static void main(String[] args) throws Exception { + asyncListReferenceImagesPaged(); + } + + public static void asyncListReferenceImagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListReferenceImagesResponse response = + productSearchClient.listReferenceImagesCallable().call(request); + for (ReferenceImage element : response.getReferenceImagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java new file mode 100644 index 000000000000..3ad85e5d4226 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listreferenceimages_sync] +import com.google.cloud.vision.v1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncListReferenceImages { + + public static void main(String[] args) throws Exception { + syncListReferenceImages(); + } + + public static void syncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java new file mode 100644 index 000000000000..af20db290a29 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listreferenceimages_productname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncListReferenceImagesProductname { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesProductname(); + } + + public static void syncListReferenceImagesProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java new file mode 100644 index 000000000000..0200dfb0e566 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_listreferenceimages_string_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ReferenceImage; + +public class SyncListReferenceImagesString { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesString(); + } + + public static void syncListReferenceImagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java new file mode 100644 index 000000000000..d358df187e6f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_purgeproducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeProducts { + + public static void main(String[] args) throws Exception { + asyncPurgeProducts(); + } + + public static void asyncPurgeProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_purgeproducts_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java new file mode 100644 index 000000000000..fa20abafc66c --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_purgeproducts_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1.BatchOperationMetadata; +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.protobuf.Empty; + +public class AsyncPurgeProductsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeProductsLRO(); + } + + public static void asyncPurgeProductsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + OperationFuture future = + productSearchClient.purgeProductsOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_purgeproducts_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java new file mode 100644 index 000000000000..ce75436790d3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_purgeproducts_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.PurgeProductsRequest; +import com.google.protobuf.Empty; + +public class SyncPurgeProducts { + + public static void main(String[] args) throws Exception { + syncPurgeProducts(); + } + + public static void syncPurgeProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + productSearchClient.purgeProductsAsync(request).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_purgeproducts_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java new file mode 100644 index 000000000000..e4dd9b43b2df --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_purgeproducts_locationname_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncPurgeProductsLocationname { + + public static void main(String[] args) throws Exception { + syncPurgeProductsLocationname(); + } + + public static void syncPurgeProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + productSearchClient.purgeProductsAsync(parent).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_purgeproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java new file mode 100644 index 000000000000..5a7bd9a54047 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_purgeproducts_string_sync] +import com.google.cloud.vision.v1.LocationName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncPurgeProductsString { + + public static void main(String[] args) throws Exception { + syncPurgeProductsString(); + } + + public static void syncPurgeProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + productSearchClient.purgeProductsAsync(parent).get(); + } + } +} +// [END vision_v1_generated_productsearchclient_purgeproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..12bb178479bd --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class AsyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + asyncRemoveProductFromProductSet(); + } + + public static void asyncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.removeProductFromProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..2c1d2565a2b1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSet(); + } + + public static void syncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.removeProductFromProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..a85d93527f17 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameProductname(); + } + + public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java new file mode 100644 index 000000000000..d14baff1cf16 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameString(); + } + + public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java new file mode 100644 index 000000000000..0295bd233b64 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringProductname(); + } + + public static void syncRemoveProductFromProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java new file mode 100644 index 000000000000..ce1888b572bf --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] +import com.google.cloud.vision.v1.ProductName; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringString(); + } + + public static void syncRemoveProductFromProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java new file mode 100644 index 000000000000..1704b63bc084 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProduct { + + public static void main(String[] args) throws Exception { + asyncUpdateProduct(); + } + + public static void asyncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java new file mode 100644 index 000000000000..ad06e2b0b6a8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproduct_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProduct { + + public static void main(String[] args) throws Exception { + syncUpdateProduct(); + } + + public static void syncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Product response = productSearchClient.updateProduct(request); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java new file mode 100644 index 000000000000..220acd7f3289 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproduct_productfieldmask_sync] +import com.google.cloud.vision.v1.Product; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductProductFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductProductFieldmask(); + } + + public static void syncUpdateProductProductFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Product response = productSearchClient.updateProduct(product, updateMask); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java new file mode 100644 index 000000000000..c40d55a7ea7e --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + asyncUpdateProductSet(); + } + + public static void asyncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.updateProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java new file mode 100644 index 000000000000..100bcf3c7d2a --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproductset_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.cloud.vision.v1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + syncUpdateProductSet(); + } + + public static void syncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ProductSet response = productSearchClient.updateProductSet(request); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java new file mode 100644 index 000000000000..9727c5ca520f --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] +import com.google.cloud.vision.v1.ProductSearchClient; +import com.google.cloud.vision.v1.ProductSet; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSetProductsetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductSetProductsetFieldmask(); + } + + public static void syncUpdateProductSetProductsetFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); + } + } +} +// [END vision_v1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..7a737a0d8f59 --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.samples; + +// [START vision_v1_generated_productsearchsettings_createproductset_sync] +import com.google.cloud.vision.v1.ProductSearchSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..76e7ff91795d --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub.samples; + +// [START vision_v1_generated_imageannotatorstubsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorStubSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..5396f00848cf --- /dev/null +++ b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1.stub.samples; + +// [START vision_v1_generated_productsearchstubsettings_createproductset_sync] +import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchStubSettings.Builder productSearchSettingsBuilder = + ProductSearchStubSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1_generated_productsearchstubsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java new file mode 100644 index 000000000000..9b220983e950 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java @@ -0,0 +1,288 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStub; +import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorClient implements BackgroundResource { + private final ImageAnnotatorSettings settings; + private final ImageAnnotatorStub stub; + + /** Constructs an instance of ImageAnnotatorClient with default settings. */ + public static final ImageAnnotatorClient create() throws IOException { + return create(ImageAnnotatorSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) + throws IOException { + return new ImageAnnotatorClient(settings); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ImageAnnotatorSettings). + */ + public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { + return new ImageAnnotatorClient(stub); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); + } + + protected ImageAnnotatorClient(ImageAnnotatorStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ImageAnnotatorSettings getSettings() { + return settings; + } + + public ImageAnnotatorStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages( + List requests) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { + return batchAnnotateImagesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateImagesCallable() { + return stub.batchAnnotateImagesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java new file mode 100644 index 000000000000..7eb7e7503d94 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java @@ -0,0 +1,209 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); + } + + public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) + throws IOException { + return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageAnnotatorStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageAnnotatorStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageAnnotatorSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageAnnotatorStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageAnnotatorSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageAnnotatorStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); + } + + public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { + return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return getStubSettingsBuilder().batchAnnotateImagesSettings(); + } + + @Override + public ImageAnnotatorSettings build() throws IOException { + return new ImageAnnotatorSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json new file mode 100644 index 000000000000..711d85bca29f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.vision.v1p1beta1", + "libraryPackage": "com.google.cloud.vision.v1p1beta1", + "services": { + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "ImageAnnotatorClient", + "rpcs": { + "BatchAnnotateImages": { + "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java new file mode 100644 index 000000000000..9220329c88a8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ImageAnnotatorClient ======================= + * + *

Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

Sample for ImageAnnotatorClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.vision.v1p1beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..c4c203ed5bd6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java new file mode 100644 index 000000000000..439c6ccba5a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java @@ -0,0 +1,163 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { + private static final MethodDescriptor + batchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageAnnotatorStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + batchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..a3e75588bfdd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java new file mode 100644 index 000000000000..52cdf9382108 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java @@ -0,0 +1,199 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + batchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p1beta1/images:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonImageAnnotatorStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + batchAnnotateImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchAnnotateImagesMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java new file mode 100644 index 000000000000..f7bffd2caeb9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ImageAnnotatorStub implements BackgroundResource { + + public UnaryCallable + batchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java new file mode 100644 index 000000000000..8e99499dccad --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java @@ -0,0 +1,335 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorStubSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings + batchAnnotateImagesSettings; + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + public ImageAnnotatorStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageAnnotatorStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonImageAnnotatorStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); + } + + /** Builder for ImageAnnotatorStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + batchAnnotateImagesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(batchAnnotateImagesSettings); + initDefaults(this); + } + + protected Builder(ImageAnnotatorStubSettings settings) { + super(settings); + + batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(batchAnnotateImagesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + @Override + public ImageAnnotatorStubSettings build() throws IOException { + return new ImageAnnotatorStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java new file mode 100644 index 000000000000..f2dc9dfff1bb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java @@ -0,0 +1,118 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p1beta1.stub.HttpJsonImageAnnotatorStub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientHttpJsonTest { + private static MockHttpService mockService; + private static ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonImageAnnotatorStub.getMethodDescriptors(), + ImageAnnotatorSettings.getDefaultEndpoint()); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java new file mode 100644 index 000000000000..36cd957d50ac --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java @@ -0,0 +1,116 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientTest { + private static MockImageAnnotator mockImageAnnotator; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageAnnotator = new MockImageAnnotator(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java new file mode 100644 index 000000000000..36198f91c75c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotator implements MockGrpcService { + private final MockImageAnnotatorImpl serviceImpl; + + public MockImageAnnotator() { + serviceImpl = new MockImageAnnotatorImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java new file mode 100644 index 000000000000..7fc0ebc2c0af --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { + private List requests; + private Queue responses; + + public MockImageAnnotatorImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchAnnotateImages( + BatchAnnotateImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateImagesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateImagesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java new file mode 100644 index 000000000000..142018868f25 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java @@ -0,0 +1,313 @@ +package com.google.cloud.vision.v1p1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Service that performs Google Cloud Vision API detection tasks over client
+ * images, such as face, landmark, logo, label, and text detection. The
+ * ImageAnnotator service returns detected entities from the images.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p1beta1/image_annotator.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p1beta1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", + requestType = com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, + responseType = com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) + .build(); + } + } + } + return getBatchAnnotateImagesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + }; + return ImageAnnotatorStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageAnnotatorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + }; + return ImageAnnotatorBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ImageAnnotatorFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + }; + return ImageAnnotatorFutureStub.newStub(factory, channel); + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse>( + this, METHODID_BATCH_ANNOTATE_IMAGES))) + .build(); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { + private ImageAnnotatorStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ImageAnnotatorBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { + private ImageAnnotatorFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ImageAnnotatorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_ANNOTATE_IMAGES: + serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageAnnotatorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageAnnotator"); + } + } + + private static final class ImageAnnotatorFileDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier { + ImageAnnotatorFileDescriptorSupplier() {} + } + + private static final class ImageAnnotatorMethodDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageAnnotatorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ImageAnnotatorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) + .addMethod(getBatchAnnotateImagesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java new file mode 100644 index 000000000000..f0c8b57607e4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Request for performing Google Cloud Vision API tasks over a user-provided
+ * image, with user-requested features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.google.cloud.vision.v1p1beta1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p1beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.Image image_; + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return The image. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Image getImage() { + return image_ == null ? com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for performing Google Cloud Vision API tasks over a user-provided
+   * image, with user-requested features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.AnnotateImageRequest) + com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest build() { + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest buildPartial() { + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p1beta1.AnnotateImageRequest(this); + int from_bitField0_ = bitField0_; + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.AnnotateImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest other) { + if (other == com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder> imageBuilder_; + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return The image. + */ + public com.google.cloud.vision.v1p1beta1.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public Builder setImage(com.google.cloud.vision.v1p1beta1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public Builder setImage( + com.google.cloud.vision.v1p1beta1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public Builder mergeImage(com.google.cloud.vision.v1p1beta1.Image value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.google.cloud.vision.v1p1beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p1beta1.Image.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p1beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p1beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p1beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p1beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p1beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p1beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p1beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p1beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p1beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p1beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p1beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p1beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.AnnotateImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageRequest) + private static final com.google.cloud.vision.v1p1beta1.AnnotateImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.AnnotateImageRequest(); + } + + public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java new file mode 100644 index 000000000000..20070dd686b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface AnnotateImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.AnnotateImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + * @return The image. + */ + com.google.cloud.vision.v1p1beta1.Image getImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Image image = 1; + */ + com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder(); + + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p1beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java new file mode 100644 index 000000000000..9c554e4d2ef2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java @@ -0,0 +1,4108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Response to an image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + faceAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.FaceAnnotation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + landmarkAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + logoAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labelAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + textAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder subBuilder = null; + if (safeSearchAnnotation_ != null) { + subBuilder = safeSearchAnnotation_.toBuilder(); + } + safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(safeSearchAnnotation_); + safeSearchAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.cloud.vision.v1p1beta1.ImageProperties.Builder subBuilder = null; + if (imagePropertiesAnnotation_ != null) { + subBuilder = imagePropertiesAnnotation_.toBuilder(); + } + imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imagePropertiesAnnotation_); + imagePropertiesAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder subBuilder = null; + if (cropHintsAnnotation_ != null) { + subBuilder = cropHintsAnnotation_.toBuilder(); + } + cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsAnnotation_); + cropHintsAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder subBuilder = null; + if (fullTextAnnotation_ != null) { + subBuilder = fullTextAnnotation_.toBuilder(); + } + fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullTextAnnotation_); + fullTextAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.vision.v1p1beta1.WebDetection.Builder subBuilder = null; + if (webDetection_ != null) { + subBuilder = webDetection_.toBuilder(); + } + webDetection_ = input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetection_); + webDetection_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); + } + + public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List faceAnnotations_; + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List getFaceAnnotationsList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List + getFaceAnnotationsOrBuilderList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public int getFaceAnnotationsCount() { + return faceAnnotations_.size(); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { + return faceAnnotations_.get(index); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + return faceAnnotations_.get(index); + } + + public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List landmarkAnnotations_; + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List getLandmarkAnnotationsList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public int getLandmarkAnnotationsCount() { + return landmarkAnnotations_.size(); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { + return landmarkAnnotations_.get(index); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + return landmarkAnnotations_.get(index); + } + + public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List logoAnnotations_; + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List getLogoAnnotationsList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List + getLogoAnnotationsOrBuilderList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public int getLogoAnnotationsCount() { + return logoAnnotations_.size(); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { + return logoAnnotations_.get(index); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + return logoAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List labelAnnotations_; + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { + return labelAnnotations_.get(index); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + return labelAnnotations_.get(index); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List textAnnotations_; + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List getTextAnnotationsList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + return textAnnotations_.get(index); + } + + public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + @java.lang.Override + public boolean hasFullTextAnnotation() { + return fullTextAnnotation_ != null; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + return getFullTextAnnotation(); + } + + public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + @java.lang.Override + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotation_ != null; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + return getSafeSearchAnnotation(); + } + + public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; + private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + @java.lang.Override + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ != null; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + return getImagePropertiesAnnotation(); + } + + public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; + private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + @java.lang.Override + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotation_ != null; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + return getCropHintsAnnotation(); + } + + public static final int WEB_DETECTION_FIELD_NUMBER = 13; + private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + @java.lang.Override + public boolean hasWebDetection() { + return webDetection_ != null; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { + return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + return getWebDetection(); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < faceAnnotations_.size(); i++) { + output.writeMessage(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + output.writeMessage(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + output.writeMessage(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + output.writeMessage(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + output.writeMessage(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + if (cropHintsAnnotation_ != null) { + output.writeMessage(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + output.writeMessage(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + output.writeMessage(13, getWebDetection()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < faceAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getError()); + } + if (cropHintsAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getWebDetection()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) obj; + + if (!getFaceAnnotationsList() + .equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList() + .equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList() + .equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList() + .equals(other.getLabelAnnotationsList())) return false; + if (!getTextAnnotationsList() + .equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; + if (hasFullTextAnnotation()) { + if (!getFullTextAnnotation() + .equals(other.getFullTextAnnotation())) return false; + } + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; + if (hasSafeSearchAnnotation()) { + if (!getSafeSearchAnnotation() + .equals(other.getSafeSearchAnnotation())) return false; + } + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; + if (hasImagePropertiesAnnotation()) { + if (!getImagePropertiesAnnotation() + .equals(other.getImagePropertiesAnnotation())) return false; + } + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; + if (hasCropHintsAnnotation()) { + if (!getCropHintsAnnotation() + .equals(other.getCropHintsAnnotation())) return false; + } + if (hasWebDetection() != other.hasWebDetection()) return false; + if (hasWebDetection()) { + if (!getWebDetection() + .equals(other.getWebDetection())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFaceAnnotationsCount() > 0) { + hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFaceAnnotationsList().hashCode(); + } + if (getLandmarkAnnotationsCount() > 0) { + hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); + } + if (getLogoAnnotationsCount() > 0) { + hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLogoAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (hasFullTextAnnotation()) { + hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getFullTextAnnotation().hashCode(); + } + if (hasSafeSearchAnnotation()) { + hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); + } + if (hasImagePropertiesAnnotation()) { + hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); + } + if (hasCropHintsAnnotation()) { + hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsAnnotation().hashCode(); + } + if (hasWebDetection()) { + hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + getWebDetection().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) + com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFaceAnnotationsFieldBuilder(); + getLandmarkAnnotationsFieldBuilder(); + getLogoAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + faceAnnotationsBuilder_.clear(); + } + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + landmarkAnnotationsBuilder_.clear(); + } + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + logoAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelAnnotationsBuilder_.clear(); + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + textAnnotationsBuilder_.clear(); + } + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + if (webDetectionBuilder_ == null) { + webDetection_ = null; + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse build() { + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(this); + int from_bitField0_ = bitField0_; + if (faceAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.faceAnnotations_ = faceAnnotations_; + } else { + result.faceAnnotations_ = faceAnnotationsBuilder_.build(); + } + if (landmarkAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.landmarkAnnotations_ = landmarkAnnotations_; + } else { + result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); + } + if (logoAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.logoAnnotations_ = logoAnnotations_; + } else { + result.logoAnnotations_ = logoAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (fullTextAnnotationBuilder_ == null) { + result.fullTextAnnotation_ = fullTextAnnotation_; + } else { + result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); + } + if (safeSearchAnnotationBuilder_ == null) { + result.safeSearchAnnotation_ = safeSearchAnnotation_; + } else { + result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); + } + if (imagePropertiesAnnotationBuilder_ == null) { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; + } else { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); + } + if (cropHintsAnnotationBuilder_ == null) { + result.cropHintsAnnotation_ = cropHintsAnnotation_; + } else { + result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); + } + if (webDetectionBuilder_ == null) { + result.webDetection_ = webDetection_; + } else { + result.webDetection_ = webDetectionBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.AnnotateImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other) { + if (other == com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()) return this; + if (faceAnnotationsBuilder_ == null) { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotations_.isEmpty()) { + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.addAll(other.faceAnnotations_); + } + onChanged(); + } + } else { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotationsBuilder_.isEmpty()) { + faceAnnotationsBuilder_.dispose(); + faceAnnotationsBuilder_ = null; + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + faceAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFaceAnnotationsFieldBuilder() : null; + } else { + faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); + } + } + } + if (landmarkAnnotationsBuilder_ == null) { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotations_.isEmpty()) { + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.addAll(other.landmarkAnnotations_); + } + onChanged(); + } + } else { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotationsBuilder_.isEmpty()) { + landmarkAnnotationsBuilder_.dispose(); + landmarkAnnotationsBuilder_ = null; + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + landmarkAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarkAnnotationsFieldBuilder() : null; + } else { + landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); + } + } + } + if (logoAnnotationsBuilder_ == null) { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotations_.isEmpty()) { + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.addAll(other.logoAnnotations_); + } + onChanged(); + } + } else { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotationsBuilder_.isEmpty()) { + logoAnnotationsBuilder_.dispose(); + logoAnnotationsBuilder_ = null; + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + logoAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogoAnnotationsFieldBuilder() : null; + } else { + logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLabelAnnotationsFieldBuilder() : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextAnnotationsFieldBuilder() : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (other.hasFullTextAnnotation()) { + mergeFullTextAnnotation(other.getFullTextAnnotation()); + } + if (other.hasSafeSearchAnnotation()) { + mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); + } + if (other.hasImagePropertiesAnnotation()) { + mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); + } + if (other.hasCropHintsAnnotation()) { + mergeCropHintsAnnotation(other.getCropHintsAnnotation()); + } + if (other.hasWebDetection()) { + mergeWebDetection(other.getWebDetection()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List faceAnnotations_ = + java.util.Collections.emptyList(); + private void ensureFaceAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; + + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List getFaceAnnotationsList() { + if (faceAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } else { + return faceAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public int getFaceAnnotationsCount() { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.size(); + } else { + return faceAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); + } else { + return faceAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations(com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addAllFaceAnnotations( + java.lang.Iterable values) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, faceAnnotations_); + onChanged(); + } else { + faceAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder clearFaceAnnotations() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + faceAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public Builder removeFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.remove(index); + onChanged(); + } else { + faceAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); } else { + return faceAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsOrBuilderList() { + if (faceAnnotationsBuilder_ != null) { + return faceAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { + return getFaceAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsBuilderList() { + return getFaceAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> + getFaceAnnotationsFieldBuilder() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder>( + faceAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + faceAnnotations_ = null; + } + return faceAnnotationsBuilder_; + } + + private java.util.List landmarkAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLandmarkAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; + + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List getLandmarkAnnotationsList() { + if (landmarkAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } else { + return landmarkAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public int getLandmarkAnnotationsCount() { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.size(); + } else { + return landmarkAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); + } else { + return landmarkAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addAllLandmarkAnnotations( + java.lang.Iterable values) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarkAnnotations_); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder clearLandmarkAnnotations() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + landmarkAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder removeLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.remove(index); + onChanged(); + } else { + landmarkAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); } else { + return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + if (landmarkAnnotationsBuilder_ != null) { + return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsBuilderList() { + return getLandmarkAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> + getLandmarkAnnotationsFieldBuilder() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( + landmarkAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + landmarkAnnotations_ = null; + } + return landmarkAnnotationsBuilder_; + } + + private java.util.List logoAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLogoAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; + + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List getLogoAnnotationsList() { + if (logoAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } else { + return logoAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public int getLogoAnnotationsCount() { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.size(); + } else { + return logoAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); + } else { + return logoAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addAllLogoAnnotations( + java.lang.Iterable values) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logoAnnotations_); + onChanged(); + } else { + logoAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder clearLogoAnnotations() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + logoAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder removeLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.remove(index); + onChanged(); + } else { + logoAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); } else { + return logoAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsOrBuilderList() { + if (logoAnnotationsBuilder_ != null) { + return logoAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { + return getLogoAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsBuilderList() { + return getLogoAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> + getLogoAnnotationsFieldBuilder() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( + logoAnnotations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + logoAnnotations_ = null; + } + return logoAnnotationsBuilder_; + } + + private java.util.List labelAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; + + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private java.util.List textAnnotations_ = + java.util.Collections.emptyList(); + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = new java.util.ArrayList(textAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; + + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addAllTextAnnotations( + java.lang.Iterable values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + public boolean hasFullTextAnnotation() { + return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } else { + return fullTextAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullTextAnnotation_ = value; + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation( + com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder builderForValue) { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = builderForValue.build(); + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (fullTextAnnotation_ != null) { + fullTextAnnotation_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); + } else { + fullTextAnnotation_ = value; + } + onChanged(); + } else { + fullTextAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder clearFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + onChanged(); + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { + + onChanged(); + return getFullTextAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + if (fullTextAnnotationBuilder_ != null) { + return fullTextAnnotationBuilder_.getMessageOrBuilder(); + } else { + return fullTextAnnotation_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> + getFullTextAnnotationFieldBuilder() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder>( + getFullTextAnnotation(), + getParentForChildren(), + isClean()); + fullTextAnnotation_ = null; + } + return fullTextAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } else { + return safeSearchAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safeSearchAnnotation_ = value; + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation( + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder builderForValue) { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = builderForValue.build(); + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (safeSearchAnnotation_ != null) { + safeSearchAnnotation_ = + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); + } else { + safeSearchAnnotation_ = value; + } + onChanged(); + } else { + safeSearchAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder clearSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + onChanged(); + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { + + onChanged(); + return getSafeSearchAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + if (safeSearchAnnotationBuilder_ != null) { + return safeSearchAnnotationBuilder_.getMessageOrBuilder(); + } else { + return safeSearchAnnotation_ == null ? + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> + getSafeSearchAnnotationFieldBuilder() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder>( + getSafeSearchAnnotation(), + getParentForChildren(), + isClean()); + safeSearchAnnotation_ = null; + } + return safeSearchAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } else { + return imagePropertiesAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p1beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imagePropertiesAnnotation_ = value; + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation( + com.google.cloud.vision.v1p1beta1.ImageProperties.Builder builderForValue) { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = builderForValue.build(); + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p1beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (imagePropertiesAnnotation_ != null) { + imagePropertiesAnnotation_ = + com.google.cloud.vision.v1p1beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); + } else { + imagePropertiesAnnotation_ = value; + } + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder clearImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + onChanged(); + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p1beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { + + onChanged(); + return getImagePropertiesAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + if (imagePropertiesAnnotationBuilder_ != null) { + return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); + } else { + return imagePropertiesAnnotation_ == null ? + com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> + getImagePropertiesAnnotationFieldBuilder() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder>( + getImagePropertiesAnnotation(), + getParentForChildren(), + isClean()); + imagePropertiesAnnotation_ = null; + } + return imagePropertiesAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } else { + return cropHintsAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsAnnotation_ = value; + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation( + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder builderForValue) { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = builderForValue.build(); + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (cropHintsAnnotation_ != null) { + cropHintsAnnotation_ = + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); + } else { + cropHintsAnnotation_ = value; + } + onChanged(); + } else { + cropHintsAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder clearCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + onChanged(); + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { + + onChanged(); + return getCropHintsAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + if (cropHintsAnnotationBuilder_ != null) { + return cropHintsAnnotationBuilder_.getMessageOrBuilder(); + } else { + return cropHintsAnnotation_ == null ? + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> + getCropHintsAnnotationFieldBuilder() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder>( + getCropHintsAnnotation(), + getParentForChildren(), + isClean()); + cropHintsAnnotation_ = null; + } + return cropHintsAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> webDetectionBuilder_; + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + public boolean hasWebDetection() { + return webDetectionBuilder_ != null || webDetection_ != null; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { + if (webDetectionBuilder_ == null) { + return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; + } else { + return webDetectionBuilder_.getMessage(); + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetection_ = value; + onChanged(); + } else { + webDetectionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection( + com.google.cloud.vision.v1p1beta1.WebDetection.Builder builderForValue) { + if (webDetectionBuilder_ == null) { + webDetection_ = builderForValue.build(); + onChanged(); + } else { + webDetectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public Builder mergeWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (webDetection_ != null) { + webDetection_ = + com.google.cloud.vision.v1p1beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); + } else { + webDetection_ = value; + } + onChanged(); + } else { + webDetectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public Builder clearWebDetection() { + if (webDetectionBuilder_ == null) { + webDetection_ = null; + onChanged(); + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.Builder getWebDetectionBuilder() { + + onChanged(); + return getWebDetectionFieldBuilder().getBuilder(); + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + if (webDetectionBuilder_ != null) { + return webDetectionBuilder_.getMessageOrBuilder(); + } else { + return webDetection_ == null ? + com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> + getWebDetectionFieldBuilder() { + if (webDetectionBuilder_ == null) { + webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder>( + getWebDetection(), + getParentForChildren(), + isClean()); + webDetection_ = null; + } + return webDetectionBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) + private static final com.google.cloud.vision.v1p1beta1.AnnotateImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(); + } + + public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java new file mode 100644 index 000000000000..1ee0a0448868 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java @@ -0,0 +1,406 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface AnnotateImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.AnnotateImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + int getFaceAnnotationsCount(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsOrBuilderList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + int getLandmarkAnnotationsCount(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsOrBuilderList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + int getLogoAnnotationsCount(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsOrBuilderList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + int getLabelAnnotationsCount(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + int getTextAnnotationsCount(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + boolean hasFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); + + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + boolean hasSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); + + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + boolean hasImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; + */ + com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); + + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + boolean hasCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); + + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + boolean hasWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; + */ + com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); + + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..2039cb820876 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Multiple image annotation requests are batched into a single service call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} + */ +public final class BatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) + BatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesRequest.newBuilder() to construct. + private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple image annotation requests are batched into a single service call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..31d4013e1f92 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface BatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..26dfffc1b251 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Response to a batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} + */ +public final class BatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) + BatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesResponse.newBuilder() to construct. + private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..564cfec86844 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface BatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java new file mode 100644 index 000000000000..bc80bf6116b4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java @@ -0,0 +1,1914 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Logical element on the page.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Block} + */ +public final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Block) + BlockOrBuilder { +private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + paragraphs_ = java.util.Collections.emptyList(); + blockType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paragraphs_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Paragraph.parser(), extensionRegistry)); + break; + } + case 32: { + int rawValue = input.readEnum(); + + blockType_ = rawValue; + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Block.class, com.google.cloud.vision.v1p1beta1.Block.Builder.class); + } + + /** + *
+   * Type of a block (text, image etc) as identified by OCR.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p1beta1.Block.BlockType} + */ + public enum BlockType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + PICTURE(3), + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + RULER(4), + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + BARCODE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + public static final int PICTURE_VALUE = 3; + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + public static final int RULER_VALUE = 4; + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + public static final int BARCODE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TEXT; + case 2: return TABLE; + case 3: return PICTURE; + case 4: return RULER; + case 5: return BARCODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockType findValueByNumber(int number) { + return BlockType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.Block.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockType[] VALUES = values(); + + public static BlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Block.BlockType) + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 3; + private java.util.List paragraphs_; + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List getParagraphsList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + return paragraphs_.get(index); + } + + public static final int BLOCK_TYPE_FIELD_NUMBER = 4; + private int blockType_; + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Block.BlockType result = com.google.cloud.vision.v1p1beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p1beta1.Block.BlockType.UNRECOGNIZED : result; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p1beta1.Block.BlockType.UNKNOWN.getNumber()) { + output.writeEnum(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p1beta1.Block.BlockType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Block)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Block other = (com.google.cloud.vision.v1p1beta1.Block) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList() + .equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + blockType_; + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Logical element on the page.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Block) + com.google.cloud.vision.v1p1beta1.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Block.class, com.google.cloud.vision.v1p1beta1.Block.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getParagraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + paragraphsBuilder_.clear(); + } + blockType_ = 0; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block build() { + com.google.cloud.vision.v1p1beta1.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block buildPartial() { + com.google.cloud.vision.v1p1beta1.Block result = new com.google.cloud.vision.v1p1beta1.Block(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + result.blockType_ = blockType_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Block) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Block other) { + if (other == com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParagraphsFieldBuilder() : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (other.blockType_ != 0) { + setBlockTypeValue(other.getBlockTypeValue()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List paragraphs_ = + java.util.Collections.emptyList(); + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(paragraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder> paragraphsBuilder_; + + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public java.util.List getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p1beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs(com.google.cloud.vision.v1p1beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p1beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder addAllParagraphs( + java.lang.Iterable values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p1beta1.Paragraph.Builder getParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p1beta1.Paragraph.Builder addParagraphsBuilder() { + return getParagraphsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p1beta1.Paragraph.Builder addParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder>( + paragraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private int blockType_ = 0; + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @param value The enum numeric value on the wire for blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockTypeValue(int value) { + + blockType_ = value; + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Block.BlockType result = com.google.cloud.vision.v1p1beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p1beta1.Block.BlockType.UNRECOGNIZED : result; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @param value The blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockType(com.google.cloud.vision.v1p1beta1.Block.BlockType value) { + if (value == null) { + throw new NullPointerException(); + } + + blockType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return This builder for chaining. + */ + public Builder clearBlockType() { + + blockType_ = 0; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Block) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Block) + private static final com.google.cloud.vision.v1p1beta1.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Block(); + } + + public static com.google.cloud.vision.v1p1beta1.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java new file mode 100644 index 000000000000..8bd1180141c2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + int getParagraphsCount(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsOrBuilderList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index); + + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + int getBlockTypeValue(); + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType(); + + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java new file mode 100644 index 000000000000..7526ac1941fd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A bounding polygon for the detected image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BoundingPoly} + */ +public final class BoundingPoly extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BoundingPoly) + BoundingPolyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Vertex.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BoundingPoly.class, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List getVerticesList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + @java.lang.Override + public int getVerticesCount() { + return vertices_.size(); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + return vertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, vertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.BoundingPoly other = (com.google.cloud.vision.v1p1beta1.BoundingPoly) obj; + + if (!getVerticesList() + .equals(other.getVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A bounding polygon for the detected image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.BoundingPoly} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BoundingPoly) + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.BoundingPoly.class, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly build() { + com.google.cloud.vision.v1p1beta1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly buildPartial() { + com.google.cloud.vision.v1p1beta1.BoundingPoly result = new com.google.cloud.vision.v1p1beta1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.BoundingPoly) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.BoundingPoly)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BoundingPoly other) { + if (other == com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVerticesFieldBuilder() : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder> verticesBuilder_; + + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.vision.v1p1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p1beta1.Vertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BoundingPoly) + private static final com.google.cloud.vision.v1p1beta1.BoundingPoly DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BoundingPoly(); + } + + public static com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..04377a3e7f55 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface BoundingPolyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java new file mode 100644 index 000000000000..a63e2cd9d8e4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java @@ -0,0 +1,835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Color information consists of RGB channels, score, and the fraction of
+ * the image that the color occupies in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ColorInfo} + */ +public final class ColorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ColorInfo) + ColorInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ColorInfo.newBuilder() to construct. + private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 29: { + + pixelFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ColorInfo.class, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private com.google.type.Color color_; + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return color_ != null; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return getColor(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; + private float pixelFraction_; + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != null) { + output.writeMessage(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + output.writeFloat(3, pixelFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, pixelFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ColorInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.ColorInfo other = (com.google.cloud.vision.v1p1beta1.ColorInfo) obj; + + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor() + .equals(other.getColor())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits( + other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPixelFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ColorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Color information consists of RGB channels, score, and the fraction of
+   * the image that the color occupies in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ColorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ColorInfo) + com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ColorInfo.class, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.ColorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + score_ = 0F; + + pixelFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfo build() { + com.google.cloud.vision.v1p1beta1.ColorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfo buildPartial() { + com.google.cloud.vision.v1p1beta1.ColorInfo result = new com.google.cloud.vision.v1p1beta1.ColorInfo(this); + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + result.score_ = score_; + result.pixelFraction_ = pixelFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.ColorInfo) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.ColorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ColorInfo other) { + if (other == com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()) return this; + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getPixelFraction() != 0F) { + setPixelFraction(other.getPixelFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.ColorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.ColorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor( + com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.Color.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.google.type.Color.getDefaultInstance() : color_; + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + + private float score_ ; + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float pixelFraction_ ; + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @param value The pixelFraction to set. + * @return This builder for chaining. + */ + public Builder setPixelFraction(float value) { + + pixelFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearPixelFraction() { + + pixelFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ColorInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ColorInfo) + private static final com.google.cloud.vision.v1p1beta1.ColorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ColorInfo(); + } + + public static com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java new file mode 100644 index 000000000000..774d3b205355 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ColorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ColorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + boolean hasColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + com.google.type.Color getColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + com.google.type.ColorOrBuilder getColorOrBuilder(); + + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + float getPixelFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java new file mode 100644 index 000000000000..a3e3f94b7021 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java @@ -0,0 +1,845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Single crop hint that is used to generate a new crop when serving an image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHint} + */ +public final class CropHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHint) + CropHintOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHint.newBuilder() to construct. + private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHint() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + case 29: { + + importanceFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHint.class, com.google.cloud.vision.v1p1beta1.CropHint.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; + private float importanceFraction_; + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + output.writeFloat(3, importanceFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, importanceFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHint)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.CropHint other = (com.google.cloud.vision.v1p1beta1.CropHint) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits( + other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImportanceFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Single crop hint that is used to generate a new crop when serving an image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHint) + com.google.cloud.vision.v1p1beta1.CropHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHint.class, com.google.cloud.vision.v1p1beta1.CropHint.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.CropHint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + confidence_ = 0F; + + importanceFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHint build() { + com.google.cloud.vision.v1p1beta1.CropHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHint buildPartial() { + com.google.cloud.vision.v1p1beta1.CropHint result = new com.google.cloud.vision.v1p1beta1.CropHint(this); + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.confidence_ = confidence_; + result.importanceFraction_ = importanceFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.CropHint) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHint other) { + if (other == com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getImportanceFraction() != 0F) { + setImportanceFraction(other.getImportanceFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.CropHint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float importanceFraction_ ; + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @param value The importanceFraction to set. + * @return This builder for chaining. + */ + public Builder setImportanceFraction(float value) { + + importanceFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearImportanceFraction() { + + importanceFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHint) + private static final com.google.cloud.vision.v1p1beta1.CropHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHint(); + } + + public static com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java new file mode 100644 index 000000000000..05a68b2a579d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface CropHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + float getImportanceFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java new file mode 100644 index 000000000000..fdbde2545130 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Set of crop hints that are used to generate new crops when serving images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsAnnotation} + */ +public final class CropHintsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHintsAnnotation) + CropHintsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsAnnotation.newBuilder() to construct. + private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsAnnotation() { + cropHints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cropHints_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.CropHint.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder.class); + } + + public static final int CROP_HINTS_FIELD_NUMBER = 1; + private java.util.List cropHints_; + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List getCropHintsList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List + getCropHintsOrBuilderList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public int getCropHintsCount() { + return cropHints_.size(); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index) { + return cropHints_.get(index); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + return cropHints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cropHints_.size(); i++) { + output.writeMessage(1, cropHints_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cropHints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, cropHints_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHintsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) obj; + + if (!getCropHintsList() + .equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCropHintsCount() > 0) { + hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of crop hints that are used to generate new crops when serving images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHintsAnnotation) + com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCropHintsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation build() { + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p1beta1.CropHintsAnnotation(this); + int from_bitField0_ = bitField0_; + if (cropHintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cropHints_ = cropHints_; + } else { + result.cropHints_ = cropHintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHintsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance()) return this; + if (cropHintsBuilder_ == null) { + if (!other.cropHints_.isEmpty()) { + if (cropHints_.isEmpty()) { + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCropHintsIsMutable(); + cropHints_.addAll(other.cropHints_); + } + onChanged(); + } + } else { + if (!other.cropHints_.isEmpty()) { + if (cropHintsBuilder_.isEmpty()) { + cropHintsBuilder_.dispose(); + cropHintsBuilder_ = null; + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + cropHintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCropHintsFieldBuilder() : null; + } else { + cropHintsBuilder_.addAllMessages(other.cropHints_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List cropHints_ = + java.util.Collections.emptyList(); + private void ensureCropHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(cropHints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder> cropHintsBuilder_; + + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public java.util.List getCropHintsList() { + if (cropHintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cropHints_); + } else { + return cropHintsBuilder_.getMessageList(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public int getCropHintsCount() { + if (cropHintsBuilder_ == null) { + return cropHints_.size(); + } else { + return cropHintsBuilder_.getCount(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); + } else { + return cropHintsBuilder_.getMessage(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p1beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.set(index, value); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.set(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints(com.google.cloud.vision.v1p1beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p1beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(index, value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder addAllCropHints( + java.lang.Iterable values) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cropHints_); + onChanged(); + } else { + cropHintsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder clearCropHints() { + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public Builder removeCropHints(int index) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.remove(index); + onChanged(); + } else { + cropHintsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p1beta1.CropHint.Builder getCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().getBuilder(index); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); } else { + return cropHintsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsOrBuilderList() { + if (cropHintsBuilder_ != null) { + return cropHintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cropHints_); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder() { + return getCropHintsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsBuilderList() { + return getCropHintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder> + getCropHintsFieldBuilder() { + if (cropHintsBuilder_ == null) { + cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder>( + cropHints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cropHints_ = null; + } + return cropHintsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHintsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsAnnotation) + private static final com.google.cloud.vision.v1p1beta1.CropHintsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHintsAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java new file mode 100644 index 000000000000..ff3802bfe6a1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface CropHintsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHintsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + int getCropHintsCount(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsOrBuilderList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java new file mode 100644 index 000000000000..618af7cbd553 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java @@ -0,0 +1,696 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Parameters for crop hints annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsParams} + */ +public final class CropHintsParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHintsParams) + CropHintsParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsParams.newBuilder() to construct. + private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsParams() { + aspectRatios_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + aspectRatios_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + aspectRatios_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHintsParams.class, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder.class); + } + + public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList aspectRatios_; + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + @java.lang.Override + public java.util.List + getAspectRatiosList() { + return aspectRatios_; + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + private int aspectRatiosMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getAspectRatiosList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); + } + for (int i = 0; i < aspectRatios_.size(); i++) { + output.writeFloatNoTag(aspectRatios_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getAspectRatiosList().size(); + size += dataSize; + if (!getAspectRatiosList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + aspectRatiosMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHintsParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.CropHintsParams other = (com.google.cloud.vision.v1p1beta1.CropHintsParams) obj; + + if (!getAspectRatiosList() + .equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAspectRatiosCount() > 0) { + hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; + hash = (53 * hash) + getAspectRatiosList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHintsParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHintsParams) + com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.CropHintsParams.class, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.CropHintsParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParams build() { + com.google.cloud.vision.v1p1beta1.CropHintsParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParams buildPartial() { + com.google.cloud.vision.v1p1beta1.CropHintsParams result = new com.google.cloud.vision.v1p1beta1.CropHintsParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aspectRatios_ = aspectRatios_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.CropHintsParams) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHintsParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHintsParams other) { + if (other == com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance()) return this; + if (!other.aspectRatios_.isEmpty()) { + if (aspectRatios_.isEmpty()) { + aspectRatios_ = other.aspectRatios_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAspectRatiosIsMutable(); + aspectRatios_.addAll(other.aspectRatios_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.CropHintsParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHintsParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); + private void ensureAspectRatiosIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + public java.util.List + getAspectRatiosList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index to set the value at. + * @param value The aspectRatios to set. + * @return This builder for chaining. + */ + public Builder setAspectRatios( + int index, float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param value The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAspectRatios(float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.addFloat(value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param values The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAllAspectRatios( + java.lang.Iterable values) { + ensureAspectRatiosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aspectRatios_); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return This builder for chaining. + */ + public Builder clearAspectRatios() { + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHintsParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsParams) + private static final com.google.cloud.vision.v1p1beta1.CropHintsParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHintsParams(); + } + + public static com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java new file mode 100644 index 000000000000..eea5626dd8dd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface CropHintsParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHintsParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + java.util.List getAspectRatiosList(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + int getAspectRatiosCount(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + float getAspectRatios(int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java new file mode 100644 index 000000000000..d1721d2d5922 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Set of dominant colors and their corresponding scores.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.DominantColorsAnnotation} + */ +public final class DominantColorsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) + DominantColorsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DominantColorsAnnotation.newBuilder() to construct. + private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DominantColorsAnnotation() { + colors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DominantColorsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DominantColorsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + colors_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.ColorInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder.class); + } + + public static final int COLORS_FIELD_NUMBER = 1; + private java.util.List colors_; + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List getColorsList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List + getColorsOrBuilderList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public int getColorsCount() { + return colors_.size(); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index) { + return colors_.get(index); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + return colors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < colors_.size(); i++) { + output.writeMessage(1, colors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < colors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, colors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) obj; + + if (!getColorsList() + .equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColorsCount() > 0) { + hash = (37 * hash) + COLORS_FIELD_NUMBER; + hash = (53 * hash) + getColorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of dominant colors and their corresponding scores.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.DominantColorsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + colorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation build() { + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation(this); + int from_bitField0_ = bitField0_; + if (colorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.colors_ = colors_; + } else { + result.colors_ = colorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance()) return this; + if (colorsBuilder_ == null) { + if (!other.colors_.isEmpty()) { + if (colors_.isEmpty()) { + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColorsIsMutable(); + colors_.addAll(other.colors_); + } + onChanged(); + } + } else { + if (!other.colors_.isEmpty()) { + if (colorsBuilder_.isEmpty()) { + colorsBuilder_.dispose(); + colorsBuilder_ = null; + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + colorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getColorsFieldBuilder() : null; + } else { + colorsBuilder_.addAllMessages(other.colors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List colors_ = + java.util.Collections.emptyList(); + private void ensureColorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(colors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder> colorsBuilder_; + + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public java.util.List getColorsList() { + if (colorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(colors_); + } else { + return colorsBuilder_.getMessageList(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public int getColorsCount() { + if (colorsBuilder_ == null) { + return colors_.size(); + } else { + return colorsBuilder_.getCount(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); + } else { + return colorsBuilder_.getMessage(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p1beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.set(index, value); + onChanged(); + } else { + colorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.set(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder addColors(com.google.cloud.vision.v1p1beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(value); + onChanged(); + } else { + colorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p1beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(index, value); + onChanged(); + } else { + colorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder addColors( + com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder addAllColors( + java.lang.Iterable values) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, colors_); + onChanged(); + } else { + colorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder clearColors() { + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + colorsBuilder_.clear(); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public Builder removeColors(int index) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.remove(index); + onChanged(); + } else { + colorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder getColorsBuilder( + int index) { + return getColorsFieldBuilder().getBuilder(index); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); } else { + return colorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsOrBuilderList() { + if (colorsBuilder_ != null) { + return colorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(colors_); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder() { + return getColorsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder( + int index) { + return getColorsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsBuilderList() { + return getColorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder> + getColorsFieldBuilder() { + if (colorsBuilder_ == null) { + colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder>( + colors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + colors_ = null; + } + return colorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) + private static final com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DominantColorsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DominantColorsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java new file mode 100644 index 000000000000..07bc1245e0ce --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface DominantColorsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + int getColorsCount(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsOrBuilderList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java new file mode 100644 index 000000000000..ada7e6fafa1f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java @@ -0,0 +1,2468 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Set of detected entity features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.EntityAnnotation} + */ +public final class EntityAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.EntityAnnotation) + EntityAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityAnnotation.newBuilder() to construct. + private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityAnnotation() { + mid_ = ""; + locale_ = ""; + description_ = ""; + locations_ = java.util.Collections.emptyList(); + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + locale_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + case 53: { + + topicality_ = input.readFloat(); + break; + } + case 58: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.LocationInfo.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + properties_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Property.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.class, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALE_FIELD_NUMBER = 2; + private volatile java.lang.Object locale_; + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + @java.lang.Override + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } + } + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int TOPICALITY_FIELD_NUMBER = 6; + private float topicality_; + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 7; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int LOCATIONS_FIELD_NUMBER = 8; + private java.util.List locations_; + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index) { + return locations_.get(index); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + return locations_.get(index); + } + + public static final int PROPERTIES_FIELD_NUMBER = 9; + private java.util.List properties_; + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Property getProperties(int index) { + return properties_.get(index); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + output.writeFloat(6, topicality_); + } + if (boundingPoly_ != null) { + output.writeMessage(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(9, properties_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, topicality_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, properties_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.EntityAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.EntityAnnotation other = (com.google.cloud.vision.v1p1beta1.EntityAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLocale() + .equals(other.getLocale())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits( + other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getLocationsList() + .equals(other.getLocationsList())) return false; + if (!getPropertiesList() + .equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLocale().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTopicality()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected entity features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.EntityAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.EntityAnnotation) + com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.EntityAnnotation.class, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.EntityAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + locale_ = ""; + + description_ = ""; + + score_ = 0F; + + confidence_ = 0F; + + topicality_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + propertiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation build() { + com.google.cloud.vision.v1p1beta1.EntityAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.EntityAnnotation result = new com.google.cloud.vision.v1p1beta1.EntityAnnotation(this); + int from_bitField0_ = bitField0_; + result.mid_ = mid_; + result.locale_ = locale_; + result.description_ = description_; + result.score_ = score_; + result.confidence_ = confidence_; + result.topicality_ = topicality_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.EntityAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.EntityAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.EntityAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLocale().isEmpty()) { + locale_ = other.locale_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getTopicality() != 0F) { + setTopicality(other.getTopicality()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPropertiesFieldBuilder() : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.EntityAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.EntityAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object mid_ = ""; + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object locale_ = ""; + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The locale. + */ + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The locale to set. + * @return This builder for chaining. + */ + public Builder setLocale( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locale_ = value; + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return This builder for chaining. + */ + public Builder clearLocale() { + + locale_ = getDefaultInstance().getLocale(); + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The bytes for locale to set. + * @return This builder for chaining. + */ + public Builder setLocaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locale_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float topicality_ ; + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @param value The topicality to set. + * @return This builder for chaining. + */ + public Builder setTopicality(float value) { + + topicality_ = value; + onChanged(); + return this; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return This builder for chaining. + */ + public Builder clearTopicality() { + + topicality_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder> locationsBuilder_; + + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p1beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder addLocations(com.google.cloud.vision.v1p1beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p1beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder getLocationsBuilder( + int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilder( + int index) { + return getLocationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder>( + locations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List properties_ = + java.util.Collections.emptyList(); + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder> propertiesBuilder_; + + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p1beta1.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p1beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder addProperties(com.google.cloud.vision.v1p1beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p1beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder addProperties( + com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p1beta1.Property.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder>( + properties_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.EntityAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.EntityAnnotation) + private static final com.google.cloud.vision.v1p1beta1.EntityAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.EntityAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java new file mode 100644 index 000000000000..0a2f511f9bfc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java @@ -0,0 +1,255 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface EntityAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.EntityAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + java.lang.String getLocale(); + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + com.google.protobuf.ByteString + getLocaleBytes(); + + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + float getTopicality(); + + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + int getLocationsCount(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsOrBuilderList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index); + + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + java.util.List + getPropertiesList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p1beta1.Property getProperties(int index); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + int getPropertiesCount(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java new file mode 100644 index 000000000000..64455d45269a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java @@ -0,0 +1,4300 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A face annotation object contains the results of face detection.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation} + */ +public final class FaceAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.FaceAnnotation) + FaceAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceAnnotation.newBuilder() to construct. + private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceAnnotation() { + landmarks_ = java.util.Collections.emptyList(); + joyLikelihood_ = 0; + sorrowLikelihood_ = 0; + angerLikelihood_ = 0; + surpriseLikelihood_ = 0; + underExposedLikelihood_ = 0; + blurredLikelihood_ = 0; + headwearLikelihood_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (fdBoundingPoly_ != null) { + subBuilder = fdBoundingPoly_.toBuilder(); + } + fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fdBoundingPoly_); + fdBoundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + landmarks_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); + break; + } + case 37: { + + rollAngle_ = input.readFloat(); + break; + } + case 45: { + + panAngle_ = input.readFloat(); + break; + } + case 53: { + + tiltAngle_ = input.readFloat(); + break; + } + case 61: { + + detectionConfidence_ = input.readFloat(); + break; + } + case 69: { + + landmarkingConfidence_ = input.readFloat(); + break; + } + case 72: { + int rawValue = input.readEnum(); + + joyLikelihood_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + sorrowLikelihood_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + angerLikelihood_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + surpriseLikelihood_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + underExposedLikelihood_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + blurredLikelihood_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + headwearLikelihood_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder.class); + } + + public interface LandmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType(); + + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return The position. + */ + com.google.cloud.vision.v1p1beta1.Position getPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder(); + } + /** + *
+   * A face-specific landmark (for example, a face feature).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} + */ + public static final class Landmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Landmark() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Landmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Landmark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + com.google.cloud.vision.v1p1beta1.Position.Builder subBuilder = null; + if (position_ != null) { + subBuilder = position_.toBuilder(); + } + position_ = input.readMessage(com.google.cloud.vision.v1p1beta1.Position.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(position_); + position_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder.class); + } + + /** + *
+     * Face landmark (feature) type.
+     * Left and right are defined from the vantage of the viewer of the image
+     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
+     * typically, is the person's right eye.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + UNKNOWN_LANDMARK(0), + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + LEFT_EYE(1), + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + RIGHT_EYE(2), + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + LEFT_OF_LEFT_EYEBROW(3), + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + RIGHT_OF_LEFT_EYEBROW(4), + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + LEFT_OF_RIGHT_EYEBROW(5), + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + RIGHT_OF_RIGHT_EYEBROW(6), + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + MIDPOINT_BETWEEN_EYES(7), + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + NOSE_TIP(8), + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + UPPER_LIP(9), + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + LOWER_LIP(10), + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + MOUTH_LEFT(11), + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + MOUTH_RIGHT(12), + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + MOUTH_CENTER(13), + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + NOSE_BOTTOM_RIGHT(14), + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + NOSE_BOTTOM_LEFT(15), + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + NOSE_BOTTOM_CENTER(16), + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + LEFT_EYE_TOP_BOUNDARY(17), + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + LEFT_EYE_RIGHT_CORNER(18), + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + LEFT_EYE_BOTTOM_BOUNDARY(19), + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + LEFT_EYE_LEFT_CORNER(20), + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + RIGHT_EYE_TOP_BOUNDARY(21), + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + RIGHT_EYE_RIGHT_CORNER(22), + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + RIGHT_EYE_BOTTOM_BOUNDARY(23), + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + RIGHT_EYE_LEFT_CORNER(24), + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + LEFT_EYEBROW_UPPER_MIDPOINT(25), + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + RIGHT_EYEBROW_UPPER_MIDPOINT(26), + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + LEFT_EAR_TRAGION(27), + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + RIGHT_EAR_TRAGION(28), + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + LEFT_EYE_PUPIL(29), + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + RIGHT_EYE_PUPIL(30), + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + FOREHEAD_GLABELLA(31), + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + CHIN_GNATHION(32), + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + CHIN_LEFT_GONION(33), + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + CHIN_RIGHT_GONION(34), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + public static final int UNKNOWN_LANDMARK_VALUE = 0; + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + public static final int LEFT_EYE_VALUE = 1; + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + public static final int RIGHT_EYE_VALUE = 2; + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + public static final int NOSE_TIP_VALUE = 8; + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + public static final int UPPER_LIP_VALUE = 9; + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + public static final int LOWER_LIP_VALUE = 10; + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + public static final int MOUTH_LEFT_VALUE = 11; + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + public static final int MOUTH_RIGHT_VALUE = 12; + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + public static final int MOUTH_CENTER_VALUE = 13; + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + public static final int NOSE_BOTTOM_LEFT_VALUE = 15; + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + public static final int NOSE_BOTTOM_CENTER_VALUE = 16; + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + public static final int LEFT_EAR_TRAGION_VALUE = 27; + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + public static final int RIGHT_EAR_TRAGION_VALUE = 28; + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + public static final int LEFT_EYE_PUPIL_VALUE = 29; + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + public static final int RIGHT_EYE_PUPIL_VALUE = 30; + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + public static final int FOREHEAD_GLABELLA_VALUE = 31; + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + public static final int CHIN_GNATHION_VALUE = 32; + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + public static final int CHIN_LEFT_GONION_VALUE = 33; + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + public static final int CHIN_RIGHT_GONION_VALUE = 34; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_LANDMARK; + case 1: return LEFT_EYE; + case 2: return RIGHT_EYE; + case 3: return LEFT_OF_LEFT_EYEBROW; + case 4: return RIGHT_OF_LEFT_EYEBROW; + case 5: return LEFT_OF_RIGHT_EYEBROW; + case 6: return RIGHT_OF_RIGHT_EYEBROW; + case 7: return MIDPOINT_BETWEEN_EYES; + case 8: return NOSE_TIP; + case 9: return UPPER_LIP; + case 10: return LOWER_LIP; + case 11: return MOUTH_LEFT; + case 12: return MOUTH_RIGHT; + case 13: return MOUTH_CENTER; + case 14: return NOSE_BOTTOM_RIGHT; + case 15: return NOSE_BOTTOM_LEFT; + case 16: return NOSE_BOTTOM_CENTER; + case 17: return LEFT_EYE_TOP_BOUNDARY; + case 18: return LEFT_EYE_RIGHT_CORNER; + case 19: return LEFT_EYE_BOTTOM_BOUNDARY; + case 20: return LEFT_EYE_LEFT_CORNER; + case 21: return RIGHT_EYE_TOP_BOUNDARY; + case 22: return RIGHT_EYE_RIGHT_CORNER; + case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; + case 24: return RIGHT_EYE_LEFT_CORNER; + case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; + case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; + case 27: return LEFT_EAR_TRAGION; + case 28: return RIGHT_EAR_TRAGION; + case 29: return LEFT_EYE_PUPIL; + case 30: return RIGHT_EYE_PUPIL; + case 31: return FOREHEAD_GLABELLA; + case 32: return CHIN_GNATHION; + case 33: return CHIN_LEFT_GONION; + case 34: return CHIN_RIGHT_GONION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type) + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p1beta1.Position position_; + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return position_ != null; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return The position. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Position getPosition() { + return position_ == null ? com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder() { + return getPosition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + output.writeEnum(3, type_); + } + if (position_ != null) { + output.writeMessage(4, getPosition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (position_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) obj; + + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A face-specific landmark (for example, a face feature).
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) + com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + if (positionBuilder_ == null) { + position_ = null; + } else { + position_ = null; + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark build() { + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark buildPartial() { + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark(this); + result.type_ = type_; + if (positionBuilder_ == null) { + result.position_ = position_; + } else { + result.position_ = positionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark other) { + if (other == com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p1beta1.Position position_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder> positionBuilder_; + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return positionBuilder_ != null || position_ != null; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + * @return The position. + */ + public com.google.cloud.vision.v1p1beta1.Position getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public Builder setPosition(com.google.cloud.vision.v1p1beta1.Position value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + onChanged(); + } else { + positionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public Builder setPosition( + com.google.cloud.vision.v1p1beta1.Position.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + onChanged(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public Builder mergePosition(com.google.cloud.vision.v1p1beta1.Position value) { + if (positionBuilder_ == null) { + if (position_ != null) { + position_ = + com.google.cloud.vision.v1p1beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); + } else { + position_ = value; + } + onChanged(); + } else { + positionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public Builder clearPosition() { + if (positionBuilder_ == null) { + position_ = null; + onChanged(); + } else { + position_ = null; + positionBuilder_ = null; + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p1beta1.Position.Builder getPositionBuilder() { + + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.Position position = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) + private static final com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark(); + } + + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Landmark(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_; + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + @java.lang.Override + public boolean hasFdBoundingPoly() { + return fdBoundingPoly_ != null; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly() { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + return getFdBoundingPoly(); + } + + public static final int LANDMARKS_FIELD_NUMBER = 3; + private java.util.List landmarks_; + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + return landmarks_.get(index); + } + + public static final int ROLL_ANGLE_FIELD_NUMBER = 4; + private float rollAngle_; + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + + public static final int PAN_ANGLE_FIELD_NUMBER = 5; + private float panAngle_; + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + + public static final int TILT_ANGLE_FIELD_NUMBER = 6; + private float tiltAngle_; + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + + public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; + private float detectionConfidence_; + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + + public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; + private float landmarkingConfidence_; + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + + public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; + private int joyLikelihood_; + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; + private int sorrowLikelihood_; + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; + private int angerLikelihood_; + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; + private int surpriseLikelihood_; + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; + private int underExposedLikelihood_; + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; + private int blurredLikelihood_; + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; + private int headwearLikelihood_; + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + output.writeMessage(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + output.writeFloat(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + output.writeFloat(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + output.writeFloat(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + output.writeFloat(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + output.writeFloat(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(15, headwearLikelihood_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, headwearLikelihood_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.FaceAnnotation other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; + if (hasFdBoundingPoly()) { + if (!getFdBoundingPoly() + .equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList() + .equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits( + other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits( + other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits( + other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits( + other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits( + other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (hasFdBoundingPoly()) { + hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getFdBoundingPoly().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRollAngle()); + hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPanAngle()); + hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTiltAngle()); + hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDetectionConfidence()); + hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLandmarkingConfidence()); + hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + joyLikelihood_; + hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + sorrowLikelihood_; + hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + angerLikelihood_; + hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + surpriseLikelihood_; + hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + underExposedLikelihood_; + hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + blurredLikelihood_; + hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + headwearLikelihood_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.FaceAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A face annotation object contains the results of face detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.FaceAnnotation) + com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.FaceAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLandmarksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + landmarksBuilder_.clear(); + } + rollAngle_ = 0F; + + panAngle_ = 0F; + + tiltAngle_ = 0F; + + detectionConfidence_ = 0F; + + landmarkingConfidence_ = 0F; + + joyLikelihood_ = 0; + + sorrowLikelihood_ = 0; + + angerLikelihood_ = 0; + + surpriseLikelihood_ = 0; + + underExposedLikelihood_ = 0; + + blurredLikelihood_ = 0; + + headwearLikelihood_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation build() { + com.google.cloud.vision.v1p1beta1.FaceAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.FaceAnnotation result = new com.google.cloud.vision.v1p1beta1.FaceAnnotation(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (fdBoundingPolyBuilder_ == null) { + result.fdBoundingPoly_ = fdBoundingPoly_; + } else { + result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + result.rollAngle_ = rollAngle_; + result.panAngle_ = panAngle_; + result.tiltAngle_ = tiltAngle_; + result.detectionConfidence_ = detectionConfidence_; + result.landmarkingConfidence_ = landmarkingConfidence_; + result.joyLikelihood_ = joyLikelihood_; + result.sorrowLikelihood_ = sorrowLikelihood_; + result.angerLikelihood_ = angerLikelihood_; + result.surpriseLikelihood_ = surpriseLikelihood_; + result.underExposedLikelihood_ = underExposedLikelihood_; + result.blurredLikelihood_ = blurredLikelihood_; + result.headwearLikelihood_ = headwearLikelihood_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.FaceAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.FaceAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.hasFdBoundingPoly()) { + mergeFdBoundingPoly(other.getFdBoundingPoly()); + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarksFieldBuilder() : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (other.getRollAngle() != 0F) { + setRollAngle(other.getRollAngle()); + } + if (other.getPanAngle() != 0F) { + setPanAngle(other.getPanAngle()); + } + if (other.getTiltAngle() != 0F) { + setTiltAngle(other.getTiltAngle()); + } + if (other.getDetectionConfidence() != 0F) { + setDetectionConfidence(other.getDetectionConfidence()); + } + if (other.getLandmarkingConfidence() != 0F) { + setLandmarkingConfidence(other.getLandmarkingConfidence()); + } + if (other.joyLikelihood_ != 0) { + setJoyLikelihoodValue(other.getJoyLikelihoodValue()); + } + if (other.sorrowLikelihood_ != 0) { + setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); + } + if (other.angerLikelihood_ != 0) { + setAngerLikelihoodValue(other.getAngerLikelihoodValue()); + } + if (other.surpriseLikelihood_ != 0) { + setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); + } + if (other.underExposedLikelihood_ != 0) { + setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); + } + if (other.blurredLikelihood_ != 0) { + setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); + } + if (other.headwearLikelihood_ != 0) { + setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.FaceAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.FaceAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + public boolean hasFdBoundingPoly() { + return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } else { + return fdBoundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fdBoundingPoly_ = value; + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = builderForValue.build(); + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (fdBoundingPoly_ != null) { + fdBoundingPoly_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); + } else { + fdBoundingPoly_ = value; + } + onChanged(); + } else { + fdBoundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder clearFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + onChanged(); + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { + + onChanged(); + return getFdBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + if (fdBoundingPolyBuilder_ != null) { + return fdBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + return fdBoundingPoly_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getFdBoundingPolyFieldBuilder() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getFdBoundingPoly(), + getParentForChildren(), + isClean()); + fdBoundingPoly_ = null; + } + return fdBoundingPolyBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; + + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().getBuilder(index); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { + return getLandmarksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksBuilderList() { + return getLandmarksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder> + getLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder>( + landmarks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private float rollAngle_ ; + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @param value The rollAngle to set. + * @return This builder for chaining. + */ + public Builder setRollAngle(float value) { + + rollAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return This builder for chaining. + */ + public Builder clearRollAngle() { + + rollAngle_ = 0F; + onChanged(); + return this; + } + + private float panAngle_ ; + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @param value The panAngle to set. + * @return This builder for chaining. + */ + public Builder setPanAngle(float value) { + + panAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return This builder for chaining. + */ + public Builder clearPanAngle() { + + panAngle_ = 0F; + onChanged(); + return this; + } + + private float tiltAngle_ ; + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @param value The tiltAngle to set. + * @return This builder for chaining. + */ + public Builder setTiltAngle(float value) { + + tiltAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return This builder for chaining. + */ + public Builder clearTiltAngle() { + + tiltAngle_ = 0F; + onChanged(); + return this; + } + + private float detectionConfidence_ ; + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @param value The detectionConfidence to set. + * @return This builder for chaining. + */ + public Builder setDetectionConfidence(float value) { + + detectionConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return This builder for chaining. + */ + public Builder clearDetectionConfidence() { + + detectionConfidence_ = 0F; + onChanged(); + return this; + } + + private float landmarkingConfidence_ ; + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @param value The landmarkingConfidence to set. + * @return This builder for chaining. + */ + public Builder setLandmarkingConfidence(float value) { + + landmarkingConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return This builder for chaining. + */ + public Builder clearLandmarkingConfidence() { + + landmarkingConfidence_ = 0F; + onChanged(); + return this; + } + + private int joyLikelihood_ = 0; + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @param value The enum numeric value on the wire for joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihoodValue(int value) { + + joyLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @param value The joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + joyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return This builder for chaining. + */ + public Builder clearJoyLikelihood() { + + joyLikelihood_ = 0; + onChanged(); + return this; + } + + private int sorrowLikelihood_ = 0; + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @param value The enum numeric value on the wire for sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihoodValue(int value) { + + sorrowLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @param value The sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + sorrowLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return This builder for chaining. + */ + public Builder clearSorrowLikelihood() { + + sorrowLikelihood_ = 0; + onChanged(); + return this; + } + + private int angerLikelihood_ = 0; + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @param value The enum numeric value on the wire for angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihoodValue(int value) { + + angerLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @param value The angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + angerLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return This builder for chaining. + */ + public Builder clearAngerLikelihood() { + + angerLikelihood_ = 0; + onChanged(); + return this; + } + + private int surpriseLikelihood_ = 0; + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @param value The enum numeric value on the wire for surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihoodValue(int value) { + + surpriseLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @param value The surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + surpriseLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return This builder for chaining. + */ + public Builder clearSurpriseLikelihood() { + + surpriseLikelihood_ = 0; + onChanged(); + return this; + } + + private int underExposedLikelihood_ = 0; + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @param value The enum numeric value on the wire for underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihoodValue(int value) { + + underExposedLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @param value The underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + underExposedLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return This builder for chaining. + */ + public Builder clearUnderExposedLikelihood() { + + underExposedLikelihood_ = 0; + onChanged(); + return this; + } + + private int blurredLikelihood_ = 0; + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @param value The enum numeric value on the wire for blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihoodValue(int value) { + + blurredLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @param value The blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + blurredLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return This builder for chaining. + */ + public Builder clearBlurredLikelihood() { + + blurredLikelihood_ = 0; + onChanged(); + return this; + } + + private int headwearLikelihood_ = 0; + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @param value The enum numeric value on the wire for headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihoodValue(int value) { + + headwearLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @param value The headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + headwearLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return This builder for chaining. + */ + public Builder clearHeadwearLikelihood() { + + headwearLikelihood_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.FaceAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation) + private static final com.google.cloud.vision.v1p1beta1.FaceAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.FaceAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java new file mode 100644 index 000000000000..81024f41d3d7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java @@ -0,0 +1,328 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface FaceAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.FaceAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + boolean hasFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); + + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + int getLandmarksCount(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksOrBuilderList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index); + + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + float getRollAngle(); + + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + float getPanAngle(); + + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + float getTiltAngle(); + + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + float getDetectionConfidence(); + + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + float getLandmarkingConfidence(); + + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + int getJoyLikelihoodValue(); + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood(); + + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + int getSorrowLikelihoodValue(); + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood(); + + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + int getAngerLikelihoodValue(); + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood(); + + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + int getSurpriseLikelihoodValue(); + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood(); + + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + int getUnderExposedLikelihoodValue(); + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood(); + + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + int getBlurredLikelihoodValue(); + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood(); + + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + int getHeadwearLikelihoodValue(); + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java new file mode 100644 index 000000000000..455bc116a4d3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java @@ -0,0 +1,1109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Users describe the type of Google Cloud Vision API tasks to perform over
+ * images by using *Feature*s. Each Feature indicates a type of image
+ * detection task to perform. Features encode the Cloud Vision API
+ * vertical to operate on and the number of top-scoring results to return.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + type_ = 0; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + maxResults_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Feature.class, com.google.cloud.vision.v1p1beta1.Feature.Builder.class); + } + + /** + *
+   * Type of image feature.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p1beta1.Feature.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + FACE_DETECTION(1), + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + LANDMARK_DETECTION(2), + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + LOGO_DETECTION(3), + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + LABEL_DETECTION(4), + /** + *
+     * Run OCR.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + TEXT_DETECTION(5), + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + DOCUMENT_TEXT_DETECTION(11), + /** + *
+     * Run computer vision models to compute image safe-search properties.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + SAFE_SEARCH_DETECTION(6), + /** + *
+     * Compute a set of image properties, such as the image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + IMAGE_PROPERTIES(7), + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + CROP_HINTS(9), + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + WEB_DETECTION(10), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + public static final int FACE_DETECTION_VALUE = 1; + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + public static final int LANDMARK_DETECTION_VALUE = 2; + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + public static final int LOGO_DETECTION_VALUE = 3; + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + public static final int LABEL_DETECTION_VALUE = 4; + /** + *
+     * Run OCR.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + public static final int TEXT_DETECTION_VALUE = 5; + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; + /** + *
+     * Run computer vision models to compute image safe-search properties.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + public static final int SAFE_SEARCH_DETECTION_VALUE = 6; + /** + *
+     * Compute a set of image properties, such as the image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + public static final int IMAGE_PROPERTIES_VALUE = 7; + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + public static final int CROP_HINTS_VALUE = 9; + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + public static final int WEB_DETECTION_VALUE = 10; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return FACE_DETECTION; + case 2: return LANDMARK_DETECTION; + case 3: return LOGO_DETECTION; + case 4: return LABEL_DETECTION; + case 5: return TEXT_DETECTION; + case 11: return DOCUMENT_TEXT_DETECTION; + case 6: return SAFE_SEARCH_DETECTION; + case 7: return IMAGE_PROPERTIES; + case 9: return CROP_HINTS; + case 10: return WEB_DETECTION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.Feature.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Feature.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Feature.Type result = com.google.cloud.vision.v1p1beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.Feature.Type.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 2; + private int maxResults_; + /** + *
+   * Maximum number of results of this type.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p1beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (maxResults_ != 0) { + output.writeInt32(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p1beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Feature)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Feature other = (com.google.cloud.vision.v1p1beta1.Feature) obj; + + if (type_ != other.type_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Users describe the type of Google Cloud Vision API tasks to perform over
+   * images by using *Feature*s. Each Feature indicates a type of image
+   * detection task to perform. Features encode the Cloud Vision API
+   * vertical to operate on and the number of top-scoring results to return.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Feature) + com.google.cloud.vision.v1p1beta1.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Feature.class, com.google.cloud.vision.v1p1beta1.Feature.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + maxResults_ = 0; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature build() { + com.google.cloud.vision.v1p1beta1.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature buildPartial() { + com.google.cloud.vision.v1p1beta1.Feature result = new com.google.cloud.vision.v1p1beta1.Feature(this); + result.type_ = type_; + result.maxResults_ = maxResults_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Feature) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Feature other) { + if (other == com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Feature.Type result = com.google.cloud.vision.v1p1beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.Feature.Type.UNRECOGNIZED : result; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p1beta1.Feature.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + *
+     * Maximum number of results of this type.
+     * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + *
+     * Maximum number of results of this type.
+     * 
+ * + * int32 max_results = 2; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of results of this type.
+     * 
+ * + * int32 max_results = 2; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + + maxResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The bytes for model. + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Feature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Feature) + private static final com.google.cloud.vision.v1p1beta1.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Feature(); + } + + public static com.google.cloud.vision.v1p1beta1.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java new file mode 100644 index 000000000000..36b8fcf8225b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p1beta1.Feature.Type getType(); + + /** + *
+   * Maximum number of results of this type.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + int getMaxResults(); + + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + java.lang.String getModel(); + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + com.google.protobuf.ByteString + getModelBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java new file mode 100644 index 000000000000..938eae0de41d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +public final class GeometryProto { + private GeometryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1p1beta1/geometry" + + ".proto\022\035google.cloud.vision.v1p1beta1\"\036\n" + + "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"G\n\014Boundin" + + "gPoly\0227\n\010vertices\030\001 \003(\0132%.google.cloud.v" + + "ision.v1p1beta1.Vertex\"+\n\010Position\022\t\n\001x\030" + + "\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B|\n!com.googl" + + "e.cloud.vision.v1p1beta1B\rGeometryProtoP" + + "\001ZCgoogle.golang.org/genproto/googleapis" + + "/cloud/vision/v1p1beta1;vision\370\001\001b\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor, + new java.lang.String[] { "Vertices", }); + internal_static_google_cloud_vision_v1p1beta1_Position_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Position_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java new file mode 100644 index 000000000000..056f55504f86 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Client image to perform Google Cloud Vision API tasks over.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Image} + */ +public final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Image) + ImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + content_ = input.readBytes(); + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.ImageSource.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Image.class, com.google.cloud.vision.v1p1beta1.Image.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: as with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.ImageSource source_; + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return The source. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSource getSource() { + return source_ == null ? com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; + } + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Image)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Image other = (com.google.cloud.vision.v1p1beta1.Image) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Client image to perform Google Cloud Vision API tasks over.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Image) + com.google.cloud.vision.v1p1beta1.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Image.class, com.google.cloud.vision.v1p1beta1.Image.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Image getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Image build() { + com.google.cloud.vision.v1p1beta1.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Image buildPartial() { + com.google.cloud.vision.v1p1beta1.Image result = new com.google.cloud.vision.v1p1beta1.Image(this); + result.content_ = content_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Image) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Image other) { + if (other == com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance()) return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: as with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: as with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: as with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p1beta1.ImageSource source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder> sourceBuilder_; + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return The source. + */ + public com.google.cloud.vision.v1p1beta1.ImageSource getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public Builder setSource(com.google.cloud.vision.v1p1beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public Builder setSource( + com.google.cloud.vision.v1p1beta1.ImageSource.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public Builder mergeSource(com.google.cloud.vision.v1p1beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.vision.v1p1beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p1beta1.ImageSource.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; + } + } + /** + *
+     * Google Cloud Storage image location. If both `content` and `source`
+     * are provided for an image, `content` takes precedence and is
+     * used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Image) + private static final com.google.cloud.vision.v1p1beta1.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Image(); + } + + public static com.google.cloud.vision.v1p1beta1.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java new file mode 100644 index 000000000000..d918478ec86f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java @@ -0,0 +1,475 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public final class ImageAnnotatorProto { + private ImageAnnotatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p1beta1/image_an" + + "notator.proto\022\035google.cloud.vision.v1p1b" + + "eta1\032\034google/api/annotations.proto\032\027goog" + + "le/api/client.proto\032\037google/api/field_be" + + "havior.proto\032,google/cloud/vision/v1p1be" + + "ta1/geometry.proto\0323google/cloud/vision/" + + "v1p1beta1/text_annotation.proto\0321google/" + + "cloud/vision/v1p1beta1/web_detection.pro" + + "to\032\027google/rpc/status.proto\032\027google/type" + + "/color.proto\032\030google/type/latlng.proto\"\341" + + "\002\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.cloud." + + "vision.v1p1beta1.Feature.Type\022\023\n\013max_res" + + "ults\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\366\001\n\004Type\022\024\n\020TY" + + "PE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022" + + "LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003" + + "\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECTION\020" + + "\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_S" + + "EARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022" + + "\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\"7\n\013Im" + + "ageSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timag" + + "e_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content\030\001 \001(\014\022:\n" + + "\006source\030\002 \001(\0132*.google.cloud.vision.v1p1" + + "beta1.ImageSource\"\233\016\n\016FaceAnnotation\022B\n\r" + + "bounding_poly\030\001 \001(\0132+.google.cloud.visio" + + "n.v1p1beta1.BoundingPoly\022E\n\020fd_bounding_" + + "poly\030\002 \001(\0132+.google.cloud.vision.v1p1bet" + + "a1.BoundingPoly\022I\n\tlandmarks\030\003 \003(\01326.goo" + + "gle.cloud.vision.v1p1beta1.FaceAnnotatio" + + "n.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022\021\n\tpan_an" + + "gle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024detecti" + + "on_confidence\030\007 \001(\002\022\036\n\026landmarking_confi" + + "dence\030\010 \001(\002\022A\n\016joy_likelihood\030\t \001(\0162).go" + + "ogle.cloud.vision.v1p1beta1.Likelihood\022D" + + "\n\021sorrow_likelihood\030\n \001(\0162).google.cloud" + + ".vision.v1p1beta1.Likelihood\022C\n\020anger_li" + + "kelihood\030\013 \001(\0162).google.cloud.vision.v1p" + + "1beta1.Likelihood\022F\n\023surprise_likelihood" + + "\030\014 \001(\0162).google.cloud.vision.v1p1beta1.L" + + "ikelihood\022K\n\030under_exposed_likelihood\030\r " + + "\001(\0162).google.cloud.vision.v1p1beta1.Like" + + "lihood\022E\n\022blurred_likelihood\030\016 \001(\0162).goo" + + "gle.cloud.vision.v1p1beta1.Likelihood\022F\n" + + "\023headwear_likelihood\030\017 \001(\0162).google.clou" + + "d.vision.v1p1beta1.Likelihood\032\307\007\n\010Landma" + + "rk\022I\n\004type\030\003 \001(\0162;.google.cloud.vision.v" + + "1p1beta1.FaceAnnotation.Landmark.Type\0229\n" + + "\010position\030\004 \001(\0132\'.google.cloud.vision.v1" + + "p1beta1.Position\"\264\006\n\004Type\022\024\n\020UNKNOWN_LAN" + + "DMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024" + + "LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_" + + "EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026" + + "RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025MIDPOINT_BET" + + "WEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t" + + "\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH" + + "_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n\021NOSE_BOTTO" + + "M_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_" + + "BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY" + + "\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022\022\034\n\030LEFT_EY" + + "E_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_EYE_LEFT_COR" + + "NER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIG" + + "HT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTO" + + "M_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022" + + "\037\n\033LEFT_EYEBROW_UPPER_MIDPOINT\020\031\022 \n\034RIGH" + + "T_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_T" + + "RAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_" + + "EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FORE" + + "HEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CH" + + "IN_LEFT_GONION\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\"" + + "4\n\014LocationInfo\022$\n\007lat_lng\030\001 \001(\0132\023.googl" + + "e.type.LatLng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\274\002\n" + + "\020EntityAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale" + + "\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r\n\005score\030\004 \001" + + "(\002\022\022\n\nconfidence\030\005 \001(\002\022\022\n\ntopicality\030\006 \001" + + "(\002\022B\n\rbounding_poly\030\007 \001(\0132+.google.cloud" + + ".vision.v1p1beta1.BoundingPoly\022>\n\tlocati" + + "ons\030\010 \003(\0132+.google.cloud.vision.v1p1beta" + + "1.LocationInfo\022;\n\nproperties\030\t \003(\0132\'.goo" + + "gle.cloud.vision.v1p1beta1.Property\"\274\002\n\024" + + "SafeSearchAnnotation\0228\n\005adult\030\001 \001(\0162).go" + + "ogle.cloud.vision.v1p1beta1.Likelihood\0228" + + "\n\005spoof\030\002 \001(\0162).google.cloud.vision.v1p1" + + "beta1.Likelihood\022:\n\007medical\030\003 \001(\0162).goog" + + "le.cloud.vision.v1p1beta1.Likelihood\022;\n\010" + + "violence\030\004 \001(\0162).google.cloud.vision.v1p" + + "1beta1.Likelihood\0227\n\004racy\030\t \001(\0162).google" + + ".cloud.vision.v1p1beta1.Likelihood\"a\n\013La" + + "tLongRect\022(\n\013min_lat_lng\030\001 \001(\0132\023.google." + + "type.LatLng\022(\n\013max_lat_lng\030\002 \001(\0132\023.googl" + + "e.type.LatLng\"U\n\tColorInfo\022!\n\005color\030\001 \001(" + + "\0132\022.google.type.Color\022\r\n\005score\030\002 \001(\002\022\026\n\016" + + "pixel_fraction\030\003 \001(\002\"T\n\030DominantColorsAn" + + "notation\0228\n\006colors\030\001 \003(\0132(.google.cloud." + + "vision.v1p1beta1.ColorInfo\"c\n\017ImagePrope" + + "rties\022P\n\017dominant_colors\030\001 \001(\01327.google." + + "cloud.vision.v1p1beta1.DominantColorsAnn" + + "otation\"\177\n\010CropHint\022B\n\rbounding_poly\030\001 \001" + + "(\0132+.google.cloud.vision.v1p1beta1.Bound" + + "ingPoly\022\022\n\nconfidence\030\002 \001(\002\022\033\n\023importanc" + + "e_fraction\030\003 \001(\002\"R\n\023CropHintsAnnotation\022" + + ";\n\ncrop_hints\030\001 \003(\0132\'.google.cloud.visio" + + "n.v1p1beta1.CropHint\"(\n\017CropHintsParams\022" + + "\025\n\raspect_ratios\030\001 \003(\002\"1\n\022WebDetectionPa" + + "rams\022\033\n\023include_geo_results\030\002 \001(\010\"c\n\023Tex" + + "tDetectionParams\022.\n&enable_text_detectio" + + "n_confidence_score\030\t \001(\010\022\034\n\024advanced_ocr" + + "_options\030\013 \003(\t\"\330\002\n\014ImageContext\022A\n\rlat_l" + + "ong_rect\030\001 \001(\0132*.google.cloud.vision.v1p" + + "1beta1.LatLongRect\022\026\n\016language_hints\030\002 \003" + + "(\t\022I\n\021crop_hints_params\030\004 \001(\0132..google.c" + + "loud.vision.v1p1beta1.CropHintsParams\022O\n" + + "\024web_detection_params\030\006 \001(\01321.google.clo" + + "ud.vision.v1p1beta1.WebDetectionParams\022Q" + + "\n\025text_detection_params\030\014 \001(\01322.google.c" + + "loud.vision.v1p1beta1.TextDetectionParam" + + "s\"\311\001\n\024AnnotateImageRequest\0223\n\005image\030\001 \001(" + + "\0132$.google.cloud.vision.v1p1beta1.Image\022" + + "8\n\010features\030\002 \003(\0132&.google.cloud.vision." + + "v1p1beta1.Feature\022B\n\rimage_context\030\003 \001(\013" + + "2+.google.cloud.vision.v1p1beta1.ImageCo" + + "ntext\"\302\006\n\025AnnotateImageResponse\022G\n\020face_" + + "annotations\030\001 \003(\0132-.google.cloud.vision." + + "v1p1beta1.FaceAnnotation\022M\n\024landmark_ann" + + "otations\030\002 \003(\0132/.google.cloud.vision.v1p" + + "1beta1.EntityAnnotation\022I\n\020logo_annotati" + + "ons\030\003 \003(\0132/.google.cloud.vision.v1p1beta" + + "1.EntityAnnotation\022J\n\021label_annotations\030" + + "\004 \003(\0132/.google.cloud.vision.v1p1beta1.En" + + "tityAnnotation\022I\n\020text_annotations\030\005 \003(\013" + + "2/.google.cloud.vision.v1p1beta1.EntityA" + + "nnotation\022K\n\024full_text_annotation\030\014 \001(\0132" + + "-.google.cloud.vision.v1p1beta1.TextAnno" + + "tation\022S\n\026safe_search_annotation\030\006 \001(\01323" + + ".google.cloud.vision.v1p1beta1.SafeSearc" + + "hAnnotation\022S\n\033image_properties_annotati" + + "on\030\010 \001(\0132..google.cloud.vision.v1p1beta1" + + ".ImageProperties\022Q\n\025crop_hints_annotatio" + + "n\030\013 \001(\01322.google.cloud.vision.v1p1beta1." + + "CropHintsAnnotation\022B\n\rweb_detection\030\r \001" + + "(\0132+.google.cloud.vision.v1p1beta1.WebDe" + + "tection\022!\n\005error\030\t \001(\0132\022.google.rpc.Stat" + + "us\"h\n\032BatchAnnotateImagesRequest\022J\n\010requ" + + "ests\030\001 \003(\01323.google.cloud.vision.v1p1bet" + + "a1.AnnotateImageRequestB\003\340A\002\"f\n\033BatchAnn" + + "otateImagesResponse\022G\n\tresponses\030\001 \003(\01324" + + ".google.cloud.vision.v1p1beta1.AnnotateI" + + "mageResponse*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022" + + "\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSS" + + "IBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\311\002\n\016" + + "ImageAnnotator\022\276\001\n\023BatchAnnotateImages\0229" + + ".google.cloud.vision.v1p1beta1.BatchAnno" + + "tateImagesRequest\032:.google.cloud.vision." + + "v1p1beta1.BatchAnnotateImagesResponse\"0\202" + + "\323\344\223\002\037\"\032/v1p1beta1/images:annotate:\001*\332A\010r" + + "equests\032v\312A\025vision.googleapis.com\322A[http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rm,https://www.googleapis.com/auth/cloud" + + "-visionB\202\001\n!com.google.cloud.vision.v1p1" + + "beta1B\023ImageAnnotatorProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p1beta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p1beta1.TextAnnotationProto.getDescriptor(), + com.google.cloud.vision.v1p1beta1.WebDetectionProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.ColorProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor, + new java.lang.String[] { "Type", "MaxResults", "Model", }); + internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor, + new java.lang.String[] { "GcsImageUri", "ImageUri", }); + internal_static_google_cloud_vision_v1p1beta1_Image_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Image_descriptor, + new java.lang.String[] { "Content", "Source", }); + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor, + new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor = + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor, + new java.lang.String[] { "Type", "Position", }); + internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor, + new java.lang.String[] { "LatLng", }); + internal_static_google_cloud_vision_v1p1beta1_Property_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Property_descriptor, + new java.lang.String[] { "Name", "Value", "Uint64Value", }); + internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor, + new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); + internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor, + new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); + internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor, + new java.lang.String[] { "MinLatLng", "MaxLatLng", }); + internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor, + new java.lang.String[] { "Color", "Score", "PixelFraction", }); + internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor, + new java.lang.String[] { "Colors", }); + internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor, + new java.lang.String[] { "DominantColors", }); + internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor, + new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); + internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor, + new java.lang.String[] { "CropHints", }); + internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor, + new java.lang.String[] { "AspectRatios", }); + internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor, + new java.lang.String[] { "IncludeGeoResults", }); + internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor, + new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); + internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor, + new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "WebDetectionParams", "TextDetectionParams", }); + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor, + new java.lang.String[] { "Image", "Features", "ImageContext", }); + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor, + new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "Error", }); + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor, + new java.lang.String[] { "Responses", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p1beta1.TextAnnotationProto.getDescriptor(); + com.google.cloud.vision.v1p1beta1.WebDetectionProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.ColorProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java new file mode 100644 index 000000000000..444455c6ed36 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java @@ -0,0 +1,1711 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Image context and/or feature-specific parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageContext} + */ +public final class ImageContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageContext) + ImageContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageContext.newBuilder() to construct. + private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageContext() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.LatLongRect.Builder subBuilder = null; + if (latLongRect_ != null) { + subBuilder = latLongRect_.toBuilder(); + } + latLongRect_ = input.readMessage(com.google.cloud.vision.v1p1beta1.LatLongRect.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLongRect_); + latLongRect_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + case 34: { + com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder subBuilder = null; + if (cropHintsParams_ != null) { + subBuilder = cropHintsParams_.toBuilder(); + } + cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.CropHintsParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsParams_); + cropHintsParams_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder subBuilder = null; + if (webDetectionParams_ != null) { + subBuilder = webDetectionParams_.toBuilder(); + } + webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetectionParams_); + webDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder subBuilder = null; + if (textDetectionParams_ != null) { + subBuilder = textDetectionParams_.toBuilder(); + } + textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionParams_); + textDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageContext.class, com.google.cloud.vision.v1p1beta1.ImageContext.Builder.class); + } + + public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_; + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + @java.lang.Override + public boolean hasLatLongRect() { + return latLongRect_ != null; + } + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect() { + return latLongRect_ == null ? com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + return getLatLongRect(); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList languageHints_; + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_; + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_; + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + @java.lang.Override + public boolean hasCropHintsParams() { + return cropHintsParams_ != null; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams() { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + return getCropHintsParams(); + } + + public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_; + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + @java.lang.Override + public boolean hasWebDetectionParams() { + return webDetectionParams_ != null; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams() { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + return getWebDetectionParams(); + } + + public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p1beta1.TextDetectionParams textDetectionParams_; + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + @java.lang.Override + public boolean hasTextDetectionParams() { + return textDetectionParams_ != null; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams() { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + return getTextDetectionParams(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLongRect_ != null) { + output.writeMessage(1, getLatLongRect()); + } + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); + } + if (cropHintsParams_ != null) { + output.writeMessage(4, getCropHintsParams()); + } + if (webDetectionParams_ != null) { + output.writeMessage(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + output.writeMessage(12, getTextDetectionParams()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLongRect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLongRect()); + } + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + if (cropHintsParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCropHintsParams()); + } + if (webDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTextDetectionParams()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.ImageContext other = (com.google.cloud.vision.v1p1beta1.ImageContext) obj; + + if (hasLatLongRect() != other.hasLatLongRect()) return false; + if (hasLatLongRect()) { + if (!getLatLongRect() + .equals(other.getLatLongRect())) return false; + } + if (!getLanguageHintsList() + .equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; + if (hasCropHintsParams()) { + if (!getCropHintsParams() + .equals(other.getCropHintsParams())) return false; + } + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; + if (hasWebDetectionParams()) { + if (!getWebDetectionParams() + .equals(other.getWebDetectionParams())) return false; + } + if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; + if (hasTextDetectionParams()) { + if (!getTextDetectionParams() + .equals(other.getTextDetectionParams())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLongRect()) { + hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; + hash = (53 * hash) + getLatLongRect().hashCode(); + } + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + if (hasCropHintsParams()) { + hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsParams().hashCode(); + } + if (hasWebDetectionParams()) { + hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getWebDetectionParams().hashCode(); + } + if (hasTextDetectionParams()) { + hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Image context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageContext) + com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageContext.class, com.google.cloud.vision.v1p1beta1.ImageContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.ImageContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContext build() { + com.google.cloud.vision.v1p1beta1.ImageContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContext buildPartial() { + com.google.cloud.vision.v1p1beta1.ImageContext result = new com.google.cloud.vision.v1p1beta1.ImageContext(this); + int from_bitField0_ = bitField0_; + if (latLongRectBuilder_ == null) { + result.latLongRect_ = latLongRect_; + } else { + result.latLongRect_ = latLongRectBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + if (cropHintsParamsBuilder_ == null) { + result.cropHintsParams_ = cropHintsParams_; + } else { + result.cropHintsParams_ = cropHintsParamsBuilder_.build(); + } + if (webDetectionParamsBuilder_ == null) { + result.webDetectionParams_ = webDetectionParams_; + } else { + result.webDetectionParams_ = webDetectionParamsBuilder_.build(); + } + if (textDetectionParamsBuilder_ == null) { + result.textDetectionParams_ = textDetectionParams_; + } else { + result.textDetectionParams_ = textDetectionParamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.ImageContext) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageContext other) { + if (other == com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance()) return this; + if (other.hasLatLongRect()) { + mergeLatLongRect(other.getLatLongRect()); + } + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + if (other.hasCropHintsParams()) { + mergeCropHintsParams(other.getCropHintsParams()); + } + if (other.hasWebDetectionParams()) { + mergeWebDetectionParams(other.getWebDetectionParams()); + } + if (other.hasTextDetectionParams()) { + mergeTextDetectionParams(other.getTextDetectionParams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.ImageContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder> latLongRectBuilder_; + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + public boolean hasLatLongRect() { + return latLongRectBuilder_ != null || latLongRect_ != null; + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + public com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect() { + if (latLongRectBuilder_ == null) { + return latLongRect_ == null ? com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } else { + return latLongRectBuilder_.getMessage(); + } + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect(com.google.cloud.vision.v1p1beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLongRect_ = value; + onChanged(); + } else { + latLongRectBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect( + com.google.cloud.vision.v1p1beta1.LatLongRect.Builder builderForValue) { + if (latLongRectBuilder_ == null) { + latLongRect_ = builderForValue.build(); + onChanged(); + } else { + latLongRectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public Builder mergeLatLongRect(com.google.cloud.vision.v1p1beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (latLongRect_ != null) { + latLongRect_ = + com.google.cloud.vision.v1p1beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); + } else { + latLongRect_ = value; + } + onChanged(); + } else { + latLongRectBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public Builder clearLatLongRect() { + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + onChanged(); + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p1beta1.LatLongRect.Builder getLatLongRectBuilder() { + + onChanged(); + return getLatLongRectFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + if (latLongRectBuilder_ != null) { + return latLongRectBuilder_.getMessageOrBuilder(); + } else { + return latLongRect_ == null ? + com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + } + /** + *
+     * lat/long rectangle that specifies the location of the image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder> + getLatLongRectFieldBuilder() { + if (latLongRectBuilder_ == null) { + latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder>( + getLatLongRect(), + getParentForChildren(), + isClean()); + latLongRect_ = null; + } + return latLongRectBuilder_; + } + + private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints( + java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languageHints_); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + public boolean hasCropHintsParams() { + return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + public com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } else { + return cropHintsParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams(com.google.cloud.vision.v1p1beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsParams_ = value; + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams( + com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder builderForValue) { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = builderForValue.build(); + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder mergeCropHintsParams(com.google.cloud.vision.v1p1beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (cropHintsParams_ != null) { + cropHintsParams_ = + com.google.cloud.vision.v1p1beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); + } else { + cropHintsParams_ = value; + } + onChanged(); + } else { + cropHintsParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder clearCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + onChanged(); + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { + + onChanged(); + return getCropHintsParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + if (cropHintsParamsBuilder_ != null) { + return cropHintsParamsBuilder_.getMessageOrBuilder(); + } else { + return cropHintsParams_ == null ? + com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder> + getCropHintsParamsFieldBuilder() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder>( + getCropHintsParams(), + getParentForChildren(), + isClean()); + cropHintsParams_ = null; + } + return cropHintsParamsBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + public boolean hasWebDetectionParams() { + return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + public com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } else { + return webDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams(com.google.cloud.vision.v1p1beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetectionParams_ = value; + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams( + com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder builderForValue) { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p1beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (webDetectionParams_ != null) { + webDetectionParams_ = + com.google.cloud.vision.v1p1beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); + } else { + webDetectionParams_ = value; + } + onChanged(); + } else { + webDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder clearWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + onChanged(); + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { + + onChanged(); + return getWebDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + if (webDetectionParamsBuilder_ != null) { + return webDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return webDetectionParams_ == null ? + com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder> + getWebDetectionParamsFieldBuilder() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder>( + getWebDetectionParams(), + getParentForChildren(), + isClean()); + webDetectionParams_ = null; + } + return webDetectionParamsBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.TextDetectionParams textDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + public boolean hasTextDetectionParams() { + return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + public com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } else { + return textDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams(com.google.cloud.vision.v1p1beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionParams_ = value; + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams( + com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder builderForValue) { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p1beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (textDetectionParams_ != null) { + textDetectionParams_ = + com.google.cloud.vision.v1p1beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); + } else { + textDetectionParams_ = value; + } + onChanged(); + } else { + textDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder clearTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + onChanged(); + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { + + onChanged(); + return getTextDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + if (textDetectionParamsBuilder_ != null) { + return textDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return textDetectionParams_ == null ? + com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder> + getTextDetectionParamsFieldBuilder() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder>( + getTextDetectionParams(), + getParentForChildren(), + isClean()); + textDetectionParams_ = null; + } + return textDetectionParamsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageContext) + private static final com.google.cloud.vision.v1p1beta1.ImageContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageContext(); + } + + public static com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java new file mode 100644 index 000000000000..ae176ee844ec --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java @@ -0,0 +1,186 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ImageContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + boolean hasLatLongRect(); + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect(); + /** + *
+   * lat/long rectangle that specifies the location of the image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; + */ + com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); + + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + java.util.List + getLanguageHintsList(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString + getLanguageHintsBytes(int index); + + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + boolean hasCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; + */ + com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); + + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + boolean hasWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; + */ + com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); + + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + boolean hasTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; + */ + com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java new file mode 100644 index 000000000000..02874223184b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: as with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + * @return The source. + */ + com.google.cloud.vision.v1p1beta1.ImageSource getSource(); + /** + *
+   * Google Cloud Storage image location. If both `content` and `source`
+   * are provided for an image, `content` takes precedence and is
+   * used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.ImageSource source = 2; + */ + com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java new file mode 100644 index 000000000000..2850e0cd1034 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Stores image properties, such as dominant colors.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageProperties} + */ +public final class ImageProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageProperties) + ImagePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageProperties.newBuilder() to construct. + private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageProperties() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder subBuilder = null; + if (dominantColors_ != null) { + subBuilder = dominantColors_.toBuilder(); + } + dominantColors_ = input.readMessage(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dominantColors_); + dominantColors_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageProperties.class, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder.class); + } + + public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_; + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + @java.lang.Override + public boolean hasDominantColors() { + return dominantColors_ != null; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors() { + return dominantColors_ == null ? com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + return getDominantColors(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dominantColors_ != null) { + output.writeMessage(1, getDominantColors()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dominantColors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDominantColors()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageProperties)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.ImageProperties other = (com.google.cloud.vision.v1p1beta1.ImageProperties) obj; + + if (hasDominantColors() != other.hasDominantColors()) return false; + if (hasDominantColors()) { + if (!getDominantColors() + .equals(other.getDominantColors())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDominantColors()) { + hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; + hash = (53 * hash) + getDominantColors().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores image properties, such as dominant colors.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageProperties) + com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageProperties.class, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.ImageProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageProperties build() { + com.google.cloud.vision.v1p1beta1.ImageProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageProperties buildPartial() { + com.google.cloud.vision.v1p1beta1.ImageProperties result = new com.google.cloud.vision.v1p1beta1.ImageProperties(this); + if (dominantColorsBuilder_ == null) { + result.dominantColors_ = dominantColors_; + } else { + result.dominantColors_ = dominantColorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.ImageProperties) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageProperties other) { + if (other == com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance()) return this; + if (other.hasDominantColors()) { + mergeDominantColors(other.getDominantColors()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.ImageProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + public boolean hasDominantColors() { + return dominantColorsBuilder_ != null || dominantColors_ != null; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors() { + if (dominantColorsBuilder_ == null) { + return dominantColors_ == null ? com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } else { + return dominantColorsBuilder_.getMessage(); + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dominantColors_ = value; + onChanged(); + } else { + dominantColorsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors( + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder builderForValue) { + if (dominantColorsBuilder_ == null) { + dominantColors_ = builderForValue.build(); + onChanged(); + } else { + dominantColorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder mergeDominantColors(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (dominantColors_ != null) { + dominantColors_ = + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); + } else { + dominantColors_ = value; + } + onChanged(); + } else { + dominantColorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder clearDominantColors() { + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + onChanged(); + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { + + onChanged(); + return getDominantColorsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + if (dominantColorsBuilder_ != null) { + return dominantColorsBuilder_.getMessageOrBuilder(); + } else { + return dominantColors_ == null ? + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder> + getDominantColorsFieldBuilder() { + if (dominantColorsBuilder_ == null) { + dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder>( + getDominantColors(), + getParentForChildren(), + isClean()); + dominantColors_ = null; + } + return dominantColorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageProperties) + private static final com.google.cloud.vision.v1p1beta1.ImageProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageProperties(); + } + + public static com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java new file mode 100644 index 000000000000..ca186d7d13db --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ImagePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + boolean hasDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; + */ + com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java new file mode 100644 index 000000000000..6649bab9dcc0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java @@ -0,0 +1,859 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * External image source (Google Cloud Storage image location).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageSource} + */ +public final class ImageSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageSource) + ImageSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageSource.newBuilder() to construct. + private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageSource() { + gcsImageUri_ = ""; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + gcsImageUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageSource.class, com.google.cloud.vision.v1p1beta1.ImageSource.Builder.class); + } + + public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsImageUri_; + /** + *
+   * NOTE: For new code `image_uri` below is preferred.
+   * Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + @java.lang.Override + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } + } + /** + *
+   * NOTE: For new code `image_uri` below is preferred.
+   * Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + *
+   * Image URI which supports:
+   * 1) Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 2) Publicly accessible image HTTP/HTTPS URL.
+   * This is preferred over the legacy `gcs_image_uri` above. When both
+   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + *
+   * Image URI which supports:
+   * 1) Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 2) Publicly accessible image HTTP/HTTPS URL.
+   * This is preferred over the legacy `gcs_image_uri` above. When both
+   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.ImageSource other = (com.google.cloud.vision.v1p1beta1.ImageSource) obj; + + if (!getGcsImageUri() + .equals(other.getGcsImageUri())) return false; + if (!getImageUri() + .equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsImageUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * External image source (Google Cloud Storage image location).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageSource) + com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.ImageSource.class, com.google.cloud.vision.v1p1beta1.ImageSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.ImageSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + gcsImageUri_ = ""; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSource build() { + com.google.cloud.vision.v1p1beta1.ImageSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSource buildPartial() { + com.google.cloud.vision.v1p1beta1.ImageSource result = new com.google.cloud.vision.v1p1beta1.ImageSource(this); + result.gcsImageUri_ = gcsImageUri_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.ImageSource) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageSource other) { + if (other == com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance()) return this; + if (!other.getGcsImageUri().isEmpty()) { + gcsImageUri_ = other.gcsImageUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.ImageSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsImageUri_ = ""; + /** + *
+     * NOTE: For new code `image_uri` below is preferred.
+     * Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * NOTE: For new code `image_uri` below is preferred.
+     * Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * NOTE: For new code `image_uri` below is preferred.
+     * Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsImageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * NOTE: For new code `image_uri` below is preferred.
+     * Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 
+ * + * string gcs_image_uri = 1; + * @return This builder for chaining. + */ + public Builder clearGcsImageUri() { + + gcsImageUri_ = getDefaultInstance().getGcsImageUri(); + onChanged(); + return this; + } + /** + *
+     * NOTE: For new code `image_uri` below is preferred.
+     * Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The bytes for gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + *
+     * Image URI which supports:
+     * 1) Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 2) Publicly accessible image HTTP/HTTPS URL.
+     * This is preferred over the legacy `gcs_image_uri` above. When both
+     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Image URI which supports:
+     * 1) Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 2) Publicly accessible image HTTP/HTTPS URL.
+     * This is preferred over the legacy `gcs_image_uri` above. When both
+     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Image URI which supports:
+     * 1) Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 2) Publicly accessible image HTTP/HTTPS URL.
+     * This is preferred over the legacy `gcs_image_uri` above. When both
+     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * Image URI which supports:
+     * 1) Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 2) Publicly accessible image HTTP/HTTPS URL.
+     * This is preferred over the legacy `gcs_image_uri` above. When both
+     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + *
+     * Image URI which supports:
+     * 1) Google Cloud Storage image URI, which must be in the following form:
+     * `gs://bucket_name/object_name` (for details, see
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+     * NOTE: Cloud Storage object versioning is not supported.
+     * 2) Publicly accessible image HTTP/HTTPS URL.
+     * This is preferred over the legacy `gcs_image_uri` above. When both
+     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageSource) + private static final com.google.cloud.vision.v1p1beta1.ImageSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageSource(); + } + + public static com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java new file mode 100644 index 000000000000..6ecdd6db2e87 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ImageSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * NOTE: For new code `image_uri` below is preferred.
+   * Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + java.lang.String getGcsImageUri(); + /** + *
+   * NOTE: For new code `image_uri` below is preferred.
+   * Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + com.google.protobuf.ByteString + getGcsImageUriBytes(); + + /** + *
+   * Image URI which supports:
+   * 1) Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 2) Publicly accessible image HTTP/HTTPS URL.
+   * This is preferred over the legacy `gcs_image_uri` above. When both
+   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + *
+   * Image URI which supports:
+   * 1) Google Cloud Storage image URI, which must be in the following form:
+   * `gs://bucket_name/object_name` (for details, see
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
+   * NOTE: Cloud Storage object versioning is not supported.
+   * 2) Publicly accessible image HTTP/HTTPS URL.
+   * This is preferred over the legacy `gcs_image_uri` above. When both
+   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString + getImageUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java new file mode 100644 index 000000000000..30513a85cb7a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Rectangle determined by min and max `LatLng` pairs.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.LatLongRect} + */ +public final class LatLongRect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.LatLongRect) + LatLongRectOrBuilder { +private static final long serialVersionUID = 0L; + // Use LatLongRect.newBuilder() to construct. + private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LatLongRect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LatLongRect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LatLongRect( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (minLatLng_ != null) { + subBuilder = minLatLng_.toBuilder(); + } + minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minLatLng_); + minLatLng_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.type.LatLng.Builder subBuilder = null; + if (maxLatLng_ != null) { + subBuilder = maxLatLng_.toBuilder(); + } + maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxLatLng_); + maxLatLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.LatLongRect.class, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder.class); + } + + public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng minLatLng_; + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + @java.lang.Override + public boolean hasMinLatLng() { + return minLatLng_ != null; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMinLatLng() { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + return getMinLatLng(); + } + + public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; + private com.google.type.LatLng maxLatLng_; + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + @java.lang.Override + public boolean hasMaxLatLng() { + return maxLatLng_ != null; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMaxLatLng() { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + return getMaxLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minLatLng_ != null) { + output.writeMessage(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + output.writeMessage(2, getMaxLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.LatLongRect)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.LatLongRect other = (com.google.cloud.vision.v1p1beta1.LatLongRect) obj; + + if (hasMinLatLng() != other.hasMinLatLng()) return false; + if (hasMinLatLng()) { + if (!getMinLatLng() + .equals(other.getMinLatLng())) return false; + } + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; + if (hasMaxLatLng()) { + if (!getMaxLatLng() + .equals(other.getMaxLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinLatLng()) { + hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMinLatLng().hashCode(); + } + if (hasMaxLatLng()) { + hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMaxLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.LatLongRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rectangle determined by min and max `LatLng` pairs.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.LatLongRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.LatLongRect) + com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.LatLongRect.class, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.LatLongRect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRect build() { + com.google.cloud.vision.v1p1beta1.LatLongRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRect buildPartial() { + com.google.cloud.vision.v1p1beta1.LatLongRect result = new com.google.cloud.vision.v1p1beta1.LatLongRect(this); + if (minLatLngBuilder_ == null) { + result.minLatLng_ = minLatLng_; + } else { + result.minLatLng_ = minLatLngBuilder_.build(); + } + if (maxLatLngBuilder_ == null) { + result.maxLatLng_ = maxLatLng_; + } else { + result.maxLatLng_ = maxLatLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.LatLongRect) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.LatLongRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.LatLongRect other) { + if (other == com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance()) return this; + if (other.hasMinLatLng()) { + mergeMinLatLng(other.getMinLatLng()); + } + if (other.hasMaxLatLng()) { + mergeMaxLatLng(other.getMaxLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.LatLongRect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.LatLongRect) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng minLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + public boolean hasMinLatLng() { + return minLatLngBuilder_ != null || minLatLng_ != null; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + public com.google.type.LatLng getMinLatLng() { + if (minLatLngBuilder_ == null) { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } else { + return minLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minLatLng_ = value; + onChanged(); + } else { + minLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (minLatLngBuilder_ == null) { + minLatLng_ = builderForValue.build(); + onChanged(); + } else { + minLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder mergeMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (minLatLng_ != null) { + minLatLng_ = + com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); + } else { + minLatLng_ = value; + } + onChanged(); + } else { + minLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder clearMinLatLng() { + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + onChanged(); + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLng.Builder getMinLatLngBuilder() { + + onChanged(); + return getMinLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + if (minLatLngBuilder_ != null) { + return minLatLngBuilder_.getMessageOrBuilder(); + } else { + return minLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMinLatLngFieldBuilder() { + if (minLatLngBuilder_ == null) { + minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMinLatLng(), + getParentForChildren(), + isClean()); + minLatLng_ = null; + } + return minLatLngBuilder_; + } + + private com.google.type.LatLng maxLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + public boolean hasMaxLatLng() { + return maxLatLngBuilder_ != null || maxLatLng_ != null; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + public com.google.type.LatLng getMaxLatLng() { + if (maxLatLngBuilder_ == null) { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } else { + return maxLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxLatLng_ = value; + onChanged(); + } else { + maxLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = builderForValue.build(); + onChanged(); + } else { + maxLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder mergeMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (maxLatLng_ != null) { + maxLatLng_ = + com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); + } else { + maxLatLng_ = value; + } + onChanged(); + } else { + maxLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder clearMaxLatLng() { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + onChanged(); + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLng.Builder getMaxLatLngBuilder() { + + onChanged(); + return getMaxLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + if (maxLatLngBuilder_ != null) { + return maxLatLngBuilder_.getMessageOrBuilder(); + } else { + return maxLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMaxLatLngFieldBuilder() { + if (maxLatLngBuilder_ == null) { + maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMaxLatLng(), + getParentForChildren(), + isClean()); + maxLatLng_ = null; + } + return maxLatLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.LatLongRect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LatLongRect) + private static final com.google.cloud.vision.v1p1beta1.LatLongRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.LatLongRect(); + } + + public static com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatLongRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatLongRect(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java new file mode 100644 index 000000000000..5b7a3f94dee5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface LatLongRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.LatLongRect) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + boolean hasMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + com.google.type.LatLng getMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); + + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + boolean hasMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + com.google.type.LatLng getMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java new file mode 100644 index 000000000000..aef339b3b06b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A bucketized representation of likelihood, which is intended to give clients
+ * highly stable results across model upgrades.
+ * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p1beta1.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Likelihood) +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java new file mode 100644 index 000000000000..bc899c218fd6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Detected entity location information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.LocationInfo} + */ +public final class LocationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.LocationInfo) + LocationInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.LocationInfo.class, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder.class); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng latLng_; + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLng_ != null) { + output.writeMessage(1, getLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.LocationInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.LocationInfo other = (com.google.cloud.vision.v1p1beta1.LocationInfo) obj; + + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng() + .equals(other.getLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.LocationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected entity location information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.LocationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.LocationInfo) + com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.LocationInfo.class, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.LocationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfo build() { + com.google.cloud.vision.v1p1beta1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfo buildPartial() { + com.google.cloud.vision.v1p1beta1.LocationInfo result = new com.google.cloud.vision.v1p1beta1.LocationInfo(this); + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.LocationInfo) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.LocationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.LocationInfo other) { + if (other == com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()) return this; + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.LocationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.LocationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = + com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getLatLng(), + getParentForChildren(), + isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LocationInfo) + private static final com.google.cloud.vision.v1p1beta1.LocationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.LocationInfo(); + } + + public static com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..e5cfd64a4634 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface LocationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java new file mode 100644 index 000000000000..6105d55b5f73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java @@ -0,0 +1,1350 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Detected page from OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Page} + */ +public final class Page extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Page) + PageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Page() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Page(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blocks_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Block.parser(), extensionRegistry)); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Page.class, com.google.cloud.vision.v1p1beta1.Page.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+   * Page width in pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+   * Page height in pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int BLOCKS_FIELD_NUMBER = 4; + private java.util.List blocks_; + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Page)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Page other = (com.google.cloud.vision.v1p1beta1.Page) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getBlocksList() + .equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Page prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected page from OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Page} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Page) + com.google.cloud.vision.v1p1beta1.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Page.class, com.google.cloud.vision.v1p1beta1.Page.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + width_ = 0; + + height_ = 0; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Page getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Page build() { + com.google.cloud.vision.v1p1beta1.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Page buildPartial() { + com.google.cloud.vision.v1p1beta1.Page result = new com.google.cloud.vision.v1p1beta1.Page(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + result.width_ = width_; + result.height_ = height_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Page) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Page other) { + if (other == com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Page) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private int width_ ; + /** + *
+     * Page width in pixels.
+     * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Page width in pixels.
+     * 
+ * + * int32 width = 2; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Page width in pixels.
+     * 
+ * + * int32 width = 2; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Page height in pixels.
+     * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Page height in pixels.
+     * 
+ * + * int32 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Page height in pixels.
+     * 
+ * + * int32 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder> blocksBuilder_; + + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p1beta1.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p1beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder addBlocks(com.google.cloud.vision.v1p1beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p1beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder addBlocks( + com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p1beta1.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p1beta1.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p1beta1.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Page) + private static final com.google.cloud.vision.v1p1beta1.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Page(); + } + + public static com.google.cloud.vision.v1p1beta1.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Page(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java new file mode 100644 index 000000000000..59a47d4bc9de --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Page) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * Page width in pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Page height in pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + int getHeight(); + + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + java.util.List + getBlocksList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p1beta1.Block getBlocks(int index); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + int getBlocksCount(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java new file mode 100644 index 000000000000..ce2093bbb47c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Structural unit of text representing a number of words in certain order.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Paragraph} + */ +public final class Paragraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Paragraph) + ParagraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Paragraph() { + words_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Paragraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Paragraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Word.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Paragraph.class, com.google.cloud.vision.v1p1beta1.Paragraph.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int WORDS_FIELD_NUMBER = 3; + private java.util.List words_; + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List getWordsList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List + getWordsOrBuilderList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + @java.lang.Override + public int getWordsCount() { + return words_.size(); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Word getWords(int index) { + return words_.get(index); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( + int index) { + return words_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + output.writeMessage(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Paragraph other = (com.google.cloud.vision.v1p1beta1.Paragraph) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Paragraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structural unit of text representing a number of words in certain order.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Paragraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Paragraph) + com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Paragraph.class, com.google.cloud.vision.v1p1beta1.Paragraph.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Paragraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + wordsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Paragraph build() { + com.google.cloud.vision.v1p1beta1.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Paragraph buildPartial() { + com.google.cloud.vision.v1p1beta1.Paragraph result = new com.google.cloud.vision.v1p1beta1.Paragraph(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (wordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + } else { + result.words_ = wordsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Paragraph) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Paragraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Paragraph other) { + if (other == com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (wordsBuilder_ == null) { + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + } else { + if (!other.words_.isEmpty()) { + if (wordsBuilder_.isEmpty()) { + wordsBuilder_.dispose(); + wordsBuilder_ = null; + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + wordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWordsFieldBuilder() : null; + } else { + wordsBuilder_.addAllMessages(other.words_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Paragraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Paragraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List words_ = + java.util.Collections.emptyList(); + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(words_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder> wordsBuilder_; + + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public java.util.List getWordsList() { + if (wordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(words_); + } else { + return wordsBuilder_.getMessageList(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public int getWordsCount() { + if (wordsBuilder_ == null) { + return words_.size(); + } else { + return wordsBuilder_.getCount(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p1beta1.Word getWords(int index) { + if (wordsBuilder_ == null) { + return words_.get(index); + } else { + return wordsBuilder_.getMessage(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p1beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + } else { + wordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.set(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder addWords(com.google.cloud.vision.v1p1beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + } else { + wordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p1beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(index, value); + onChanged(); + } else { + wordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder addWords( + com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder addAllWords( + java.lang.Iterable values) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + } else { + wordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder clearWords() { + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wordsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public Builder removeWords(int index) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.remove(index); + onChanged(); + } else { + wordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p1beta1.Word.Builder getWordsBuilder( + int index) { + return getWordsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( + int index) { + if (wordsBuilder_ == null) { + return words_.get(index); } else { + return wordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public java.util.List + getWordsOrBuilderList() { + if (wordsBuilder_ != null) { + return wordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(words_); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p1beta1.Word.Builder addWordsBuilder() { + return getWordsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p1beta1.Word.Builder addWordsBuilder( + int index) { + return getWordsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + public java.util.List + getWordsBuilderList() { + return getWordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder> + getWordsFieldBuilder() { + if (wordsBuilder_ == null) { + wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder>( + words_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + words_ = null; + } + return wordsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Paragraph) + private static final com.google.cloud.vision.v1p1beta1.Paragraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Paragraph(); + } + + public static com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Paragraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java new file mode 100644 index 000000000000..7e8db9054b48 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface ParagraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Paragraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + java.util.List + getWordsList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + com.google.cloud.vision.v1p1beta1.Word getWords(int index); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + int getWordsCount(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + java.util.List + getWordsOrBuilderList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Word words = 3; + */ + com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java new file mode 100644 index 000000000000..02237f2413e6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A 3D position in the image, used primarily for Face detection landmarks.
+ * A valid Position must have both x and y coordinates.
+ * The position coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Position} + */ +public final class Position extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Position) + PositionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Position.newBuilder() to construct. + private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Position() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Position(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Position( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + case 29: { + + z_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Position.class, com.google.cloud.vision.v1p1beta1.Position.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_; + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Position)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Position other = (com.google.cloud.vision.v1p1beta1.Position) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Position parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Position parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 3D position in the image, used primarily for Face detection landmarks.
+   * A valid Position must have both x and y coordinates.
+   * The position coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Position} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Position) + com.google.cloud.vision.v1p1beta1.PositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Position.class, com.google.cloud.vision.v1p1beta1.Position.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Position.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + z_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Position getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Position build() { + com.google.cloud.vision.v1p1beta1.Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Position buildPartial() { + com.google.cloud.vision.v1p1beta1.Position result = new com.google.cloud.vision.v1p1beta1.Position(this); + result.x_ = x_; + result.y_ = y_; + result.z_ = z_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Position) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Position)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Position other) { + if (other == com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Position parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + onChanged(); + return this; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + + z_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Position) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Position) + private static final com.google.cloud.vision.v1p1beta1.Position DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Position(); + } + + public static com.google.cloud.vision.v1p1beta1.Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Position parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Position(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java new file mode 100644 index 000000000000..2ba8c03f086f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface PositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Position) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); + + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + float getZ(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java new file mode 100644 index 000000000000..497914bdda12 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A `Property` consists of a user-supplied name/value pair.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Property} + */ +public final class Property extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Property) + PropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Property() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: { + + uint64Value_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Property.class, com.google.cloud.vision.v1p1beta1.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UINT64_VALUE_FIELD_NUMBER = 3; + private long uint64Value_; + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (uint64Value_ != 0L) { + output.writeUInt64(3, uint64Value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (uint64Value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, uint64Value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Property)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Property other = (com.google.cloud.vision.v1p1beta1.Property) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getUint64Value() + != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint64Value()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Property parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Property prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `Property` consists of a user-supplied name/value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Property} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Property) + com.google.cloud.vision.v1p1beta1.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Property.class, com.google.cloud.vision.v1p1beta1.Property.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + uint64Value_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Property getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Property build() { + com.google.cloud.vision.v1p1beta1.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Property buildPartial() { + com.google.cloud.vision.v1p1beta1.Property result = new com.google.cloud.vision.v1p1beta1.Property(this); + result.name_ = name_; + result.value_ = value_; + result.uint64Value_ = uint64Value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Property) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Property)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Property other) { + if (other == com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getUint64Value() != 0L) { + setUint64Value(other.getUint64Value()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private long uint64Value_ ; + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @param value The uint64Value to set. + * @return This builder for chaining. + */ + public Builder setUint64Value(long value) { + + uint64Value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return This builder for chaining. + */ + public Builder clearUint64Value() { + + uint64Value_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Property) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Property) + private static final com.google.cloud.vision.v1p1beta1.Property DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Property(); + } + + public static com.google.cloud.vision.v1p1beta1.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java new file mode 100644 index 000000000000..ce36f3b7690e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface PropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Property) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + long getUint64Value(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java new file mode 100644 index 000000000000..5dcbbac7d167 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Set of features pertaining to the image, computed by computer vision
+ * methods over safe-search verticals (for example, adult, spoof, medical,
+ * violence).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.SafeSearchAnnotation} + */ +public final class SafeSearchAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) + SafeSearchAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use SafeSearchAnnotation.newBuilder() to construct. + private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SafeSearchAnnotation() { + adult_ = 0; + spoof_ = 0; + medical_ = 0; + violence_ = 0; + racy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SafeSearchAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SafeSearchAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + adult_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + spoof_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + medical_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + violence_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + racy_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder.class); + } + + public static final int ADULT_FIELD_NUMBER = 1; + private int adult_; + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SPOOF_FIELD_NUMBER = 2; + private int spoof_; + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int MEDICAL_FIELD_NUMBER = 3; + private int medical_; + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int VIOLENCE_FIELD_NUMBER = 4; + private int violence_; + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RACY_FIELD_NUMBER = 9; + private int racy_; + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adult_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, racy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adult_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, racy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) obj; + + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADULT_FIELD_NUMBER; + hash = (53 * hash) + adult_; + hash = (37 * hash) + SPOOF_FIELD_NUMBER; + hash = (53 * hash) + spoof_; + hash = (37 * hash) + MEDICAL_FIELD_NUMBER; + hash = (53 * hash) + medical_; + hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; + hash = (53 * hash) + violence_; + hash = (37 * hash) + RACY_FIELD_NUMBER; + hash = (53 * hash) + racy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of features pertaining to the image, computed by computer vision
+   * methods over safe-search verticals (for example, adult, spoof, medical,
+   * violence).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.SafeSearchAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adult_ = 0; + + spoof_ = 0; + + medical_ = 0; + + violence_ = 0; + + racy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation build() { + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation(this); + result.adult_ = adult_; + result.spoof_ = spoof_; + result.medical_ = medical_; + result.violence_ = violence_; + result.racy_ = racy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance()) return this; + if (other.adult_ != 0) { + setAdultValue(other.getAdultValue()); + } + if (other.spoof_ != 0) { + setSpoofValue(other.getSpoofValue()); + } + if (other.medical_ != 0) { + setMedicalValue(other.getMedicalValue()); + } + if (other.violence_ != 0) { + setViolenceValue(other.getViolenceValue()); + } + if (other.racy_ != 0) { + setRacyValue(other.getRacyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int adult_ = 0; + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @param value The enum numeric value on the wire for adult to set. + * @return This builder for chaining. + */ + public Builder setAdultValue(int value) { + + adult_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @param value The adult to set. + * @return This builder for chaining. + */ + public Builder setAdult(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + adult_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return This builder for chaining. + */ + public Builder clearAdult() { + + adult_ = 0; + onChanged(); + return this; + } + + private int spoof_ = 0; + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @param value The enum numeric value on the wire for spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoofValue(int value) { + + spoof_ = value; + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @param value The spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoof(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + spoof_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return This builder for chaining. + */ + public Builder clearSpoof() { + + spoof_ = 0; + onChanged(); + return this; + } + + private int medical_ = 0; + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @param value The enum numeric value on the wire for medical to set. + * @return This builder for chaining. + */ + public Builder setMedicalValue(int value) { + + medical_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @param value The medical to set. + * @return This builder for chaining. + */ + public Builder setMedical(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + medical_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return This builder for chaining. + */ + public Builder clearMedical() { + + medical_ = 0; + onChanged(); + return this; + } + + private int violence_ = 0; + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @param value The enum numeric value on the wire for violence to set. + * @return This builder for chaining. + */ + public Builder setViolenceValue(int value) { + + violence_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @param value The violence to set. + * @return This builder for chaining. + */ + public Builder setViolence(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + violence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return This builder for chaining. + */ + public Builder clearViolence() { + + violence_ = 0; + onChanged(); + return this; + } + + private int racy_ = 0; + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @param value The enum numeric value on the wire for racy to set. + * @return This builder for chaining. + */ + public Builder setRacyValue(int value) { + + racy_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @param value The racy to set. + * @return This builder for chaining. + */ + public Builder setRacy(com.google.cloud.vision.v1p1beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + racy_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return This builder for chaining. + */ + public Builder clearRacy() { + + racy_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) + private static final com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafeSearchAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SafeSearchAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java new file mode 100644 index 000000000000..d86304073839 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface SafeSearchAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + int getAdultValue(); + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; + * @return The adult. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getAdult(); + + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + int getSpoofValue(); + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; + * @return The spoof. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getSpoof(); + + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + int getMedicalValue(); + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; + * @return The medical. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getMedical(); + + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + int getViolenceValue(); + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; + * @return The violence. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getViolence(); + + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + int getRacyValue(); + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; + * @return The racy. + */ + com.google.cloud.vision.v1p1beta1.Likelihood getRacy(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java new file mode 100644 index 000000000000..1f8703351983 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A single symbol representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Symbol} + */ +public final class Symbol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Symbol) + SymbolOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symbol() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symbol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Symbol.class, com.google.cloud.vision.v1p1beta1.Symbol.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int TEXT_FIELD_NUMBER = 3; + private volatile java.lang.Object text_; + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Symbol)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Symbol other = (com.google.cloud.vision.v1p1beta1.Symbol) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getText() + .equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Symbol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single symbol representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Symbol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Symbol) + com.google.cloud.vision.v1p1beta1.SymbolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Symbol.class, com.google.cloud.vision.v1p1beta1.Symbol.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Symbol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + text_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Symbol build() { + com.google.cloud.vision.v1p1beta1.Symbol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Symbol buildPartial() { + com.google.cloud.vision.v1p1beta1.Symbol result = new com.google.cloud.vision.v1p1beta1.Symbol(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + result.text_ = text_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Symbol) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Symbol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Symbol other) { + if (other == com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Symbol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Symbol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Symbol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Symbol) + private static final com.google.cloud.vision.v1p1beta1.Symbol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Symbol(); + } + + public static com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java new file mode 100644 index 000000000000..5884bbe3032e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Symbol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java new file mode 100644 index 000000000000..41d2655636c6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java @@ -0,0 +1,3814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * TextAnnotation contains a structured representation of OCR extracted text.
+ * The hierarchy of an OCR extracted text structure is like this:
+ *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+ * Each structural component, starting from Page, may further have their own
+ * properties. Properties describe detected languages, breaks etc.. Please refer
+ * to the
+ * [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty]
+ * message definition below for more detail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation} + */ +public final class TextAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation) + TextAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextAnnotation() { + pages_ = java.util.Collections.emptyList(); + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Page.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder.class); + } + + public interface DetectedLanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + } + /** + *
+   * Detected language for a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} + */ + public static final class DetectedLanguage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedLanguage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) obj; + + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage build() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage buildPartial() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage(this); + result.languageCode_ = languageCode_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage other) { + if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) + private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage(); + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedLanguage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedBreakOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType(); + + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + boolean getIsPrefix(); + } + /** + *
+   * Detected start or end of a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} + */ + public static final class DetectedBreak extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedBreak() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedBreak(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedBreak( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + isPrefix_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + /** + *
+     * Enum to denote the type of break found. New line, space etc.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType} + */ + public enum BreakType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + SURE_SPACE(2), + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + EOL_SURE_SPACE(3), + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + HYPHEN(4), + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + LINE_BREAK(5), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + public static final int SURE_SPACE_VALUE = 2; + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + public static final int EOL_SURE_SPACE_VALUE = 3; + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + public static final int HYPHEN_VALUE = 4; + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + public static final int LINE_BREAK_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BreakType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BreakType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SPACE; + case 2: return SURE_SPACE; + case 3: return EOL_SURE_SPACE; + case 4: return HYPHEN; + case 5: return LINE_BREAK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BreakType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BreakType findValueByNumber(int number) { + return BreakType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); + } + + private static final BreakType[] VALUES = values(); + + public static BreakType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BreakType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + + public static final int IS_PREFIX_FIELD_NUMBER = 2; + private boolean isPrefix_; + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (isPrefix_ != false) { + output.writeBool(2, isPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (isPrefix_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) obj; + + if (type_ != other.type_) return false; + if (getIsPrefix() + != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPrefix()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected start or end of a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + isPrefix_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak build() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak buildPartial() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak(this); + result.type_ = type_; + result.isPrefix_ = isPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak other) { + if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getIsPrefix() != false) { + setIsPrefix(other.getIsPrefix()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean isPrefix_ ; + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @param value The isPrefix to set. + * @return This builder for chaining. + */ + public Builder setIsPrefix(boolean value) { + + isPrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearIsPrefix() { + + isPrefix_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) + private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak(); + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedBreak(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TextPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + int getDetectedLanguagesCount(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesOrBuilderList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index); + + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + boolean hasDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); + } + /** + *
+   * Additional information detected on the structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} + */ + public static final class TextProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) + TextPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextProperty.newBuilder() to construct. + private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextProperty() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextProperty(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextProperty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectedLanguages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; + if (detectedBreak_ != null) { + subBuilder = detectedBreak_.toBuilder(); + } + detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectedBreak_); + detectedBreak_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder.class); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; + private java.util.List detectedLanguages_; + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + return detectedLanguages_.get(index); + } + + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_; + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + return detectedBreak_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + return getDetectedBreak(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectedBreak()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) obj; + + if (!getDetectedLanguagesList() + .equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak() + .equals(other.getDetectedBreak())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Additional information detected on the structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectedLanguagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectedLanguagesBuilder_.clear(); + } + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty build() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty buildPartial() { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty(this); + int from_bitField0_ = bitField0_; + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (detectedBreakBuilder_ == null) { + result.detectedBreak_ = detectedBreak_; + } else { + result.detectedBreak_ = detectedBreakBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty other) { + if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectedLanguagesFieldBuilder() : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List detectedLanguages_ = + java.util.Collections.emptyList(); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; + + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return detectedBreakBuilder_ != null || detectedBreak_ != null; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + onChanged(); + } else { + detectedBreakBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak( + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + onChanged(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder mergeDetectedBreak(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (detectedBreak_ != null) { + detectedBreak_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); + } else { + detectedBreak_ = value; + } + onChanged(); + } else { + detectedBreakBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder clearDetectedBreak() { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + onChanged(); + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { + + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder>( + getDetectedBreak(), + getParentForChildren(), + isClean()); + detectedBreak_ = null; + } + return detectedBreakBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) + private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty(); + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextProperty(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PAGES_FIELD_NUMBER = 1; + private java.util.List pages_; + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Page getPages(int index) { + return pages_.get(index); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object text_; + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.TextAnnotation other = (com.google.cloud.vision.v1p1beta1.TextAnnotation) obj; + + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * TextAnnotation contains a structured representation of OCR extracted text.
+   * The hierarchy of an OCR extracted text structure is like this:
+   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+   * Each structural component, starting from Page, may further have their own
+   * properties. Properties describe detected languages, breaks etc.. Please refer
+   * to the
+   * [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty]
+   * message definition below for more detail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation) + com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextAnnotation.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pagesBuilder_.clear(); + } + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation build() { + com.google.cloud.vision.v1p1beta1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation buildPartial() { + com.google.cloud.vision.v1p1beta1.TextAnnotation result = new com.google.cloud.vision.v1p1beta1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation other) { + if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance()) return this; + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder> pagesBuilder_; + + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p1beta1.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p1beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder addPages(com.google.cloud.vision.v1p1beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p1beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder addPages( + com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p1beta1.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p1beta1.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p1beta1.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation) + private static final com.google.cloud.vision.v1p1beta1.TextAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation(); + } + + public static com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..27dd9b9a4a96 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface TextAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + java.util.List + getPagesList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p1beta1.Page getPages(int index); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + int getPagesCount(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + java.util.List + getPagesOrBuilderList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( + int index); + + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java new file mode 100644 index 000000000000..df44c643aabc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public final class TextAnnotationProto { + private TextAnnotationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p1beta1/text_ann" + + "otation.proto\022\035google.cloud.vision.v1p1b" + + "eta1\032,google/cloud/vision/v1p1beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p1beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p1beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p1beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p1beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p1beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p1beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p1beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p1beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p1beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p1beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p1beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p1beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p1bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "1beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p1beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p1beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p1beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p1beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p1" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p1beta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor, + new java.lang.String[] { "Pages", "Text", }); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor = + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor, + new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor = + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor, + new java.lang.String[] { "Type", "IsPrefix", }); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor = + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor, + new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); + internal_static_google_cloud_vision_v1p1beta1_Page_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Page_descriptor, + new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); + internal_static_google_cloud_vision_v1p1beta1_Block_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Block_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); + internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); + internal_static_google_cloud_vision_v1p1beta1_Word_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Word_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); + internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); + com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java new file mode 100644 index 000000000000..b78d85301ea6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Parameters for text detections. This is used to control TEXT_DETECTION and
+ * DOCUMENT_TEXT_DETECTION features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextDetectionParams} + */ +public final class TextDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextDetectionParams) + TextDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextDetectionParams.newBuilder() to construct. + private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextDetectionParams() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 72: { + + enableTextDetectionConfidenceScore_ = input.readBool(); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + advancedOcrOptions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextDetectionParams.class, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder.class); + } + + public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; + private boolean enableTextDetectionConfidenceScore_; + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList advancedOcrOptions_; + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableTextDetectionConfidenceScore_ != false) { + output.writeBool(9, enableTextDetectionConfidenceScore_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTextDetectionConfidenceScore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, enableTextDetectionConfidenceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.TextDetectionParams other = (com.google.cloud.vision.v1p1beta1.TextDetectionParams) obj; + + if (getEnableTextDetectionConfidenceScore() + != other.getEnableTextDetectionConfidenceScore()) return false; + if (!getAdvancedOcrOptionsList() + .equals(other.getAdvancedOcrOptionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableTextDetectionConfidenceScore()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for text detections. This is used to control TEXT_DETECTION and
+   * DOCUMENT_TEXT_DETECTION features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.TextDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextDetectionParams) + com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.TextDetectionParams.class, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.TextDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableTextDetectionConfidenceScore_ = false; + + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParams build() { + com.google.cloud.vision.v1p1beta1.TextDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParams buildPartial() { + com.google.cloud.vision.v1p1beta1.TextDetectionParams result = new com.google.cloud.vision.v1p1beta1.TextDetectionParams(this); + int from_bitField0_ = bitField0_; + result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; + if (((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.advancedOcrOptions_ = advancedOcrOptions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.TextDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.TextDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextDetectionParams other) { + if (other == com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance()) return this; + if (other.getEnableTextDetectionConfidenceScore() != false) { + setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.TextDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.TextDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean enableTextDetectionConfidenceScore_ ; + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @param value The enableTextDetectionConfidenceScore to set. + * @return This builder for chaining. + */ + public Builder setEnableTextDetectionConfidenceScore(boolean value) { + + enableTextDetectionConfidenceScore_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return This builder for chaining. + */ + public Builder clearEnableTextDetectionConfidenceScore() { + + enableTextDetectionConfidenceScore_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdvancedOcrOptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_.getUnmodifiableView(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions( + java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, advancedOcrOptions_); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextDetectionParams) + private static final com.google.cloud.vision.v1p1beta1.TextDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextDetectionParams(); + } + + public static com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..7c57f410906b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface TextDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + boolean getEnableTextDetectionConfidenceScore(); + + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + java.util.List + getAdvancedOcrOptionsList(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java new file mode 100644 index 000000000000..ce0045a464fb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Vertex} + */ +public final class Vertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Vertex) + VertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Vertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Vertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + x_ = input.readInt32(); + break; + } + case 16: { + + y_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Vertex.class, com.google.cloud.vision.v1p1beta1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Vertex other = (com.google.cloud.vision.v1p1beta1.Vertex) obj; + + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Vertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Vertex) + com.google.cloud.vision.v1p1beta1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Vertex.class, com.google.cloud.vision.v1p1beta1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Vertex build() { + com.google.cloud.vision.v1p1beta1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Vertex buildPartial() { + com.google.cloud.vision.v1p1beta1.Vertex result = new com.google.cloud.vision.v1p1beta1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Vertex) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Vertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Vertex other) { + if (other == com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Vertex) + private static final com.google.cloud.vision.v1p1beta1.Vertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Vertex(); + } + + public static com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java new file mode 100644 index 000000000000..555ae15381e1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/geometry.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface VertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + int getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + int getY(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java new file mode 100644 index 000000000000..7e38690ea1e5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java @@ -0,0 +1,7537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/web_detection.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Relevant information for the image from the Internet.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection} + */ +public final class WebDetection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection) + WebDetectionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetection.newBuilder() to construct. + private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetection() { + webEntities_ = java.util.Collections.emptyList(); + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + visuallySimilarImages_ = java.util.Collections.emptyList(); + bestGuessLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + webEntities_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pagesWithMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + visuallySimilarImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + bestGuessLabels_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.class, com.google.cloud.vision.v1p1beta1.WebDetection.Builder.class); + } + + public interface WebEntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Entity deduced from similar images on the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebEntity} + */ + public static final class WebEntity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) + WebEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebEntity.newBuilder() to construct. + private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebEntity() { + entityId_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebEntity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebEntity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Entity deduced from similar images on the Internet.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebEntity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + score_ = 0F; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity build() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity(this); + result.entityId_ = entityId_; + result.score_ = score_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) + private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebEntity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Metadata for online images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebImage} + */ + public static final class WebImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebImage) + WebImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebImage.newBuilder() to construct. + private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebImage() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for online images.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebImage) + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage build() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebImage(this); + result.url_ = url_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebImage) + private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebImage(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebPageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebPage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + java.lang.String getPageTitle(); + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + com.google.protobuf.ByteString + getPageTitleBytes(); + + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + int getFullMatchingImagesCount(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + int getPartialMatchingImagesCount(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + } + /** + *
+   * Metadata for web pages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebPage} + */ + public static final class WebPage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebPage) + WebPageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebPage.newBuilder() to construct. + private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebPage() { + url_ = ""; + pageTitle_ = ""; + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebPage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebPage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageTitle_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PAGE_TITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pageTitle_; + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + @java.lang.Override + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } + } + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List fullMatchingImages_; + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; + private java.util.List partialMatchingImages_; + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(5, partialMatchingImages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, partialMatchingImages_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebPage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getPageTitle() + .equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPageTitle().hashCode(); + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for web pages.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebPage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebPage) + com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + pageTitle_ = ""; + + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage build() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebPage(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + result.score_ = score_; + result.pageTitle_ = pageTitle_; + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebPage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getPageTitle().isEmpty()) { + pageTitle_ = other.pageTitle_; + onChanged(); + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object pageTitle_ = ""; + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageTitle_ = value; + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return This builder for chaining. + */ + public Builder clearPageTitle() { + + pageTitle_ = getDefaultInstance().getPageTitle(); + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The bytes for pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageTitle_ = value; + onChanged(); + return this; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebPage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebPage) + private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebPage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebPage(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebPage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebPage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + } + /** + *
+   * Label to provide extra metadata for the web detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebLabel} + */ + public static final class WebLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) + WebLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLabel.newBuilder() to construct. + private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLabel() { + label_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder.class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) obj; + + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Label to provide extra metadata for the web detection.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + label_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel build() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel(this); + result.label_ = label_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) + private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int WEB_ENTITIES_FIELD_NUMBER = 1; + private java.util.List webEntities_; + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List getWebEntitiesList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List + getWebEntitiesOrBuilderList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public int getWebEntitiesCount() { + return webEntities_.size(); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index) { + return webEntities_.get(index); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + return webEntities_.get(index); + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; + private java.util.List fullMatchingImages_; + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; + private java.util.List partialMatchingImages_; + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List pagesWithMatchingImages_; + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List getPagesWithMatchingImagesList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public int getPagesWithMatchingImagesCount() { + return pagesWithMatchingImages_.size(); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + return pagesWithMatchingImages_.get(index); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + return pagesWithMatchingImages_.get(index); + } + + public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; + private java.util.List visuallySimilarImages_; + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List getVisuallySimilarImagesList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public int getVisuallySimilarImagesCount() { + return visuallySimilarImages_.size(); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + return visuallySimilarImages_.get(index); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + return visuallySimilarImages_.get(index); + } + + public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; + private java.util.List bestGuessLabels_; + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List getBestGuessLabelsList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List + getBestGuessLabelsOrBuilderList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public int getBestGuessLabelsCount() { + return bestGuessLabels_.size(); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + return bestGuessLabels_.get(index); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + return bestGuessLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < webEntities_.size(); i++) { + output.writeMessage(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + output.writeMessage(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + output.writeMessage(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + output.writeMessage(8, bestGuessLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < webEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, bestGuessLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetection other = (com.google.cloud.vision.v1p1beta1.WebDetection) obj; + + if (!getWebEntitiesList() + .equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList() + .equals(other.getPagesWithMatchingImagesList())) return false; + if (!getVisuallySimilarImagesList() + .equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList() + .equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWebEntitiesCount() > 0) { + hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getWebEntitiesList().hashCode(); + } + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + if (getPagesWithMatchingImagesCount() > 0) { + hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); + } + if (getVisuallySimilarImagesCount() > 0) { + hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); + } + if (getBestGuessLabelsCount() > 0) { + hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getBestGuessLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Relevant information for the image from the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection) + com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetection.class, com.google.cloud.vision.v1p1beta1.WebDetection.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWebEntitiesFieldBuilder(); + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + getPagesWithMatchingImagesFieldBuilder(); + getVisuallySimilarImagesFieldBuilder(); + getBestGuessLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + webEntitiesBuilder_.clear(); + } + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + partialMatchingImagesBuilder_.clear(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + visuallySimilarImagesBuilder_.clear(); + } + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection build() { + com.google.cloud.vision.v1p1beta1.WebDetection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetection result = new com.google.cloud.vision.v1p1beta1.WebDetection(this); + int from_bitField0_ = bitField0_; + if (webEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.webEntities_ = webEntities_; + } else { + result.webEntities_ = webEntitiesBuilder_.build(); + } + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pagesWithMatchingImages_ = pagesWithMatchingImages_; + } else { + result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); + } + if (visuallySimilarImagesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.visuallySimilarImages_ = visuallySimilarImages_; + } else { + result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); + } + if (bestGuessLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bestGuessLabels_ = bestGuessLabels_; + } else { + result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance()) return this; + if (webEntitiesBuilder_ == null) { + if (!other.webEntities_.isEmpty()) { + if (webEntities_.isEmpty()) { + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWebEntitiesIsMutable(); + webEntities_.addAll(other.webEntities_); + } + onChanged(); + } + } else { + if (!other.webEntities_.isEmpty()) { + if (webEntitiesBuilder_.isEmpty()) { + webEntitiesBuilder_.dispose(); + webEntitiesBuilder_ = null; + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + webEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWebEntitiesFieldBuilder() : null; + } else { + webEntitiesBuilder_.addAllMessages(other.webEntities_); + } + } + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImages_.isEmpty()) { + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); + } + onChanged(); + } + } else { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImagesBuilder_.isEmpty()) { + pagesWithMatchingImagesBuilder_.dispose(); + pagesWithMatchingImagesBuilder_ = null; + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + pagesWithMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesWithMatchingImagesFieldBuilder() : null; + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); + } + } + } + if (visuallySimilarImagesBuilder_ == null) { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImages_.isEmpty()) { + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.addAll(other.visuallySimilarImages_); + } + onChanged(); + } + } else { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImagesBuilder_.isEmpty()) { + visuallySimilarImagesBuilder_.dispose(); + visuallySimilarImagesBuilder_ = null; + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + visuallySimilarImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVisuallySimilarImagesFieldBuilder() : null; + } else { + visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); + } + } + } + if (bestGuessLabelsBuilder_ == null) { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabels_.isEmpty()) { + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.addAll(other.bestGuessLabels_); + } + onChanged(); + } + } else { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabelsBuilder_.isEmpty()) { + bestGuessLabelsBuilder_.dispose(); + bestGuessLabelsBuilder_ = null; + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + bestGuessLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBestGuessLabelsFieldBuilder() : null; + } else { + bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List webEntities_ = + java.util.Collections.emptyList(); + private void ensureWebEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(webEntities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; + + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List getWebEntitiesList() { + if (webEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webEntities_); + } else { + return webEntitiesBuilder_.getMessageList(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public int getWebEntitiesCount() { + if (webEntitiesBuilder_ == null) { + return webEntities_.size(); + } else { + return webEntitiesBuilder_.getCount(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); + } else { + return webEntitiesBuilder_.getMessage(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.set(index, value); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(index, value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addAllWebEntities( + java.lang.Iterable values) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, webEntities_); + onChanged(); + } else { + webEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder clearWebEntities() { + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + webEntitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder removeWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.remove(index); + onChanged(); + } else { + webEntitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); } else { + return webEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesOrBuilderList() { + if (webEntitiesBuilder_ != null) { + return webEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webEntities_); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { + return getWebEntitiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesBuilderList() { + return getWebEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder> + getWebEntitiesFieldBuilder() { + if (webEntitiesBuilder_ == null) { + webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder>( + webEntities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + webEntities_ = null; + } + return webEntitiesBuilder_; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + + private java.util.List pagesWithMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePagesWithMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; + + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List getPagesWithMatchingImagesList() { + if (pagesWithMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } else { + return pagesWithMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public int getPagesWithMatchingImagesCount() { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.size(); + } else { + return pagesWithMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); + } else { + return pagesWithMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addAllPagesWithMatchingImages( + java.lang.Iterable values) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pagesWithMatchingImages_); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder clearPagesWithMatchingImages() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder removePagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.remove(index); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); } else { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + if (pagesWithMatchingImagesBuilder_ != null) { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesBuilderList() { + return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder> + getPagesWithMatchingImagesFieldBuilder() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder>( + pagesWithMatchingImages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pagesWithMatchingImages_ = null; + } + return pagesWithMatchingImagesBuilder_; + } + + private java.util.List visuallySimilarImages_ = + java.util.Collections.emptyList(); + private void ensureVisuallySimilarImagesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; + + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List getVisuallySimilarImagesList() { + if (visuallySimilarImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } else { + return visuallySimilarImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public int getVisuallySimilarImagesCount() { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.size(); + } else { + return visuallySimilarImagesBuilder_.getCount(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); + } else { + return visuallySimilarImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addAllVisuallySimilarImages( + java.lang.Iterable values) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, visuallySimilarImages_); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder clearVisuallySimilarImages() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + visuallySimilarImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder removeVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.remove(index); + onChanged(); + } else { + visuallySimilarImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); } else { + return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + if (visuallySimilarImagesBuilder_ != null) { + return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesBuilderList() { + return getVisuallySimilarImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> + getVisuallySimilarImagesFieldBuilder() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( + visuallySimilarImages_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + visuallySimilarImages_ = null; + } + return visuallySimilarImagesBuilder_; + } + + private java.util.List bestGuessLabels_ = + java.util.Collections.emptyList(); + private void ensureBestGuessLabelsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; + + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List getBestGuessLabelsList() { + if (bestGuessLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } else { + return bestGuessLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public int getBestGuessLabelsCount() { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.size(); + } else { + return bestGuessLabelsBuilder_.getCount(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); + } else { + return bestGuessLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addAllBestGuessLabels( + java.lang.Iterable values) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bestGuessLabels_); + onChanged(); + } else { + bestGuessLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder clearBestGuessLabels() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder removeBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.remove(index); + onChanged(); + } else { + bestGuessLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); } else { + return bestGuessLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsOrBuilderList() { + if (bestGuessLabelsBuilder_ != null) { + return bestGuessLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { + return getBestGuessLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsBuilderList() { + return getBestGuessLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder> + getBestGuessLabelsFieldBuilder() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder>( + bestGuessLabels_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + bestGuessLabels_ = null; + } + return bestGuessLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection) + private static final com.google.cloud.vision.v1p1beta1.WebDetection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java new file mode 100644 index 000000000000..476bc2737f4e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java @@ -0,0 +1,288 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/web_detection.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface WebDetectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + int getWebEntitiesCount(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesOrBuilderList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index); + + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + int getFullMatchingImagesCount(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + int getPartialMatchingImagesCount(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + int getPagesWithMatchingImagesCount(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesOrBuilderList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index); + + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + int getVisuallySimilarImagesCount(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesOrBuilderList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index); + + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + int getBestGuessLabelsCount(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsOrBuilderList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java new file mode 100644 index 000000000000..9b87f3a47a7b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * Parameters for web detection request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetectionParams} + */ +public final class WebDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetectionParams) + WebDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetectionParams.newBuilder() to construct. + private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetectionParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + includeGeoResults_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetectionParams.class, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder.class); + } + + public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; + private boolean includeGeoResults_; + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (includeGeoResults_ != false) { + output.writeBool(2, includeGeoResults_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeGeoResults_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, includeGeoResults_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.WebDetectionParams other = (com.google.cloud.vision.v1p1beta1.WebDetectionParams) obj; + + if (getIncludeGeoResults() + != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeGeoResults()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for web detection request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetectionParams) + com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.WebDetectionParams.class, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.WebDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + includeGeoResults_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParams build() { + com.google.cloud.vision.v1p1beta1.WebDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParams buildPartial() { + com.google.cloud.vision.v1p1beta1.WebDetectionParams result = new com.google.cloud.vision.v1p1beta1.WebDetectionParams(this); + result.includeGeoResults_ = includeGeoResults_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetectionParams other) { + if (other == com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance()) return this; + if (other.getIncludeGeoResults() != false) { + setIncludeGeoResults(other.getIncludeGeoResults()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.WebDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeGeoResults_ ; + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @param value The includeGeoResults to set. + * @return This builder for chaining. + */ + public Builder setIncludeGeoResults(boolean value) { + + includeGeoResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeGeoResults() { + + includeGeoResults_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetectionParams) + private static final com.google.cloud.vision.v1p1beta1.WebDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetectionParams(); + } + + public static com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..f0d59fa3e424 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/image_annotator.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface WebDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + boolean getIncludeGeoResults(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java new file mode 100644 index 000000000000..f8bf6d561187 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/web_detection.proto + +package com.google.cloud.vision.v1p1beta1; + +public final class WebDetectionProto { + private WebDetectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/vision/v1p1beta1/web_dete" + + "ction.proto\022\035google.cloud.vision.v1p1bet" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p1beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p1beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p1" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p1beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p1beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p1beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p1beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p1beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p1beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p1beta1;visio" + + "n\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor, + new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor = + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor, + new java.lang.String[] { "EntityId", "Score", "Description", }); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor = + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor, + new java.lang.String[] { "Url", "Score", }); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor = + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor, + new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor = + internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor, + new java.lang.String[] { "Label", "LanguageCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java new file mode 100644 index 000000000000..01d73d0ac84a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java @@ -0,0 +1,1617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +/** + *
+ * A word representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Word} + */ +public final class Word extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Word) + WordOrBuilder { +private static final long serialVersionUID = 0L; + // Use Word.newBuilder() to construct. + private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Word() { + symbols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Word(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Word( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + symbols_.add( + input.readMessage(com.google.cloud.vision.v1p1beta1.Symbol.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Word.class, com.google.cloud.vision.v1p1beta1.Word.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int SYMBOLS_FIELD_NUMBER = 3; + private java.util.List symbols_; + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List getSymbolsList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List + getSymbolsOrBuilderList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Word)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p1beta1.Word other = (com.google.cloud.vision.v1p1beta1.Word) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList() + .equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Word parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Word parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p1beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Word prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A word representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p1beta1.Word} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Word) + com.google.cloud.vision.v1p1beta1.WordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p1beta1.Word.class, com.google.cloud.vision.v1p1beta1.Word.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p1beta1.Word.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSymbolsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + symbolsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Word getDefaultInstanceForType() { + return com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Word build() { + com.google.cloud.vision.v1p1beta1.Word result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Word buildPartial() { + com.google.cloud.vision.v1p1beta1.Word result = new com.google.cloud.vision.v1p1beta1.Word(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p1beta1.Word) { + return mergeFrom((com.google.cloud.vision.v1p1beta1.Word)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Word other) { + if (other == com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymbolsFieldBuilder() : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p1beta1.Word parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p1beta1.Word) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(symbols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder> symbolsBuilder_; + + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public java.util.List getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p1beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder addSymbols(com.google.cloud.vision.v1p1beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p1beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder addAllSymbols( + java.lang.Iterable values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p1beta1.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p1beta1.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p1beta1.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder>( + symbols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Word) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Word) + private static final com.google.cloud.vision.v1p1beta1.Word DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Word(); + } + + public static com.google.cloud.vision.v1p1beta1.Word getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Word parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Word(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p1beta1.Word getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java new file mode 100644 index 000000000000..5efeee951df6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p1beta1/text_annotation.proto + +package com.google.cloud.vision.v1p1beta1; + +public interface WordOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Word) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + int getSymbolsCount(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto new file mode 100644 index 000000000000..6d46d9c342ec --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto @@ -0,0 +1,53 @@ +// Copyright 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p1beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p1beta1"; + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A bounding polygon for the detected image annotation. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto new file mode 100644 index 000000000000..f66ad504fca9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto @@ -0,0 +1,618 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p1beta1/geometry.proto"; +import "google/cloud/vision/v1p1beta1/text_annotation.proto"; +import "google/cloud/vision/v1p1beta1/web_detection.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p1beta1"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) + returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p1beta1/images:annotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + } +} + +// Users describe the type of Google Cloud Vision API tasks to perform over +// images by using *Feature*s. Each Feature indicates a type of image +// detection task to perform. Features encode the Cloud Vision API +// vertical to operate on and the number of top-scoring results to return. +message Feature { + // Type of image feature. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run OCR. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run computer vision models to compute image safe-search properties. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. + string model = 3; +} + +// External image source (Google Cloud Storage image location). +message ImageSource { + // NOTE: For new code `image_uri` below is preferred. + // Google Cloud Storage image URI, which must be in the following form: + // `gs://bucket_name/object_name` (for details, see + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris)). + // NOTE: Cloud Storage object versioning is not supported. + string gcs_image_uri = 1; + + // Image URI which supports: + // 1) Google Cloud Storage image URI, which must be in the following form: + // `gs://bucket_name/object_name` (for details, see + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris)). + // NOTE: Cloud Storage object versioning is not supported. + // 2) Publicly accessible image HTTP/HTTPS URL. + // This is preferred over the legacy `gcs_image_uri` above. When both + // `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // Image content, represented as a stream of bytes. + // Note: as with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + bytes content = 1; + + // Google Cloud Storage image location. If both `content` and `source` + // are provided for an image, `content` takes precedence and is + // used to perform the image annotation request. + ImageSource source = 2; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale, as returned in `ImageParams`. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale, as returned in `ImageParams`. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Parameters for text detections. This is used to control TEXT_DETECTION and +// DOCUMENT_TEXT_DETECTION features. +message TextDetectionParams { + + // By default, Cloud Vision API only includes confidence score for + // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + // score for TEXT_DETECTION as well. + bool enable_text_detection_confidence_score = 9; + + // A list of advanced OCR options to fine-tune OCR behavior. + repeated string advanced_ocr_options = 11; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // lat/long rectangle that specifies the location of the image. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. In most cases, an empty value + // yields the best results since it enables automatic language detection. For + // languages based on the Latin alphabet, setting `language_hints` is not + // needed. In rare cases, when the language of the text in the image is known, + // setting a hint will help get better results (although it will be a + // significant hindrance if the hint is wrong). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](https://cloud.google.com/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; + + // Parameters for text detection and document text detection. + TextDetectionParams text_detection_params = 12; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely that the image belongs to the specified vertical. + VERY_UNLIKELY = 1; + + // It is unlikely that the image belongs to the specified vertical. + UNLIKELY = 2; + + // It is possible that the image belongs to the specified vertical. + POSSIBLE = 3; + + // It is likely that the image belongs to the specified vertical. + LIKELY = 4; + + // It is very likely that the image belongs to the specified vertical. + VERY_LIKELY = 5; +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto new file mode 100644 index 000000000000..f85cc44dfd59 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto @@ -0,0 +1,251 @@ +// Copyright 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p1beta1; + +import "google/cloud/vision/v1p1beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p1beta1"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol +// Each structural component, starting from Page, may further have their own +// properties. Properties describe detected languages, breaks etc.. Please refer +// to the +// [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // Detected language for a structural component. + message DetectedLanguage { + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 1; + + // Confidence of detected language. Range [0, 1]. + float confidence = 2; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width in pixels. + int32 width = 2; + + // Page height in pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto new file mode 100644 index 000000000000..c50e1ad62cc8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto @@ -0,0 +1,103 @@ +// Copyright 2017 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p1beta1; + + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p1beta1"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // Best guess text labels for the request image. + repeated WebLabel best_guess_labels = 8; +} diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..1d51e8ec2f76 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateImages(); + } + + public static void asyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); + // Do something. + BatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..7135c01739b3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_sync] +import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); + } + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java new file mode 100644 index 000000000000..fd295212a666 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] +import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateImagesListannotateimagerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImagesListannotateimagerequest(); + } + + public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); + } + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..fd559b5be3db --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..d4a8a48d420b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..4506072cbb00 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p1beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..1221c05f23a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.samples; + +// [START vision_v1p1beta1_generated_imageannotatorsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p1beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..963d6f74191a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p1beta1.stub.samples; + +// [START vision_v1p1beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorStubSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p1beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java new file mode 100644 index 000000000000..f1e9ad6c2093 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java @@ -0,0 +1,451 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStub; +import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorClient implements BackgroundResource { + private final ImageAnnotatorSettings settings; + private final ImageAnnotatorStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ImageAnnotatorClient with default settings. */ + public static final ImageAnnotatorClient create() throws IOException { + return create(ImageAnnotatorSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) + throws IOException { + return new ImageAnnotatorClient(settings); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ImageAnnotatorSettings). + */ + public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { + return new ImageAnnotatorClient(stub); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ImageAnnotatorClient(ImageAnnotatorStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ImageAnnotatorSettings getSettings() { + return settings; + } + + public ImageAnnotatorStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages( + List requests) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { + return batchAnnotateImagesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateImagesCallable() { + return stub.batchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run async image detection and annotation for a list of generic files (e.g. PDF) which may + * contain multiple pages and multiple images per page. Progress and results can be retrieved + * through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
+   * }
+   * }
+ * + * @param requests Required. Individual async file annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(List requests) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return asyncBatchAnnotateFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run async image detection and annotation for a list of generic files (e.g. PDF) which may + * contain multiple pages and multiple images per page. Progress and results can be retrieved + * through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { + return asyncBatchAnnotateFilesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run async image detection and annotation for a list of generic files (e.g. PDF) which may + * contain multiple pages and multiple images per page. Progress and results can be retrieved + * through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return stub.asyncBatchAnnotateFilesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run async image detection and annotation for a list of generic files (e.g. PDF) which may + * contain multiple pages and multiple images per page. Progress and results can be retrieved + * through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateFilesCallable() { + return stub.asyncBatchAnnotateFilesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java new file mode 100644 index 000000000000..6557ba40327e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java @@ -0,0 +1,238 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateFilesOperationSettings(); + } + + public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) + throws IOException { + return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageAnnotatorStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageAnnotatorStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageAnnotatorSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageAnnotatorStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageAnnotatorSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageAnnotatorStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); + } + + public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { + return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return getStubSettingsBuilder().batchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); + } + + @Override + public ImageAnnotatorSettings build() throws IOException { + return new ImageAnnotatorSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json new file mode 100644 index 000000000000..e4c1882ed562 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json @@ -0,0 +1,24 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.vision.v1p2beta1", + "libraryPackage": "com.google.cloud.vision.v1p2beta1", + "services": { + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "ImageAnnotatorClient", + "rpcs": { + "AsyncBatchAnnotateFiles": { + "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] + }, + "BatchAnnotateImages": { + "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java new file mode 100644 index 000000000000..f1254f6cdf57 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ImageAnnotatorClient ======================= + * + *

Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

Sample for ImageAnnotatorClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.vision.v1p2beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..9a46dc820cc6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java new file mode 100644 index 000000000000..0efebe4129be --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java @@ -0,0 +1,213 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { + private static final MethodDescriptor + batchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p2beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageAnnotatorStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + batchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .build(); + GrpcCallSettings + asyncBatchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..9fc90fd37f8c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java new file mode 100644 index 000000000000..57c2c44afb14 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java @@ -0,0 +1,293 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/images:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p2beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/files:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateFilesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonImageAnnotatorStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + batchAnnotateImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchAnnotateImagesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java new file mode 100644 index 000000000000..697f897efca9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java @@ -0,0 +1,69 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ImageAnnotatorStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + batchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java new file mode 100644 index 000000000000..eab5af0ff930 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java @@ -0,0 +1,421 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.OperationMetadata; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorStubSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings + batchAnnotateImagesSettings; + private final UnaryCallSettings + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + public ImageAnnotatorStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageAnnotatorStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonImageAnnotatorStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); + asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); + asyncBatchAnnotateFilesOperationSettings = + settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); + } + + /** Builder for ImageAnnotatorStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + batchAnnotateImagesSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); + initDefaults(this); + } + + protected Builder(ImageAnnotatorStubSettings settings) { + super(settings); + + batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); + asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateFilesOperationSettings = + settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateFilesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateFilesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + @Override + public ImageAnnotatorStubSettings build() throws IOException { + return new ImageAnnotatorStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java new file mode 100644 index 000000000000..345c3ad7020e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java @@ -0,0 +1,171 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p2beta1.stub.HttpJsonImageAnnotatorStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientHttpJsonTest { + private static MockHttpService mockService; + private static ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonImageAnnotatorStub.getMethodDescriptors(), + ImageAnnotatorSettings.getDefaultEndpoint()); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java new file mode 100644 index 000000000000..fccfdc12efa4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientTest { + private static MockImageAnnotator mockImageAnnotator; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageAnnotator = new MockImageAnnotator(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateFilesRequest actualRequest = + ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java new file mode 100644 index 000000000000..6f72a4b50c45 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotator implements MockGrpcService { + private final MockImageAnnotatorImpl serviceImpl; + + public MockImageAnnotator() { + serviceImpl = new MockImageAnnotatorImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java new file mode 100644 index 000000000000..cc30e9f33bf7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java @@ -0,0 +1,104 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { + private List requests; + private Queue responses; + + public MockImageAnnotatorImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchAnnotateImages( + BatchAnnotateImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateImagesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateFiles( + AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java new file mode 100644 index 000000000000..6f324bd374ea --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java @@ -0,0 +1,419 @@ +package com.google.cloud.vision.v1p2beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Service that performs Google Cloud Vision API detection tasks over client
+ * images, such as face, landmark, logo, label, and text detection. The
+ * ImageAnnotator service returns detected entities from the images.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p2beta1/image_annotator.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p2beta1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", + requestType = com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, + responseType = com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) + .build(); + } + } + } + return getBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", + requestType = com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) + .build(); + } + } + } + return getAsyncBatchAnnotateFilesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + }; + return ImageAnnotatorStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageAnnotatorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + }; + return ImageAnnotatorBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ImageAnnotatorFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + }; + return ImageAnnotatorFutureStub.newStub(factory, channel); + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Run async image detection and annotation for a list of generic files (e.g.
+     * PDF) which may contain multiple pages and multiple images per page.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse>( + this, METHODID_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getAsyncBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) + .build(); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { + private ImageAnnotatorStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run async image detection and annotation for a list of generic files (e.g.
+     * PDF) which may contain multiple pages and multiple images per page.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ImageAnnotatorBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run async image detection and annotation for a list of generic files (e.g.
+     * PDF) which may contain multiple pages and multiple images per page.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { + private ImageAnnotatorFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run async image detection and annotation for a list of generic files (e.g.
+     * PDF) which may contain multiple pages and multiple images per page.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ImageAnnotatorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_ANNOTATE_IMAGES: + serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_FILES: + serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageAnnotatorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageAnnotator"); + } + } + + private static final class ImageAnnotatorFileDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier { + ImageAnnotatorFileDescriptorSupplier() {} + } + + private static final class ImageAnnotatorMethodDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageAnnotatorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ImageAnnotatorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) + .addMethod(getBatchAnnotateImagesMethod()) + .addMethod(getAsyncBatchAnnotateFilesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java new file mode 100644 index 000000000000..da1800f52636 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java @@ -0,0 +1,1110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Response to a single file annotation request. A file may contain one or more
+ * images, which individually have their own responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateFileResponse} + */ +public final class AnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateFileResponse) + AnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileResponse.newBuilder() to construct. + private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int RESPONSES_FIELD_NUMBER = 2; + private java.util.List responses_; + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(2, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a single file annotation request. A file may contain one or more
+   * images, which individually have their own responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateFileResponse) + com.google.cloud.vision.v1p2beta1.AnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse build() { + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p2beta1.AnnotateFileResponse(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p2beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateFileResponse) + private static final com.google.cloud.vision.v1p2beta1.AnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..7e80598525f9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java new file mode 100644 index 000000000000..de64ed09eab6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Request for performing Google Cloud Vision API tasks over a user-provided
+ * image, with user-requested features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.google.cloud.vision.v1p2beta1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p2beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.Image image_; + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return The image. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Image getImage() { + return image_ == null ? com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for performing Google Cloud Vision API tasks over a user-provided
+   * image, with user-requested features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateImageRequest) + com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest build() { + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest buildPartial() { + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p2beta1.AnnotateImageRequest(this); + int from_bitField0_ = bitField0_; + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest other) { + if (other == com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder> imageBuilder_; + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return The image. + */ + public com.google.cloud.vision.v1p2beta1.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public Builder setImage(com.google.cloud.vision.v1p2beta1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public Builder setImage( + com.google.cloud.vision.v1p2beta1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public Builder mergeImage(com.google.cloud.vision.v1p2beta1.Image value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.google.cloud.vision.v1p2beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p2beta1.Image.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p2beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p2beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageRequest) + private static final com.google.cloud.vision.v1p2beta1.AnnotateImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateImageRequest(); + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java new file mode 100644 index 000000000000..f6610bbce26b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AnnotateImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + * @return The image. + */ + com.google.cloud.vision.v1p2beta1.Image getImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Image image = 1; + */ + com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder(); + + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p2beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java new file mode 100644 index 000000000000..0d456dc11162 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java @@ -0,0 +1,4356 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Response to an image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + faceAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.FaceAnnotation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + landmarkAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + logoAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labelAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + textAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder subBuilder = null; + if (safeSearchAnnotation_ != null) { + subBuilder = safeSearchAnnotation_.toBuilder(); + } + safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(safeSearchAnnotation_); + safeSearchAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.cloud.vision.v1p2beta1.ImageProperties.Builder subBuilder = null; + if (imagePropertiesAnnotation_ != null) { + subBuilder = imagePropertiesAnnotation_.toBuilder(); + } + imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imagePropertiesAnnotation_); + imagePropertiesAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder subBuilder = null; + if (cropHintsAnnotation_ != null) { + subBuilder = cropHintsAnnotation_.toBuilder(); + } + cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsAnnotation_); + cropHintsAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder subBuilder = null; + if (fullTextAnnotation_ != null) { + subBuilder = fullTextAnnotation_.toBuilder(); + } + fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullTextAnnotation_); + fullTextAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.vision.v1p2beta1.WebDetection.Builder subBuilder = null; + if (webDetection_ != null) { + subBuilder = webDetection_.toBuilder(); + } + webDetection_ = input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetection_); + webDetection_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder.class); + } + + public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List faceAnnotations_; + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List getFaceAnnotationsList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List + getFaceAnnotationsOrBuilderList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public int getFaceAnnotationsCount() { + return faceAnnotations_.size(); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index) { + return faceAnnotations_.get(index); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + return faceAnnotations_.get(index); + } + + public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List landmarkAnnotations_; + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List getLandmarkAnnotationsList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public int getLandmarkAnnotationsCount() { + return landmarkAnnotations_.size(); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index) { + return landmarkAnnotations_.get(index); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + return landmarkAnnotations_.get(index); + } + + public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List logoAnnotations_; + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List getLogoAnnotationsList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List + getLogoAnnotationsOrBuilderList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public int getLogoAnnotationsCount() { + return logoAnnotations_.size(); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index) { + return logoAnnotations_.get(index); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + return logoAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List labelAnnotations_; + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index) { + return labelAnnotations_.get(index); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + return labelAnnotations_.get(index); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List textAnnotations_; + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List getTextAnnotationsList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + return textAnnotations_.get(index); + } + + public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_; + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + @java.lang.Override + public boolean hasFullTextAnnotation() { + return fullTextAnnotation_ != null; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation() { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + return getFullTextAnnotation(); + } + + public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_; + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + @java.lang.Override + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotation_ != null; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + return getSafeSearchAnnotation(); + } + + public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; + private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_; + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + @java.lang.Override + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ != null; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + return getImagePropertiesAnnotation(); + } + + public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; + private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_; + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + @java.lang.Override + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotation_ != null; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation() { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + return getCropHintsAnnotation(); + } + + public static final int WEB_DETECTION_FIELD_NUMBER = 13; + private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_; + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + @java.lang.Override + public boolean hasWebDetection() { + return webDetection_ != null; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection() { + return webDetection_ == null ? com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + return getWebDetection(); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CONTEXT_FIELD_NUMBER = 21; + private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_; + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext() { + return context_ == null ? com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < faceAnnotations_.size(); i++) { + output.writeMessage(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + output.writeMessage(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + output.writeMessage(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + output.writeMessage(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + output.writeMessage(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + if (cropHintsAnnotation_ != null) { + output.writeMessage(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + output.writeMessage(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + output.writeMessage(13, getWebDetection()); + } + if (context_ != null) { + output.writeMessage(21, getContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < faceAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getError()); + } + if (cropHintsAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getWebDetection()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) obj; + + if (!getFaceAnnotationsList() + .equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList() + .equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList() + .equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList() + .equals(other.getLabelAnnotationsList())) return false; + if (!getTextAnnotationsList() + .equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; + if (hasFullTextAnnotation()) { + if (!getFullTextAnnotation() + .equals(other.getFullTextAnnotation())) return false; + } + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; + if (hasSafeSearchAnnotation()) { + if (!getSafeSearchAnnotation() + .equals(other.getSafeSearchAnnotation())) return false; + } + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; + if (hasImagePropertiesAnnotation()) { + if (!getImagePropertiesAnnotation() + .equals(other.getImagePropertiesAnnotation())) return false; + } + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; + if (hasCropHintsAnnotation()) { + if (!getCropHintsAnnotation() + .equals(other.getCropHintsAnnotation())) return false; + } + if (hasWebDetection() != other.hasWebDetection()) return false; + if (hasWebDetection()) { + if (!getWebDetection() + .equals(other.getWebDetection())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFaceAnnotationsCount() > 0) { + hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFaceAnnotationsList().hashCode(); + } + if (getLandmarkAnnotationsCount() > 0) { + hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); + } + if (getLogoAnnotationsCount() > 0) { + hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLogoAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (hasFullTextAnnotation()) { + hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getFullTextAnnotation().hashCode(); + } + if (hasSafeSearchAnnotation()) { + hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); + } + if (hasImagePropertiesAnnotation()) { + hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); + } + if (hasCropHintsAnnotation()) { + hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsAnnotation().hashCode(); + } + if (hasWebDetection()) { + hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + getWebDetection().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateImageResponse) + com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFaceAnnotationsFieldBuilder(); + getLandmarkAnnotationsFieldBuilder(); + getLogoAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + faceAnnotationsBuilder_.clear(); + } + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + landmarkAnnotationsBuilder_.clear(); + } + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + logoAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelAnnotationsBuilder_.clear(); + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + textAnnotationsBuilder_.clear(); + } + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + if (webDetectionBuilder_ == null) { + webDetection_ = null; + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse build() { + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p2beta1.AnnotateImageResponse(this); + int from_bitField0_ = bitField0_; + if (faceAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.faceAnnotations_ = faceAnnotations_; + } else { + result.faceAnnotations_ = faceAnnotationsBuilder_.build(); + } + if (landmarkAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.landmarkAnnotations_ = landmarkAnnotations_; + } else { + result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); + } + if (logoAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.logoAnnotations_ = logoAnnotations_; + } else { + result.logoAnnotations_ = logoAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (fullTextAnnotationBuilder_ == null) { + result.fullTextAnnotation_ = fullTextAnnotation_; + } else { + result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); + } + if (safeSearchAnnotationBuilder_ == null) { + result.safeSearchAnnotation_ = safeSearchAnnotation_; + } else { + result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); + } + if (imagePropertiesAnnotationBuilder_ == null) { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; + } else { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); + } + if (cropHintsAnnotationBuilder_ == null) { + result.cropHintsAnnotation_ = cropHintsAnnotation_; + } else { + result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); + } + if (webDetectionBuilder_ == null) { + result.webDetection_ = webDetection_; + } else { + result.webDetection_ = webDetectionBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse other) { + if (other == com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()) return this; + if (faceAnnotationsBuilder_ == null) { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotations_.isEmpty()) { + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.addAll(other.faceAnnotations_); + } + onChanged(); + } + } else { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotationsBuilder_.isEmpty()) { + faceAnnotationsBuilder_.dispose(); + faceAnnotationsBuilder_ = null; + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + faceAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFaceAnnotationsFieldBuilder() : null; + } else { + faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); + } + } + } + if (landmarkAnnotationsBuilder_ == null) { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotations_.isEmpty()) { + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.addAll(other.landmarkAnnotations_); + } + onChanged(); + } + } else { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotationsBuilder_.isEmpty()) { + landmarkAnnotationsBuilder_.dispose(); + landmarkAnnotationsBuilder_ = null; + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + landmarkAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarkAnnotationsFieldBuilder() : null; + } else { + landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); + } + } + } + if (logoAnnotationsBuilder_ == null) { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotations_.isEmpty()) { + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.addAll(other.logoAnnotations_); + } + onChanged(); + } + } else { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotationsBuilder_.isEmpty()) { + logoAnnotationsBuilder_.dispose(); + logoAnnotationsBuilder_ = null; + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + logoAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogoAnnotationsFieldBuilder() : null; + } else { + logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLabelAnnotationsFieldBuilder() : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextAnnotationsFieldBuilder() : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (other.hasFullTextAnnotation()) { + mergeFullTextAnnotation(other.getFullTextAnnotation()); + } + if (other.hasSafeSearchAnnotation()) { + mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); + } + if (other.hasImagePropertiesAnnotation()) { + mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); + } + if (other.hasCropHintsAnnotation()) { + mergeCropHintsAnnotation(other.getCropHintsAnnotation()); + } + if (other.hasWebDetection()) { + mergeWebDetection(other.getWebDetection()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List faceAnnotations_ = + java.util.Collections.emptyList(); + private void ensureFaceAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; + + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List getFaceAnnotationsList() { + if (faceAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } else { + return faceAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public int getFaceAnnotationsCount() { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.size(); + } else { + return faceAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); + } else { + return faceAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations(com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addAllFaceAnnotations( + java.lang.Iterable values) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, faceAnnotations_); + onChanged(); + } else { + faceAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder clearFaceAnnotations() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + faceAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public Builder removeFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.remove(index); + onChanged(); + } else { + faceAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); } else { + return faceAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsOrBuilderList() { + if (faceAnnotationsBuilder_ != null) { + return faceAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { + return getFaceAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsBuilderList() { + return getFaceAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder> + getFaceAnnotationsFieldBuilder() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder>( + faceAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + faceAnnotations_ = null; + } + return faceAnnotationsBuilder_; + } + + private java.util.List landmarkAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLandmarkAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; + + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List getLandmarkAnnotationsList() { + if (landmarkAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } else { + return landmarkAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public int getLandmarkAnnotationsCount() { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.size(); + } else { + return landmarkAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); + } else { + return landmarkAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addAllLandmarkAnnotations( + java.lang.Iterable values) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarkAnnotations_); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder clearLandmarkAnnotations() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + landmarkAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder removeLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.remove(index); + onChanged(); + } else { + landmarkAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); } else { + return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + if (landmarkAnnotationsBuilder_ != null) { + return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsBuilderList() { + return getLandmarkAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> + getLandmarkAnnotationsFieldBuilder() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( + landmarkAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + landmarkAnnotations_ = null; + } + return landmarkAnnotationsBuilder_; + } + + private java.util.List logoAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLogoAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; + + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List getLogoAnnotationsList() { + if (logoAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } else { + return logoAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public int getLogoAnnotationsCount() { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.size(); + } else { + return logoAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); + } else { + return logoAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addAllLogoAnnotations( + java.lang.Iterable values) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logoAnnotations_); + onChanged(); + } else { + logoAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder clearLogoAnnotations() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + logoAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder removeLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.remove(index); + onChanged(); + } else { + logoAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); } else { + return logoAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsOrBuilderList() { + if (logoAnnotationsBuilder_ != null) { + return logoAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { + return getLogoAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsBuilderList() { + return getLogoAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> + getLogoAnnotationsFieldBuilder() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( + logoAnnotations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + logoAnnotations_ = null; + } + return logoAnnotationsBuilder_; + } + + private java.util.List labelAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; + + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private java.util.List textAnnotations_ = + java.util.Collections.emptyList(); + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + textAnnotations_ = new java.util.ArrayList(textAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; + + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addAllTextAnnotations( + java.lang.Iterable values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + public boolean hasFullTextAnnotation() { + return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } else { + return fullTextAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation(com.google.cloud.vision.v1p2beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullTextAnnotation_ = value; + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation( + com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder builderForValue) { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = builderForValue.build(); + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p2beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (fullTextAnnotation_ != null) { + fullTextAnnotation_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); + } else { + fullTextAnnotation_ = value; + } + onChanged(); + } else { + fullTextAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder clearFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + onChanged(); + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { + + onChanged(); + return getFullTextAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + if (fullTextAnnotationBuilder_ != null) { + return fullTextAnnotationBuilder_.getMessageOrBuilder(); + } else { + return fullTextAnnotation_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder> + getFullTextAnnotationFieldBuilder() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder>( + getFullTextAnnotation(), + getParentForChildren(), + isClean()); + fullTextAnnotation_ = null; + } + return fullTextAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } else { + return safeSearchAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safeSearchAnnotation_ = value; + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation( + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder builderForValue) { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = builderForValue.build(); + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (safeSearchAnnotation_ != null) { + safeSearchAnnotation_ = + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); + } else { + safeSearchAnnotation_ = value; + } + onChanged(); + } else { + safeSearchAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder clearSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + onChanged(); + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { + + onChanged(); + return getSafeSearchAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + if (safeSearchAnnotationBuilder_ != null) { + return safeSearchAnnotationBuilder_.getMessageOrBuilder(); + } else { + return safeSearchAnnotation_ == null ? + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder> + getSafeSearchAnnotationFieldBuilder() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder>( + getSafeSearchAnnotation(), + getParentForChildren(), + isClean()); + safeSearchAnnotation_ = null; + } + return safeSearchAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + public com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } else { + return imagePropertiesAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p2beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imagePropertiesAnnotation_ = value; + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation( + com.google.cloud.vision.v1p2beta1.ImageProperties.Builder builderForValue) { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = builderForValue.build(); + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p2beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (imagePropertiesAnnotation_ != null) { + imagePropertiesAnnotation_ = + com.google.cloud.vision.v1p2beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); + } else { + imagePropertiesAnnotation_ = value; + } + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder clearImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + onChanged(); + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p2beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { + + onChanged(); + return getImagePropertiesAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + if (imagePropertiesAnnotationBuilder_ != null) { + return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); + } else { + return imagePropertiesAnnotation_ == null ? + com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder> + getImagePropertiesAnnotationFieldBuilder() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder>( + getImagePropertiesAnnotation(), + getParentForChildren(), + isClean()); + imagePropertiesAnnotation_ = null; + } + return imagePropertiesAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } else { + return cropHintsAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsAnnotation_ = value; + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation( + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder builderForValue) { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = builderForValue.build(); + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (cropHintsAnnotation_ != null) { + cropHintsAnnotation_ = + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); + } else { + cropHintsAnnotation_ = value; + } + onChanged(); + } else { + cropHintsAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder clearCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + onChanged(); + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { + + onChanged(); + return getCropHintsAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + if (cropHintsAnnotationBuilder_ != null) { + return cropHintsAnnotationBuilder_.getMessageOrBuilder(); + } else { + return cropHintsAnnotation_ == null ? + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder> + getCropHintsAnnotationFieldBuilder() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder>( + getCropHintsAnnotation(), + getParentForChildren(), + isClean()); + cropHintsAnnotation_ = null; + } + return cropHintsAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder> webDetectionBuilder_; + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + public boolean hasWebDetection() { + return webDetectionBuilder_ != null || webDetection_ != null; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + public com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection() { + if (webDetectionBuilder_ == null) { + return webDetection_ == null ? com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; + } else { + return webDetectionBuilder_.getMessage(); + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection(com.google.cloud.vision.v1p2beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetection_ = value; + onChanged(); + } else { + webDetectionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection( + com.google.cloud.vision.v1p2beta1.WebDetection.Builder builderForValue) { + if (webDetectionBuilder_ == null) { + webDetection_ = builderForValue.build(); + onChanged(); + } else { + webDetectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public Builder mergeWebDetection(com.google.cloud.vision.v1p2beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (webDetection_ != null) { + webDetection_ = + com.google.cloud.vision.v1p2beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); + } else { + webDetection_ = value; + } + onChanged(); + } else { + webDetectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public Builder clearWebDetection() { + if (webDetectionBuilder_ == null) { + webDetection_ = null; + onChanged(); + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.Builder getWebDetectionBuilder() { + + onChanged(); + return getWebDetectionFieldBuilder().getBuilder(); + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + if (webDetectionBuilder_ != null) { + return webDetectionBuilder_.getMessageOrBuilder(); + } else { + return webDetection_ == null ? + com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder> + getWebDetectionFieldBuilder() { + if (webDetectionBuilder_ == null) { + webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder>( + getWebDetection(), + getParentForChildren(), + isClean()); + webDetection_ = null; + } + return webDetectionBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder> contextBuilder_; + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext( + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public Builder mergeContext(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageResponse) + private static final com.google.cloud.vision.v1p2beta1.AnnotateImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateImageResponse(); + } + + public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java new file mode 100644 index 000000000000..c9055eb121e9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java @@ -0,0 +1,436 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AnnotateImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + int getFaceAnnotationsCount(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsOrBuilderList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + int getLandmarkAnnotationsCount(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsOrBuilderList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + int getLogoAnnotationsCount(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsOrBuilderList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + int getLabelAnnotationsCount(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + int getTextAnnotationsCount(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + boolean hasFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); + + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + boolean hasSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); + + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + boolean hasImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; + */ + com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); + + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + boolean hasCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); + + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + boolean hasWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; + */ + com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); + + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; + */ + com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java new file mode 100644 index 000000000000..2b086d817049 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java @@ -0,0 +1,1580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * An offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} + */ +public final class AsyncAnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) + AsyncAnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileRequest.newBuilder() to construct. + private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p2beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.vision.v1p2beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (outputConfig_ != null) { + output.writeMessage(4, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest build() { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p2beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p2beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p2beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p2beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) + private static final com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..4052046dcf0d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AsyncAnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p2beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; + */ + com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java new file mode 100644 index 000000000000..58dc4e62a537 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The response for a single offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} + */ +public final class AsyncAnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) + AsyncAnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileResponse.newBuilder() to construct. + private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response for a single offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse build() { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p2beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) + private static final com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..a910bcfd7c7c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AsyncAnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..9133d4c8dfae --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Multiple async file annotation requests are batched into a single service
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} + */ +public final class AsyncBatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) + AsyncBatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. + private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple async file annotation requests are batched into a single service
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..f2aa927ea9f8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AsyncBatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..88364f0ab78e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Response to an async batch file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} + */ +public final class AsyncBatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) + AsyncBatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. + private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..f16c1193c2b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface AsyncBatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..fa3f305982e8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Multiple image annotation requests are batched into a single service call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} + */ +public final class BatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) + BatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesRequest.newBuilder() to construct. + private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple image annotation requests are batched into a single service call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..b068595ed47d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface BatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..bdc96fcca2d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Response to a batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} + */ +public final class BatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) + BatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesResponse.newBuilder() to construct. + private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..3615f5a29e08 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface BatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java new file mode 100644 index 000000000000..70eabde18c66 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java @@ -0,0 +1,1914 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Logical element on the page.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Block} + */ +public final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Block) + BlockOrBuilder { +private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + paragraphs_ = java.util.Collections.emptyList(); + blockType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paragraphs_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Paragraph.parser(), extensionRegistry)); + break; + } + case 32: { + int rawValue = input.readEnum(); + + blockType_ = rawValue; + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Block.class, com.google.cloud.vision.v1p2beta1.Block.Builder.class); + } + + /** + *
+   * Type of a block (text, image etc) as identified by OCR.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.Block.BlockType} + */ + public enum BlockType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + PICTURE(3), + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + RULER(4), + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + BARCODE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + public static final int PICTURE_VALUE = 3; + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + public static final int RULER_VALUE = 4; + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + public static final int BARCODE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TEXT; + case 2: return TABLE; + case 3: return PICTURE; + case 4: return RULER; + case 5: return BARCODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockType findValueByNumber(int number) { + return BlockType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.Block.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockType[] VALUES = values(); + + public static BlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Block.BlockType) + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 3; + private java.util.List paragraphs_; + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List getParagraphsList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + return paragraphs_.get(index); + } + + public static final int BLOCK_TYPE_FIELD_NUMBER = 4; + private int blockType_; + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Block.BlockType result = com.google.cloud.vision.v1p2beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p2beta1.Block.BlockType.UNRECOGNIZED : result; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p2beta1.Block.BlockType.UNKNOWN.getNumber()) { + output.writeEnum(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p2beta1.Block.BlockType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Block)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Block other = (com.google.cloud.vision.v1p2beta1.Block) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList() + .equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + blockType_; + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Logical element on the page.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Block) + com.google.cloud.vision.v1p2beta1.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Block.class, com.google.cloud.vision.v1p2beta1.Block.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getParagraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + paragraphsBuilder_.clear(); + } + blockType_ = 0; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block build() { + com.google.cloud.vision.v1p2beta1.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block buildPartial() { + com.google.cloud.vision.v1p2beta1.Block result = new com.google.cloud.vision.v1p2beta1.Block(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + result.blockType_ = blockType_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Block) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Block other) { + if (other == com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParagraphsFieldBuilder() : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (other.blockType_ != 0) { + setBlockTypeValue(other.getBlockTypeValue()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List paragraphs_ = + java.util.Collections.emptyList(); + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(paragraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder> paragraphsBuilder_; + + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public java.util.List getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p2beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs(com.google.cloud.vision.v1p2beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p2beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder addAllParagraphs( + java.lang.Iterable values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p2beta1.Paragraph.Builder getParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p2beta1.Paragraph.Builder addParagraphsBuilder() { + return getParagraphsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p2beta1.Paragraph.Builder addParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder>( + paragraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private int blockType_ = 0; + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @param value The enum numeric value on the wire for blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockTypeValue(int value) { + + blockType_ = value; + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Block.BlockType result = com.google.cloud.vision.v1p2beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p2beta1.Block.BlockType.UNRECOGNIZED : result; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @param value The blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockType(com.google.cloud.vision.v1p2beta1.Block.BlockType value) { + if (value == null) { + throw new NullPointerException(); + } + + blockType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return This builder for chaining. + */ + public Builder clearBlockType() { + + blockType_ = 0; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Block) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Block) + private static final com.google.cloud.vision.v1p2beta1.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Block(); + } + + public static com.google.cloud.vision.v1p2beta1.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java new file mode 100644 index 000000000000..ef09321b576b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + int getParagraphsCount(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsOrBuilderList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index); + + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + int getBlockTypeValue(); + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType(); + + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java new file mode 100644 index 000000000000..68010ef4b5da --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java @@ -0,0 +1,1312 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A bounding polygon for the detected image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BoundingPoly} + */ +public final class BoundingPoly extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BoundingPoly) + BoundingPolyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Vertex.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + normalizedVertices_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.NormalizedVertex.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BoundingPoly.class, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List getVerticesList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + @java.lang.Override + public int getVerticesCount() { + return vertices_.size(); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + return vertices_.get(index); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; + private java.util.List normalizedVertices_; + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(2, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.BoundingPoly other = (com.google.cloud.vision.v1p2beta1.BoundingPoly) obj; + + if (!getVerticesList() + .equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList() + .equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A bounding polygon for the detected image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.BoundingPoly} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BoundingPoly) + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.BoundingPoly.class, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + getNormalizedVerticesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly build() { + com.google.cloud.vision.v1p2beta1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly buildPartial() { + com.google.cloud.vision.v1p2beta1.BoundingPoly result = new com.google.cloud.vision.v1p2beta1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.BoundingPoly) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.BoundingPoly)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BoundingPoly other) { + if (other == com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVerticesFieldBuilder() : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNormalizedVerticesFieldBuilder() : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder> verticesBuilder_; + + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p2beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.vision.v1p2beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p2beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p2beta1.Vertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; + + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices(com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BoundingPoly) + private static final com.google.cloud.vision.v1p2beta1.BoundingPoly DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BoundingPoly(); + } + + public static com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..b173fb638213 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface BoundingPolyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( + int index); + + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + int getNormalizedVerticesCount(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java new file mode 100644 index 000000000000..dd9c2689bbf2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java @@ -0,0 +1,835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Color information consists of RGB channels, score, and the fraction of
+ * the image that the color occupies in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ColorInfo} + */ +public final class ColorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ColorInfo) + ColorInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ColorInfo.newBuilder() to construct. + private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 29: { + + pixelFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ColorInfo.class, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private com.google.type.Color color_; + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return color_ != null; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return getColor(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; + private float pixelFraction_; + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != null) { + output.writeMessage(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + output.writeFloat(3, pixelFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, pixelFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ColorInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.ColorInfo other = (com.google.cloud.vision.v1p2beta1.ColorInfo) obj; + + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor() + .equals(other.getColor())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits( + other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPixelFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ColorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Color information consists of RGB channels, score, and the fraction of
+   * the image that the color occupies in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ColorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ColorInfo) + com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ColorInfo.class, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.ColorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + score_ = 0F; + + pixelFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfo build() { + com.google.cloud.vision.v1p2beta1.ColorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfo buildPartial() { + com.google.cloud.vision.v1p2beta1.ColorInfo result = new com.google.cloud.vision.v1p2beta1.ColorInfo(this); + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + result.score_ = score_; + result.pixelFraction_ = pixelFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.ColorInfo) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.ColorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ColorInfo other) { + if (other == com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()) return this; + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getPixelFraction() != 0F) { + setPixelFraction(other.getPixelFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.ColorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.ColorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor( + com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.Color.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.google.type.Color.getDefaultInstance() : color_; + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + + private float score_ ; + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float pixelFraction_ ; + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @param value The pixelFraction to set. + * @return This builder for chaining. + */ + public Builder setPixelFraction(float value) { + + pixelFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearPixelFraction() { + + pixelFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ColorInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ColorInfo) + private static final com.google.cloud.vision.v1p2beta1.ColorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ColorInfo(); + } + + public static com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java new file mode 100644 index 000000000000..f8504f6f4136 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ColorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ColorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + boolean hasColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + com.google.type.Color getColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + com.google.type.ColorOrBuilder getColorOrBuilder(); + + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + float getPixelFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java new file mode 100644 index 000000000000..0c67762e0273 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java @@ -0,0 +1,845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Single crop hint that is used to generate a new crop when serving an image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHint} + */ +public final class CropHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHint) + CropHintOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHint.newBuilder() to construct. + private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHint() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + case 29: { + + importanceFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHint.class, com.google.cloud.vision.v1p2beta1.CropHint.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; + private float importanceFraction_; + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + output.writeFloat(3, importanceFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, importanceFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHint)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.CropHint other = (com.google.cloud.vision.v1p2beta1.CropHint) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits( + other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImportanceFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Single crop hint that is used to generate a new crop when serving an image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHint) + com.google.cloud.vision.v1p2beta1.CropHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHint.class, com.google.cloud.vision.v1p2beta1.CropHint.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.CropHint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + confidence_ = 0F; + + importanceFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHint build() { + com.google.cloud.vision.v1p2beta1.CropHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHint buildPartial() { + com.google.cloud.vision.v1p2beta1.CropHint result = new com.google.cloud.vision.v1p2beta1.CropHint(this); + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.confidence_ = confidence_; + result.importanceFraction_ = importanceFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.CropHint) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHint other) { + if (other == com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getImportanceFraction() != 0F) { + setImportanceFraction(other.getImportanceFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.CropHint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float importanceFraction_ ; + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @param value The importanceFraction to set. + * @return This builder for chaining. + */ + public Builder setImportanceFraction(float value) { + + importanceFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearImportanceFraction() { + + importanceFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHint) + private static final com.google.cloud.vision.v1p2beta1.CropHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHint(); + } + + public static com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java new file mode 100644 index 000000000000..dd3ed9e88583 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface CropHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + float getImportanceFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java new file mode 100644 index 000000000000..1d0643eb5654 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Set of crop hints that are used to generate new crops when serving images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsAnnotation} + */ +public final class CropHintsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHintsAnnotation) + CropHintsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsAnnotation.newBuilder() to construct. + private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsAnnotation() { + cropHints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cropHints_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.CropHint.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder.class); + } + + public static final int CROP_HINTS_FIELD_NUMBER = 1; + private java.util.List cropHints_; + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List getCropHintsList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List + getCropHintsOrBuilderList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public int getCropHintsCount() { + return cropHints_.size(); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index) { + return cropHints_.get(index); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + return cropHints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cropHints_.size(); i++) { + output.writeMessage(1, cropHints_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cropHints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, cropHints_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHintsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) obj; + + if (!getCropHintsList() + .equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCropHintsCount() > 0) { + hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of crop hints that are used to generate new crops when serving images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHintsAnnotation) + com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCropHintsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation build() { + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p2beta1.CropHintsAnnotation(this); + int from_bitField0_ = bitField0_; + if (cropHintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cropHints_ = cropHints_; + } else { + result.cropHints_ = cropHintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHintsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance()) return this; + if (cropHintsBuilder_ == null) { + if (!other.cropHints_.isEmpty()) { + if (cropHints_.isEmpty()) { + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCropHintsIsMutable(); + cropHints_.addAll(other.cropHints_); + } + onChanged(); + } + } else { + if (!other.cropHints_.isEmpty()) { + if (cropHintsBuilder_.isEmpty()) { + cropHintsBuilder_.dispose(); + cropHintsBuilder_ = null; + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + cropHintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCropHintsFieldBuilder() : null; + } else { + cropHintsBuilder_.addAllMessages(other.cropHints_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List cropHints_ = + java.util.Collections.emptyList(); + private void ensureCropHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(cropHints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder> cropHintsBuilder_; + + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public java.util.List getCropHintsList() { + if (cropHintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cropHints_); + } else { + return cropHintsBuilder_.getMessageList(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public int getCropHintsCount() { + if (cropHintsBuilder_ == null) { + return cropHints_.size(); + } else { + return cropHintsBuilder_.getCount(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); + } else { + return cropHintsBuilder_.getMessage(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p2beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.set(index, value); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.set(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints(com.google.cloud.vision.v1p2beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p2beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(index, value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder addAllCropHints( + java.lang.Iterable values) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cropHints_); + onChanged(); + } else { + cropHintsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder clearCropHints() { + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public Builder removeCropHints(int index) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.remove(index); + onChanged(); + } else { + cropHintsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p2beta1.CropHint.Builder getCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().getBuilder(index); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); } else { + return cropHintsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsOrBuilderList() { + if (cropHintsBuilder_ != null) { + return cropHintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cropHints_); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder() { + return getCropHintsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsBuilderList() { + return getCropHintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder> + getCropHintsFieldBuilder() { + if (cropHintsBuilder_ == null) { + cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder>( + cropHints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cropHints_ = null; + } + return cropHintsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHintsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsAnnotation) + private static final com.google.cloud.vision.v1p2beta1.CropHintsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHintsAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java new file mode 100644 index 000000000000..5aeb3fb4336c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface CropHintsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHintsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + int getCropHintsCount(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsOrBuilderList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java new file mode 100644 index 000000000000..9d91ec28766f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java @@ -0,0 +1,696 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Parameters for crop hints annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsParams} + */ +public final class CropHintsParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHintsParams) + CropHintsParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsParams.newBuilder() to construct. + private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsParams() { + aspectRatios_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + aspectRatios_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + aspectRatios_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHintsParams.class, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder.class); + } + + public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList aspectRatios_; + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + @java.lang.Override + public java.util.List + getAspectRatiosList() { + return aspectRatios_; + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + private int aspectRatiosMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getAspectRatiosList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); + } + for (int i = 0; i < aspectRatios_.size(); i++) { + output.writeFloatNoTag(aspectRatios_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getAspectRatiosList().size(); + size += dataSize; + if (!getAspectRatiosList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + aspectRatiosMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHintsParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.CropHintsParams other = (com.google.cloud.vision.v1p2beta1.CropHintsParams) obj; + + if (!getAspectRatiosList() + .equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAspectRatiosCount() > 0) { + hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; + hash = (53 * hash) + getAspectRatiosList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHintsParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHintsParams) + com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.CropHintsParams.class, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.CropHintsParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParams build() { + com.google.cloud.vision.v1p2beta1.CropHintsParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParams buildPartial() { + com.google.cloud.vision.v1p2beta1.CropHintsParams result = new com.google.cloud.vision.v1p2beta1.CropHintsParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aspectRatios_ = aspectRatios_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.CropHintsParams) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHintsParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHintsParams other) { + if (other == com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance()) return this; + if (!other.aspectRatios_.isEmpty()) { + if (aspectRatios_.isEmpty()) { + aspectRatios_ = other.aspectRatios_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAspectRatiosIsMutable(); + aspectRatios_.addAll(other.aspectRatios_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.CropHintsParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHintsParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); + private void ensureAspectRatiosIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + public java.util.List + getAspectRatiosList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index to set the value at. + * @param value The aspectRatios to set. + * @return This builder for chaining. + */ + public Builder setAspectRatios( + int index, float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param value The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAspectRatios(float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.addFloat(value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param values The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAllAspectRatios( + java.lang.Iterable values) { + ensureAspectRatiosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aspectRatios_); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return This builder for chaining. + */ + public Builder clearAspectRatios() { + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHintsParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsParams) + private static final com.google.cloud.vision.v1p2beta1.CropHintsParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHintsParams(); + } + + public static com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java new file mode 100644 index 000000000000..74f0fc357716 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface CropHintsParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHintsParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + java.util.List getAspectRatiosList(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + int getAspectRatiosCount(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + float getAspectRatios(int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java new file mode 100644 index 000000000000..ee8b9f8e0a77 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Set of dominant colors and their corresponding scores.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.DominantColorsAnnotation} + */ +public final class DominantColorsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) + DominantColorsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DominantColorsAnnotation.newBuilder() to construct. + private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DominantColorsAnnotation() { + colors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DominantColorsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DominantColorsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + colors_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.ColorInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder.class); + } + + public static final int COLORS_FIELD_NUMBER = 1; + private java.util.List colors_; + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List getColorsList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List + getColorsOrBuilderList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public int getColorsCount() { + return colors_.size(); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index) { + return colors_.get(index); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + return colors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < colors_.size(); i++) { + output.writeMessage(1, colors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < colors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, colors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) obj; + + if (!getColorsList() + .equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColorsCount() > 0) { + hash = (37 * hash) + COLORS_FIELD_NUMBER; + hash = (53 * hash) + getColorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of dominant colors and their corresponding scores.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.DominantColorsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + colorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation build() { + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation(this); + int from_bitField0_ = bitField0_; + if (colorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.colors_ = colors_; + } else { + result.colors_ = colorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance()) return this; + if (colorsBuilder_ == null) { + if (!other.colors_.isEmpty()) { + if (colors_.isEmpty()) { + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColorsIsMutable(); + colors_.addAll(other.colors_); + } + onChanged(); + } + } else { + if (!other.colors_.isEmpty()) { + if (colorsBuilder_.isEmpty()) { + colorsBuilder_.dispose(); + colorsBuilder_ = null; + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + colorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getColorsFieldBuilder() : null; + } else { + colorsBuilder_.addAllMessages(other.colors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List colors_ = + java.util.Collections.emptyList(); + private void ensureColorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(colors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder> colorsBuilder_; + + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public java.util.List getColorsList() { + if (colorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(colors_); + } else { + return colorsBuilder_.getMessageList(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public int getColorsCount() { + if (colorsBuilder_ == null) { + return colors_.size(); + } else { + return colorsBuilder_.getCount(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); + } else { + return colorsBuilder_.getMessage(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p2beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.set(index, value); + onChanged(); + } else { + colorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.set(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder addColors(com.google.cloud.vision.v1p2beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(value); + onChanged(); + } else { + colorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p2beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(index, value); + onChanged(); + } else { + colorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder addColors( + com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder addAllColors( + java.lang.Iterable values) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, colors_); + onChanged(); + } else { + colorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder clearColors() { + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + colorsBuilder_.clear(); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public Builder removeColors(int index) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.remove(index); + onChanged(); + } else { + colorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder getColorsBuilder( + int index) { + return getColorsFieldBuilder().getBuilder(index); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); } else { + return colorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsOrBuilderList() { + if (colorsBuilder_ != null) { + return colorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(colors_); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder() { + return getColorsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder( + int index) { + return getColorsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsBuilderList() { + return getColorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder> + getColorsFieldBuilder() { + if (colorsBuilder_ == null) { + colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder>( + colors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + colors_ = null; + } + return colorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) + private static final com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DominantColorsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DominantColorsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java new file mode 100644 index 000000000000..69e28e73e98c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface DominantColorsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + int getColorsCount(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsOrBuilderList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java new file mode 100644 index 000000000000..d7eb4eb89c77 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java @@ -0,0 +1,2472 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Set of detected entity features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.EntityAnnotation} + */ +public final class EntityAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.EntityAnnotation) + EntityAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityAnnotation.newBuilder() to construct. + private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityAnnotation() { + mid_ = ""; + locale_ = ""; + description_ = ""; + locations_ = java.util.Collections.emptyList(); + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + locale_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + case 53: { + + topicality_ = input.readFloat(); + break; + } + case 58: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.LocationInfo.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + properties_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Property.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.class, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALE_FIELD_NUMBER = 2; + private volatile java.lang.Object locale_; + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + @java.lang.Override + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } + } + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int TOPICALITY_FIELD_NUMBER = 6; + private float topicality_; + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 7; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int LOCATIONS_FIELD_NUMBER = 8; + private java.util.List locations_; + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index) { + return locations_.get(index); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + return locations_.get(index); + } + + public static final int PROPERTIES_FIELD_NUMBER = 9; + private java.util.List properties_; + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Property getProperties(int index) { + return properties_.get(index); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + output.writeFloat(6, topicality_); + } + if (boundingPoly_ != null) { + output.writeMessage(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(9, properties_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, topicality_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, properties_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.EntityAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.EntityAnnotation other = (com.google.cloud.vision.v1p2beta1.EntityAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLocale() + .equals(other.getLocale())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits( + other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getLocationsList() + .equals(other.getLocationsList())) return false; + if (!getPropertiesList() + .equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLocale().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTopicality()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.EntityAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected entity features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.EntityAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.EntityAnnotation) + com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.EntityAnnotation.class, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.EntityAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + locale_ = ""; + + description_ = ""; + + score_ = 0F; + + confidence_ = 0F; + + topicality_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + propertiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation build() { + com.google.cloud.vision.v1p2beta1.EntityAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.EntityAnnotation result = new com.google.cloud.vision.v1p2beta1.EntityAnnotation(this); + int from_bitField0_ = bitField0_; + result.mid_ = mid_; + result.locale_ = locale_; + result.description_ = description_; + result.score_ = score_; + result.confidence_ = confidence_; + result.topicality_ = topicality_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.EntityAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.EntityAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.EntityAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLocale().isEmpty()) { + locale_ = other.locale_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getTopicality() != 0F) { + setTopicality(other.getTopicality()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPropertiesFieldBuilder() : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.EntityAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.EntityAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object mid_ = ""; + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object locale_ = ""; + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The locale. + */ + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The locale to set. + * @return This builder for chaining. + */ + public Builder setLocale( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locale_ = value; + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return This builder for chaining. + */ + public Builder clearLocale() { + + locale_ = getDefaultInstance().getLocale(); + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The bytes for locale to set. + * @return This builder for chaining. + */ + public Builder setLocaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locale_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float topicality_ ; + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @param value The topicality to set. + * @return This builder for chaining. + */ + public Builder setTopicality(float value) { + + topicality_ = value; + onChanged(); + return this; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return This builder for chaining. + */ + public Builder clearTopicality() { + + topicality_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder> locationsBuilder_; + + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p2beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder addLocations(com.google.cloud.vision.v1p2beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p2beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder getLocationsBuilder( + int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilder( + int index) { + return getLocationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder>( + locations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List properties_ = + java.util.Collections.emptyList(); + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder> propertiesBuilder_; + + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p2beta1.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p2beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder addProperties(com.google.cloud.vision.v1p2beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p2beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder addProperties( + com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p2beta1.Property.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder>( + properties_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.EntityAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.EntityAnnotation) + private static final com.google.cloud.vision.v1p2beta1.EntityAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.EntityAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java new file mode 100644 index 000000000000..5d6d50377ece --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java @@ -0,0 +1,256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface EntityAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.EntityAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + java.lang.String getLocale(); + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + com.google.protobuf.ByteString + getLocaleBytes(); + + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + float getTopicality(); + + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + int getLocationsCount(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsOrBuilderList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index); + + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + java.util.List + getPropertiesList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p2beta1.Property getProperties(int index); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + int getPropertiesCount(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java new file mode 100644 index 000000000000..d82c429d0b09 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java @@ -0,0 +1,4300 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A face annotation object contains the results of face detection.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation} + */ +public final class FaceAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.FaceAnnotation) + FaceAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceAnnotation.newBuilder() to construct. + private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceAnnotation() { + landmarks_ = java.util.Collections.emptyList(); + joyLikelihood_ = 0; + sorrowLikelihood_ = 0; + angerLikelihood_ = 0; + surpriseLikelihood_ = 0; + underExposedLikelihood_ = 0; + blurredLikelihood_ = 0; + headwearLikelihood_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (fdBoundingPoly_ != null) { + subBuilder = fdBoundingPoly_.toBuilder(); + } + fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fdBoundingPoly_); + fdBoundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + landmarks_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); + break; + } + case 37: { + + rollAngle_ = input.readFloat(); + break; + } + case 45: { + + panAngle_ = input.readFloat(); + break; + } + case 53: { + + tiltAngle_ = input.readFloat(); + break; + } + case 61: { + + detectionConfidence_ = input.readFloat(); + break; + } + case 69: { + + landmarkingConfidence_ = input.readFloat(); + break; + } + case 72: { + int rawValue = input.readEnum(); + + joyLikelihood_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + sorrowLikelihood_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + angerLikelihood_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + surpriseLikelihood_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + underExposedLikelihood_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + blurredLikelihood_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + headwearLikelihood_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder.class); + } + + public interface LandmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType(); + + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return The position. + */ + com.google.cloud.vision.v1p2beta1.Position getPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder(); + } + /** + *
+   * A face-specific landmark (for example, a face feature).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} + */ + public static final class Landmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Landmark() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Landmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Landmark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + com.google.cloud.vision.v1p2beta1.Position.Builder subBuilder = null; + if (position_ != null) { + subBuilder = position_.toBuilder(); + } + position_ = input.readMessage(com.google.cloud.vision.v1p2beta1.Position.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(position_); + position_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder.class); + } + + /** + *
+     * Face landmark (feature) type.
+     * Left and right are defined from the vantage of the viewer of the image
+     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
+     * typically, is the person's right eye.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + UNKNOWN_LANDMARK(0), + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + LEFT_EYE(1), + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + RIGHT_EYE(2), + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + LEFT_OF_LEFT_EYEBROW(3), + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + RIGHT_OF_LEFT_EYEBROW(4), + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + LEFT_OF_RIGHT_EYEBROW(5), + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + RIGHT_OF_RIGHT_EYEBROW(6), + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + MIDPOINT_BETWEEN_EYES(7), + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + NOSE_TIP(8), + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + UPPER_LIP(9), + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + LOWER_LIP(10), + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + MOUTH_LEFT(11), + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + MOUTH_RIGHT(12), + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + MOUTH_CENTER(13), + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + NOSE_BOTTOM_RIGHT(14), + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + NOSE_BOTTOM_LEFT(15), + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + NOSE_BOTTOM_CENTER(16), + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + LEFT_EYE_TOP_BOUNDARY(17), + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + LEFT_EYE_RIGHT_CORNER(18), + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + LEFT_EYE_BOTTOM_BOUNDARY(19), + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + LEFT_EYE_LEFT_CORNER(20), + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + RIGHT_EYE_TOP_BOUNDARY(21), + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + RIGHT_EYE_RIGHT_CORNER(22), + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + RIGHT_EYE_BOTTOM_BOUNDARY(23), + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + RIGHT_EYE_LEFT_CORNER(24), + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + LEFT_EYEBROW_UPPER_MIDPOINT(25), + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + RIGHT_EYEBROW_UPPER_MIDPOINT(26), + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + LEFT_EAR_TRAGION(27), + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + RIGHT_EAR_TRAGION(28), + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + LEFT_EYE_PUPIL(29), + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + RIGHT_EYE_PUPIL(30), + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + FOREHEAD_GLABELLA(31), + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + CHIN_GNATHION(32), + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + CHIN_LEFT_GONION(33), + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + CHIN_RIGHT_GONION(34), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + public static final int UNKNOWN_LANDMARK_VALUE = 0; + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + public static final int LEFT_EYE_VALUE = 1; + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + public static final int RIGHT_EYE_VALUE = 2; + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + public static final int NOSE_TIP_VALUE = 8; + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + public static final int UPPER_LIP_VALUE = 9; + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + public static final int LOWER_LIP_VALUE = 10; + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + public static final int MOUTH_LEFT_VALUE = 11; + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + public static final int MOUTH_RIGHT_VALUE = 12; + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + public static final int MOUTH_CENTER_VALUE = 13; + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + public static final int NOSE_BOTTOM_LEFT_VALUE = 15; + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + public static final int NOSE_BOTTOM_CENTER_VALUE = 16; + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + public static final int LEFT_EAR_TRAGION_VALUE = 27; + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + public static final int RIGHT_EAR_TRAGION_VALUE = 28; + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + public static final int LEFT_EYE_PUPIL_VALUE = 29; + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + public static final int RIGHT_EYE_PUPIL_VALUE = 30; + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + public static final int FOREHEAD_GLABELLA_VALUE = 31; + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + public static final int CHIN_GNATHION_VALUE = 32; + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + public static final int CHIN_LEFT_GONION_VALUE = 33; + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + public static final int CHIN_RIGHT_GONION_VALUE = 34; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_LANDMARK; + case 1: return LEFT_EYE; + case 2: return RIGHT_EYE; + case 3: return LEFT_OF_LEFT_EYEBROW; + case 4: return RIGHT_OF_LEFT_EYEBROW; + case 5: return LEFT_OF_RIGHT_EYEBROW; + case 6: return RIGHT_OF_RIGHT_EYEBROW; + case 7: return MIDPOINT_BETWEEN_EYES; + case 8: return NOSE_TIP; + case 9: return UPPER_LIP; + case 10: return LOWER_LIP; + case 11: return MOUTH_LEFT; + case 12: return MOUTH_RIGHT; + case 13: return MOUTH_CENTER; + case 14: return NOSE_BOTTOM_RIGHT; + case 15: return NOSE_BOTTOM_LEFT; + case 16: return NOSE_BOTTOM_CENTER; + case 17: return LEFT_EYE_TOP_BOUNDARY; + case 18: return LEFT_EYE_RIGHT_CORNER; + case 19: return LEFT_EYE_BOTTOM_BOUNDARY; + case 20: return LEFT_EYE_LEFT_CORNER; + case 21: return RIGHT_EYE_TOP_BOUNDARY; + case 22: return RIGHT_EYE_RIGHT_CORNER; + case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; + case 24: return RIGHT_EYE_LEFT_CORNER; + case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; + case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; + case 27: return LEFT_EAR_TRAGION; + case 28: return RIGHT_EAR_TRAGION; + case 29: return LEFT_EYE_PUPIL; + case 30: return RIGHT_EYE_PUPIL; + case 31: return FOREHEAD_GLABELLA; + case 32: return CHIN_GNATHION; + case 33: return CHIN_LEFT_GONION; + case 34: return CHIN_RIGHT_GONION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type) + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p2beta1.Position position_; + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return position_ != null; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return The position. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Position getPosition() { + return position_ == null ? com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder() { + return getPosition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + output.writeEnum(3, type_); + } + if (position_ != null) { + output.writeMessage(4, getPosition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (position_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) obj; + + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A face-specific landmark (for example, a face feature).
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) + com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + if (positionBuilder_ == null) { + position_ = null; + } else { + position_ = null; + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark build() { + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark buildPartial() { + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark(this); + result.type_ = type_; + if (positionBuilder_ == null) { + result.position_ = position_; + } else { + result.position_ = positionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark other) { + if (other == com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p2beta1.Position position_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder> positionBuilder_; + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return positionBuilder_ != null || position_ != null; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + * @return The position. + */ + public com.google.cloud.vision.v1p2beta1.Position getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public Builder setPosition(com.google.cloud.vision.v1p2beta1.Position value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + onChanged(); + } else { + positionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public Builder setPosition( + com.google.cloud.vision.v1p2beta1.Position.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + onChanged(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public Builder mergePosition(com.google.cloud.vision.v1p2beta1.Position value) { + if (positionBuilder_ == null) { + if (position_ != null) { + position_ = + com.google.cloud.vision.v1p2beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); + } else { + position_ = value; + } + onChanged(); + } else { + positionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public Builder clearPosition() { + if (positionBuilder_ == null) { + position_ = null; + onChanged(); + } else { + position_ = null; + positionBuilder_ = null; + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p2beta1.Position.Builder getPositionBuilder() { + + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.Position position = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) + private static final com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark(); + } + + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Landmark(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_; + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + @java.lang.Override + public boolean hasFdBoundingPoly() { + return fdBoundingPoly_ != null; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly() { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + return getFdBoundingPoly(); + } + + public static final int LANDMARKS_FIELD_NUMBER = 3; + private java.util.List landmarks_; + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + return landmarks_.get(index); + } + + public static final int ROLL_ANGLE_FIELD_NUMBER = 4; + private float rollAngle_; + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + + public static final int PAN_ANGLE_FIELD_NUMBER = 5; + private float panAngle_; + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + + public static final int TILT_ANGLE_FIELD_NUMBER = 6; + private float tiltAngle_; + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + + public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; + private float detectionConfidence_; + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + + public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; + private float landmarkingConfidence_; + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + + public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; + private int joyLikelihood_; + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; + private int sorrowLikelihood_; + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; + private int angerLikelihood_; + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; + private int surpriseLikelihood_; + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; + private int underExposedLikelihood_; + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; + private int blurredLikelihood_; + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; + private int headwearLikelihood_; + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + output.writeMessage(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + output.writeFloat(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + output.writeFloat(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + output.writeFloat(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + output.writeFloat(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + output.writeFloat(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(15, headwearLikelihood_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, headwearLikelihood_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.FaceAnnotation other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; + if (hasFdBoundingPoly()) { + if (!getFdBoundingPoly() + .equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList() + .equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits( + other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits( + other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits( + other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits( + other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits( + other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (hasFdBoundingPoly()) { + hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getFdBoundingPoly().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRollAngle()); + hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPanAngle()); + hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTiltAngle()); + hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDetectionConfidence()); + hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLandmarkingConfidence()); + hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + joyLikelihood_; + hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + sorrowLikelihood_; + hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + angerLikelihood_; + hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + surpriseLikelihood_; + hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + underExposedLikelihood_; + hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + blurredLikelihood_; + hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + headwearLikelihood_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.FaceAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A face annotation object contains the results of face detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.FaceAnnotation) + com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.FaceAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLandmarksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + landmarksBuilder_.clear(); + } + rollAngle_ = 0F; + + panAngle_ = 0F; + + tiltAngle_ = 0F; + + detectionConfidence_ = 0F; + + landmarkingConfidence_ = 0F; + + joyLikelihood_ = 0; + + sorrowLikelihood_ = 0; + + angerLikelihood_ = 0; + + surpriseLikelihood_ = 0; + + underExposedLikelihood_ = 0; + + blurredLikelihood_ = 0; + + headwearLikelihood_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation build() { + com.google.cloud.vision.v1p2beta1.FaceAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.FaceAnnotation result = new com.google.cloud.vision.v1p2beta1.FaceAnnotation(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (fdBoundingPolyBuilder_ == null) { + result.fdBoundingPoly_ = fdBoundingPoly_; + } else { + result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + result.rollAngle_ = rollAngle_; + result.panAngle_ = panAngle_; + result.tiltAngle_ = tiltAngle_; + result.detectionConfidence_ = detectionConfidence_; + result.landmarkingConfidence_ = landmarkingConfidence_; + result.joyLikelihood_ = joyLikelihood_; + result.sorrowLikelihood_ = sorrowLikelihood_; + result.angerLikelihood_ = angerLikelihood_; + result.surpriseLikelihood_ = surpriseLikelihood_; + result.underExposedLikelihood_ = underExposedLikelihood_; + result.blurredLikelihood_ = blurredLikelihood_; + result.headwearLikelihood_ = headwearLikelihood_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.FaceAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.FaceAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.hasFdBoundingPoly()) { + mergeFdBoundingPoly(other.getFdBoundingPoly()); + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarksFieldBuilder() : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (other.getRollAngle() != 0F) { + setRollAngle(other.getRollAngle()); + } + if (other.getPanAngle() != 0F) { + setPanAngle(other.getPanAngle()); + } + if (other.getTiltAngle() != 0F) { + setTiltAngle(other.getTiltAngle()); + } + if (other.getDetectionConfidence() != 0F) { + setDetectionConfidence(other.getDetectionConfidence()); + } + if (other.getLandmarkingConfidence() != 0F) { + setLandmarkingConfidence(other.getLandmarkingConfidence()); + } + if (other.joyLikelihood_ != 0) { + setJoyLikelihoodValue(other.getJoyLikelihoodValue()); + } + if (other.sorrowLikelihood_ != 0) { + setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); + } + if (other.angerLikelihood_ != 0) { + setAngerLikelihoodValue(other.getAngerLikelihoodValue()); + } + if (other.surpriseLikelihood_ != 0) { + setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); + } + if (other.underExposedLikelihood_ != 0) { + setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); + } + if (other.blurredLikelihood_ != 0) { + setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); + } + if (other.headwearLikelihood_ != 0) { + setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.FaceAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.FaceAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + public boolean hasFdBoundingPoly() { + return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } else { + return fdBoundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fdBoundingPoly_ = value; + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = builderForValue.build(); + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (fdBoundingPoly_ != null) { + fdBoundingPoly_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); + } else { + fdBoundingPoly_ = value; + } + onChanged(); + } else { + fdBoundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder clearFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + onChanged(); + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { + + onChanged(); + return getFdBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + if (fdBoundingPolyBuilder_ != null) { + return fdBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + return fdBoundingPoly_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getFdBoundingPolyFieldBuilder() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getFdBoundingPoly(), + getParentForChildren(), + isClean()); + fdBoundingPoly_ = null; + } + return fdBoundingPolyBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; + + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().getBuilder(index); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { + return getLandmarksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksBuilderList() { + return getLandmarksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder> + getLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder>( + landmarks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private float rollAngle_ ; + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @param value The rollAngle to set. + * @return This builder for chaining. + */ + public Builder setRollAngle(float value) { + + rollAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return This builder for chaining. + */ + public Builder clearRollAngle() { + + rollAngle_ = 0F; + onChanged(); + return this; + } + + private float panAngle_ ; + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @param value The panAngle to set. + * @return This builder for chaining. + */ + public Builder setPanAngle(float value) { + + panAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return This builder for chaining. + */ + public Builder clearPanAngle() { + + panAngle_ = 0F; + onChanged(); + return this; + } + + private float tiltAngle_ ; + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @param value The tiltAngle to set. + * @return This builder for chaining. + */ + public Builder setTiltAngle(float value) { + + tiltAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return This builder for chaining. + */ + public Builder clearTiltAngle() { + + tiltAngle_ = 0F; + onChanged(); + return this; + } + + private float detectionConfidence_ ; + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @param value The detectionConfidence to set. + * @return This builder for chaining. + */ + public Builder setDetectionConfidence(float value) { + + detectionConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return This builder for chaining. + */ + public Builder clearDetectionConfidence() { + + detectionConfidence_ = 0F; + onChanged(); + return this; + } + + private float landmarkingConfidence_ ; + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @param value The landmarkingConfidence to set. + * @return This builder for chaining. + */ + public Builder setLandmarkingConfidence(float value) { + + landmarkingConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return This builder for chaining. + */ + public Builder clearLandmarkingConfidence() { + + landmarkingConfidence_ = 0F; + onChanged(); + return this; + } + + private int joyLikelihood_ = 0; + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @param value The enum numeric value on the wire for joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihoodValue(int value) { + + joyLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @param value The joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + joyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return This builder for chaining. + */ + public Builder clearJoyLikelihood() { + + joyLikelihood_ = 0; + onChanged(); + return this; + } + + private int sorrowLikelihood_ = 0; + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @param value The enum numeric value on the wire for sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihoodValue(int value) { + + sorrowLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @param value The sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + sorrowLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return This builder for chaining. + */ + public Builder clearSorrowLikelihood() { + + sorrowLikelihood_ = 0; + onChanged(); + return this; + } + + private int angerLikelihood_ = 0; + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @param value The enum numeric value on the wire for angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihoodValue(int value) { + + angerLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @param value The angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + angerLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return This builder for chaining. + */ + public Builder clearAngerLikelihood() { + + angerLikelihood_ = 0; + onChanged(); + return this; + } + + private int surpriseLikelihood_ = 0; + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @param value The enum numeric value on the wire for surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihoodValue(int value) { + + surpriseLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @param value The surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + surpriseLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return This builder for chaining. + */ + public Builder clearSurpriseLikelihood() { + + surpriseLikelihood_ = 0; + onChanged(); + return this; + } + + private int underExposedLikelihood_ = 0; + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @param value The enum numeric value on the wire for underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihoodValue(int value) { + + underExposedLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @param value The underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + underExposedLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return This builder for chaining. + */ + public Builder clearUnderExposedLikelihood() { + + underExposedLikelihood_ = 0; + onChanged(); + return this; + } + + private int blurredLikelihood_ = 0; + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @param value The enum numeric value on the wire for blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihoodValue(int value) { + + blurredLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @param value The blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + blurredLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return This builder for chaining. + */ + public Builder clearBlurredLikelihood() { + + blurredLikelihood_ = 0; + onChanged(); + return this; + } + + private int headwearLikelihood_ = 0; + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @param value The enum numeric value on the wire for headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihoodValue(int value) { + + headwearLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @param value The headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + headwearLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return This builder for chaining. + */ + public Builder clearHeadwearLikelihood() { + + headwearLikelihood_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.FaceAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation) + private static final com.google.cloud.vision.v1p2beta1.FaceAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.FaceAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java new file mode 100644 index 000000000000..84e2c7755766 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java @@ -0,0 +1,328 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface FaceAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.FaceAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + boolean hasFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); + + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + int getLandmarksCount(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksOrBuilderList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index); + + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + float getRollAngle(); + + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + float getPanAngle(); + + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + float getTiltAngle(); + + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + float getDetectionConfidence(); + + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + float getLandmarkingConfidence(); + + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + int getJoyLikelihoodValue(); + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood(); + + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + int getSorrowLikelihoodValue(); + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood(); + + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + int getAngerLikelihoodValue(); + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood(); + + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + int getSurpriseLikelihoodValue(); + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood(); + + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + int getUnderExposedLikelihoodValue(); + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood(); + + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + int getBlurredLikelihoodValue(); + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood(); + + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + int getHeadwearLikelihoodValue(); + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java new file mode 100644 index 000000000000..6086c3e620f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java @@ -0,0 +1,1119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The type of Google Cloud Vision API detection to perform, and the maximum
+ * number of results to return for that type. Multiple `Feature` objects can
+ * be specified in the `features` list.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + type_ = 0; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + maxResults_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Feature.class, com.google.cloud.vision.v1p2beta1.Feature.Builder.class); + } + + /** + *
+   * Type of Google Cloud Vision API feature to be extracted.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.Feature.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + FACE_DETECTION(1), + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + LANDMARK_DETECTION(2), + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + LOGO_DETECTION(3), + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + LABEL_DETECTION(4), + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + TEXT_DETECTION(5), + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + DOCUMENT_TEXT_DETECTION(11), + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + SAFE_SEARCH_DETECTION(6), + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + IMAGE_PROPERTIES(7), + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + CROP_HINTS(9), + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + WEB_DETECTION(10), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + public static final int FACE_DETECTION_VALUE = 1; + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + public static final int LANDMARK_DETECTION_VALUE = 2; + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + public static final int LOGO_DETECTION_VALUE = 3; + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + public static final int LABEL_DETECTION_VALUE = 4; + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + public static final int TEXT_DETECTION_VALUE = 5; + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + public static final int SAFE_SEARCH_DETECTION_VALUE = 6; + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + public static final int IMAGE_PROPERTIES_VALUE = 7; + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + public static final int CROP_HINTS_VALUE = 9; + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + public static final int WEB_DETECTION_VALUE = 10; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return FACE_DETECTION; + case 2: return LANDMARK_DETECTION; + case 3: return LOGO_DETECTION; + case 4: return LABEL_DETECTION; + case 5: return TEXT_DETECTION; + case 11: return DOCUMENT_TEXT_DETECTION; + case 6: return SAFE_SEARCH_DETECTION; + case 7: return IMAGE_PROPERTIES; + case 9: return CROP_HINTS; + case 10: return WEB_DETECTION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.Feature.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Feature.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Feature.Type result = com.google.cloud.vision.v1p2beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.Feature.Type.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 2; + private int maxResults_; + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p2beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (maxResults_ != 0) { + output.writeInt32(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p2beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Feature)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Feature other = (com.google.cloud.vision.v1p2beta1.Feature) obj; + + if (type_ != other.type_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The type of Google Cloud Vision API detection to perform, and the maximum
+   * number of results to return for that type. Multiple `Feature` objects can
+   * be specified in the `features` list.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Feature) + com.google.cloud.vision.v1p2beta1.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Feature.class, com.google.cloud.vision.v1p2beta1.Feature.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + maxResults_ = 0; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature build() { + com.google.cloud.vision.v1p2beta1.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature buildPartial() { + com.google.cloud.vision.v1p2beta1.Feature result = new com.google.cloud.vision.v1p2beta1.Feature(this); + result.type_ = type_; + result.maxResults_ = maxResults_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Feature) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Feature other) { + if (other == com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Feature.Type result = com.google.cloud.vision.v1p2beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.Feature.Type.UNRECOGNIZED : result; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p2beta1.Feature.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + + maxResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The bytes for model. + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Feature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Feature) + private static final com.google.cloud.vision.v1p2beta1.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Feature(); + } + + public static com.google.cloud.vision.v1p2beta1.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java new file mode 100644 index 000000000000..f7c622a66b50 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p2beta1.Feature.Type getType(); + + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + int getMaxResults(); + + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + java.lang.String getModel(); + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + com.google.protobuf.ByteString + getModelBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java new file mode 100644 index 000000000000..45689a4ff3e0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java @@ -0,0 +1,672 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The Google Cloud Storage location where the output will be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.GcsDestination.class, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.GcsDestination other = (com.google.cloud.vision.v1p2beta1.GcsDestination) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the output will be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.GcsDestination) + com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.GcsDestination.class, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestination build() { + com.google.cloud.vision.v1p2beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestination buildPartial() { + com.google.cloud.vision.v1p2beta1.GcsDestination result = new com.google.cloud.vision.v1p2beta1.GcsDestination(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.GcsDestination) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.GcsDestination other) { + if (other == com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsDestination) + private static final com.google.cloud.vision.v1p2beta1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.GcsDestination(); + } + + public static com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..43add1f4d65a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java new file mode 100644 index 000000000000..35f4b9c6f64a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The Google Cloud Storage location where the input will be read from.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsSource} + */ +public final class GcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.GcsSource) + GcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsSource() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.GcsSource.class, com.google.cloud.vision.v1p2beta1.GcsSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a GCS
+   * object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a GCS
+   * object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.GcsSource other = (com.google.cloud.vision.v1p2beta1.GcsSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the input will be read from.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.GcsSource) + com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.GcsSource.class, com.google.cloud.vision.v1p2beta1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSource build() { + com.google.cloud.vision.v1p2beta1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSource buildPartial() { + com.google.cloud.vision.v1p2beta1.GcsSource result = new com.google.cloud.vision.v1p2beta1.GcsSource(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.GcsSource) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.GcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.GcsSource other) { + if (other == com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a GCS
+     * object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a GCS
+     * object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a GCS
+     * object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a GCS
+     * object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a GCS
+     * object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsSource) + private static final com.google.cloud.vision.v1p2beta1.GcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.GcsSource(); + } + + public static com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..5a6aa6e02552 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface GcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a GCS
+   * object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a GCS
+   * object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java new file mode 100644 index 000000000000..7a71f64d4d27 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +public final class GeometryProto { + private GeometryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1p2beta1/geometry" + + ".proto\022\035google.cloud.vision.v1p2beta1\"\036\n" + + "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + + "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + + "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + + "d.vision.v1p2beta1.Vertex\022L\n\023normalized_" + + "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + + "2beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B|\n!com.goog" + + "le.cloud.vision.v1p2beta1B\rGeometryProto" + + "P\001ZCgoogle.golang.org/genproto/googleapi" + + "s/cloud/vision/v1p2beta1;vision\370\001\001b\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor, + new java.lang.String[] { "Vertices", "NormalizedVertices", }); + internal_static_google_cloud_vision_v1p2beta1_Position_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Position_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java new file mode 100644 index 000000000000..c69354d21f4d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Client image to perform Google Cloud Vision API tasks over.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Image} + */ +public final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Image) + ImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + content_ = input.readBytes(); + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.ImageSource.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Image.class, com.google.cloud.vision.v1p2beta1.Image.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.ImageSource source_; + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return The source. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSource getSource() { + return source_ == null ? com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Image)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Image other = (com.google.cloud.vision.v1p2beta1.Image) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Client image to perform Google Cloud Vision API tasks over.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Image) + com.google.cloud.vision.v1p2beta1.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Image.class, com.google.cloud.vision.v1p2beta1.Image.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Image getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Image build() { + com.google.cloud.vision.v1p2beta1.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Image buildPartial() { + com.google.cloud.vision.v1p2beta1.Image result = new com.google.cloud.vision.v1p2beta1.Image(this); + result.content_ = content_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Image) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Image other) { + if (other == com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance()) return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p2beta1.ImageSource source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder> sourceBuilder_; + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return The source. + */ + public com.google.cloud.vision.v1p2beta1.ImageSource getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public Builder setSource(com.google.cloud.vision.v1p2beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public Builder setSource( + com.google.cloud.vision.v1p2beta1.ImageSource.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public Builder mergeSource(com.google.cloud.vision.v1p2beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.vision.v1p2beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p2beta1.ImageSource.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Image) + private static final com.google.cloud.vision.v1p2beta1.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Image(); + } + + public static com.google.cloud.vision.v1p2beta1.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java new file mode 100644 index 000000000000..003d2004acdf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java @@ -0,0 +1,681 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * If an image was produced from a file (e.g. a PDF), this message gives
+ * information about the source of that image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageAnnotationContext} + */ +public final class ImageAnnotationContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageAnnotationContext) + ImageAnnotationContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageAnnotationContext.newBuilder() to construct. + private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageAnnotationContext() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageAnnotationContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageAnnotationContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageAnnotationContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (getPageNumber() + != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * If an image was produced from a file (e.g. a PDF), this message gives
+   * information about the source of that image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageAnnotationContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageAnnotationContext) + com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + pageNumber_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext build() { + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext buildPartial() { + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p2beta1.ImageAnnotationContext(this); + result.uri_ = uri_; + result.pageNumber_ = pageNumber_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageAnnotationContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext other) { + if (other == com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageAnnotationContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageAnnotationContext) + private static final com.google.cloud.vision.v1p2beta1.ImageAnnotationContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageAnnotationContext(); + } + + public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageAnnotationContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageAnnotationContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java new file mode 100644 index 000000000000..52853ae62f0e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ImageAnnotationContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageAnnotationContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + int getPageNumber(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java new file mode 100644 index 000000000000..802ad3341f96 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java @@ -0,0 +1,645 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public final class ImageAnnotatorProto { + private ImageAnnotatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p2beta1/image_an" + + "notator.proto\022\035google.cloud.vision.v1p2b" + + "eta1\032\034google/api/annotations.proto\032\027goog" + + "le/api/client.proto\032\037google/api/field_be" + + "havior.proto\032,google/cloud/vision/v1p2be" + + "ta1/geometry.proto\0323google/cloud/vision/" + + "v1p2beta1/text_annotation.proto\0321google/" + + "cloud/vision/v1p2beta1/web_detection.pro" + + "to\032#google/longrunning/operations.proto\032" + + "\037google/protobuf/timestamp.proto\032\027google" + + "/rpc/status.proto\032\027google/type/color.pro" + + "to\032\030google/type/latlng.proto\"\341\002\n\007Feature" + + "\0229\n\004type\030\001 \001(\0162+.google.cloud.vision.v1p" + + "2beta1.Feature.Type\022\023\n\013max_results\030\002 \001(\005" + + "\022\r\n\005model\030\003 \001(\t\"\366\001\n\004Type\022\024\n\020TYPE_UNSPECI" + + "FIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022LANDMARK_D" + + "ETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003\022\023\n\017LABEL_" + + "DETECTION\020\004\022\022\n\016TEXT_DETECTION\020\005\022\033\n\027DOCUM" + + "ENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_SEARCH_DETE" + + "CTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022\016\n\nCROP_HI" + + "NTS\020\t\022\021\n\rWEB_DETECTION\020\n\"7\n\013ImageSource\022" + + "\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timage_uri\030\002 \001(" + + "\t\"T\n\005Image\022\017\n\007content\030\001 \001(\014\022:\n\006source\030\002 " + + "\001(\0132*.google.cloud.vision.v1p2beta1.Imag" + + "eSource\"\233\016\n\016FaceAnnotation\022B\n\rbounding_p" + + "oly\030\001 \001(\0132+.google.cloud.vision.v1p2beta" + + "1.BoundingPoly\022E\n\020fd_bounding_poly\030\002 \001(\013" + + "2+.google.cloud.vision.v1p2beta1.Boundin" + + "gPoly\022I\n\tlandmarks\030\003 \003(\01326.google.cloud." + + "vision.v1p2beta1.FaceAnnotation.Landmark" + + "\022\022\n\nroll_angle\030\004 \001(\002\022\021\n\tpan_angle\030\005 \001(\002\022" + + "\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024detection_confide" + + "nce\030\007 \001(\002\022\036\n\026landmarking_confidence\030\010 \001(" + + "\002\022A\n\016joy_likelihood\030\t \001(\0162).google.cloud" + + ".vision.v1p2beta1.Likelihood\022D\n\021sorrow_l" + + "ikelihood\030\n \001(\0162).google.cloud.vision.v1" + + "p2beta1.Likelihood\022C\n\020anger_likelihood\030\013" + + " \001(\0162).google.cloud.vision.v1p2beta1.Lik" + + "elihood\022F\n\023surprise_likelihood\030\014 \001(\0162).g" + + "oogle.cloud.vision.v1p2beta1.Likelihood\022" + + "K\n\030under_exposed_likelihood\030\r \001(\0162).goog" + + "le.cloud.vision.v1p2beta1.Likelihood\022E\n\022" + + "blurred_likelihood\030\016 \001(\0162).google.cloud." + + "vision.v1p2beta1.Likelihood\022F\n\023headwear_" + + "likelihood\030\017 \001(\0162).google.cloud.vision.v" + + "1p2beta1.Likelihood\032\307\007\n\010Landmark\022I\n\004type" + + "\030\003 \001(\0162;.google.cloud.vision.v1p2beta1.F" + + "aceAnnotation.Landmark.Type\0229\n\010position\030" + + "\004 \001(\0132\'.google.cloud.vision.v1p2beta1.Po" + + "sition\"\264\006\n\004Type\022\024\n\020UNKNOWN_LANDMARK\020\000\022\014\n" + + "\010LEFT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024LEFT_OF_LE" + + "FT_EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_EYEBROW\020\004\022" + + "\031\n\025LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026RIGHT_OF_R" + + "IGHT_EYEBROW\020\006\022\031\n\025MIDPOINT_BETWEEN_EYES\020" + + "\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t\022\r\n\tLOWER_" + + "LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020" + + "\n\014MOUTH_CENTER\020\r\022\025\n\021NOSE_BOTTOM_RIGHT\020\016\022" + + "\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_BOTTOM_CEN" + + "TER\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY\020\021\022\031\n\025LEFT" + + "_EYE_RIGHT_CORNER\020\022\022\034\n\030LEFT_EYE_BOTTOM_B" + + "OUNDARY\020\023\022\030\n\024LEFT_EYE_LEFT_CORNER\020\024\022\032\n\026R" + + "IGHT_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIGHT_EYE_RIG" + + "HT_CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTOM_BOUNDARY" + + "\020\027\022\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022\037\n\033LEFT_EY" + + "EBROW_UPPER_MIDPOINT\020\031\022 \n\034RIGHT_EYEBROW_" + + "UPPER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_TRAGION\020\033\022\025" + + "\n\021RIGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_EYE_PUPIL\020" + + "\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FOREHEAD_GLABE" + + "LLA\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CHIN_LEFT_GO" + + "NION\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\"4\n\014Locatio" + + "nInfo\022$\n\007lat_lng\030\001 \001(\0132\023.google.type.Lat" + + "Lng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\274\002\n\020EntityAnn" + + "otation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale\030\002 \001(\t\022\023\n\013" + + "description\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022\022\n\nconf" + + "idence\030\005 \001(\002\022\022\n\ntopicality\030\006 \001(\002\022B\n\rboun" + + "ding_poly\030\007 \001(\0132+.google.cloud.vision.v1" + + "p2beta1.BoundingPoly\022>\n\tlocations\030\010 \003(\0132" + + "+.google.cloud.vision.v1p2beta1.Location" + + "Info\022;\n\nproperties\030\t \003(\0132\'.google.cloud." + + "vision.v1p2beta1.Property\"\274\002\n\024SafeSearch" + + "Annotation\0228\n\005adult\030\001 \001(\0162).google.cloud" + + ".vision.v1p2beta1.Likelihood\0228\n\005spoof\030\002 " + + "\001(\0162).google.cloud.vision.v1p2beta1.Like" + + "lihood\022:\n\007medical\030\003 \001(\0162).google.cloud.v" + + "ision.v1p2beta1.Likelihood\022;\n\010violence\030\004" + + " \001(\0162).google.cloud.vision.v1p2beta1.Lik" + + "elihood\0227\n\004racy\030\t \001(\0162).google.cloud.vis" + + "ion.v1p2beta1.Likelihood\"a\n\013LatLongRect\022" + + "(\n\013min_lat_lng\030\001 \001(\0132\023.google.type.LatLn" + + "g\022(\n\013max_lat_lng\030\002 \001(\0132\023.google.type.Lat" + + "Lng\"U\n\tColorInfo\022!\n\005color\030\001 \001(\0132\022.google" + + ".type.Color\022\r\n\005score\030\002 \001(\002\022\026\n\016pixel_frac" + + "tion\030\003 \001(\002\"T\n\030DominantColorsAnnotation\0228" + + "\n\006colors\030\001 \003(\0132(.google.cloud.vision.v1p" + + "2beta1.ColorInfo\"c\n\017ImageProperties\022P\n\017d" + + "ominant_colors\030\001 \001(\01327.google.cloud.visi" + + "on.v1p2beta1.DominantColorsAnnotation\"\177\n" + + "\010CropHint\022B\n\rbounding_poly\030\001 \001(\0132+.googl" + + "e.cloud.vision.v1p2beta1.BoundingPoly\022\022\n" + + "\nconfidence\030\002 \001(\002\022\033\n\023importance_fraction" + + "\030\003 \001(\002\"R\n\023CropHintsAnnotation\022;\n\ncrop_hi" + + "nts\030\001 \003(\0132\'.google.cloud.vision.v1p2beta" + + "1.CropHint\"(\n\017CropHintsParams\022\025\n\raspect_" + + "ratios\030\001 \003(\002\"1\n\022WebDetectionParams\022\033\n\023in" + + "clude_geo_results\030\002 \001(\010\"c\n\023TextDetection" + + "Params\022.\n&enable_text_detection_confiden" + + "ce_score\030\t \001(\010\022\034\n\024advanced_ocr_options\030\013" + + " \003(\t\"\330\002\n\014ImageContext\022A\n\rlat_long_rect\030\001" + + " \001(\0132*.google.cloud.vision.v1p2beta1.Lat" + + "LongRect\022\026\n\016language_hints\030\002 \003(\t\022I\n\021crop" + + "_hints_params\030\004 \001(\0132..google.cloud.visio" + + "n.v1p2beta1.CropHintsParams\022O\n\024web_detec" + + "tion_params\030\006 \001(\01321.google.cloud.vision." + + "v1p2beta1.WebDetectionParams\022Q\n\025text_det" + + "ection_params\030\014 \001(\01322.google.cloud.visio" + + "n.v1p2beta1.TextDetectionParams\"\311\001\n\024Anno" + + "tateImageRequest\0223\n\005image\030\001 \001(\0132$.google" + + ".cloud.vision.v1p2beta1.Image\0228\n\010feature" + + "s\030\002 \003(\0132&.google.cloud.vision.v1p2beta1." + + "Feature\022B\n\rimage_context\030\003 \001(\0132+.google." + + "cloud.vision.v1p2beta1.ImageContext\":\n\026I" + + "mageAnnotationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013pa" + + "ge_number\030\002 \001(\005\"\212\007\n\025AnnotateImageRespons" + + "e\022G\n\020face_annotations\030\001 \003(\0132-.google.clo" + + "ud.vision.v1p2beta1.FaceAnnotation\022M\n\024la" + + "ndmark_annotations\030\002 \003(\0132/.google.cloud." + + "vision.v1p2beta1.EntityAnnotation\022I\n\020log" + + "o_annotations\030\003 \003(\0132/.google.cloud.visio" + + "n.v1p2beta1.EntityAnnotation\022J\n\021label_an" + + "notations\030\004 \003(\0132/.google.cloud.vision.v1" + + "p2beta1.EntityAnnotation\022I\n\020text_annotat" + + "ions\030\005 \003(\0132/.google.cloud.vision.v1p2bet" + + "a1.EntityAnnotation\022K\n\024full_text_annotat" + + "ion\030\014 \001(\0132-.google.cloud.vision.v1p2beta" + + "1.TextAnnotation\022S\n\026safe_search_annotati" + + "on\030\006 \001(\01323.google.cloud.vision.v1p2beta1" + + ".SafeSearchAnnotation\022S\n\033image_propertie" + + "s_annotation\030\010 \001(\0132..google.cloud.vision" + + ".v1p2beta1.ImageProperties\022Q\n\025crop_hints" + + "_annotation\030\013 \001(\01322.google.cloud.vision." + + "v1p2beta1.CropHintsAnnotation\022B\n\rweb_det" + + "ection\030\r \001(\0132+.google.cloud.vision.v1p2b" + + "eta1.WebDetection\022!\n\005error\030\t \001(\0132\022.googl" + + "e.rpc.Status\022F\n\007context\030\025 \001(\01325.google.c" + + "loud.vision.v1p2beta1.ImageAnnotationCon" + + "text\"\241\001\n\024AnnotateFileResponse\022@\n\014input_c" + + "onfig\030\001 \001(\0132*.google.cloud.vision.v1p2be" + + "ta1.InputConfig\022G\n\tresponses\030\002 \003(\01324.goo" + + "gle.cloud.vision.v1p2beta1.AnnotateImage" + + "Response\"h\n\032BatchAnnotateImagesRequest\022J" + + "\n\010requests\030\001 \003(\01323.google.cloud.vision.v" + + "1p2beta1.AnnotateImageRequestB\003\340A\002\"f\n\033Ba" + + "tchAnnotateImagesResponse\022G\n\tresponses\030\001" + + " \003(\01324.google.cloud.vision.v1p2beta1.Ann" + + "otateImageResponse\"\236\002\n\030AsyncAnnotateFile" + + "Request\022@\n\014input_config\030\001 \001(\0132*.google.c" + + "loud.vision.v1p2beta1.InputConfig\0228\n\010fea" + + "tures\030\002 \003(\0132&.google.cloud.vision.v1p2be" + + "ta1.Feature\022B\n\rimage_context\030\003 \001(\0132+.goo" + + "gle.cloud.vision.v1p2beta1.ImageContext\022" + + "B\n\routput_config\030\004 \001(\0132+.google.cloud.vi" + + "sion.v1p2beta1.OutputConfig\"_\n\031AsyncAnno" + + "tateFileResponse\022B\n\routput_config\030\001 \001(\0132" + + "+.google.cloud.vision.v1p2beta1.OutputCo" + + "nfig\"p\n\036AsyncBatchAnnotateFilesRequest\022N" + + "\n\010requests\030\001 \003(\01327.google.cloud.vision.v" + + "1p2beta1.AsyncAnnotateFileRequestB\003\340A\002\"n" + + "\n\037AsyncBatchAnnotateFilesResponse\022K\n\tres" + + "ponses\030\001 \003(\01328.google.cloud.vision.v1p2b" + + "eta1.AsyncAnnotateFileResponse\"^\n\013InputC" + + "onfig\022<\n\ngcs_source\030\001 \001(\0132(.google.cloud" + + ".vision.v1p2beta1.GcsSource\022\021\n\tmime_type" + + "\030\002 \001(\t\"j\n\014OutputConfig\022F\n\017gcs_destinatio" + + "n\030\001 \001(\0132-.google.cloud.vision.v1p2beta1." + + "GcsDestination\022\022\n\nbatch_size\030\002 \001(\005\"\030\n\tGc" + + "sSource\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestination\022\013" + + "\n\003uri\030\001 \001(\t\"\217\002\n\021OperationMetadata\022E\n\005sta" + + "te\030\001 \001(\01626.google.cloud.vision.v1p2beta1" + + ".OperationMetadata.State\022/\n\013create_time\030" + + "\005 \001(\0132\032.google.protobuf.Timestamp\022/\n\013upd" + + "ate_time\030\006 \001(\0132\032.google.protobuf.Timesta" + + "mp\"Q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007CR" + + "EATED\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\r\n\tCANCEL" + + "LED\020\004*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022\021\n\rVERY" + + "_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSSIBLE\020\003\022" + + "\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\265\004\n\016ImageAn" + + "notator\022\276\001\n\023BatchAnnotateImages\0229.google" + + ".cloud.vision.v1p2beta1.BatchAnnotateIma" + + "gesRequest\032:.google.cloud.vision.v1p2bet" + + "a1.BatchAnnotateImagesResponse\"0\202\323\344\223\002\037\"\032" + + "/v1p2beta1/images:annotate:\001*\332A\010requests" + + "\022\351\001\n\027AsyncBatchAnnotateFiles\022=.google.cl" + + "oud.vision.v1p2beta1.AsyncBatchAnnotateF" + + "ilesRequest\032\035.google.longrunning.Operati" + + "on\"p\202\323\344\223\002(\"#/v1p2beta1/files:asyncBatchA" + + "nnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnno" + + "tateFilesResponse\022\021OperationMetadata\032v\312A" + + "\025vision.googleapis.com\322A[https://www.goo" + + "gleapis.com/auth/cloud-platform,https://" + + "www.googleapis.com/auth/cloud-visionB\202\001\n" + + "!com.google.cloud.vision.v1p2beta1B\023Imag" + + "eAnnotatorProtoP\001ZCgoogle.golang.org/gen" + + "proto/googleapis/cloud/vision/v1p2beta1;" + + "vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p2beta1.TextAnnotationProto.getDescriptor(), + com.google.cloud.vision.v1p2beta1.WebDetectionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.ColorProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor, + new java.lang.String[] { "Type", "MaxResults", "Model", }); + internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor, + new java.lang.String[] { "GcsImageUri", "ImageUri", }); + internal_static_google_cloud_vision_v1p2beta1_Image_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Image_descriptor, + new java.lang.String[] { "Content", "Source", }); + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor, + new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor = + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor, + new java.lang.String[] { "Type", "Position", }); + internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor, + new java.lang.String[] { "LatLng", }); + internal_static_google_cloud_vision_v1p2beta1_Property_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Property_descriptor, + new java.lang.String[] { "Name", "Value", "Uint64Value", }); + internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor, + new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); + internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor, + new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); + internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor, + new java.lang.String[] { "MinLatLng", "MaxLatLng", }); + internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor, + new java.lang.String[] { "Color", "Score", "PixelFraction", }); + internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor, + new java.lang.String[] { "Colors", }); + internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor, + new java.lang.String[] { "DominantColors", }); + internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor, + new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); + internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor, + new java.lang.String[] { "CropHints", }); + internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor, + new java.lang.String[] { "AspectRatios", }); + internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor, + new java.lang.String[] { "IncludeGeoResults", }); + internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor, + new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); + internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor, + new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "WebDetectionParams", "TextDetectionParams", }); + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor, + new java.lang.String[] { "Image", "Features", "ImageContext", }); + internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor, + new java.lang.String[] { "Uri", "PageNumber", }); + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor, + new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "Error", "Context", }); + internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor, + new java.lang.String[] { "InputConfig", "Responses", }); + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor, + new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor, + new java.lang.String[] { "OutputConfig", }); + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor, + new java.lang.String[] { "GcsSource", "MimeType", }); + internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BatchSize", }); + internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor, + new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p2beta1.TextAnnotationProto.getDescriptor(); + com.google.cloud.vision.v1p2beta1.WebDetectionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.ColorProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java new file mode 100644 index 000000000000..9c1a913772ad --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java @@ -0,0 +1,1711 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Image context and/or feature-specific parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageContext} + */ +public final class ImageContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageContext) + ImageContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageContext.newBuilder() to construct. + private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageContext() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.LatLongRect.Builder subBuilder = null; + if (latLongRect_ != null) { + subBuilder = latLongRect_.toBuilder(); + } + latLongRect_ = input.readMessage(com.google.cloud.vision.v1p2beta1.LatLongRect.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLongRect_); + latLongRect_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + case 34: { + com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder subBuilder = null; + if (cropHintsParams_ != null) { + subBuilder = cropHintsParams_.toBuilder(); + } + cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.CropHintsParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsParams_); + cropHintsParams_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder subBuilder = null; + if (webDetectionParams_ != null) { + subBuilder = webDetectionParams_.toBuilder(); + } + webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetectionParams_); + webDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder subBuilder = null; + if (textDetectionParams_ != null) { + subBuilder = textDetectionParams_.toBuilder(); + } + textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionParams_); + textDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageContext.class, com.google.cloud.vision.v1p2beta1.ImageContext.Builder.class); + } + + public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_; + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + @java.lang.Override + public boolean hasLatLongRect() { + return latLongRect_ != null; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect() { + return latLongRect_ == null ? com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + return getLatLongRect(); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList languageHints_; + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_; + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_; + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + @java.lang.Override + public boolean hasCropHintsParams() { + return cropHintsParams_ != null; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams() { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + return getCropHintsParams(); + } + + public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_; + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + @java.lang.Override + public boolean hasWebDetectionParams() { + return webDetectionParams_ != null; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams() { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + return getWebDetectionParams(); + } + + public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p2beta1.TextDetectionParams textDetectionParams_; + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + @java.lang.Override + public boolean hasTextDetectionParams() { + return textDetectionParams_ != null; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams() { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + return getTextDetectionParams(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLongRect_ != null) { + output.writeMessage(1, getLatLongRect()); + } + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); + } + if (cropHintsParams_ != null) { + output.writeMessage(4, getCropHintsParams()); + } + if (webDetectionParams_ != null) { + output.writeMessage(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + output.writeMessage(12, getTextDetectionParams()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLongRect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLongRect()); + } + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + if (cropHintsParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCropHintsParams()); + } + if (webDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTextDetectionParams()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.ImageContext other = (com.google.cloud.vision.v1p2beta1.ImageContext) obj; + + if (hasLatLongRect() != other.hasLatLongRect()) return false; + if (hasLatLongRect()) { + if (!getLatLongRect() + .equals(other.getLatLongRect())) return false; + } + if (!getLanguageHintsList() + .equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; + if (hasCropHintsParams()) { + if (!getCropHintsParams() + .equals(other.getCropHintsParams())) return false; + } + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; + if (hasWebDetectionParams()) { + if (!getWebDetectionParams() + .equals(other.getWebDetectionParams())) return false; + } + if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; + if (hasTextDetectionParams()) { + if (!getTextDetectionParams() + .equals(other.getTextDetectionParams())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLongRect()) { + hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; + hash = (53 * hash) + getLatLongRect().hashCode(); + } + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + if (hasCropHintsParams()) { + hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsParams().hashCode(); + } + if (hasWebDetectionParams()) { + hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getWebDetectionParams().hashCode(); + } + if (hasTextDetectionParams()) { + hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Image context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageContext) + com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageContext.class, com.google.cloud.vision.v1p2beta1.ImageContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext build() { + com.google.cloud.vision.v1p2beta1.ImageContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext buildPartial() { + com.google.cloud.vision.v1p2beta1.ImageContext result = new com.google.cloud.vision.v1p2beta1.ImageContext(this); + int from_bitField0_ = bitField0_; + if (latLongRectBuilder_ == null) { + result.latLongRect_ = latLongRect_; + } else { + result.latLongRect_ = latLongRectBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + if (cropHintsParamsBuilder_ == null) { + result.cropHintsParams_ = cropHintsParams_; + } else { + result.cropHintsParams_ = cropHintsParamsBuilder_.build(); + } + if (webDetectionParamsBuilder_ == null) { + result.webDetectionParams_ = webDetectionParams_; + } else { + result.webDetectionParams_ = webDetectionParamsBuilder_.build(); + } + if (textDetectionParamsBuilder_ == null) { + result.textDetectionParams_ = textDetectionParams_; + } else { + result.textDetectionParams_ = textDetectionParamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.ImageContext) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageContext other) { + if (other == com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance()) return this; + if (other.hasLatLongRect()) { + mergeLatLongRect(other.getLatLongRect()); + } + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + if (other.hasCropHintsParams()) { + mergeCropHintsParams(other.getCropHintsParams()); + } + if (other.hasWebDetectionParams()) { + mergeWebDetectionParams(other.getWebDetectionParams()); + } + if (other.hasTextDetectionParams()) { + mergeTextDetectionParams(other.getTextDetectionParams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.ImageContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder> latLongRectBuilder_; + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + public boolean hasLatLongRect() { + return latLongRectBuilder_ != null || latLongRect_ != null; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + public com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect() { + if (latLongRectBuilder_ == null) { + return latLongRect_ == null ? com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } else { + return latLongRectBuilder_.getMessage(); + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect(com.google.cloud.vision.v1p2beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLongRect_ = value; + onChanged(); + } else { + latLongRectBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect( + com.google.cloud.vision.v1p2beta1.LatLongRect.Builder builderForValue) { + if (latLongRectBuilder_ == null) { + latLongRect_ = builderForValue.build(); + onChanged(); + } else { + latLongRectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public Builder mergeLatLongRect(com.google.cloud.vision.v1p2beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (latLongRect_ != null) { + latLongRect_ = + com.google.cloud.vision.v1p2beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); + } else { + latLongRect_ = value; + } + onChanged(); + } else { + latLongRectBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public Builder clearLatLongRect() { + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + onChanged(); + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p2beta1.LatLongRect.Builder getLatLongRectBuilder() { + + onChanged(); + return getLatLongRectFieldBuilder().getBuilder(); + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + if (latLongRectBuilder_ != null) { + return latLongRectBuilder_.getMessageOrBuilder(); + } else { + return latLongRect_ == null ? + com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder> + getLatLongRectFieldBuilder() { + if (latLongRectBuilder_ == null) { + latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder>( + getLatLongRect(), + getParentForChildren(), + isClean()); + latLongRect_ = null; + } + return latLongRectBuilder_; + } + + private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints( + java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languageHints_); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + public boolean hasCropHintsParams() { + return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + public com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } else { + return cropHintsParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams(com.google.cloud.vision.v1p2beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsParams_ = value; + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams( + com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder builderForValue) { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = builderForValue.build(); + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder mergeCropHintsParams(com.google.cloud.vision.v1p2beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (cropHintsParams_ != null) { + cropHintsParams_ = + com.google.cloud.vision.v1p2beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); + } else { + cropHintsParams_ = value; + } + onChanged(); + } else { + cropHintsParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder clearCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + onChanged(); + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { + + onChanged(); + return getCropHintsParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + if (cropHintsParamsBuilder_ != null) { + return cropHintsParamsBuilder_.getMessageOrBuilder(); + } else { + return cropHintsParams_ == null ? + com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder> + getCropHintsParamsFieldBuilder() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder>( + getCropHintsParams(), + getParentForChildren(), + isClean()); + cropHintsParams_ = null; + } + return cropHintsParamsBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + public boolean hasWebDetectionParams() { + return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + public com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } else { + return webDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams(com.google.cloud.vision.v1p2beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetectionParams_ = value; + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams( + com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder builderForValue) { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p2beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (webDetectionParams_ != null) { + webDetectionParams_ = + com.google.cloud.vision.v1p2beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); + } else { + webDetectionParams_ = value; + } + onChanged(); + } else { + webDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder clearWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + onChanged(); + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { + + onChanged(); + return getWebDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + if (webDetectionParamsBuilder_ != null) { + return webDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return webDetectionParams_ == null ? + com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder> + getWebDetectionParamsFieldBuilder() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder>( + getWebDetectionParams(), + getParentForChildren(), + isClean()); + webDetectionParams_ = null; + } + return webDetectionParamsBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.TextDetectionParams textDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + public boolean hasTextDetectionParams() { + return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + public com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } else { + return textDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams(com.google.cloud.vision.v1p2beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionParams_ = value; + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams( + com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder builderForValue) { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p2beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (textDetectionParams_ != null) { + textDetectionParams_ = + com.google.cloud.vision.v1p2beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); + } else { + textDetectionParams_ = value; + } + onChanged(); + } else { + textDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder clearTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + onChanged(); + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { + + onChanged(); + return getTextDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + if (textDetectionParamsBuilder_ != null) { + return textDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return textDetectionParams_ == null ? + com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder> + getTextDetectionParamsFieldBuilder() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder>( + getTextDetectionParams(), + getParentForChildren(), + isClean()); + textDetectionParams_ = null; + } + return textDetectionParamsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageContext) + private static final com.google.cloud.vision.v1p2beta1.ImageContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageContext(); + } + + public static com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java new file mode 100644 index 000000000000..c99820b85a8d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java @@ -0,0 +1,186 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ImageContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + boolean hasLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; + */ + com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); + + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + java.util.List + getLanguageHintsList(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString + getLanguageHintsBytes(int index); + + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + boolean hasCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; + */ + com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); + + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + boolean hasWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; + */ + com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); + + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + boolean hasTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; + */ + com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java new file mode 100644 index 000000000000..4f42706d0e8a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + * @return The source. + */ + com.google.cloud.vision.v1p2beta1.ImageSource getSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.ImageSource source = 2; + */ + com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java new file mode 100644 index 000000000000..bb8c98f2988d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Stores image properties, such as dominant colors.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageProperties} + */ +public final class ImageProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageProperties) + ImagePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageProperties.newBuilder() to construct. + private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageProperties() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder subBuilder = null; + if (dominantColors_ != null) { + subBuilder = dominantColors_.toBuilder(); + } + dominantColors_ = input.readMessage(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dominantColors_); + dominantColors_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageProperties.class, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder.class); + } + + public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_; + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + @java.lang.Override + public boolean hasDominantColors() { + return dominantColors_ != null; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors() { + return dominantColors_ == null ? com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + return getDominantColors(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dominantColors_ != null) { + output.writeMessage(1, getDominantColors()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dominantColors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDominantColors()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageProperties)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.ImageProperties other = (com.google.cloud.vision.v1p2beta1.ImageProperties) obj; + + if (hasDominantColors() != other.hasDominantColors()) return false; + if (hasDominantColors()) { + if (!getDominantColors() + .equals(other.getDominantColors())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDominantColors()) { + hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; + hash = (53 * hash) + getDominantColors().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores image properties, such as dominant colors.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageProperties) + com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageProperties.class, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.ImageProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageProperties build() { + com.google.cloud.vision.v1p2beta1.ImageProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageProperties buildPartial() { + com.google.cloud.vision.v1p2beta1.ImageProperties result = new com.google.cloud.vision.v1p2beta1.ImageProperties(this); + if (dominantColorsBuilder_ == null) { + result.dominantColors_ = dominantColors_; + } else { + result.dominantColors_ = dominantColorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.ImageProperties) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageProperties other) { + if (other == com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance()) return this; + if (other.hasDominantColors()) { + mergeDominantColors(other.getDominantColors()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.ImageProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + public boolean hasDominantColors() { + return dominantColorsBuilder_ != null || dominantColors_ != null; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors() { + if (dominantColorsBuilder_ == null) { + return dominantColors_ == null ? com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } else { + return dominantColorsBuilder_.getMessage(); + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dominantColors_ = value; + onChanged(); + } else { + dominantColorsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors( + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder builderForValue) { + if (dominantColorsBuilder_ == null) { + dominantColors_ = builderForValue.build(); + onChanged(); + } else { + dominantColorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder mergeDominantColors(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (dominantColors_ != null) { + dominantColors_ = + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); + } else { + dominantColors_ = value; + } + onChanged(); + } else { + dominantColorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder clearDominantColors() { + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + onChanged(); + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { + + onChanged(); + return getDominantColorsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + if (dominantColorsBuilder_ != null) { + return dominantColorsBuilder_.getMessageOrBuilder(); + } else { + return dominantColors_ == null ? + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder> + getDominantColorsFieldBuilder() { + if (dominantColorsBuilder_ == null) { + dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder>( + getDominantColors(), + getParentForChildren(), + isClean()); + dominantColors_ = null; + } + return dominantColorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageProperties) + private static final com.google.cloud.vision.v1p2beta1.ImageProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageProperties(); + } + + public static com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java new file mode 100644 index 000000000000..f0c47ac2806b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ImagePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + boolean hasDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; + */ + com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java new file mode 100644 index 000000000000..286311c4daf5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java @@ -0,0 +1,880 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * External image source (Google Cloud Storage or web URL image location).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageSource} + */ +public final class ImageSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageSource) + ImageSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageSource.newBuilder() to construct. + private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageSource() { + gcsImageUri_ = ""; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + gcsImageUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageSource.class, com.google.cloud.vision.v1p2beta1.ImageSource.Builder.class); + } + + public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsImageUri_; + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + @java.lang.Override + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } + } + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.ImageSource other = (com.google.cloud.vision.v1p2beta1.ImageSource) obj; + + if (!getGcsImageUri() + .equals(other.getGcsImageUri())) return false; + if (!getImageUri() + .equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsImageUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * External image source (Google Cloud Storage or web URL image location).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageSource) + com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.ImageSource.class, com.google.cloud.vision.v1p2beta1.ImageSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.ImageSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + gcsImageUri_ = ""; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSource build() { + com.google.cloud.vision.v1p2beta1.ImageSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSource buildPartial() { + com.google.cloud.vision.v1p2beta1.ImageSource result = new com.google.cloud.vision.v1p2beta1.ImageSource(this); + result.gcsImageUri_ = gcsImageUri_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.ImageSource) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageSource other) { + if (other == com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance()) return this; + if (!other.getGcsImageUri().isEmpty()) { + gcsImageUri_ = other.gcsImageUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.ImageSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsImageUri_ = ""; + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsImageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return This builder for chaining. + */ + public Builder clearGcsImageUri() { + + gcsImageUri_ = getDefaultInstance().getGcsImageUri(); + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The bytes for gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageSource) + private static final com.google.cloud.vision.v1p2beta1.ImageSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageSource(); + } + + public static com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java new file mode 100644 index 000000000000..9d0c37d2b2b6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ImageSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + java.lang.String getGcsImageUri(); + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + com.google.protobuf.ByteString + getGcsImageUriBytes(); + + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString + getImageUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java new file mode 100644 index 000000000000..6ed2447f6116 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The desired input location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.InputConfig} + */ +public final class InputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.InputConfig) + InputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputConfig() { + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.GcsSource.Builder subBuilder = null; + if (gcsSource_ != null) { + subBuilder = gcsSource_.toBuilder(); + } + gcsSource_ = input.readMessage(com.google.cloud.vision.v1p2beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsSource_); + gcsSource_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.InputConfig.class, com.google.cloud.vision.v1p2beta1.InputConfig.Builder.class); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_; + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return gcsSource_ != null; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource() { + return gcsSource_ == null ? com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + return getGcsSource(); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsSource_ != null) { + output.writeMessage(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.InputConfig other = (com.google.cloud.vision.v1p2beta1.InputConfig) obj; + + if (hasGcsSource() != other.hasGcsSource()) return false; + if (hasGcsSource()) { + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + } + if (!getMimeType() + .equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsSource()) { + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired input location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.InputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.InputConfig) + com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.InputConfig.class, com.google.cloud.vision.v1p2beta1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig build() { + com.google.cloud.vision.v1p2beta1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig buildPartial() { + com.google.cloud.vision.v1p2beta1.InputConfig result = new com.google.cloud.vision.v1p2beta1.InputConfig(this); + if (gcsSourceBuilder_ == null) { + result.gcsSource_ = gcsSource_; + } else { + result.gcsSource_ = gcsSourceBuilder_.build(); + } + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.InputConfig) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.InputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.InputConfig other) { + if (other == com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance()) return this; + if (other.hasGcsSource()) { + mergeGcsSource(other.getGcsSource()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + public boolean hasGcsSource() { + return gcsSourceBuilder_ != null || gcsSource_ != null; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + public com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + return gcsSource_ == null ? com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; + } else { + return gcsSourceBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1p2beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1p2beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + gcsSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1p2beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (gcsSource_ != null) { + gcsSource_ = + com.google.cloud.vision.v1p2beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); + } else { + gcsSource_ = value; + } + onChanged(); + } else { + gcsSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + onChanged(); + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p2beta1.GcsSource.Builder getGcsSourceBuilder() { + + onChanged(); + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (gcsSourceBuilder_ != null) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + return gcsSource_ == null ? + com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder>( + getGcsSource(), + getParentForChildren(), + isClean()); + gcsSource_ = null; + } + return gcsSourceBuilder_; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.InputConfig) + private static final com.google.cloud.vision.v1p2beta1.InputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.InputConfig(); + } + + public static com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..5a669943d957 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface InputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java new file mode 100644 index 000000000000..d28d73c98a6e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Rectangle determined by min and max `LatLng` pairs.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.LatLongRect} + */ +public final class LatLongRect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.LatLongRect) + LatLongRectOrBuilder { +private static final long serialVersionUID = 0L; + // Use LatLongRect.newBuilder() to construct. + private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LatLongRect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LatLongRect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LatLongRect( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (minLatLng_ != null) { + subBuilder = minLatLng_.toBuilder(); + } + minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minLatLng_); + minLatLng_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.type.LatLng.Builder subBuilder = null; + if (maxLatLng_ != null) { + subBuilder = maxLatLng_.toBuilder(); + } + maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxLatLng_); + maxLatLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.LatLongRect.class, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder.class); + } + + public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng minLatLng_; + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + @java.lang.Override + public boolean hasMinLatLng() { + return minLatLng_ != null; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMinLatLng() { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + return getMinLatLng(); + } + + public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; + private com.google.type.LatLng maxLatLng_; + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + @java.lang.Override + public boolean hasMaxLatLng() { + return maxLatLng_ != null; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMaxLatLng() { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + return getMaxLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minLatLng_ != null) { + output.writeMessage(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + output.writeMessage(2, getMaxLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.LatLongRect)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.LatLongRect other = (com.google.cloud.vision.v1p2beta1.LatLongRect) obj; + + if (hasMinLatLng() != other.hasMinLatLng()) return false; + if (hasMinLatLng()) { + if (!getMinLatLng() + .equals(other.getMinLatLng())) return false; + } + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; + if (hasMaxLatLng()) { + if (!getMaxLatLng() + .equals(other.getMaxLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinLatLng()) { + hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMinLatLng().hashCode(); + } + if (hasMaxLatLng()) { + hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMaxLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.LatLongRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rectangle determined by min and max `LatLng` pairs.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.LatLongRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.LatLongRect) + com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.LatLongRect.class, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.LatLongRect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRect build() { + com.google.cloud.vision.v1p2beta1.LatLongRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRect buildPartial() { + com.google.cloud.vision.v1p2beta1.LatLongRect result = new com.google.cloud.vision.v1p2beta1.LatLongRect(this); + if (minLatLngBuilder_ == null) { + result.minLatLng_ = minLatLng_; + } else { + result.minLatLng_ = minLatLngBuilder_.build(); + } + if (maxLatLngBuilder_ == null) { + result.maxLatLng_ = maxLatLng_; + } else { + result.maxLatLng_ = maxLatLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.LatLongRect) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.LatLongRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.LatLongRect other) { + if (other == com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance()) return this; + if (other.hasMinLatLng()) { + mergeMinLatLng(other.getMinLatLng()); + } + if (other.hasMaxLatLng()) { + mergeMaxLatLng(other.getMaxLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.LatLongRect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.LatLongRect) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng minLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + public boolean hasMinLatLng() { + return minLatLngBuilder_ != null || minLatLng_ != null; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + public com.google.type.LatLng getMinLatLng() { + if (minLatLngBuilder_ == null) { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } else { + return minLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minLatLng_ = value; + onChanged(); + } else { + minLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (minLatLngBuilder_ == null) { + minLatLng_ = builderForValue.build(); + onChanged(); + } else { + minLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder mergeMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (minLatLng_ != null) { + minLatLng_ = + com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); + } else { + minLatLng_ = value; + } + onChanged(); + } else { + minLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder clearMinLatLng() { + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + onChanged(); + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLng.Builder getMinLatLngBuilder() { + + onChanged(); + return getMinLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + if (minLatLngBuilder_ != null) { + return minLatLngBuilder_.getMessageOrBuilder(); + } else { + return minLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMinLatLngFieldBuilder() { + if (minLatLngBuilder_ == null) { + minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMinLatLng(), + getParentForChildren(), + isClean()); + minLatLng_ = null; + } + return minLatLngBuilder_; + } + + private com.google.type.LatLng maxLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + public boolean hasMaxLatLng() { + return maxLatLngBuilder_ != null || maxLatLng_ != null; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + public com.google.type.LatLng getMaxLatLng() { + if (maxLatLngBuilder_ == null) { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } else { + return maxLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxLatLng_ = value; + onChanged(); + } else { + maxLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = builderForValue.build(); + onChanged(); + } else { + maxLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder mergeMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (maxLatLng_ != null) { + maxLatLng_ = + com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); + } else { + maxLatLng_ = value; + } + onChanged(); + } else { + maxLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder clearMaxLatLng() { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + onChanged(); + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLng.Builder getMaxLatLngBuilder() { + + onChanged(); + return getMaxLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + if (maxLatLngBuilder_ != null) { + return maxLatLngBuilder_.getMessageOrBuilder(); + } else { + return maxLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMaxLatLngFieldBuilder() { + if (maxLatLngBuilder_ == null) { + maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMaxLatLng(), + getParentForChildren(), + isClean()); + maxLatLng_ = null; + } + return maxLatLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.LatLongRect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LatLongRect) + private static final com.google.cloud.vision.v1p2beta1.LatLongRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.LatLongRect(); + } + + public static com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatLongRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatLongRect(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java new file mode 100644 index 000000000000..185c7c87dd57 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface LatLongRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.LatLongRect) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + boolean hasMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + com.google.type.LatLng getMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); + + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + boolean hasMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + com.google.type.LatLng getMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java new file mode 100644 index 000000000000..c7172261531f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A bucketized representation of likelihood, which is intended to give clients
+ * highly stable results across model upgrades.
+ * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Likelihood) +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java new file mode 100644 index 000000000000..1e302763aec4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Detected entity location information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.LocationInfo} + */ +public final class LocationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.LocationInfo) + LocationInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.LocationInfo.class, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder.class); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng latLng_; + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLng_ != null) { + output.writeMessage(1, getLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.LocationInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.LocationInfo other = (com.google.cloud.vision.v1p2beta1.LocationInfo) obj; + + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng() + .equals(other.getLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.LocationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected entity location information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.LocationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.LocationInfo) + com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.LocationInfo.class, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.LocationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfo build() { + com.google.cloud.vision.v1p2beta1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfo buildPartial() { + com.google.cloud.vision.v1p2beta1.LocationInfo result = new com.google.cloud.vision.v1p2beta1.LocationInfo(this); + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.LocationInfo) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.LocationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.LocationInfo other) { + if (other == com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()) return this; + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.LocationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.LocationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = + com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getLatLng(), + getParentForChildren(), + isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LocationInfo) + private static final com.google.cloud.vision.v1p2beta1.LocationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.LocationInfo(); + } + + public static com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..3504a4c087ff --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface LocationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java new file mode 100644 index 000000000000..f2dc1dea703b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java @@ -0,0 +1,597 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.NormalizedVertex} + */ +public final class NormalizedVertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.NormalizedVertex) + NormalizedVertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NormalizedVertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NormalizedVertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.NormalizedVertex.class, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.NormalizedVertex other = (com.google.cloud.vision.v1p2beta1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.NormalizedVertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.NormalizedVertex) + com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.NormalizedVertex.class, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertex build() { + com.google.cloud.vision.v1p2beta1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertex buildPartial() { + com.google.cloud.vision.v1p2beta1.NormalizedVertex result = new com.google.cloud.vision.v1p2beta1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.NormalizedVertex) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.NormalizedVertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.NormalizedVertex other) { + if (other == com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.NormalizedVertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.NormalizedVertex) + private static final com.google.cloud.vision.v1p2beta1.NormalizedVertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.NormalizedVertex(); + } + + public static com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..24008b11dd56 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface NormalizedVertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java new file mode 100644 index 000000000000..f4945b6d3306 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java @@ -0,0 +1,1204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Contains metadata for the BatchAnnotateImages operation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.OperationMetadata.class, com.google.cloud.vision.v1p2beta1.OperationMetadata.Builder.class); + } + + /** + *
+   * Batch operation states.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.OperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATED; + case 2: return RUNNING; + case 3: return DONE; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.OperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.OperationMetadata.State result = com.google.cloud.vision.v1p2beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p2beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1p2beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1p2beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.OperationMetadata other = (com.google.cloud.vision.v1p2beta1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Contains metadata for the BatchAnnotateImages operation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.OperationMetadata) + com.google.cloud.vision.v1p2beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.OperationMetadata.class, com.google.cloud.vision.v1p2beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OperationMetadata build() { + com.google.cloud.vision.v1p2beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OperationMetadata buildPartial() { + com.google.cloud.vision.v1p2beta1.OperationMetadata result = new com.google.cloud.vision.v1p2beta1.OperationMetadata(this); + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.OperationMetadata other) { + if (other == com.google.cloud.vision.v1p2beta1.OperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.OperationMetadata.State result = com.google.cloud.vision.v1p2beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p2beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1p2beta1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OperationMetadata) + private static final com.google.cloud.vision.v1p2beta1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.OperationMetadata(); + } + + public static com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..c13f6c14c9a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java new file mode 100644 index 000000000000..fc22563ed737 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * The desired output location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.GcsDestination.Builder subBuilder = null; + if (gcsDestination_ != null) { + subBuilder = gcsDestination_.toBuilder(); + } + gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p2beta1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsDestination_); + gcsDestination_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + batchSize_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.OutputConfig.class, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder.class); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_; + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return gcsDestination_ != null; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination() { + return gcsDestination_ == null ? com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + return getGcsDestination(); + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_; + /** + *
+   * The max number of response protos to put into each output JSON file on GCS.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsDestination_ != null) { + output.writeMessage(1, getGcsDestination()); + } + if (batchSize_ != 0) { + output.writeInt32(2, batchSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsDestination_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsDestination()); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, batchSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.OutputConfig other = (com.google.cloud.vision.v1p2beta1.OutputConfig) obj; + + if (hasGcsDestination() != other.hasGcsDestination()) return false; + if (hasGcsDestination()) { + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + } + if (getBatchSize() + != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsDestination()) { + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + } + hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired output location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.OutputConfig) + com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.OutputConfig.class, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + batchSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig build() { + com.google.cloud.vision.v1p2beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig buildPartial() { + com.google.cloud.vision.v1p2beta1.OutputConfig result = new com.google.cloud.vision.v1p2beta1.OutputConfig(this); + if (gcsDestinationBuilder_ == null) { + result.gcsDestination_ = gcsDestination_; + } else { + result.gcsDestination_ = gcsDestinationBuilder_.build(); + } + result.batchSize_ = batchSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.OutputConfig) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.OutputConfig other) { + if (other == com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance()) return this; + if (other.hasGcsDestination()) { + mergeGcsDestination(other.getGcsDestination()); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return gcsDestinationBuilder_ != null || gcsDestination_ != null; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + public com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + return gcsDestination_ == null ? com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } else { + return gcsDestinationBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.vision.v1p2beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsDestination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.vision.v1p2beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.vision.v1p2beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (gcsDestination_ != null) { + gcsDestination_ = + com.google.cloud.vision.v1p2beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); + } else { + gcsDestination_ = value; + } + onChanged(); + } else { + gcsDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + onChanged(); + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p2beta1.GcsDestination.Builder getGcsDestinationBuilder() { + + onChanged(); + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (gcsDestinationBuilder_ != null) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + return gcsDestination_ == null ? + com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder>( + getGcsDestination(), + getParentForChildren(), + isClean()); + gcsDestination_ = null; + } + return gcsDestinationBuilder_; + } + + private int batchSize_ ; + /** + *
+     * The max number of response protos to put into each output JSON file on GCS.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + *
+     * The max number of response protos to put into each output JSON file on GCS.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The max number of response protos to put into each output JSON file on GCS.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + + batchSize_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OutputConfig) + private static final com.google.cloud.vision.v1p2beta1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.OutputConfig(); + } + + public static com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..1cf4dce48a97 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * The max number of response protos to put into each output JSON file on GCS.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + int getBatchSize(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java new file mode 100644 index 000000000000..768c6ddcc478 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java @@ -0,0 +1,1358 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Detected page from OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Page} + */ +public final class Page extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Page) + PageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Page() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Page(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blocks_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Block.parser(), extensionRegistry)); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Page.class, com.google.cloud.vision.v1p2beta1.Page.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int BLOCKS_FIELD_NUMBER = 4; + private java.util.List blocks_; + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Page)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Page other = (com.google.cloud.vision.v1p2beta1.Page) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getBlocksList() + .equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Page prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected page from OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Page} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Page) + com.google.cloud.vision.v1p2beta1.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Page.class, com.google.cloud.vision.v1p2beta1.Page.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + width_ = 0; + + height_ = 0; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Page getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Page build() { + com.google.cloud.vision.v1p2beta1.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Page buildPartial() { + com.google.cloud.vision.v1p2beta1.Page result = new com.google.cloud.vision.v1p2beta1.Page(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + result.width_ = width_; + result.height_ = height_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Page) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Page other) { + if (other == com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Page) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private int width_ ; + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder> blocksBuilder_; + + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p2beta1.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p2beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder addBlocks(com.google.cloud.vision.v1p2beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p2beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder addBlocks( + com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p2beta1.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p2beta1.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p2beta1.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Page) + private static final com.google.cloud.vision.v1p2beta1.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Page(); + } + + public static com.google.cloud.vision.v1p2beta1.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Page(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java new file mode 100644 index 000000000000..4e569749e881 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Page) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + int getHeight(); + + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + java.util.List + getBlocksList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p2beta1.Block getBlocks(int index); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + int getBlocksCount(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java new file mode 100644 index 000000000000..2a133c8783b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Structural unit of text representing a number of words in certain order.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Paragraph} + */ +public final class Paragraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Paragraph) + ParagraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Paragraph() { + words_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Paragraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Paragraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Word.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Paragraph.class, com.google.cloud.vision.v1p2beta1.Paragraph.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int WORDS_FIELD_NUMBER = 3; + private java.util.List words_; + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List getWordsList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List + getWordsOrBuilderList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + @java.lang.Override + public int getWordsCount() { + return words_.size(); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Word getWords(int index) { + return words_.get(index); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( + int index) { + return words_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + output.writeMessage(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Paragraph other = (com.google.cloud.vision.v1p2beta1.Paragraph) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Paragraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structural unit of text representing a number of words in certain order.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Paragraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Paragraph) + com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Paragraph.class, com.google.cloud.vision.v1p2beta1.Paragraph.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Paragraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + wordsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Paragraph build() { + com.google.cloud.vision.v1p2beta1.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Paragraph buildPartial() { + com.google.cloud.vision.v1p2beta1.Paragraph result = new com.google.cloud.vision.v1p2beta1.Paragraph(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (wordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + } else { + result.words_ = wordsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Paragraph) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Paragraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Paragraph other) { + if (other == com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (wordsBuilder_ == null) { + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + } else { + if (!other.words_.isEmpty()) { + if (wordsBuilder_.isEmpty()) { + wordsBuilder_.dispose(); + wordsBuilder_ = null; + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + wordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWordsFieldBuilder() : null; + } else { + wordsBuilder_.addAllMessages(other.words_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Paragraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Paragraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List words_ = + java.util.Collections.emptyList(); + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(words_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder> wordsBuilder_; + + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public java.util.List getWordsList() { + if (wordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(words_); + } else { + return wordsBuilder_.getMessageList(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public int getWordsCount() { + if (wordsBuilder_ == null) { + return words_.size(); + } else { + return wordsBuilder_.getCount(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p2beta1.Word getWords(int index) { + if (wordsBuilder_ == null) { + return words_.get(index); + } else { + return wordsBuilder_.getMessage(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p2beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + } else { + wordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.set(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder addWords(com.google.cloud.vision.v1p2beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + } else { + wordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p2beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(index, value); + onChanged(); + } else { + wordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder addWords( + com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder addAllWords( + java.lang.Iterable values) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + } else { + wordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder clearWords() { + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wordsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public Builder removeWords(int index) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.remove(index); + onChanged(); + } else { + wordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p2beta1.Word.Builder getWordsBuilder( + int index) { + return getWordsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( + int index) { + if (wordsBuilder_ == null) { + return words_.get(index); } else { + return wordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public java.util.List + getWordsOrBuilderList() { + if (wordsBuilder_ != null) { + return wordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(words_); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p2beta1.Word.Builder addWordsBuilder() { + return getWordsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p2beta1.Word.Builder addWordsBuilder( + int index) { + return getWordsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + public java.util.List + getWordsBuilderList() { + return getWordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder> + getWordsFieldBuilder() { + if (wordsBuilder_ == null) { + wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder>( + words_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + words_ = null; + } + return wordsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Paragraph) + private static final com.google.cloud.vision.v1p2beta1.Paragraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Paragraph(); + } + + public static com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Paragraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java new file mode 100644 index 000000000000..e989fcc671f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface ParagraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Paragraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + java.util.List + getWordsList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + com.google.cloud.vision.v1p2beta1.Word getWords(int index); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + int getWordsCount(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + java.util.List + getWordsOrBuilderList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Word words = 3; + */ + com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java new file mode 100644 index 000000000000..15b9ceea3aba --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A 3D position in the image, used primarily for Face detection landmarks.
+ * A valid Position must have both x and y coordinates.
+ * The position coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Position} + */ +public final class Position extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Position) + PositionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Position.newBuilder() to construct. + private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Position() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Position(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Position( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + case 29: { + + z_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Position.class, com.google.cloud.vision.v1p2beta1.Position.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_; + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Position)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Position other = (com.google.cloud.vision.v1p2beta1.Position) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Position parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Position parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 3D position in the image, used primarily for Face detection landmarks.
+   * A valid Position must have both x and y coordinates.
+   * The position coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Position} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Position) + com.google.cloud.vision.v1p2beta1.PositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Position.class, com.google.cloud.vision.v1p2beta1.Position.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Position.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + z_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Position getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Position build() { + com.google.cloud.vision.v1p2beta1.Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Position buildPartial() { + com.google.cloud.vision.v1p2beta1.Position result = new com.google.cloud.vision.v1p2beta1.Position(this); + result.x_ = x_; + result.y_ = y_; + result.z_ = z_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Position) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Position)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Position other) { + if (other == com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Position parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + onChanged(); + return this; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + + z_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Position) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Position) + private static final com.google.cloud.vision.v1p2beta1.Position DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Position(); + } + + public static com.google.cloud.vision.v1p2beta1.Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Position parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Position(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java new file mode 100644 index 000000000000..333b07f75a92 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface PositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Position) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); + + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + float getZ(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java new file mode 100644 index 000000000000..e8ee49620cc6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A `Property` consists of a user-supplied name/value pair.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Property} + */ +public final class Property extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Property) + PropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Property() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: { + + uint64Value_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Property.class, com.google.cloud.vision.v1p2beta1.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UINT64_VALUE_FIELD_NUMBER = 3; + private long uint64Value_; + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (uint64Value_ != 0L) { + output.writeUInt64(3, uint64Value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (uint64Value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, uint64Value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Property)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Property other = (com.google.cloud.vision.v1p2beta1.Property) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getUint64Value() + != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint64Value()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Property parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Property prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `Property` consists of a user-supplied name/value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Property} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Property) + com.google.cloud.vision.v1p2beta1.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Property.class, com.google.cloud.vision.v1p2beta1.Property.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + uint64Value_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Property getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Property build() { + com.google.cloud.vision.v1p2beta1.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Property buildPartial() { + com.google.cloud.vision.v1p2beta1.Property result = new com.google.cloud.vision.v1p2beta1.Property(this); + result.name_ = name_; + result.value_ = value_; + result.uint64Value_ = uint64Value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Property) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Property)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Property other) { + if (other == com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getUint64Value() != 0L) { + setUint64Value(other.getUint64Value()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private long uint64Value_ ; + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @param value The uint64Value to set. + * @return This builder for chaining. + */ + public Builder setUint64Value(long value) { + + uint64Value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return This builder for chaining. + */ + public Builder clearUint64Value() { + + uint64Value_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Property) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Property) + private static final com.google.cloud.vision.v1p2beta1.Property DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Property(); + } + + public static com.google.cloud.vision.v1p2beta1.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java new file mode 100644 index 000000000000..a6559a942f46 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface PropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Property) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + long getUint64Value(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java new file mode 100644 index 000000000000..5bce1f6280d3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Set of features pertaining to the image, computed by computer vision
+ * methods over safe-search verticals (for example, adult, spoof, medical,
+ * violence).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.SafeSearchAnnotation} + */ +public final class SafeSearchAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) + SafeSearchAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use SafeSearchAnnotation.newBuilder() to construct. + private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SafeSearchAnnotation() { + adult_ = 0; + spoof_ = 0; + medical_ = 0; + violence_ = 0; + racy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SafeSearchAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SafeSearchAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + adult_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + spoof_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + medical_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + violence_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + racy_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder.class); + } + + public static final int ADULT_FIELD_NUMBER = 1; + private int adult_; + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SPOOF_FIELD_NUMBER = 2; + private int spoof_; + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int MEDICAL_FIELD_NUMBER = 3; + private int medical_; + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int VIOLENCE_FIELD_NUMBER = 4; + private int violence_; + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RACY_FIELD_NUMBER = 9; + private int racy_; + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adult_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, racy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adult_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, racy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) obj; + + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADULT_FIELD_NUMBER; + hash = (53 * hash) + adult_; + hash = (37 * hash) + SPOOF_FIELD_NUMBER; + hash = (53 * hash) + spoof_; + hash = (37 * hash) + MEDICAL_FIELD_NUMBER; + hash = (53 * hash) + medical_; + hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; + hash = (53 * hash) + violence_; + hash = (37 * hash) + RACY_FIELD_NUMBER; + hash = (53 * hash) + racy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of features pertaining to the image, computed by computer vision
+   * methods over safe-search verticals (for example, adult, spoof, medical,
+   * violence).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.SafeSearchAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adult_ = 0; + + spoof_ = 0; + + medical_ = 0; + + violence_ = 0; + + racy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation build() { + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation(this); + result.adult_ = adult_; + result.spoof_ = spoof_; + result.medical_ = medical_; + result.violence_ = violence_; + result.racy_ = racy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance()) return this; + if (other.adult_ != 0) { + setAdultValue(other.getAdultValue()); + } + if (other.spoof_ != 0) { + setSpoofValue(other.getSpoofValue()); + } + if (other.medical_ != 0) { + setMedicalValue(other.getMedicalValue()); + } + if (other.violence_ != 0) { + setViolenceValue(other.getViolenceValue()); + } + if (other.racy_ != 0) { + setRacyValue(other.getRacyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int adult_ = 0; + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @param value The enum numeric value on the wire for adult to set. + * @return This builder for chaining. + */ + public Builder setAdultValue(int value) { + + adult_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @param value The adult to set. + * @return This builder for chaining. + */ + public Builder setAdult(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + adult_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return This builder for chaining. + */ + public Builder clearAdult() { + + adult_ = 0; + onChanged(); + return this; + } + + private int spoof_ = 0; + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @param value The enum numeric value on the wire for spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoofValue(int value) { + + spoof_ = value; + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @param value The spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoof(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + spoof_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return This builder for chaining. + */ + public Builder clearSpoof() { + + spoof_ = 0; + onChanged(); + return this; + } + + private int medical_ = 0; + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @param value The enum numeric value on the wire for medical to set. + * @return This builder for chaining. + */ + public Builder setMedicalValue(int value) { + + medical_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @param value The medical to set. + * @return This builder for chaining. + */ + public Builder setMedical(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + medical_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return This builder for chaining. + */ + public Builder clearMedical() { + + medical_ = 0; + onChanged(); + return this; + } + + private int violence_ = 0; + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @param value The enum numeric value on the wire for violence to set. + * @return This builder for chaining. + */ + public Builder setViolenceValue(int value) { + + violence_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @param value The violence to set. + * @return This builder for chaining. + */ + public Builder setViolence(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + violence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return This builder for chaining. + */ + public Builder clearViolence() { + + violence_ = 0; + onChanged(); + return this; + } + + private int racy_ = 0; + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @param value The enum numeric value on the wire for racy to set. + * @return This builder for chaining. + */ + public Builder setRacyValue(int value) { + + racy_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @param value The racy to set. + * @return This builder for chaining. + */ + public Builder setRacy(com.google.cloud.vision.v1p2beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + racy_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return This builder for chaining. + */ + public Builder clearRacy() { + + racy_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) + private static final com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafeSearchAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SafeSearchAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java new file mode 100644 index 000000000000..2f97a54c675d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface SafeSearchAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + int getAdultValue(); + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; + * @return The adult. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getAdult(); + + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + int getSpoofValue(); + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; + * @return The spoof. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getSpoof(); + + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + int getMedicalValue(); + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; + * @return The medical. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getMedical(); + + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + int getViolenceValue(); + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; + * @return The violence. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getViolence(); + + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + int getRacyValue(); + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; + * @return The racy. + */ + com.google.cloud.vision.v1p2beta1.Likelihood getRacy(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java new file mode 100644 index 000000000000..a0ee829c942b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A single symbol representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Symbol} + */ +public final class Symbol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Symbol) + SymbolOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symbol() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symbol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Symbol.class, com.google.cloud.vision.v1p2beta1.Symbol.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int TEXT_FIELD_NUMBER = 3; + private volatile java.lang.Object text_; + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Symbol)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Symbol other = (com.google.cloud.vision.v1p2beta1.Symbol) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getText() + .equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Symbol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single symbol representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Symbol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Symbol) + com.google.cloud.vision.v1p2beta1.SymbolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Symbol.class, com.google.cloud.vision.v1p2beta1.Symbol.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Symbol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + text_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Symbol build() { + com.google.cloud.vision.v1p2beta1.Symbol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Symbol buildPartial() { + com.google.cloud.vision.v1p2beta1.Symbol result = new com.google.cloud.vision.v1p2beta1.Symbol(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + result.text_ = text_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Symbol) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Symbol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Symbol other) { + if (other == com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Symbol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Symbol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Symbol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Symbol) + private static final com.google.cloud.vision.v1p2beta1.Symbol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Symbol(); + } + + public static com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java new file mode 100644 index 000000000000..a192c7ee7ba8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Symbol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java new file mode 100644 index 000000000000..a75c31a2379b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java @@ -0,0 +1,3814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * TextAnnotation contains a structured representation of OCR extracted text.
+ * The hierarchy of an OCR extracted text structure is like this:
+ *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+ * Each structural component, starting from Page, may further have their own
+ * properties. Properties describe detected languages, breaks etc.. Please refer
+ * to the
+ * [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty]
+ * message definition below for more detail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation} + */ +public final class TextAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation) + TextAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextAnnotation() { + pages_ = java.util.Collections.emptyList(); + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Page.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder.class); + } + + public interface DetectedLanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + } + /** + *
+   * Detected language for a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} + */ + public static final class DetectedLanguage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedLanguage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) obj; + + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage build() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage buildPartial() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage(this); + result.languageCode_ = languageCode_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage other) { + if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) + private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage(); + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedLanguage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedBreakOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType(); + + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + boolean getIsPrefix(); + } + /** + *
+   * Detected start or end of a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} + */ + public static final class DetectedBreak extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedBreak() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedBreak(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedBreak( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + isPrefix_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + /** + *
+     * Enum to denote the type of break found. New line, space etc.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType} + */ + public enum BreakType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + SURE_SPACE(2), + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + EOL_SURE_SPACE(3), + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + HYPHEN(4), + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + LINE_BREAK(5), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + public static final int SURE_SPACE_VALUE = 2; + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + public static final int EOL_SURE_SPACE_VALUE = 3; + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + public static final int HYPHEN_VALUE = 4; + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + public static final int LINE_BREAK_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BreakType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BreakType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SPACE; + case 2: return SURE_SPACE; + case 3: return EOL_SURE_SPACE; + case 4: return HYPHEN; + case 5: return LINE_BREAK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BreakType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BreakType findValueByNumber(int number) { + return BreakType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); + } + + private static final BreakType[] VALUES = values(); + + public static BreakType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BreakType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + + public static final int IS_PREFIX_FIELD_NUMBER = 2; + private boolean isPrefix_; + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (isPrefix_ != false) { + output.writeBool(2, isPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (isPrefix_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) obj; + + if (type_ != other.type_) return false; + if (getIsPrefix() + != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPrefix()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected start or end of a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + isPrefix_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak build() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak buildPartial() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak(this); + result.type_ = type_; + result.isPrefix_ = isPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak other) { + if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getIsPrefix() != false) { + setIsPrefix(other.getIsPrefix()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean isPrefix_ ; + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @param value The isPrefix to set. + * @return This builder for chaining. + */ + public Builder setIsPrefix(boolean value) { + + isPrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearIsPrefix() { + + isPrefix_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) + private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak(); + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedBreak(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TextPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + int getDetectedLanguagesCount(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesOrBuilderList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index); + + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + boolean hasDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); + } + /** + *
+   * Additional information detected on the structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} + */ + public static final class TextProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) + TextPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextProperty.newBuilder() to construct. + private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextProperty() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextProperty(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextProperty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectedLanguages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; + if (detectedBreak_ != null) { + subBuilder = detectedBreak_.toBuilder(); + } + detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectedBreak_); + detectedBreak_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder.class); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; + private java.util.List detectedLanguages_; + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + return detectedLanguages_.get(index); + } + + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_; + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + return detectedBreak_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + return getDetectedBreak(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectedBreak()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) obj; + + if (!getDetectedLanguagesList() + .equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak() + .equals(other.getDetectedBreak())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Additional information detected on the structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectedLanguagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectedLanguagesBuilder_.clear(); + } + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty build() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty buildPartial() { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty(this); + int from_bitField0_ = bitField0_; + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (detectedBreakBuilder_ == null) { + result.detectedBreak_ = detectedBreak_; + } else { + result.detectedBreak_ = detectedBreakBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty other) { + if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectedLanguagesFieldBuilder() : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List detectedLanguages_ = + java.util.Collections.emptyList(); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; + + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return detectedBreakBuilder_ != null || detectedBreak_ != null; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + onChanged(); + } else { + detectedBreakBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak( + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + onChanged(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder mergeDetectedBreak(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (detectedBreak_ != null) { + detectedBreak_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); + } else { + detectedBreak_ = value; + } + onChanged(); + } else { + detectedBreakBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder clearDetectedBreak() { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + onChanged(); + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { + + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder>( + getDetectedBreak(), + getParentForChildren(), + isClean()); + detectedBreak_ = null; + } + return detectedBreakBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) + private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty(); + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextProperty(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PAGES_FIELD_NUMBER = 1; + private java.util.List pages_; + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Page getPages(int index) { + return pages_.get(index); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object text_; + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.TextAnnotation other = (com.google.cloud.vision.v1p2beta1.TextAnnotation) obj; + + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * TextAnnotation contains a structured representation of OCR extracted text.
+   * The hierarchy of an OCR extracted text structure is like this:
+   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+   * Each structural component, starting from Page, may further have their own
+   * properties. Properties describe detected languages, breaks etc.. Please refer
+   * to the
+   * [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty]
+   * message definition below for more detail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation) + com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextAnnotation.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pagesBuilder_.clear(); + } + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation build() { + com.google.cloud.vision.v1p2beta1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation buildPartial() { + com.google.cloud.vision.v1p2beta1.TextAnnotation result = new com.google.cloud.vision.v1p2beta1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation other) { + if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance()) return this; + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder> pagesBuilder_; + + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p2beta1.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p2beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder addPages(com.google.cloud.vision.v1p2beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p2beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder addPages( + com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p2beta1.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p2beta1.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p2beta1.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation) + private static final com.google.cloud.vision.v1p2beta1.TextAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation(); + } + + public static com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..993383596b57 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface TextAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + java.util.List + getPagesList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p2beta1.Page getPages(int index); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + int getPagesCount(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + java.util.List + getPagesOrBuilderList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( + int index); + + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java new file mode 100644 index 000000000000..308d4dc72da2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public final class TextAnnotationProto { + private TextAnnotationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p2beta1/text_ann" + + "otation.proto\022\035google.cloud.vision.v1p2b" + + "eta1\032,google/cloud/vision/v1p2beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p2beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p2beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p2beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p2beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p2beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p2beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p2beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p2beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p2beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p2beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p2beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p2beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p2bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "2beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p2beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p2beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p2beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p2beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p2" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p2beta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor, + new java.lang.String[] { "Pages", "Text", }); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor = + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor, + new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor = + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor, + new java.lang.String[] { "Type", "IsPrefix", }); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor = + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor, + new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); + internal_static_google_cloud_vision_v1p2beta1_Page_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Page_descriptor, + new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); + internal_static_google_cloud_vision_v1p2beta1_Block_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Block_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); + internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); + internal_static_google_cloud_vision_v1p2beta1_Word_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Word_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); + internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); + com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java new file mode 100644 index 000000000000..a62c85f83d46 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Parameters for text detections. This is used to control TEXT_DETECTION and
+ * DOCUMENT_TEXT_DETECTION features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextDetectionParams} + */ +public final class TextDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextDetectionParams) + TextDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextDetectionParams.newBuilder() to construct. + private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextDetectionParams() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 72: { + + enableTextDetectionConfidenceScore_ = input.readBool(); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + advancedOcrOptions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextDetectionParams.class, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder.class); + } + + public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; + private boolean enableTextDetectionConfidenceScore_; + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList advancedOcrOptions_; + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableTextDetectionConfidenceScore_ != false) { + output.writeBool(9, enableTextDetectionConfidenceScore_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTextDetectionConfidenceScore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, enableTextDetectionConfidenceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.TextDetectionParams other = (com.google.cloud.vision.v1p2beta1.TextDetectionParams) obj; + + if (getEnableTextDetectionConfidenceScore() + != other.getEnableTextDetectionConfidenceScore()) return false; + if (!getAdvancedOcrOptionsList() + .equals(other.getAdvancedOcrOptionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableTextDetectionConfidenceScore()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for text detections. This is used to control TEXT_DETECTION and
+   * DOCUMENT_TEXT_DETECTION features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.TextDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextDetectionParams) + com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.TextDetectionParams.class, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.TextDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableTextDetectionConfidenceScore_ = false; + + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParams build() { + com.google.cloud.vision.v1p2beta1.TextDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParams buildPartial() { + com.google.cloud.vision.v1p2beta1.TextDetectionParams result = new com.google.cloud.vision.v1p2beta1.TextDetectionParams(this); + int from_bitField0_ = bitField0_; + result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; + if (((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.advancedOcrOptions_ = advancedOcrOptions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.TextDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.TextDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextDetectionParams other) { + if (other == com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance()) return this; + if (other.getEnableTextDetectionConfidenceScore() != false) { + setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.TextDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.TextDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean enableTextDetectionConfidenceScore_ ; + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @param value The enableTextDetectionConfidenceScore to set. + * @return This builder for chaining. + */ + public Builder setEnableTextDetectionConfidenceScore(boolean value) { + + enableTextDetectionConfidenceScore_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return This builder for chaining. + */ + public Builder clearEnableTextDetectionConfidenceScore() { + + enableTextDetectionConfidenceScore_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdvancedOcrOptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_.getUnmodifiableView(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions( + java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, advancedOcrOptions_); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextDetectionParams) + private static final com.google.cloud.vision.v1p2beta1.TextDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextDetectionParams(); + } + + public static com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..a4c66feb3478 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface TextDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + boolean getEnableTextDetectionConfidenceScore(); + + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + java.util.List + getAdvancedOcrOptionsList(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java new file mode 100644 index 000000000000..17505587fbd2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Vertex} + */ +public final class Vertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Vertex) + VertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Vertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Vertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + x_ = input.readInt32(); + break; + } + case 16: { + + y_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Vertex.class, com.google.cloud.vision.v1p2beta1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Vertex other = (com.google.cloud.vision.v1p2beta1.Vertex) obj; + + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Vertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Vertex) + com.google.cloud.vision.v1p2beta1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Vertex.class, com.google.cloud.vision.v1p2beta1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Vertex build() { + com.google.cloud.vision.v1p2beta1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Vertex buildPartial() { + com.google.cloud.vision.v1p2beta1.Vertex result = new com.google.cloud.vision.v1p2beta1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Vertex) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Vertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Vertex other) { + if (other == com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Vertex) + private static final com.google.cloud.vision.v1p2beta1.Vertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Vertex(); + } + + public static com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java new file mode 100644 index 000000000000..e57428d2a212 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/geometry.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface VertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + int getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + int getY(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java new file mode 100644 index 000000000000..ef9fa9675bbd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java @@ -0,0 +1,7537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/web_detection.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Relevant information for the image from the Internet.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection} + */ +public final class WebDetection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection) + WebDetectionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetection.newBuilder() to construct. + private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetection() { + webEntities_ = java.util.Collections.emptyList(); + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + visuallySimilarImages_ = java.util.Collections.emptyList(); + bestGuessLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + webEntities_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pagesWithMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + visuallySimilarImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + bestGuessLabels_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.class, com.google.cloud.vision.v1p2beta1.WebDetection.Builder.class); + } + + public interface WebEntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Entity deduced from similar images on the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebEntity} + */ + public static final class WebEntity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) + WebEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebEntity.newBuilder() to construct. + private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebEntity() { + entityId_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebEntity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebEntity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Entity deduced from similar images on the Internet.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebEntity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + score_ = 0F; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity build() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity(this); + result.entityId_ = entityId_; + result.score_ = score_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) + private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebEntity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Metadata for online images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebImage} + */ + public static final class WebImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebImage) + WebImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebImage.newBuilder() to construct. + private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebImage() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for online images.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebImage) + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage build() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebImage(this); + result.url_ = url_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebImage) + private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebImage(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebPageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebPage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + java.lang.String getPageTitle(); + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + com.google.protobuf.ByteString + getPageTitleBytes(); + + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + int getFullMatchingImagesCount(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + int getPartialMatchingImagesCount(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + } + /** + *
+   * Metadata for web pages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebPage} + */ + public static final class WebPage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebPage) + WebPageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebPage.newBuilder() to construct. + private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebPage() { + url_ = ""; + pageTitle_ = ""; + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebPage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebPage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageTitle_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PAGE_TITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pageTitle_; + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + @java.lang.Override + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } + } + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List fullMatchingImages_; + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; + private java.util.List partialMatchingImages_; + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(5, partialMatchingImages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, partialMatchingImages_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebPage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getPageTitle() + .equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPageTitle().hashCode(); + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for web pages.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebPage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebPage) + com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + pageTitle_ = ""; + + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage build() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebPage(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + result.score_ = score_; + result.pageTitle_ = pageTitle_; + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebPage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getPageTitle().isEmpty()) { + pageTitle_ = other.pageTitle_; + onChanged(); + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object pageTitle_ = ""; + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageTitle_ = value; + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return This builder for chaining. + */ + public Builder clearPageTitle() { + + pageTitle_ = getDefaultInstance().getPageTitle(); + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The bytes for pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageTitle_ = value; + onChanged(); + return this; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebPage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebPage) + private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebPage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebPage(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebPage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebPage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + } + /** + *
+   * Label to provide extra metadata for the web detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebLabel} + */ + public static final class WebLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) + WebLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLabel.newBuilder() to construct. + private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLabel() { + label_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder.class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) obj; + + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Label to provide extra metadata for the web detection.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + label_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel build() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel(this); + result.label_ = label_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) + private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int WEB_ENTITIES_FIELD_NUMBER = 1; + private java.util.List webEntities_; + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List getWebEntitiesList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List + getWebEntitiesOrBuilderList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public int getWebEntitiesCount() { + return webEntities_.size(); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index) { + return webEntities_.get(index); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + return webEntities_.get(index); + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; + private java.util.List fullMatchingImages_; + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; + private java.util.List partialMatchingImages_; + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List pagesWithMatchingImages_; + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List getPagesWithMatchingImagesList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public int getPagesWithMatchingImagesCount() { + return pagesWithMatchingImages_.size(); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + return pagesWithMatchingImages_.get(index); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + return pagesWithMatchingImages_.get(index); + } + + public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; + private java.util.List visuallySimilarImages_; + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List getVisuallySimilarImagesList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public int getVisuallySimilarImagesCount() { + return visuallySimilarImages_.size(); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + return visuallySimilarImages_.get(index); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + return visuallySimilarImages_.get(index); + } + + public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; + private java.util.List bestGuessLabels_; + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List getBestGuessLabelsList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List + getBestGuessLabelsOrBuilderList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public int getBestGuessLabelsCount() { + return bestGuessLabels_.size(); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + return bestGuessLabels_.get(index); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + return bestGuessLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < webEntities_.size(); i++) { + output.writeMessage(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + output.writeMessage(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + output.writeMessage(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + output.writeMessage(8, bestGuessLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < webEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, bestGuessLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetection other = (com.google.cloud.vision.v1p2beta1.WebDetection) obj; + + if (!getWebEntitiesList() + .equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList() + .equals(other.getPagesWithMatchingImagesList())) return false; + if (!getVisuallySimilarImagesList() + .equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList() + .equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWebEntitiesCount() > 0) { + hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getWebEntitiesList().hashCode(); + } + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + if (getPagesWithMatchingImagesCount() > 0) { + hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); + } + if (getVisuallySimilarImagesCount() > 0) { + hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); + } + if (getBestGuessLabelsCount() > 0) { + hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getBestGuessLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Relevant information for the image from the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection) + com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetection.class, com.google.cloud.vision.v1p2beta1.WebDetection.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWebEntitiesFieldBuilder(); + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + getPagesWithMatchingImagesFieldBuilder(); + getVisuallySimilarImagesFieldBuilder(); + getBestGuessLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + webEntitiesBuilder_.clear(); + } + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + partialMatchingImagesBuilder_.clear(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + visuallySimilarImagesBuilder_.clear(); + } + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection build() { + com.google.cloud.vision.v1p2beta1.WebDetection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetection result = new com.google.cloud.vision.v1p2beta1.WebDetection(this); + int from_bitField0_ = bitField0_; + if (webEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.webEntities_ = webEntities_; + } else { + result.webEntities_ = webEntitiesBuilder_.build(); + } + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pagesWithMatchingImages_ = pagesWithMatchingImages_; + } else { + result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); + } + if (visuallySimilarImagesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.visuallySimilarImages_ = visuallySimilarImages_; + } else { + result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); + } + if (bestGuessLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bestGuessLabels_ = bestGuessLabels_; + } else { + result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance()) return this; + if (webEntitiesBuilder_ == null) { + if (!other.webEntities_.isEmpty()) { + if (webEntities_.isEmpty()) { + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWebEntitiesIsMutable(); + webEntities_.addAll(other.webEntities_); + } + onChanged(); + } + } else { + if (!other.webEntities_.isEmpty()) { + if (webEntitiesBuilder_.isEmpty()) { + webEntitiesBuilder_.dispose(); + webEntitiesBuilder_ = null; + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + webEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWebEntitiesFieldBuilder() : null; + } else { + webEntitiesBuilder_.addAllMessages(other.webEntities_); + } + } + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImages_.isEmpty()) { + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); + } + onChanged(); + } + } else { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImagesBuilder_.isEmpty()) { + pagesWithMatchingImagesBuilder_.dispose(); + pagesWithMatchingImagesBuilder_ = null; + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + pagesWithMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesWithMatchingImagesFieldBuilder() : null; + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); + } + } + } + if (visuallySimilarImagesBuilder_ == null) { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImages_.isEmpty()) { + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.addAll(other.visuallySimilarImages_); + } + onChanged(); + } + } else { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImagesBuilder_.isEmpty()) { + visuallySimilarImagesBuilder_.dispose(); + visuallySimilarImagesBuilder_ = null; + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + visuallySimilarImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVisuallySimilarImagesFieldBuilder() : null; + } else { + visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); + } + } + } + if (bestGuessLabelsBuilder_ == null) { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabels_.isEmpty()) { + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.addAll(other.bestGuessLabels_); + } + onChanged(); + } + } else { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabelsBuilder_.isEmpty()) { + bestGuessLabelsBuilder_.dispose(); + bestGuessLabelsBuilder_ = null; + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + bestGuessLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBestGuessLabelsFieldBuilder() : null; + } else { + bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List webEntities_ = + java.util.Collections.emptyList(); + private void ensureWebEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(webEntities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; + + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List getWebEntitiesList() { + if (webEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webEntities_); + } else { + return webEntitiesBuilder_.getMessageList(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public int getWebEntitiesCount() { + if (webEntitiesBuilder_ == null) { + return webEntities_.size(); + } else { + return webEntitiesBuilder_.getCount(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); + } else { + return webEntitiesBuilder_.getMessage(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.set(index, value); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(index, value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addAllWebEntities( + java.lang.Iterable values) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, webEntities_); + onChanged(); + } else { + webEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder clearWebEntities() { + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + webEntitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder removeWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.remove(index); + onChanged(); + } else { + webEntitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); } else { + return webEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesOrBuilderList() { + if (webEntitiesBuilder_ != null) { + return webEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webEntities_); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { + return getWebEntitiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesBuilderList() { + return getWebEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder> + getWebEntitiesFieldBuilder() { + if (webEntitiesBuilder_ == null) { + webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder>( + webEntities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + webEntities_ = null; + } + return webEntitiesBuilder_; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + + private java.util.List pagesWithMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePagesWithMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; + + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List getPagesWithMatchingImagesList() { + if (pagesWithMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } else { + return pagesWithMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public int getPagesWithMatchingImagesCount() { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.size(); + } else { + return pagesWithMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); + } else { + return pagesWithMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addAllPagesWithMatchingImages( + java.lang.Iterable values) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pagesWithMatchingImages_); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder clearPagesWithMatchingImages() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder removePagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.remove(index); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); } else { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + if (pagesWithMatchingImagesBuilder_ != null) { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesBuilderList() { + return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder> + getPagesWithMatchingImagesFieldBuilder() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder>( + pagesWithMatchingImages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pagesWithMatchingImages_ = null; + } + return pagesWithMatchingImagesBuilder_; + } + + private java.util.List visuallySimilarImages_ = + java.util.Collections.emptyList(); + private void ensureVisuallySimilarImagesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; + + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List getVisuallySimilarImagesList() { + if (visuallySimilarImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } else { + return visuallySimilarImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public int getVisuallySimilarImagesCount() { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.size(); + } else { + return visuallySimilarImagesBuilder_.getCount(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); + } else { + return visuallySimilarImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addAllVisuallySimilarImages( + java.lang.Iterable values) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, visuallySimilarImages_); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder clearVisuallySimilarImages() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + visuallySimilarImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder removeVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.remove(index); + onChanged(); + } else { + visuallySimilarImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); } else { + return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + if (visuallySimilarImagesBuilder_ != null) { + return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesBuilderList() { + return getVisuallySimilarImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> + getVisuallySimilarImagesFieldBuilder() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( + visuallySimilarImages_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + visuallySimilarImages_ = null; + } + return visuallySimilarImagesBuilder_; + } + + private java.util.List bestGuessLabels_ = + java.util.Collections.emptyList(); + private void ensureBestGuessLabelsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; + + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List getBestGuessLabelsList() { + if (bestGuessLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } else { + return bestGuessLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public int getBestGuessLabelsCount() { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.size(); + } else { + return bestGuessLabelsBuilder_.getCount(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); + } else { + return bestGuessLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addAllBestGuessLabels( + java.lang.Iterable values) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bestGuessLabels_); + onChanged(); + } else { + bestGuessLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder clearBestGuessLabels() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder removeBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.remove(index); + onChanged(); + } else { + bestGuessLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); } else { + return bestGuessLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsOrBuilderList() { + if (bestGuessLabelsBuilder_ != null) { + return bestGuessLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { + return getBestGuessLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsBuilderList() { + return getBestGuessLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder> + getBestGuessLabelsFieldBuilder() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder>( + bestGuessLabels_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + bestGuessLabels_ = null; + } + return bestGuessLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection) + private static final com.google.cloud.vision.v1p2beta1.WebDetection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java new file mode 100644 index 000000000000..be22ed9f4276 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java @@ -0,0 +1,288 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/web_detection.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface WebDetectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + int getWebEntitiesCount(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesOrBuilderList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index); + + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + int getFullMatchingImagesCount(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + int getPartialMatchingImagesCount(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + int getPagesWithMatchingImagesCount(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesOrBuilderList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index); + + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + int getVisuallySimilarImagesCount(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesOrBuilderList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index); + + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + int getBestGuessLabelsCount(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsOrBuilderList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java new file mode 100644 index 000000000000..08326401d14c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * Parameters for web detection request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetectionParams} + */ +public final class WebDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetectionParams) + WebDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetectionParams.newBuilder() to construct. + private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetectionParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + includeGeoResults_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetectionParams.class, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder.class); + } + + public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; + private boolean includeGeoResults_; + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (includeGeoResults_ != false) { + output.writeBool(2, includeGeoResults_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeGeoResults_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, includeGeoResults_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.WebDetectionParams other = (com.google.cloud.vision.v1p2beta1.WebDetectionParams) obj; + + if (getIncludeGeoResults() + != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeGeoResults()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for web detection request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetectionParams) + com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.WebDetectionParams.class, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.WebDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + includeGeoResults_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParams build() { + com.google.cloud.vision.v1p2beta1.WebDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParams buildPartial() { + com.google.cloud.vision.v1p2beta1.WebDetectionParams result = new com.google.cloud.vision.v1p2beta1.WebDetectionParams(this); + result.includeGeoResults_ = includeGeoResults_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetectionParams other) { + if (other == com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance()) return this; + if (other.getIncludeGeoResults() != false) { + setIncludeGeoResults(other.getIncludeGeoResults()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.WebDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeGeoResults_ ; + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @param value The includeGeoResults to set. + * @return This builder for chaining. + */ + public Builder setIncludeGeoResults(boolean value) { + + includeGeoResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeGeoResults() { + + includeGeoResults_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetectionParams) + private static final com.google.cloud.vision.v1p2beta1.WebDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetectionParams(); + } + + public static com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..f47b8b19f642 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/image_annotator.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface WebDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + boolean getIncludeGeoResults(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java new file mode 100644 index 000000000000..1be17273cc36 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/web_detection.proto + +package com.google.cloud.vision.v1p2beta1; + +public final class WebDetectionProto { + private WebDetectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/vision/v1p2beta1/web_dete" + + "ction.proto\022\035google.cloud.vision.v1p2bet" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p2beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p2beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p2" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p2beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p2beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p2beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p2beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p2beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p2beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p2beta1;visio" + + "n\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor, + new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor = + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor, + new java.lang.String[] { "EntityId", "Score", "Description", }); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor = + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor, + new java.lang.String[] { "Url", "Score", }); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor = + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor, + new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor = + internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor, + new java.lang.String[] { "Label", "LanguageCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java new file mode 100644 index 000000000000..35213ba52494 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java @@ -0,0 +1,1617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +/** + *
+ * A word representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Word} + */ +public final class Word extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Word) + WordOrBuilder { +private static final long serialVersionUID = 0L; + // Use Word.newBuilder() to construct. + private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Word() { + symbols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Word(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Word( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + symbols_.add( + input.readMessage(com.google.cloud.vision.v1p2beta1.Symbol.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Word.class, com.google.cloud.vision.v1p2beta1.Word.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int SYMBOLS_FIELD_NUMBER = 3; + private java.util.List symbols_; + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List getSymbolsList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List + getSymbolsOrBuilderList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Word)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p2beta1.Word other = (com.google.cloud.vision.v1p2beta1.Word) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList() + .equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Word parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Word parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p2beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Word prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A word representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p2beta1.Word} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Word) + com.google.cloud.vision.v1p2beta1.WordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p2beta1.Word.class, com.google.cloud.vision.v1p2beta1.Word.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p2beta1.Word.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSymbolsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + symbolsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Word getDefaultInstanceForType() { + return com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Word build() { + com.google.cloud.vision.v1p2beta1.Word result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Word buildPartial() { + com.google.cloud.vision.v1p2beta1.Word result = new com.google.cloud.vision.v1p2beta1.Word(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p2beta1.Word) { + return mergeFrom((com.google.cloud.vision.v1p2beta1.Word)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Word other) { + if (other == com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymbolsFieldBuilder() : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p2beta1.Word parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p2beta1.Word) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(symbols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder> symbolsBuilder_; + + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public java.util.List getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p2beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder addSymbols(com.google.cloud.vision.v1p2beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p2beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder addAllSymbols( + java.lang.Iterable values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p2beta1.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p2beta1.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p2beta1.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder>( + symbols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Word) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Word) + private static final com.google.cloud.vision.v1p2beta1.Word DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Word(); + } + + public static com.google.cloud.vision.v1p2beta1.Word getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Word parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Word(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p2beta1.Word getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java new file mode 100644 index 000000000000..a02556d317b5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p2beta1/text_annotation.proto + +package com.google.cloud.vision.v1p2beta1; + +public interface WordOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Word) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + int getSymbolsCount(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto new file mode 100644 index 000000000000..e9fec20bda76 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto @@ -0,0 +1,67 @@ +// Copyright 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p2beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p2beta1"; + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// A bounding polygon for the detected image annotation. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; + + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 2; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto new file mode 100644 index 000000000000..264462d48438 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto @@ -0,0 +1,794 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p2beta1/geometry.proto"; +import "google/cloud/vision/v1p2beta1/text_annotation.proto"; +import "google/cloud/vision/v1p2beta1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p2beta1"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p2beta1/images:annotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + } + + // Run async image detection and annotation for a list of generic files (e.g. + // PDF) which may contain multiple pages and multiple images per page. + // Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p2beta1/files:asyncBatchAnnotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; + } +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + string gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more + // info. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // Image content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + bytes content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + ImageSource source = 2; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale, as returned in `ImageParams`. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale, as returned in `ImageParams`. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Parameters for text detections. This is used to control TEXT_DETECTION and +// DOCUMENT_TEXT_DETECTION features. +message TextDetectionParams { + + // By default, Cloud Vision API only includes confidence score for + // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + // score for TEXT_DETECTION as well. + bool enable_text_detection_confidence_score = 9; + + // A list of advanced OCR options to fine-tune OCR behavior. + repeated string advanced_ocr_options = 11; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. In most cases, an empty value + // yields the best results since it enables automatic language detection. For + // languages based on the Latin alphabet, setting `language_hints` is not + // needed. In rare cases, when the language of the text in the image is known, + // setting a hint will help get better results (although it will be a + // significant hindrance if the hint is wrong). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](https://cloud.google.com/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; + + // Parameters for text detection and document text detection. + TextDetectionParams text_detection_params = 12; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + ImageAnnotationContext context = 21; +} + +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. + repeated AnnotateImageResponse responses = 2; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// Multiple async file annotation requests are batched into a single service +// call. +message AsyncBatchAnnotateFilesRequest { + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // The type of the file. Currently only "application/pdf" and "image/tiff" + // are supported. Wildcards are not supported. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file on GCS. + // The valid range is [1, 100]. If not specified, the default value is 20. + // + // For example, for one pdf file with 100 pages, 100 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a GCS + // object. Wildcards are not currently supported. + string uri = 1; +} + +// The Google Cloud Storage location where the output will be written to. +message GcsDestination { + // Google Cloud Storage URI where the results will be stored. Results will + // be in JSON format and preceded by its corresponding input URI. This field + // can either represent a single file, or a prefix for multiple outputs. + // Prefixes must end in a `/`. + // + // Examples: + // + // * File: gs://bucket-name/filename.json + // * Prefix: gs://bucket-name/prefix/here/ + // * File: gs://bucket-name/prefix/here + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} + +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely that the image belongs to the specified vertical. + VERY_UNLIKELY = 1; + + // It is unlikely that the image belongs to the specified vertical. + UNLIKELY = 2; + + // It is possible that the image belongs to the specified vertical. + POSSIBLE = 3; + + // It is likely that the image belongs to the specified vertical. + LIKELY = 4; + + // It is very likely that the image belongs to the specified vertical. + VERY_LIKELY = 5; +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto new file mode 100644 index 000000000000..af568194aa8d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto @@ -0,0 +1,258 @@ +// Copyright 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p2beta1; + +import "google/cloud/vision/v1p2beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p2beta1"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol +// Each structural component, starting from Page, may further have their own +// properties. Properties describe detected languages, breaks etc.. Please refer +// to the +// [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // Detected language for a structural component. + message DetectedLanguage { + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 1; + + // Confidence of detected language. Range [0, 1]. + float confidence = 2; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto new file mode 100644 index 000000000000..2decb8596ef2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto @@ -0,0 +1,103 @@ +// Copyright 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p2beta1; + + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p2beta1"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // Best guess text labels for the request image. + repeated WebLabel best_guess_labels = 8; +} diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..05d786512262 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFiles(); + } + + public static void asyncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java new file mode 100644 index 000000000000..bb6cf7b6b4e9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p2beta1.OperationMetadata; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFilesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFilesLRO(); + } + + public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..2c2a830b9139 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] +import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFiles(); + } + + public static void syncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java new file mode 100644 index 000000000000..4dcfe27f26d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] +import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); + } + + public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..645d8703aa05 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateImages(); + } + + public static void asyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); + // Do something. + BatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..d5a912c6e10c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_sync] +import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java new file mode 100644 index 000000000000..d0c92735b810 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] +import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateImagesListannotateimagerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImagesListannotateimagerequest(); + } + + public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); + } + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c9da22a74b4f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p2beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..f53a19c572ce --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7cca27fe6e9d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p2beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p2beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..3d4ab2bbf979 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.samples; + +// [START vision_v1p2beta1_generated_imageannotatorsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p2beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..e5e0fd50fdb9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p2beta1.stub.samples; + +// [START vision_v1p2beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorStubSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p2beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java new file mode 100644 index 000000000000..fb9e74cb83a6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java @@ -0,0 +1,451 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStub; +import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorClient implements BackgroundResource { + private final ImageAnnotatorSettings settings; + private final ImageAnnotatorStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ImageAnnotatorClient with default settings. */ + public static final ImageAnnotatorClient create() throws IOException { + return create(ImageAnnotatorSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) + throws IOException { + return new ImageAnnotatorClient(settings); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ImageAnnotatorSettings). + */ + public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { + return new ImageAnnotatorClient(stub); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ImageAnnotatorClient(ImageAnnotatorStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ImageAnnotatorSettings getSettings() { + return settings; + } + + public ImageAnnotatorStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+   * }
+   * }
+ * + * @param requests Individual image annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages( + List requests) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { + return batchAnnotateImagesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateImagesCallable() { + return stub.batchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
+   * }
+   * }
+ * + * @param requests Required. Individual async file annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(List requests) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return asyncBatchAnnotateFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { + return asyncBatchAnnotateFilesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return stub.asyncBatchAnnotateFilesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateFilesCallable() { + return stub.asyncBatchAnnotateFilesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java new file mode 100644 index 000000000000..6306339f9f9f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java @@ -0,0 +1,238 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateFilesOperationSettings(); + } + + public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) + throws IOException { + return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageAnnotatorStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageAnnotatorStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageAnnotatorSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageAnnotatorStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageAnnotatorSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageAnnotatorStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); + } + + public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { + return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return getStubSettingsBuilder().batchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); + } + + @Override + public ImageAnnotatorSettings build() throws IOException { + return new ImageAnnotatorSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java new file mode 100644 index 000000000000..c12c902cc268 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java @@ -0,0 +1,3731 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStub; +import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] + * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put + * different products into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, + * named `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ProductSearchSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchClient implements BackgroundResource { + private final ProductSearchSettings settings; + private final ProductSearchStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ProductSearchClient with default settings. */ + public static final ProductSearchClient create() throws IOException { + return create(ProductSearchSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ProductSearchClient create(ProductSearchSettings settings) + throws IOException { + return new ProductSearchClient(settings); + } + + /** + * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ProductSearchSettings). + */ + public static final ProductSearchClient create(ProductSearchStub stub) { + return new ProductSearchClient(stub); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ProductSearchClient(ProductSearchSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ProductSearchClient(ProductSearchStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ProductSearchSettings getSettings() { + return settings; + } + + public ProductSearchStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + LocationName parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + String parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ProductSet response = productSearchClient.createProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet(CreateProductSetRequest request) { + return createProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductSetCallable() { + return stub.createProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(LocationName parent) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(String parent) { + ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { + return listProductSetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ProductSet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsPagedCallable() { + return stub.listProductSetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductSetsResponse response =
+   *         productSearchClient.listProductSetsCallable().call(request);
+   *     for (ProductSet element : response.getProductSetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsCallable() { + return stub.listProductSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(ProductSetName name) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(String name) { + GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ProductSet response = productSearchClient.getProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(GetProductSetRequest request) { + return getProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductSetCallable() { + return stub.getProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
+   * }
+   * }
+ * + * @param productSet Required. The ProductSet resource which replaces the one on the server. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * path is `display_name`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(productSet) + .setUpdateMask(updateMask) + .build(); + return updateProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ProductSet response = productSearchClient.updateProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(UpdateProductSetRequest request) { + return updateProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.updateProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductSetCallable() { + return stub.updateProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(ProductSetName name) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(String name) { + DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   productSearchClient.deleteProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(DeleteProductSetRequest request) { + deleteProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductSetCallable() { + return stub.deleteProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(LocationName parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(String parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   Product response = productSearchClient.createProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(CreateProductRequest request) { + return createProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductCallable() { + return stub.createProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(LocationName parent) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(String parent) { + ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(ListProductsRequest request) { + return listProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsPagedCallable() { + return stub.listProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProductsCallable() { + return stub.listProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(ProductName name) { + GetProductRequest request = + GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(String name) { + GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   Product response = productSearchClient.getProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(GetProductRequest request) { + return getProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductCallable() { + return stub.getProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only display_name, description and labels can be updated + * right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   Product product = Product.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Product response = productSearchClient.updateProduct(product, updateMask);
+   * }
+   * }
+ * + * @param product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * paths include `product_labels`, `display_name`, and `description`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(Product product, FieldMask updateMask) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); + return updateProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only display_name, description and labels can be updated + * right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Product response = productSearchClient.updateProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(UpdateProductRequest request) { + return updateProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only display_name, description and labels can be updated + * right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductCallable() { + return stub.updateProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(ProductName name) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(String name) { + DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.deleteProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(DeleteProductRequest request) { + deleteProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductCallable() { + return stub.deleteProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + ProductName parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + String parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { + return createReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createReferenceImageCallable() { + return stub.createReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the reference image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(ReferenceImageName name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the reference image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(String name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder().setName(name).build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the reference image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   productSearchClient.deleteReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(DeleteReferenceImageRequest request) { + deleteReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the reference image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteReferenceImageCallable() { + return stub.deleteReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder().setParent(parent).build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages( + ListReferenceImagesRequest request) { + return listReferenceImagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReferenceImage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesPagedCallable() { + return stub.listReferenceImagesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListReferenceImagesResponse response =
+   *         productSearchClient.listReferenceImagesCallable().call(request);
+   *     for (ReferenceImage element : response.getReferenceImagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesCallable() { + return stub.listReferenceImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(ReferenceImageName name) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(String name) { + GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { + return getReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReferenceImageCallable() { + return stub.getReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.addProductToProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(AddProductToProductSetRequest request) { + addProductToProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addProductToProductSetCallable() { + return stub.addProductToProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.removeProductFromProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { + removeProductFromProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeProductFromProductSetCallable() { + return stub.removeProductFromProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder().setName(name).build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet( + ListProductsInProductSetRequest request) { + return listProductsInProductSetPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetPagedCallable() { + return stub.listProductsInProductSetPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsInProductSetResponse response =
+   *         productSearchClient.listProductsInProductSetCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetCallable() { + return stub.listProductsInProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInputConfig(inputConfig) + .build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(ImportProductSetsRequest request) { + return importProductSetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportProductSetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return stub.importProductSetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.importProductSetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importProductSetsCallable() { + return stub.importProductSetsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListProductSetsPagedResponse + extends AbstractPagedListResponse< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductSetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductSetsPagedResponse(ListProductSetsPage page) { + super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductSetsPage + extends AbstractPage< + ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { + + private ListProductSetsPage( + PageContext context, + ListProductSetsResponse response) { + super(context, response); + } + + private static ListProductSetsPage createEmptyPage() { + return new ListProductSetsPage(null, null); + } + + @Override + protected ListProductSetsPage createPage( + PageContext context, + ListProductSetsResponse response) { + return new ListProductSetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductSetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + private ListProductSetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductSetsFixedSizeCollection createEmptyCollection() { + return new ListProductSetsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductSetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductSetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsPagedResponse + extends AbstractPagedListResponse< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsPagedResponse(ListProductsPage page) { + super(page, ListProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsPage + extends AbstractPage { + + private ListProductsPage( + PageContext context, + ListProductsResponse response) { + super(context, response); + } + + private static ListProductsPage createEmptyPage() { + return new ListProductsPage(null, null); + } + + @Override + protected ListProductsPage createPage( + PageContext context, + ListProductsResponse response) { + return new ListProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + private ListProductsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsFixedSizeCollection createEmptyCollection() { + return new ListProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReferenceImagesPagedResponse + extends AbstractPagedListResponse< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListReferenceImagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { + super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReferenceImagesPage + extends AbstractPage< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage> { + + private ListReferenceImagesPage( + PageContext + context, + ListReferenceImagesResponse response) { + super(context, response); + } + + private static ListReferenceImagesPage createEmptyPage() { + return new ListReferenceImagesPage(null, null); + } + + @Override + protected ListReferenceImagesPage createPage( + PageContext + context, + ListReferenceImagesResponse response) { + return new ListReferenceImagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReferenceImagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + private ListReferenceImagesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { + return new ListReferenceImagesFixedSizeCollection(null, 0); + } + + @Override + protected ListReferenceImagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsInProductSetPagedResponse + extends AbstractPagedListResponse< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsInProductSetPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { + super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsInProductSetPage + extends AbstractPage< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage> { + + private ListProductsInProductSetPage( + PageContext + context, + ListProductsInProductSetResponse response) { + super(context, response); + } + + private static ListProductsInProductSetPage createEmptyPage() { + return new ListProductsInProductSetPage(null, null); + } + + @Override + protected ListProductsInProductSetPage createPage( + PageContext + context, + ListProductsInProductSetResponse response) { + return new ListProductsInProductSetPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsInProductSetFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + private ListProductsInProductSetFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { + return new ListProductsInProductSetFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsInProductSetFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java new file mode 100644 index 000000000000..f00f1fc452c7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java @@ -0,0 +1,427 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); + } + + public static final ProductSearchSettings create(ProductSearchStubSettings stub) + throws IOException { + return new ProductSearchSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProductSearchStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProductSearchStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProductSearchStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProductSearchStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProductSearchSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ProductSearchStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProductSearchSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProductSearchStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProductSearchStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); + } + + public ProductSearchStubSettings.Builder getStubSettingsBuilder() { + return ((ProductSearchStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return getStubSettingsBuilder().createProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return getStubSettingsBuilder().listProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getStubSettingsBuilder().getProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return getStubSettingsBuilder().updateProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return getStubSettingsBuilder().deleteProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return getStubSettingsBuilder().createProductSettings(); + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return getStubSettingsBuilder().listProductsSettings(); + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getStubSettingsBuilder().getProductSettings(); + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return getStubSettingsBuilder().updateProductSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return getStubSettingsBuilder().deleteProductSettings(); + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return getStubSettingsBuilder().createReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return getStubSettingsBuilder().deleteReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return getStubSettingsBuilder().listReferenceImagesSettings(); + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getStubSettingsBuilder().getReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return getStubSettingsBuilder().addProductToProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return getStubSettingsBuilder().removeProductFromProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return getStubSettingsBuilder().listProductsInProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return getStubSettingsBuilder().importProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return getStubSettingsBuilder().importProductSetsOperationSettings(); + } + + @Override + public ProductSearchSettings build() throws IOException { + return new ProductSearchSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json new file mode 100644 index 000000000000..a21bf53f72c9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json @@ -0,0 +1,87 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.vision.v1p3beta1", + "libraryPackage": "com.google.cloud.vision.v1p3beta1", + "services": { + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "ImageAnnotatorClient", + "rpcs": { + "AsyncBatchAnnotateFiles": { + "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] + }, + "BatchAnnotateImages": { + "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] + } + } + } + } + }, + "ProductSearch": { + "clients": { + "grpc": { + "libraryClient": "ProductSearchClient", + "rpcs": { + "AddProductToProductSet": { + "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] + }, + "CreateProduct": { + "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] + }, + "CreateProductSet": { + "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] + }, + "CreateReferenceImage": { + "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] + }, + "DeleteProduct": { + "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] + }, + "DeleteProductSet": { + "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] + }, + "DeleteReferenceImage": { + "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] + }, + "GetProduct": { + "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] + }, + "GetProductSet": { + "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] + }, + "GetReferenceImage": { + "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] + }, + "ImportProductSets": { + "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] + }, + "ListProductSets": { + "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] + }, + "ListProducts": { + "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] + }, + "ListProductsInProductSet": { + "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] + }, + "ListReferenceImages": { + "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] + }, + "RemoveProductFromProductSet": { + "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] + }, + "UpdateProduct": { + "methods": ["updateProduct", "updateProduct", "updateProductCallable"] + }, + "UpdateProductSet": { + "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java new file mode 100644 index 000000000000..705b0cc2846c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java @@ -0,0 +1,77 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ImageAnnotatorClient ======================= + * + *

Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

Sample for ImageAnnotatorClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

======================= ProductSearchClient ======================= + * + *

Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] + * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put + * different products into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, + * named `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

Sample for ProductSearchClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.vision.v1p3beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..2214e27dcc85 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java new file mode 100644 index 000000000000..53337a430542 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java @@ -0,0 +1,213 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { + private static final MethodDescriptor + batchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageAnnotatorStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + batchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .build(); + GrpcCallSettings + asyncBatchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java new file mode 100644 index 000000000000..decbc368d8c0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java new file mode 100644 index 000000000000..b5933ac501d5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java @@ -0,0 +1,787 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsResponse; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProductSearchStub extends ProductSearchStub { + private static final MethodDescriptor + createProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProducts") + .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProduct") + .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProduct") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReferenceImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListReferenceImages") + .setRequestMarshaller( + ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addProductToProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/AddProductToProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeProductFromProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/RemoveProductFromProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/ListProductsInProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ImportProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new GrpcProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { + return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProductSearchStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProductSearchStub( + ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcProductSearchCallableFactory()); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product_set.name", String.valueOf(request.getProductSet().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product.name", String.valueOf(request.getProduct().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listReferenceImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings addProductToProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeProductFromProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductsInProductSetTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings importProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..f172d07f79f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java new file mode 100644 index 000000000000..fdddecf79c69 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java @@ -0,0 +1,293 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/images:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/files:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateFilesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonImageAnnotatorStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + batchAnnotateImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchAnnotateImagesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java new file mode 100644 index 000000000000..ca5283f4cb82 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProductSearchCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java new file mode 100644 index 000000000000..d5c8df64767f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java @@ -0,0 +1,1199 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsResponse; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProductSearchStub extends ProductSearchStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportProductSetsResponse.getDescriptor()) + .add(BatchOperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "productSetId", request.getProductSetId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProductSets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProductSet") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{productSet.name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "productSet.name", request.getProductSet().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProductSet") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProduct") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "productId", request.getProductId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProducts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProduct") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProduct") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{product.name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "product.name", request.getProduct().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProduct") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateReferenceImage") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "referenceImageId", request.getReferenceImageId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("referenceImage", request.getReferenceImage(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteReferenceImage") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listReferenceImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListReferenceImages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetReferenceImage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + addProductToProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/AddProductToProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + removeProductFromProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/RemoveProductFromProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p3beta1.ProductSearch/ListProductsInProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ImportProductSets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportProductSetsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProductSearchStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProductSearchStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listReferenceImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + addProductToProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + removeProductFromProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductsInProductSetTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings importProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createProductSetMethodDescriptor); + methodDescriptors.add(listProductSetsMethodDescriptor); + methodDescriptors.add(getProductSetMethodDescriptor); + methodDescriptors.add(updateProductSetMethodDescriptor); + methodDescriptors.add(deleteProductSetMethodDescriptor); + methodDescriptors.add(createProductMethodDescriptor); + methodDescriptors.add(listProductsMethodDescriptor); + methodDescriptors.add(getProductMethodDescriptor); + methodDescriptors.add(updateProductMethodDescriptor); + methodDescriptors.add(deleteProductMethodDescriptor); + methodDescriptors.add(createReferenceImageMethodDescriptor); + methodDescriptors.add(deleteReferenceImageMethodDescriptor); + methodDescriptors.add(listReferenceImagesMethodDescriptor); + methodDescriptors.add(getReferenceImageMethodDescriptor); + methodDescriptors.add(addProductToProductSetMethodDescriptor); + methodDescriptors.add(removeProductFromProductSetMethodDescriptor); + methodDescriptors.add(listProductsInProductSetMethodDescriptor); + methodDescriptors.add(importProductSetsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java new file mode 100644 index 000000000000..f8f0c7fab4cb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java @@ -0,0 +1,69 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ImageAnnotatorStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + batchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java new file mode 100644 index 000000000000..27d08b00d327 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java @@ -0,0 +1,434 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.OperationMetadata; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorStubSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings + batchAnnotateImagesSettings; + private final UnaryCallSettings + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + public ImageAnnotatorStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageAnnotatorStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonImageAnnotatorStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); + asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); + asyncBatchAnnotateFilesOperationSettings = + settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); + } + + /** Builder for ImageAnnotatorStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + batchAnnotateImagesSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put( + "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); + initDefaults(this); + } + + protected Builder(ImageAnnotatorStubSettings settings) { + super(settings); + + batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); + asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateFilesOperationSettings = + settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .asyncBatchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateFilesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateFilesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + @Override + public ImageAnnotatorStubSettings build() throws IOException { + return new ImageAnnotatorStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java new file mode 100644 index 000000000000..a3b6294a3982 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java @@ -0,0 +1,183 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsResponse; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ProductSearchStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); + } + + public UnaryCallable + listProductSetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); + } + + public UnaryCallable listProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); + } + + public UnaryCallable getProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); + } + + public UnaryCallable updateProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); + } + + public UnaryCallable deleteProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); + } + + public UnaryCallable createProductCallable() { + throw new UnsupportedOperationException("Not implemented: createProductCallable()"); + } + + public UnaryCallable listProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); + } + + public UnaryCallable listProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); + } + + public UnaryCallable getProductCallable() { + throw new UnsupportedOperationException("Not implemented: getProductCallable()"); + } + + public UnaryCallable updateProductCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); + } + + public UnaryCallable deleteProductCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); + } + + public UnaryCallable createReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); + } + + public UnaryCallable deleteReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); + } + + public UnaryCallable + listReferenceImagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); + } + + public UnaryCallable + listReferenceImagesCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); + } + + public UnaryCallable getReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); + } + + public UnaryCallable addProductToProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); + } + + public UnaryCallable + removeProductFromProductSetCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeProductFromProductSetCallable()"); + } + + public UnaryCallable + listProductsInProductSetPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listProductsInProductSetPagedCallable()"); + } + + public UnaryCallable + listProductsInProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); + } + + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importProductSetsOperationCallable()"); + } + + public UnaryCallable importProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java new file mode 100644 index 000000000000..485c0939f8e3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsResponse; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
+ *     ProductSearchStubSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings createProductSetSettings; + private final PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings getProductSetSettings; + private final UnaryCallSettings updateProductSetSettings; + private final UnaryCallSettings deleteProductSetSettings; + private final UnaryCallSettings createProductSettings; + private final PagedCallSettings< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings getProductSettings; + private final UnaryCallSettings updateProductSettings; + private final UnaryCallSettings deleteProductSettings; + private final UnaryCallSettings + createReferenceImageSettings; + private final UnaryCallSettings deleteReferenceImageSettings; + private final PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings + getReferenceImageSettings; + private final UnaryCallSettings + addProductToProductSetSettings; + private final UnaryCallSettings + removeProductFromProductSetSettings; + private final PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings importProductSetsSettings; + private final OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + + private static final PagedListDescriptor< + ListProductSetsRequest, ListProductSetsResponse, ProductSet> + LIST_PRODUCT_SETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductSetsRequest injectToken( + ListProductSetsRequest payload, String token) { + return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductSetsRequest injectPageSize( + ListProductSetsRequest payload, int pageSize) { + return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductSetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductSetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductSetsResponse payload) { + return payload.getProductSetsList() == null + ? ImmutableList.of() + : payload.getProductSetsList(); + } + }; + + private static final PagedListDescriptor + LIST_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsRequest injectToken(ListProductsRequest payload, String token) { + return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { + return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> + LIST_REFERENCE_IMAGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReferenceImagesRequest injectToken( + ListReferenceImagesRequest payload, String token) { + return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReferenceImagesRequest injectPageSize( + ListReferenceImagesRequest payload, int pageSize) { + return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReferenceImagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReferenceImagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReferenceImagesResponse payload) { + return payload.getReferenceImagesList() == null + ? ImmutableList.of() + : payload.getReferenceImagesList(); + } + }; + + private static final PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = + new PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsInProductSetRequest injectToken( + ListProductsInProductSetRequest payload, String token) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListProductsInProductSetRequest injectPageSize( + ListProductsInProductSetRequest payload, int pageSize) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListProductsInProductSetRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsInProductSetResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsInProductSetResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + LIST_PRODUCT_SETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductSetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); + return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + LIST_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); + return ListProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + LIST_REFERENCE_IMAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReferenceImagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); + return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListProductsInProductSetRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + pageContext = + PageContext.create( + callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); + return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return createProductSettings; + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return getProductSettings; + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return updateProductSettings; + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + public ProductSearchStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProductSearchStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProductSearchStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createProductSetSettings = settingsBuilder.createProductSetSettings().build(); + listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); + getProductSetSettings = settingsBuilder.getProductSetSettings().build(); + updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); + deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); + createProductSettings = settingsBuilder.createProductSettings().build(); + listProductsSettings = settingsBuilder.listProductsSettings().build(); + getProductSettings = settingsBuilder.getProductSettings().build(); + updateProductSettings = settingsBuilder.updateProductSettings().build(); + deleteProductSettings = settingsBuilder.deleteProductSettings().build(); + createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); + deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); + listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); + getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); + addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); + removeProductFromProductSetSettings = + settingsBuilder.removeProductFromProductSetSettings().build(); + listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); + importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); + importProductSetsOperationSettings = + settingsBuilder.importProductSetsOperationSettings().build(); + } + + /** Builder for ProductSearchStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createProductSetSettings; + private final PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings.Builder getProductSetSettings; + private final UnaryCallSettings.Builder + updateProductSetSettings; + private final UnaryCallSettings.Builder + deleteProductSetSettings; + private final UnaryCallSettings.Builder createProductSettings; + private final PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings.Builder getProductSettings; + private final UnaryCallSettings.Builder updateProductSettings; + private final UnaryCallSettings.Builder deleteProductSettings; + private final UnaryCallSettings.Builder + createReferenceImageSettings; + private final UnaryCallSettings.Builder + deleteReferenceImageSettings; + private final PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings.Builder + getReferenceImageSettings; + private final UnaryCallSettings.Builder + addProductToProductSetSettings; + private final UnaryCallSettings.Builder + removeProductFromProductSetSettings; + private final PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings.Builder + importProductSetsSettings; + private final OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); + getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); + getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listReferenceImagesSettings = + PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); + getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsInProductSetSettings = + PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); + importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importProductSetsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings); + initDefaults(this); + } + + protected Builder(ProductSearchStubSettings settings) { + super(settings); + + createProductSetSettings = settings.createProductSetSettings.toBuilder(); + listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); + getProductSetSettings = settings.getProductSetSettings.toBuilder(); + updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); + deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); + createProductSettings = settings.createProductSettings.toBuilder(); + listProductsSettings = settings.listProductsSettings.toBuilder(); + getProductSettings = settings.getProductSettings.toBuilder(); + updateProductSettings = settings.updateProductSettings.toBuilder(); + deleteProductSettings = settings.deleteProductSettings.toBuilder(); + createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); + deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); + listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); + getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); + addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); + removeProductFromProductSetSettings = + settings.removeProductFromProductSetSettings.toBuilder(); + listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); + importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); + importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .listReferenceImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .addProductToProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .removeProductFromProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductsInProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .importProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .importProductSetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportProductSetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return createProductSettings; + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getProductSettings; + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return updateProductSettings; + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + @Override + public ProductSearchStubSettings build() throws IOException { + return new ProductSearchStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java new file mode 100644 index 000000000000..6cd55ee1fb1d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java @@ -0,0 +1,171 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p3beta1.stub.HttpJsonImageAnnotatorStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientHttpJsonTest { + private static MockHttpService mockService; + private static ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonImageAnnotatorStub.getMethodDescriptors(), + ImageAnnotatorSettings.getDefaultEndpoint()); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java new file mode 100644 index 000000000000..1e89677df179 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientTest { + private static MockImageAnnotator mockImageAnnotator; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageAnnotator = new MockImageAnnotator(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateFilesRequest actualRequest = + ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java new file mode 100644 index 000000000000..acabae859819 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotator implements MockGrpcService { + private final MockImageAnnotatorImpl serviceImpl; + + public MockImageAnnotator() { + serviceImpl = new MockImageAnnotatorImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java new file mode 100644 index 000000000000..ba0aa26d8ee4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java @@ -0,0 +1,104 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { + private List requests; + private Queue responses; + + public MockImageAnnotatorImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchAnnotateImages( + BatchAnnotateImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateImagesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateFiles( + AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java new file mode 100644 index 000000000000..8deddbde0983 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearch implements MockGrpcService { + private final MockProductSearchImpl serviceImpl; + + public MockProductSearch() { + serviceImpl = new MockProductSearchImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java new file mode 100644 index 000000000000..bc2df0d7cbee --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java @@ -0,0 +1,440 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p3beta1.ProductSearchGrpc.ProductSearchImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearchImpl extends ProductSearchImplBase { + private List requests; + private Queue responses; + + public MockProductSearchImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createProductSet( + CreateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductSets( + ListProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductSetsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductSetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductSetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProductSet( + GetProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProductSet( + UpdateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProductSet( + DeleteProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProduct( + CreateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProducts( + ListProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProduct(GetProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProduct( + UpdateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createReferenceImage( + CreateReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteReferenceImage( + DeleteReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReferenceImages( + ListReferenceImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReferenceImagesResponse) { + requests.add(request); + responseObserver.onNext(((ListReferenceImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReferenceImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getReferenceImage( + GetReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addProductToProductSet( + AddProductToProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeProductFromProductSet( + RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductsInProductSet( + ListProductsInProductSetRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsInProductSetResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsInProductSetResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsInProductSetResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importProductSets( + ImportProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java new file mode 100644 index 000000000000..57159bb8a364 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java @@ -0,0 +1,1901 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p3beta1.stub.HttpJsonProductSearchStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientHttpJsonTest { + private static MockHttpService mockService; + private static ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProductSearchStub.getMethodDescriptors(), + ProductSearchSettings.getDefaultEndpoint()); + ProductSearchSettings settings = + ProductSearchSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java new file mode 100644 index 000000000000..193e7cdf624f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java @@ -0,0 +1,1691 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientTest { + private static MockProductSearch mockProductSearch; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() { + mockProductSearch = new MockProductSearch(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProductSearchSettings settings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java new file mode 100644 index 000000000000..78d31aefc6e4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java @@ -0,0 +1,419 @@ +package com.google.cloud.vision.v1p3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Service that performs Google Cloud Vision API detection tasks over client
+ * images, such as face, landmark, logo, label, and text detection. The
+ * ImageAnnotator service returns detected entities from the images.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p3beta1/image_annotator.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p3beta1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", + requestType = com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) + .build(); + } + } + } + return getBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", + requestType = com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) + .build(); + } + } + } + return getAsyncBatchAnnotateFilesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + }; + return ImageAnnotatorStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageAnnotatorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + }; + return ImageAnnotatorBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ImageAnnotatorFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + }; + return ImageAnnotatorFutureStub.newStub(factory, channel); + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse>( + this, METHODID_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getAsyncBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) + .build(); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { + private ImageAnnotatorStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ImageAnnotatorBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { + private ImageAnnotatorFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ImageAnnotatorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_ANNOTATE_IMAGES: + serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_FILES: + serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageAnnotatorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageAnnotator"); + } + } + + private static final class ImageAnnotatorFileDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier { + ImageAnnotatorFileDescriptorSupplier() {} + } + + private static final class ImageAnnotatorMethodDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageAnnotatorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ImageAnnotatorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) + .addMethod(getBatchAnnotateImagesMethod()) + .addMethod(getAsyncBatchAnnotateFilesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java new file mode 100644 index 000000000000..1cffb8449b68 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java @@ -0,0 +1,2150 @@ +package com.google.cloud.vision.v1p3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages Products and ProductSets of reference images for use in product
+ * search. It uses the following resource model:
+ * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+ * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+ * products into groups to limit identification.
+ * In parallel,
+ * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+ *   `projects/*/locations/*/products/*`
+ * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
+ *   `projects/*/locations/*/products/*/referenceImages/*`
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p3beta1/product_search_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ProductSearchGrpc { + + private ProductSearchGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p3beta1.ProductSearch"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", + requestType = com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductSetMethod() { + io.grpc.MethodDescriptor getCreateProductSetMethod; + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) + .build(); + } + } + } + return getCreateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductSets", + requestType = com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductSetsMethod() { + io.grpc.MethodDescriptor getListProductSetsMethod; + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) + .build(); + } + } + } + return getListProductSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProductSet", + requestType = com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductSetMethod() { + io.grpc.MethodDescriptor getGetProductSetMethod; + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) + .build(); + } + } + } + return getGetProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", + requestType = com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { + io.grpc.MethodDescriptor getUpdateProductSetMethod; + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) + .build(); + } + } + } + return getUpdateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", + requestType = com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { + io.grpc.MethodDescriptor getDeleteProductSetMethod; + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) + .build(); + } + } + } + return getDeleteProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProduct", + requestType = com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductMethod() { + io.grpc.MethodDescriptor getCreateProductMethod; + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) + .build(); + } + } + } + return getCreateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProducts", + requestType = com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsMethod() { + io.grpc.MethodDescriptor getListProductsMethod; + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + ProductSearchGrpc.getListProductsMethod = getListProductsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) + .build(); + } + } + } + return getListProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProduct", + requestType = com.google.cloud.vision.v1p3beta1.GetProductRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductMethod() { + io.grpc.MethodDescriptor getGetProductMethod; + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + ProductSearchGrpc.getGetProductMethod = getGetProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) + .build(); + } + } + } + return getGetProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", + requestType = com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductMethod() { + io.grpc.MethodDescriptor getUpdateProductMethod; + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) + .build(); + } + } + } + return getUpdateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", + requestType = com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductMethod() { + io.grpc.MethodDescriptor getDeleteProductMethod; + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) + .build(); + } + } + } + return getDeleteProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", + requestType = com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { + io.grpc.MethodDescriptor getCreateReferenceImageMethod; + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) + .build(); + } + } + } + return getCreateReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", + requestType = com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { + io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) + .build(); + } + } + } + return getDeleteReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", + requestType = com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { + io.grpc.MethodDescriptor getListReferenceImagesMethod; + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) + .build(); + } + } + } + return getListReferenceImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", + requestType = com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { + io.grpc.MethodDescriptor getGetReferenceImageMethod; + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) + .build(); + } + } + } + return getGetReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", + requestType = com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { + io.grpc.MethodDescriptor getAddProductToProductSetMethod; + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) + .build(); + } + } + } + return getAddProductToProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", + requestType = com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { + io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) + .build(); + } + } + } + return getRemoveProductFromProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", + requestType = com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, + responseType = com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { + io.grpc.MethodDescriptor getListProductsInProductSetMethod; + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) + .build(); + } + } + } + return getListProductsInProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", + requestType = com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getImportProductSetsMethod() { + io.grpc.MethodDescriptor getImportProductSetsMethod; + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) + .build(); + } + } + } + return getImportProductSetsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ProductSearchStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + }; + return ProductSearchStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProductSearchBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + }; + return ProductSearchBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ProductSearchFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + }; + return ProductSearchFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static abstract class ProductSearchImplBase implements io.grpc.BindableService { + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
+     * ProductSet will be deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only display_name, description and labels can be updated right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * Possible errors:
+     * * Returns NOT_FOUND if the product does not exist.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the reference image does not exist.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p3beta1.ProductSet>( + this, METHODID_CREATE_PRODUCT_SET))) + .addMethod( + getListProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest, + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse>( + this, METHODID_LIST_PRODUCT_SETS))) + .addMethod( + getGetProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.GetProductSetRequest, + com.google.cloud.vision.v1p3beta1.ProductSet>( + this, METHODID_GET_PRODUCT_SET))) + .addMethod( + getUpdateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest, + com.google.cloud.vision.v1p3beta1.ProductSet>( + this, METHODID_UPDATE_PRODUCT_SET))) + .addMethod( + getDeleteProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT_SET))) + .addMethod( + getCreateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.CreateProductRequest, + com.google.cloud.vision.v1p3beta1.Product>( + this, METHODID_CREATE_PRODUCT))) + .addMethod( + getListProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.ListProductsRequest, + com.google.cloud.vision.v1p3beta1.ListProductsResponse>( + this, METHODID_LIST_PRODUCTS))) + .addMethod( + getGetProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.GetProductRequest, + com.google.cloud.vision.v1p3beta1.Product>( + this, METHODID_GET_PRODUCT))) + .addMethod( + getUpdateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.UpdateProductRequest, + com.google.cloud.vision.v1p3beta1.Product>( + this, METHODID_UPDATE_PRODUCT))) + .addMethod( + getDeleteProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.DeleteProductRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT))) + .addMethod( + getCreateReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest, + com.google.cloud.vision.v1p3beta1.ReferenceImage>( + this, METHODID_CREATE_REFERENCE_IMAGE))) + .addMethod( + getDeleteReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_REFERENCE_IMAGE))) + .addMethod( + getListReferenceImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest, + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse>( + this, METHODID_LIST_REFERENCE_IMAGES))) + .addMethod( + getGetReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest, + com.google.cloud.vision.v1p3beta1.ReferenceImage>( + this, METHODID_GET_REFERENCE_IMAGE))) + .addMethod( + getAddProductToProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) + .addMethod( + getRemoveProductFromProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) + .addMethod( + getListProductsInProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest, + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse>( + this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) + .addMethod( + getImportProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest, + com.google.longrunning.Operation>( + this, METHODID_IMPORT_PRODUCT_SETS))) + .build(); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { + private ProductSearchStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
+     * ProductSet will be deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only display_name, description and labels can be updated right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * Possible errors:
+     * * Returns NOT_FOUND if the product does not exist.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the reference image does not exist.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ProductSearchBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ProductSet createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ProductSet updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
+     * ProductSet will be deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.Product createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ListProductsResponse listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.Product getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only display_name, description and labels can be updated right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.Product updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * Possible errors:
+     * * Returns NOT_FOUND if the product does not exist.
+     * 
+ */ + public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the reference image does not exist.
+     * 
+ */ + public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
+     * 
+ */ + public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportProductSetsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { + private ProductSearchFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProductSet( + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductSets( + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProductSet( + com.google.cloud.vision.v1p3beta1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProductSet( + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
+     * ProductSet will be deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProductSet( + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProduct( + com.google.cloud.vision.v1p3beta1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProducts( + com.google.cloud.vision.v1p3beta1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProduct( + com.google.cloud.vision.v1p3beta1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only display_name, description and labels can be updated right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProduct( + com.google.cloud.vision.v1p3beta1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * Possible errors:
+     * * Returns NOT_FOUND if the product does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProduct( + com.google.cloud.vision.v1p3beta1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createReferenceImage( + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the reference image does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listReferenceImages( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getReferenceImage( + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture importProductSets( + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PRODUCT_SET = 0; + private static final int METHODID_LIST_PRODUCT_SETS = 1; + private static final int METHODID_GET_PRODUCT_SET = 2; + private static final int METHODID_UPDATE_PRODUCT_SET = 3; + private static final int METHODID_DELETE_PRODUCT_SET = 4; + private static final int METHODID_CREATE_PRODUCT = 5; + private static final int METHODID_LIST_PRODUCTS = 6; + private static final int METHODID_GET_PRODUCT = 7; + private static final int METHODID_UPDATE_PRODUCT = 8; + private static final int METHODID_DELETE_PRODUCT = 9; + private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; + private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; + private static final int METHODID_LIST_REFERENCE_IMAGES = 12; + private static final int METHODID_GET_REFERENCE_IMAGE = 13; + private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; + private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; + private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; + private static final int METHODID_IMPORT_PRODUCT_SETS = 17; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ProductSearchImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRODUCT_SET: + serviceImpl.createProductSet((com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCT_SETS: + serviceImpl.listProductSets((com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT_SET: + serviceImpl.getProductSet((com.google.cloud.vision.v1p3beta1.GetProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT_SET: + serviceImpl.updateProductSet((com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT_SET: + serviceImpl.deleteProductSet((com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_PRODUCT: + serviceImpl.createProduct((com.google.cloud.vision.v1p3beta1.CreateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS: + serviceImpl.listProducts((com.google.cloud.vision.v1p3beta1.ListProductsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT: + serviceImpl.getProduct((com.google.cloud.vision.v1p3beta1.GetProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT: + serviceImpl.updateProduct((com.google.cloud.vision.v1p3beta1.UpdateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT: + serviceImpl.deleteProduct((com.google.cloud.vision.v1p3beta1.DeleteProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REFERENCE_IMAGE: + serviceImpl.createReferenceImage((com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REFERENCE_IMAGE: + serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REFERENCE_IMAGES: + serviceImpl.listReferenceImages((com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REFERENCE_IMAGE: + serviceImpl.getReferenceImage((com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: + serviceImpl.addProductToProductSet((com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: + serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: + serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_PRODUCT_SETS: + serviceImpl.importProductSets((com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProductSearchBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ProductSearch"); + } + } + + private static final class ProductSearchFileDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier { + ProductSearchFileDescriptorSupplier() {} + } + + private static final class ProductSearchMethodDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ProductSearchMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ProductSearchGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) + .addMethod(getCreateProductSetMethod()) + .addMethod(getListProductSetsMethod()) + .addMethod(getGetProductSetMethod()) + .addMethod(getUpdateProductSetMethod()) + .addMethod(getDeleteProductSetMethod()) + .addMethod(getCreateProductMethod()) + .addMethod(getListProductsMethod()) + .addMethod(getGetProductMethod()) + .addMethod(getUpdateProductMethod()) + .addMethod(getDeleteProductMethod()) + .addMethod(getCreateReferenceImageMethod()) + .addMethod(getDeleteReferenceImageMethod()) + .addMethod(getListReferenceImagesMethod()) + .addMethod(getGetReferenceImageMethod()) + .addMethod(getAddProductToProductSetMethod()) + .addMethod(getRemoveProductFromProductSetMethod()) + .addMethod(getListProductsInProductSetMethod()) + .addMethod(getImportProductSetsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java new file mode 100644 index 000000000000..56e1397e1dbe --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `AddProductToProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} + */ +public final class AddProductToProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) + AddProductToProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AddProductToProductSetRequest.newBuilder() to construct. + private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddProductToProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddProductToProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AddProductToProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `AddProductToProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddProductToProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AddProductToProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..bf1c105b29d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AddProductToProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java new file mode 100644 index 000000000000..0f7da8e9bbcc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java @@ -0,0 +1,1110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response to a single file annotation request. A file may contain one or more
+ * images, which individually have their own responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateFileResponse} + */ +public final class AnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateFileResponse) + AnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileResponse.newBuilder() to construct. + private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int RESPONSES_FIELD_NUMBER = 2; + private java.util.List responses_; + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(2, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a single file annotation request. A file may contain one or more
+   * images, which individually have their own responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateFileResponse) + com.google.cloud.vision.v1p3beta1.AnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse build() { + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p3beta1.AnnotateFileResponse(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p3beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateFileResponse) + private static final com.google.cloud.vision.v1p3beta1.AnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..4802be97cd6d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to images found within the file.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java new file mode 100644 index 000000000000..8598209987b4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request for performing Google Cloud Vision API tasks over a user-provided
+ * image, with user-requested features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p3beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.Image image_; + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return The image. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Image getImage() { + return image_ == null ? com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for performing Google Cloud Vision API tasks over a user-provided
+   * image, with user-requested features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateImageRequest) + com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest build() { + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p3beta1.AnnotateImageRequest(this); + int from_bitField0_ = bitField0_; + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder> imageBuilder_; + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return The image. + */ + public com.google.cloud.vision.v1p3beta1.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public Builder setImage(com.google.cloud.vision.v1p3beta1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public Builder setImage( + com.google.cloud.vision.v1p3beta1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public Builder mergeImage(com.google.cloud.vision.v1p3beta1.Image value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.google.cloud.vision.v1p3beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p3beta1.Image.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p3beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p3beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageRequest) + private static final com.google.cloud.vision.v1p3beta1.AnnotateImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateImageRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java new file mode 100644 index 000000000000..1d1e24c31b7c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AnnotateImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + * @return The image. + */ + com.google.cloud.vision.v1p3beta1.Image getImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Image image = 1; + */ + com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder(); + + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p3beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java new file mode 100644 index 000000000000..1a12c846ac0a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java @@ -0,0 +1,5055 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response to an image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + faceAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.FaceAnnotation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + landmarkAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + logoAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labelAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + textAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder subBuilder = null; + if (safeSearchAnnotation_ != null) { + subBuilder = safeSearchAnnotation_.toBuilder(); + } + safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(safeSearchAnnotation_); + safeSearchAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.cloud.vision.v1p3beta1.ImageProperties.Builder subBuilder = null; + if (imagePropertiesAnnotation_ != null) { + subBuilder = imagePropertiesAnnotation_.toBuilder(); + } + imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imagePropertiesAnnotation_); + imagePropertiesAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder subBuilder = null; + if (cropHintsAnnotation_ != null) { + subBuilder = cropHintsAnnotation_.toBuilder(); + } + cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsAnnotation_); + cropHintsAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder subBuilder = null; + if (fullTextAnnotation_ != null) { + subBuilder = fullTextAnnotation_.toBuilder(); + } + fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullTextAnnotation_); + fullTextAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.vision.v1p3beta1.WebDetection.Builder subBuilder = null; + if (webDetection_ != null) { + subBuilder = webDetection_.toBuilder(); + } + webDetection_ = input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetection_); + webDetection_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder subBuilder = null; + if (productSearchResults_ != null) { + subBuilder = productSearchResults_.toBuilder(); + } + productSearchResults_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchResults_); + productSearchResults_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + localizedObjectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder.class); + } + + public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List faceAnnotations_; + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List getFaceAnnotationsList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List + getFaceAnnotationsOrBuilderList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public int getFaceAnnotationsCount() { + return faceAnnotations_.size(); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index) { + return faceAnnotations_.get(index); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + return faceAnnotations_.get(index); + } + + public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List landmarkAnnotations_; + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List getLandmarkAnnotationsList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public int getLandmarkAnnotationsCount() { + return landmarkAnnotations_.size(); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index) { + return landmarkAnnotations_.get(index); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + return landmarkAnnotations_.get(index); + } + + public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List logoAnnotations_; + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List getLogoAnnotationsList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List + getLogoAnnotationsOrBuilderList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public int getLogoAnnotationsCount() { + return logoAnnotations_.size(); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index) { + return logoAnnotations_.get(index); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + return logoAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List labelAnnotations_; + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index) { + return labelAnnotations_.get(index); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + return labelAnnotations_.get(index); + } + + public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; + private java.util.List localizedObjectAnnotations_; + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List getLocalizedObjectAnnotationsList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public int getLocalizedObjectAnnotationsCount() { + return localizedObjectAnnotations_.size(); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + return localizedObjectAnnotations_.get(index); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + return localizedObjectAnnotations_.get(index); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List textAnnotations_; + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List getTextAnnotationsList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + return textAnnotations_.get(index); + } + + public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_; + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + @java.lang.Override + public boolean hasFullTextAnnotation() { + return fullTextAnnotation_ != null; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation() { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + return getFullTextAnnotation(); + } + + public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_; + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + @java.lang.Override + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotation_ != null; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + return getSafeSearchAnnotation(); + } + + public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; + private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_; + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + @java.lang.Override + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ != null; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + return getImagePropertiesAnnotation(); + } + + public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; + private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_; + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + @java.lang.Override + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotation_ != null; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation() { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + return getCropHintsAnnotation(); + } + + public static final int WEB_DETECTION_FIELD_NUMBER = 13; + private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_; + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + @java.lang.Override + public boolean hasWebDetection() { + return webDetection_ != null; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection() { + return webDetection_ == null ? com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + return getWebDetection(); + } + + public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; + private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_; + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + @java.lang.Override + public boolean hasProductSearchResults() { + return productSearchResults_ != null; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults() { + return productSearchResults_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + return getProductSearchResults(); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CONTEXT_FIELD_NUMBER = 21; + private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_; + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext() { + return context_ == null ? com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < faceAnnotations_.size(); i++) { + output.writeMessage(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + output.writeMessage(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + output.writeMessage(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + output.writeMessage(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + output.writeMessage(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + if (cropHintsAnnotation_ != null) { + output.writeMessage(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + output.writeMessage(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + output.writeMessage(13, getWebDetection()); + } + if (productSearchResults_ != null) { + output.writeMessage(14, getProductSearchResults()); + } + if (context_ != null) { + output.writeMessage(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + output.writeMessage(22, localizedObjectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < faceAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getError()); + } + if (cropHintsAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getWebDetection()); + } + if (productSearchResults_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getProductSearchResults()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, localizedObjectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) obj; + + if (!getFaceAnnotationsList() + .equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList() + .equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList() + .equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList() + .equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList() + .equals(other.getLocalizedObjectAnnotationsList())) return false; + if (!getTextAnnotationsList() + .equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; + if (hasFullTextAnnotation()) { + if (!getFullTextAnnotation() + .equals(other.getFullTextAnnotation())) return false; + } + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; + if (hasSafeSearchAnnotation()) { + if (!getSafeSearchAnnotation() + .equals(other.getSafeSearchAnnotation())) return false; + } + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; + if (hasImagePropertiesAnnotation()) { + if (!getImagePropertiesAnnotation() + .equals(other.getImagePropertiesAnnotation())) return false; + } + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; + if (hasCropHintsAnnotation()) { + if (!getCropHintsAnnotation() + .equals(other.getCropHintsAnnotation())) return false; + } + if (hasWebDetection() != other.hasWebDetection()) return false; + if (hasWebDetection()) { + if (!getWebDetection() + .equals(other.getWebDetection())) return false; + } + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; + if (hasProductSearchResults()) { + if (!getProductSearchResults() + .equals(other.getProductSearchResults())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFaceAnnotationsCount() > 0) { + hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFaceAnnotationsList().hashCode(); + } + if (getLandmarkAnnotationsCount() > 0) { + hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); + } + if (getLogoAnnotationsCount() > 0) { + hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLogoAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (getLocalizedObjectAnnotationsCount() > 0) { + hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (hasFullTextAnnotation()) { + hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getFullTextAnnotation().hashCode(); + } + if (hasSafeSearchAnnotation()) { + hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); + } + if (hasImagePropertiesAnnotation()) { + hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); + } + if (hasCropHintsAnnotation()) { + hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsAnnotation().hashCode(); + } + if (hasWebDetection()) { + hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + getWebDetection().hashCode(); + } + if (hasProductSearchResults()) { + hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchResults().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateImageResponse) + com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFaceAnnotationsFieldBuilder(); + getLandmarkAnnotationsFieldBuilder(); + getLogoAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getLocalizedObjectAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + faceAnnotationsBuilder_.clear(); + } + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + landmarkAnnotationsBuilder_.clear(); + } + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + logoAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelAnnotationsBuilder_.clear(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + textAnnotationsBuilder_.clear(); + } + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + if (webDetectionBuilder_ == null) { + webDetection_ = null; + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse build() { + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p3beta1.AnnotateImageResponse(this); + int from_bitField0_ = bitField0_; + if (faceAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.faceAnnotations_ = faceAnnotations_; + } else { + result.faceAnnotations_ = faceAnnotationsBuilder_.build(); + } + if (landmarkAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.landmarkAnnotations_ = landmarkAnnotations_; + } else { + result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); + } + if (logoAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.logoAnnotations_ = logoAnnotations_; + } else { + result.logoAnnotations_ = logoAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.localizedObjectAnnotations_ = localizedObjectAnnotations_; + } else { + result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (fullTextAnnotationBuilder_ == null) { + result.fullTextAnnotation_ = fullTextAnnotation_; + } else { + result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); + } + if (safeSearchAnnotationBuilder_ == null) { + result.safeSearchAnnotation_ = safeSearchAnnotation_; + } else { + result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); + } + if (imagePropertiesAnnotationBuilder_ == null) { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; + } else { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); + } + if (cropHintsAnnotationBuilder_ == null) { + result.cropHintsAnnotation_ = cropHintsAnnotation_; + } else { + result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); + } + if (webDetectionBuilder_ == null) { + result.webDetection_ = webDetection_; + } else { + result.webDetection_ = webDetectionBuilder_.build(); + } + if (productSearchResultsBuilder_ == null) { + result.productSearchResults_ = productSearchResults_; + } else { + result.productSearchResults_ = productSearchResultsBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()) return this; + if (faceAnnotationsBuilder_ == null) { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotations_.isEmpty()) { + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.addAll(other.faceAnnotations_); + } + onChanged(); + } + } else { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotationsBuilder_.isEmpty()) { + faceAnnotationsBuilder_.dispose(); + faceAnnotationsBuilder_ = null; + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + faceAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFaceAnnotationsFieldBuilder() : null; + } else { + faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); + } + } + } + if (landmarkAnnotationsBuilder_ == null) { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotations_.isEmpty()) { + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.addAll(other.landmarkAnnotations_); + } + onChanged(); + } + } else { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotationsBuilder_.isEmpty()) { + landmarkAnnotationsBuilder_.dispose(); + landmarkAnnotationsBuilder_ = null; + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + landmarkAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarkAnnotationsFieldBuilder() : null; + } else { + landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); + } + } + } + if (logoAnnotationsBuilder_ == null) { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotations_.isEmpty()) { + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.addAll(other.logoAnnotations_); + } + onChanged(); + } + } else { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotationsBuilder_.isEmpty()) { + logoAnnotationsBuilder_.dispose(); + logoAnnotationsBuilder_ = null; + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + logoAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogoAnnotationsFieldBuilder() : null; + } else { + logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLabelAnnotationsFieldBuilder() : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotations_.isEmpty()) { + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); + } + onChanged(); + } + } else { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotationsBuilder_.isEmpty()) { + localizedObjectAnnotationsBuilder_.dispose(); + localizedObjectAnnotationsBuilder_ = null; + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + localizedObjectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocalizedObjectAnnotationsFieldBuilder() : null; + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); + } + } + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextAnnotationsFieldBuilder() : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (other.hasFullTextAnnotation()) { + mergeFullTextAnnotation(other.getFullTextAnnotation()); + } + if (other.hasSafeSearchAnnotation()) { + mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); + } + if (other.hasImagePropertiesAnnotation()) { + mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); + } + if (other.hasCropHintsAnnotation()) { + mergeCropHintsAnnotation(other.getCropHintsAnnotation()); + } + if (other.hasWebDetection()) { + mergeWebDetection(other.getWebDetection()); + } + if (other.hasProductSearchResults()) { + mergeProductSearchResults(other.getProductSearchResults()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List faceAnnotations_ = + java.util.Collections.emptyList(); + private void ensureFaceAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; + + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List getFaceAnnotationsList() { + if (faceAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } else { + return faceAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public int getFaceAnnotationsCount() { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.size(); + } else { + return faceAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); + } else { + return faceAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations(com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addAllFaceAnnotations( + java.lang.Iterable values) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, faceAnnotations_); + onChanged(); + } else { + faceAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder clearFaceAnnotations() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + faceAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public Builder removeFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.remove(index); + onChanged(); + } else { + faceAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); } else { + return faceAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsOrBuilderList() { + if (faceAnnotationsBuilder_ != null) { + return faceAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { + return getFaceAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsBuilderList() { + return getFaceAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder> + getFaceAnnotationsFieldBuilder() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder>( + faceAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + faceAnnotations_ = null; + } + return faceAnnotationsBuilder_; + } + + private java.util.List landmarkAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLandmarkAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; + + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List getLandmarkAnnotationsList() { + if (landmarkAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } else { + return landmarkAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public int getLandmarkAnnotationsCount() { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.size(); + } else { + return landmarkAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); + } else { + return landmarkAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addAllLandmarkAnnotations( + java.lang.Iterable values) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarkAnnotations_); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder clearLandmarkAnnotations() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + landmarkAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder removeLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.remove(index); + onChanged(); + } else { + landmarkAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); } else { + return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + if (landmarkAnnotationsBuilder_ != null) { + return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsBuilderList() { + return getLandmarkAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> + getLandmarkAnnotationsFieldBuilder() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( + landmarkAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + landmarkAnnotations_ = null; + } + return landmarkAnnotationsBuilder_; + } + + private java.util.List logoAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLogoAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; + + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List getLogoAnnotationsList() { + if (logoAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } else { + return logoAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public int getLogoAnnotationsCount() { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.size(); + } else { + return logoAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); + } else { + return logoAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addAllLogoAnnotations( + java.lang.Iterable values) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logoAnnotations_); + onChanged(); + } else { + logoAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder clearLogoAnnotations() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + logoAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder removeLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.remove(index); + onChanged(); + } else { + logoAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); } else { + return logoAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsOrBuilderList() { + if (logoAnnotationsBuilder_ != null) { + return logoAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { + return getLogoAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsBuilderList() { + return getLogoAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> + getLogoAnnotationsFieldBuilder() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( + logoAnnotations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + logoAnnotations_ = null; + } + return logoAnnotationsBuilder_; + } + + private java.util.List labelAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; + + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private java.util.List localizedObjectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLocalizedObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; + + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List getLocalizedObjectAnnotationsList() { + if (localizedObjectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } else { + return localizedObjectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public int getLocalizedObjectAnnotationsCount() { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.size(); + } else { + return localizedObjectAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); + } else { + return localizedObjectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addAllLocalizedObjectAnnotations( + java.lang.Iterable values) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, localizedObjectAnnotations_); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder clearLocalizedObjectAnnotations() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder removeLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.remove(index); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); } else { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + if (localizedObjectAnnotationsBuilder_ != null) { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsBuilderList() { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder> + getLocalizedObjectAnnotationsFieldBuilder() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder>( + localizedObjectAnnotations_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + localizedObjectAnnotations_ = null; + } + return localizedObjectAnnotationsBuilder_; + } + + private java.util.List textAnnotations_ = + java.util.Collections.emptyList(); + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(textAnnotations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; + + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addAllTextAnnotations( + java.lang.Iterable values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + public boolean hasFullTextAnnotation() { + return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } else { + return fullTextAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation(com.google.cloud.vision.v1p3beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullTextAnnotation_ = value; + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation( + com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder builderForValue) { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = builderForValue.build(); + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p3beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (fullTextAnnotation_ != null) { + fullTextAnnotation_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); + } else { + fullTextAnnotation_ = value; + } + onChanged(); + } else { + fullTextAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder clearFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + onChanged(); + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { + + onChanged(); + return getFullTextAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + if (fullTextAnnotationBuilder_ != null) { + return fullTextAnnotationBuilder_.getMessageOrBuilder(); + } else { + return fullTextAnnotation_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder> + getFullTextAnnotationFieldBuilder() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder>( + getFullTextAnnotation(), + getParentForChildren(), + isClean()); + fullTextAnnotation_ = null; + } + return fullTextAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } else { + return safeSearchAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safeSearchAnnotation_ = value; + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation( + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder builderForValue) { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = builderForValue.build(); + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (safeSearchAnnotation_ != null) { + safeSearchAnnotation_ = + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); + } else { + safeSearchAnnotation_ = value; + } + onChanged(); + } else { + safeSearchAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder clearSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + onChanged(); + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { + + onChanged(); + return getSafeSearchAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + if (safeSearchAnnotationBuilder_ != null) { + return safeSearchAnnotationBuilder_.getMessageOrBuilder(); + } else { + return safeSearchAnnotation_ == null ? + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder> + getSafeSearchAnnotationFieldBuilder() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder>( + getSafeSearchAnnotation(), + getParentForChildren(), + isClean()); + safeSearchAnnotation_ = null; + } + return safeSearchAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + public com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } else { + return imagePropertiesAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p3beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imagePropertiesAnnotation_ = value; + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation( + com.google.cloud.vision.v1p3beta1.ImageProperties.Builder builderForValue) { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = builderForValue.build(); + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p3beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (imagePropertiesAnnotation_ != null) { + imagePropertiesAnnotation_ = + com.google.cloud.vision.v1p3beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); + } else { + imagePropertiesAnnotation_ = value; + } + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder clearImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + onChanged(); + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p3beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { + + onChanged(); + return getImagePropertiesAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + if (imagePropertiesAnnotationBuilder_ != null) { + return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); + } else { + return imagePropertiesAnnotation_ == null ? + com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder> + getImagePropertiesAnnotationFieldBuilder() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder>( + getImagePropertiesAnnotation(), + getParentForChildren(), + isClean()); + imagePropertiesAnnotation_ = null; + } + return imagePropertiesAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } else { + return cropHintsAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsAnnotation_ = value; + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation( + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder builderForValue) { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = builderForValue.build(); + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (cropHintsAnnotation_ != null) { + cropHintsAnnotation_ = + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); + } else { + cropHintsAnnotation_ = value; + } + onChanged(); + } else { + cropHintsAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder clearCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + onChanged(); + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { + + onChanged(); + return getCropHintsAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + if (cropHintsAnnotationBuilder_ != null) { + return cropHintsAnnotationBuilder_.getMessageOrBuilder(); + } else { + return cropHintsAnnotation_ == null ? + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder> + getCropHintsAnnotationFieldBuilder() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder>( + getCropHintsAnnotation(), + getParentForChildren(), + isClean()); + cropHintsAnnotation_ = null; + } + return cropHintsAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder> webDetectionBuilder_; + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + public boolean hasWebDetection() { + return webDetectionBuilder_ != null || webDetection_ != null; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + public com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection() { + if (webDetectionBuilder_ == null) { + return webDetection_ == null ? com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; + } else { + return webDetectionBuilder_.getMessage(); + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection(com.google.cloud.vision.v1p3beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetection_ = value; + onChanged(); + } else { + webDetectionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection( + com.google.cloud.vision.v1p3beta1.WebDetection.Builder builderForValue) { + if (webDetectionBuilder_ == null) { + webDetection_ = builderForValue.build(); + onChanged(); + } else { + webDetectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public Builder mergeWebDetection(com.google.cloud.vision.v1p3beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (webDetection_ != null) { + webDetection_ = + com.google.cloud.vision.v1p3beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); + } else { + webDetection_ = value; + } + onChanged(); + } else { + webDetectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public Builder clearWebDetection() { + if (webDetectionBuilder_ == null) { + webDetection_ = null; + onChanged(); + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.Builder getWebDetectionBuilder() { + + onChanged(); + return getWebDetectionFieldBuilder().getBuilder(); + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + if (webDetectionBuilder_ != null) { + return webDetectionBuilder_.getMessageOrBuilder(); + } else { + return webDetection_ == null ? + com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder> + getWebDetectionFieldBuilder() { + if (webDetectionBuilder_ == null) { + webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder>( + getWebDetection(), + getParentForChildren(), + isClean()); + webDetection_ = null; + } + return webDetectionBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + public boolean hasProductSearchResults() { + return productSearchResultsBuilder_ != null || productSearchResults_ != null; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + return productSearchResults_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } else { + return productSearchResultsBuilder_.getMessage(); + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchResults_ = value; + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder builderForValue) { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = builderForValue.build(); + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public Builder mergeProductSearchResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (productSearchResults_ != null) { + productSearchResults_ = + com.google.cloud.vision.v1p3beta1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); + } else { + productSearchResults_ = value; + } + onChanged(); + } else { + productSearchResultsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public Builder clearProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + onChanged(); + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder getProductSearchResultsBuilder() { + + onChanged(); + return getProductSearchResultsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + if (productSearchResultsBuilder_ != null) { + return productSearchResultsBuilder_.getMessageOrBuilder(); + } else { + return productSearchResults_ == null ? + com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder> + getProductSearchResultsFieldBuilder() { + if (productSearchResultsBuilder_ == null) { + productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder>( + getProductSearchResults(), + getParentForChildren(), + isClean()); + productSearchResults_ = null; + } + return productSearchResultsBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder> contextBuilder_; + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext( + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public Builder mergeContext(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageResponse) + private static final com.google.cloud.vision.v1p3beta1.AnnotateImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateImageResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java new file mode 100644 index 000000000000..84d2c0a38b08 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java @@ -0,0 +1,512 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AnnotateImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + int getFaceAnnotationsCount(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsOrBuilderList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + int getLandmarkAnnotationsCount(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsOrBuilderList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + int getLogoAnnotationsCount(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsOrBuilderList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + int getLabelAnnotationsCount(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + int getLocalizedObjectAnnotationsCount(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsOrBuilderList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + int getTextAnnotationsCount(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + boolean hasFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); + + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + boolean hasSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); + + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + boolean hasImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; + */ + com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); + + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + boolean hasCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); + + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + boolean hasWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; + */ + com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); + + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + boolean hasProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); + + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; + */ + com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java new file mode 100644 index 000000000000..074be7e820a1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java @@ -0,0 +1,1580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * An offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} + */ +public final class AsyncAnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) + AsyncAnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileRequest.newBuilder() to construct. + private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p3beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.vision.v1p3beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (outputConfig_ != null) { + output.writeMessage(4, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest build() { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p3beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p3beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p3beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p3beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p3beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) + private static final com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..bfb260d5889c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AsyncAnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p3beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; + */ + com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java new file mode 100644 index 000000000000..412076dc190b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The response for a single offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} + */ +public final class AsyncAnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) + AsyncAnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileResponse.newBuilder() to construct. + private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response for a single offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse build() { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p3beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) + private static final com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..5cf4065edf2e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AsyncAnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..0a5f39d1f6b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Multiple async file annotation requests are batched into a single service
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} + */ +public final class AsyncBatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) + AsyncBatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. + private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple async file annotation requests are batched into a single service
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..d6d57acfdadb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AsyncBatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..f4c257d0711b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response to an async batch file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} + */ +public final class AsyncBatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) + AsyncBatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. + private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..67cf67b372aa --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface AsyncBatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..e78683043d48 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Multiple image annotation requests are batched into a single service call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} + */ +public final class BatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) + BatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesRequest.newBuilder() to construct. + private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple image annotation requests are batched into a single service call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..b669bf8f4a86 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface BatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..658f0d445778 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response to a batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} + */ +public final class BatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) + BatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesResponse.newBuilder() to construct. + private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..7b145922c2f6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface BatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java new file mode 100644 index 000000000000..881734218515 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java @@ -0,0 +1,1238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Metadata for the batch operations such as the current state.
+ * This is included in the `metadata` field of the `Operation` returned by the
+ * `GetOperation` call of the `google::longrunning::Operations` service.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata} + */ +public final class BatchOperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchOperationMetadata) + BatchOperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchOperationMetadata.newBuilder() to construct. + private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchOperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.Builder.class); + } + + /** + *
+   * Enumerates the possible states that the batch request can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + PROCESSING(1), + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + SUCCESSFUL(2), + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + public static final int PROCESSING_VALUE = 1; + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + public static final int SUCCESSFUL_VALUE = 2; + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return PROCESSING; + case 2: return SUCCESSFUL; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int SUBMIT_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp submitTime_; + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + @java.lang.Override + public boolean hasSubmitTime() { + return submitTime_ != null; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSubmitTime() { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + return getSubmitTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (submitTime_ != null) { + output.writeMessage(2, getSubmitTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (submitTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSubmitTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; + if (hasSubmitTime()) { + if (!getSubmitTime() + .equals(other.getSubmitTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasSubmitTime()) { + hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSubmitTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata for the batch operations such as the current state.
+   * This is included in the `metadata` field of the `Operation` returned by the
+   * `GetOperation` call of the `google::longrunning::Operations` service.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchOperationMetadata) + com.google.cloud.vision.v1p3beta1.BatchOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (submitTimeBuilder_ == null) { + submitTime_ = null; + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata build() { + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata buildPartial() { + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata result = new com.google.cloud.vision.v1p3beta1.BatchOperationMetadata(this); + result.state_ = state_; + if (submitTimeBuilder_ == null) { + result.submitTime_ = submitTime_; + } else { + result.submitTime_ = submitTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchOperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata other) { + if (other == com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasSubmitTime()) { + mergeSubmitTime(other.getSubmitTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp submitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + public boolean hasSubmitTime() { + return submitTimeBuilder_ != null || submitTime_ != null; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + public com.google.protobuf.Timestamp getSubmitTime() { + if (submitTimeBuilder_ == null) { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } else { + return submitTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + submitTime_ = value; + onChanged(); + } else { + submitTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (submitTimeBuilder_ == null) { + submitTime_ = builderForValue.build(); + onChanged(); + } else { + submitTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (submitTime_ != null) { + submitTime_ = + com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); + } else { + submitTime_ = value; + } + onChanged(); + } else { + submitTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder clearSubmitTime() { + if (submitTimeBuilder_ == null) { + submitTime_ = null; + onChanged(); + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { + + onChanged(); + return getSubmitTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + if (submitTimeBuilder_ != null) { + return submitTimeBuilder_.getMessageOrBuilder(); + } else { + return submitTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSubmitTimeFieldBuilder() { + if (submitTimeBuilder_ == null) { + submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSubmitTime(), + getParentForChildren(), + isClean()); + submitTime_ = null; + } + return submitTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata) + private static final com.google.cloud.vision.v1p3beta1.BatchOperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchOperationMetadata(); + } + + public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..a85a94371c46 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface BatchOperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + boolean hasSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + com.google.protobuf.Timestamp getSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); + + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java new file mode 100644 index 000000000000..2be514108d71 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java @@ -0,0 +1,1914 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Logical element on the page.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Block} + */ +public final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Block) + BlockOrBuilder { +private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + paragraphs_ = java.util.Collections.emptyList(); + blockType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paragraphs_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Paragraph.parser(), extensionRegistry)); + break; + } + case 32: { + int rawValue = input.readEnum(); + + blockType_ = rawValue; + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Block.class, com.google.cloud.vision.v1p3beta1.Block.Builder.class); + } + + /** + *
+   * Type of a block (text, image etc) as identified by OCR.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.Block.BlockType} + */ + public enum BlockType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + PICTURE(3), + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + RULER(4), + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + BARCODE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + public static final int PICTURE_VALUE = 3; + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + public static final int RULER_VALUE = 4; + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + public static final int BARCODE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TEXT; + case 2: return TABLE; + case 3: return PICTURE; + case 4: return RULER; + case 5: return BARCODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockType findValueByNumber(int number) { + return BlockType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.Block.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockType[] VALUES = values(); + + public static BlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Block.BlockType) + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 3; + private java.util.List paragraphs_; + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List getParagraphsList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + return paragraphs_.get(index); + } + + public static final int BLOCK_TYPE_FIELD_NUMBER = 4; + private int blockType_; + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Block.BlockType result = com.google.cloud.vision.v1p3beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p3beta1.Block.BlockType.UNRECOGNIZED : result; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p3beta1.Block.BlockType.UNKNOWN.getNumber()) { + output.writeEnum(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p3beta1.Block.BlockType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Block)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Block other = (com.google.cloud.vision.v1p3beta1.Block) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList() + .equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + blockType_; + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Logical element on the page.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Block) + com.google.cloud.vision.v1p3beta1.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Block.class, com.google.cloud.vision.v1p3beta1.Block.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getParagraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + paragraphsBuilder_.clear(); + } + blockType_ = 0; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block build() { + com.google.cloud.vision.v1p3beta1.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block buildPartial() { + com.google.cloud.vision.v1p3beta1.Block result = new com.google.cloud.vision.v1p3beta1.Block(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + result.blockType_ = blockType_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Block) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Block other) { + if (other == com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParagraphsFieldBuilder() : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (other.blockType_ != 0) { + setBlockTypeValue(other.getBlockTypeValue()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List paragraphs_ = + java.util.Collections.emptyList(); + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(paragraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder> paragraphsBuilder_; + + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public java.util.List getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p3beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs(com.google.cloud.vision.v1p3beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p3beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder addAllParagraphs( + java.lang.Iterable values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p3beta1.Paragraph.Builder getParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p3beta1.Paragraph.Builder addParagraphsBuilder() { + return getParagraphsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p3beta1.Paragraph.Builder addParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder>( + paragraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private int blockType_ = 0; + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @param value The enum numeric value on the wire for blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockTypeValue(int value) { + + blockType_ = value; + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Block.BlockType result = com.google.cloud.vision.v1p3beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p3beta1.Block.BlockType.UNRECOGNIZED : result; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @param value The blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockType(com.google.cloud.vision.v1p3beta1.Block.BlockType value) { + if (value == null) { + throw new NullPointerException(); + } + + blockType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return This builder for chaining. + */ + public Builder clearBlockType() { + + blockType_ = 0; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Block) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Block) + private static final com.google.cloud.vision.v1p3beta1.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Block(); + } + + public static com.google.cloud.vision.v1p3beta1.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java new file mode 100644 index 000000000000..1a5ecb47b307 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + int getParagraphsCount(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsOrBuilderList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index); + + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + int getBlockTypeValue(); + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType(); + + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java new file mode 100644 index 000000000000..851eac3e878f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java @@ -0,0 +1,1312 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A bounding polygon for the detected image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BoundingPoly} + */ +public final class BoundingPoly extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BoundingPoly) + BoundingPolyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Vertex.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + normalizedVertices_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.NormalizedVertex.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BoundingPoly.class, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List getVerticesList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + @java.lang.Override + public int getVerticesCount() { + return vertices_.size(); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + return vertices_.get(index); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; + private java.util.List normalizedVertices_; + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(2, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.BoundingPoly other = (com.google.cloud.vision.v1p3beta1.BoundingPoly) obj; + + if (!getVerticesList() + .equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList() + .equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A bounding polygon for the detected image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.BoundingPoly} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BoundingPoly) + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.BoundingPoly.class, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + getNormalizedVerticesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly build() { + com.google.cloud.vision.v1p3beta1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly buildPartial() { + com.google.cloud.vision.v1p3beta1.BoundingPoly result = new com.google.cloud.vision.v1p3beta1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.BoundingPoly) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.BoundingPoly)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BoundingPoly other) { + if (other == com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVerticesFieldBuilder() : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNormalizedVerticesFieldBuilder() : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder> verticesBuilder_; + + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p3beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.vision.v1p3beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p3beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p3beta1.Vertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; + + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices(com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BoundingPoly) + private static final com.google.cloud.vision.v1p3beta1.BoundingPoly DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BoundingPoly(); + } + + public static com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..8fa2aef81e73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface BoundingPolyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( + int index); + + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + int getNormalizedVerticesCount(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java new file mode 100644 index 000000000000..c33bedf34547 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java @@ -0,0 +1,835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Color information consists of RGB channels, score, and the fraction of
+ * the image that the color occupies in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ColorInfo} + */ +public final class ColorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ColorInfo) + ColorInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ColorInfo.newBuilder() to construct. + private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 29: { + + pixelFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ColorInfo.class, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private com.google.type.Color color_; + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return color_ != null; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return getColor(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; + private float pixelFraction_; + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != null) { + output.writeMessage(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + output.writeFloat(3, pixelFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, pixelFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ColorInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ColorInfo other = (com.google.cloud.vision.v1p3beta1.ColorInfo) obj; + + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor() + .equals(other.getColor())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits( + other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPixelFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ColorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Color information consists of RGB channels, score, and the fraction of
+   * the image that the color occupies in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ColorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ColorInfo) + com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ColorInfo.class, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ColorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + score_ = 0F; + + pixelFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfo build() { + com.google.cloud.vision.v1p3beta1.ColorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfo buildPartial() { + com.google.cloud.vision.v1p3beta1.ColorInfo result = new com.google.cloud.vision.v1p3beta1.ColorInfo(this); + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + result.score_ = score_; + result.pixelFraction_ = pixelFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ColorInfo) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ColorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ColorInfo other) { + if (other == com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()) return this; + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getPixelFraction() != 0F) { + setPixelFraction(other.getPixelFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ColorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ColorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor( + com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.Color.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.google.type.Color.getDefaultInstance() : color_; + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + + private float score_ ; + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float pixelFraction_ ; + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @param value The pixelFraction to set. + * @return This builder for chaining. + */ + public Builder setPixelFraction(float value) { + + pixelFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearPixelFraction() { + + pixelFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ColorInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ColorInfo) + private static final com.google.cloud.vision.v1p3beta1.ColorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ColorInfo(); + } + + public static com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java new file mode 100644 index 000000000000..9273013cf1fd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ColorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ColorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + boolean hasColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + com.google.type.Color getColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + com.google.type.ColorOrBuilder getColorOrBuilder(); + + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + float getPixelFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java new file mode 100644 index 000000000000..beee2d52da1b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `CreateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductRequest} + */ +public final class CreateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateProductRequest) + CreateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductRequest.newBuilder() to construct. + private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductRequest() { + parent_ = ""; + productId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.Product product_; + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productId_; + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (product_ != null) { + output.writeMessage(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CreateProductRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (!getProductId() + .equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateProductRequest) + com.google.cloud.vision.v1p3beta1.CreateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CreateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + productId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductRequest build() { + com.google.cloud.vision.v1p3beta1.CreateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.CreateProductRequest result = new com.google.cloud.vision.v1p3beta1.CreateProductRequest(this); + result.parent_ = parent_; + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.productId_ = productId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CreateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateProductRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CreateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private java.lang.Object productId_ = ""; + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductId() { + + productId_ = getDefaultInstance().getProductId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductRequest) + private static final com.google.cloud.vision.v1p3beta1.CreateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateProductRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java new file mode 100644 index 000000000000..9804a4951272 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CreateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1p3beta1.Product getProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java new file mode 100644 index 000000000000..ea635434a5f7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java @@ -0,0 +1,1025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `CreateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductSetRequest} + */ +public final class CreateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateProductSetRequest) + CreateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductSetRequest.newBuilder() to construct. + private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductSetRequest() { + parent_ = ""; + productSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productSetId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productSetId_; + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + @java.lang.Override + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (productSet_ != null) { + output.writeMessage(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (!getProductSetId() + .equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductSetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateProductSetRequest) + com.google.cloud.vision.v1p3beta1.CreateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + productSetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest result = new com.google.cloud.vision.v1p3beta1.CreateProductSetRequest(this); + result.parent_ = parent_; + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + result.productSetId_ = productSetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (!other.getProductSetId().isEmpty()) { + productSetId_ = other.productSetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private java.lang.Object productSetId_ = ""; + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSetId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductSetId() { + + productSetId_ = getDefaultInstance().getProductSetId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The bytes for productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSetId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.CreateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..fc0c0172f9bf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CreateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + java.lang.String getProductSetId(); + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + com.google.protobuf.ByteString + getProductSetIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java new file mode 100644 index 000000000000..42b61b8914d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java @@ -0,0 +1,1044 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `CreateReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} + */ +public final class CreateReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) + CreateReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateReferenceImageRequest.newBuilder() to construct. + private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateReferenceImageRequest() { + parent_ = ""; + referenceImageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder subBuilder = null; + if (referenceImage_ != null) { + subBuilder = referenceImage_.toBuilder(); + } + referenceImage_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(referenceImage_); + referenceImage_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + referenceImageId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_; + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + @java.lang.Override + public boolean hasReferenceImage() { + return referenceImage_ != null; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage() { + return referenceImage_ == null ? com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + return getReferenceImage(); + } + + public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object referenceImageId_; + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + @java.lang.Override + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (referenceImage_ != null) { + output.writeMessage(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (referenceImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; + if (hasReferenceImage()) { + if (!getReferenceImage() + .equals(other.getReferenceImage())) return false; + } + if (!getReferenceImageId() + .equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReferenceImage()) { + hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImage().hashCode(); + } + hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImageId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + referenceImageId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest build() { + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest(this); + result.parent_ = parent_; + if (referenceImageBuilder_ == null) { + result.referenceImage_ = referenceImage_; + } else { + result.referenceImage_ = referenceImageBuilder_.build(); + } + result.referenceImageId_ = referenceImageId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReferenceImage()) { + mergeReferenceImage(other.getReferenceImage()); + } + if (!other.getReferenceImageId().isEmpty()) { + referenceImageId_ = other.referenceImageId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImageBuilder_; + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + public boolean hasReferenceImage() { + return referenceImageBuilder_ != null || referenceImage_ != null; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage() { + if (referenceImageBuilder_ == null) { + return referenceImage_ == null ? com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } else { + return referenceImageBuilder_.getMessage(); + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + referenceImage_ = value; + onChanged(); + } else { + referenceImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage( + com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImageBuilder_ == null) { + referenceImage_ = builderForValue.build(); + onChanged(); + } else { + referenceImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeReferenceImage(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (referenceImage_ != null) { + referenceImage_ = + com.google.cloud.vision.v1p3beta1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); + } else { + referenceImage_ = value; + } + onChanged(); + } else { + referenceImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearReferenceImage() { + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + onChanged(); + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImageBuilder() { + + onChanged(); + return getReferenceImageFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + if (referenceImageBuilder_ != null) { + return referenceImageBuilder_.getMessageOrBuilder(); + } else { + return referenceImage_ == null ? + com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> + getReferenceImageFieldBuilder() { + if (referenceImageBuilder_ == null) { + referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( + getReferenceImage(), + getParentForChildren(), + isClean()); + referenceImage_ = null; + } + return referenceImageBuilder_; + } + + private java.lang.Object referenceImageId_ = ""; + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + referenceImageId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return This builder for chaining. + */ + public Builder clearReferenceImageId() { + + referenceImageId_ = getDefaultInstance().getReferenceImageId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The bytes for referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + referenceImageId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) + private static final com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..25fdcd67841b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CreateReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product in which to create the reference image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + boolean hasReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); + + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + java.lang.String getReferenceImageId(); + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + com.google.protobuf.ByteString + getReferenceImageIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java new file mode 100644 index 000000000000..4446c72f0460 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java @@ -0,0 +1,845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Single crop hint that is used to generate a new crop when serving an image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHint} + */ +public final class CropHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHint) + CropHintOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHint.newBuilder() to construct. + private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHint() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + case 29: { + + importanceFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHint.class, com.google.cloud.vision.v1p3beta1.CropHint.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; + private float importanceFraction_; + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + output.writeFloat(3, importanceFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, importanceFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHint)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CropHint other = (com.google.cloud.vision.v1p3beta1.CropHint) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits( + other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImportanceFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Single crop hint that is used to generate a new crop when serving an image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHint) + com.google.cloud.vision.v1p3beta1.CropHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHint.class, com.google.cloud.vision.v1p3beta1.CropHint.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CropHint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + confidence_ = 0F; + + importanceFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHint build() { + com.google.cloud.vision.v1p3beta1.CropHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHint buildPartial() { + com.google.cloud.vision.v1p3beta1.CropHint result = new com.google.cloud.vision.v1p3beta1.CropHint(this); + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.confidence_ = confidence_; + result.importanceFraction_ = importanceFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CropHint) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHint other) { + if (other == com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getImportanceFraction() != 0F) { + setImportanceFraction(other.getImportanceFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CropHint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale, as returned in `ImageParams`.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float importanceFraction_ ; + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @param value The importanceFraction to set. + * @return This builder for chaining. + */ + public Builder setImportanceFraction(float value) { + + importanceFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearImportanceFraction() { + + importanceFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHint) + private static final com.google.cloud.vision.v1p3beta1.CropHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHint(); + } + + public static com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java new file mode 100644 index 000000000000..bfc39c882c9e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CropHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale, as returned in `ImageParams`.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + float getImportanceFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java new file mode 100644 index 000000000000..d34e538fdb61 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Set of crop hints that are used to generate new crops when serving images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsAnnotation} + */ +public final class CropHintsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHintsAnnotation) + CropHintsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsAnnotation.newBuilder() to construct. + private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsAnnotation() { + cropHints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cropHints_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.CropHint.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder.class); + } + + public static final int CROP_HINTS_FIELD_NUMBER = 1; + private java.util.List cropHints_; + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List getCropHintsList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List + getCropHintsOrBuilderList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public int getCropHintsCount() { + return cropHints_.size(); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index) { + return cropHints_.get(index); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + return cropHints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cropHints_.size(); i++) { + output.writeMessage(1, cropHints_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cropHints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, cropHints_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHintsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) obj; + + if (!getCropHintsList() + .equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCropHintsCount() > 0) { + hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of crop hints that are used to generate new crops when serving images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHintsAnnotation) + com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCropHintsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation build() { + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p3beta1.CropHintsAnnotation(this); + int from_bitField0_ = bitField0_; + if (cropHintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cropHints_ = cropHints_; + } else { + result.cropHints_ = cropHintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHintsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance()) return this; + if (cropHintsBuilder_ == null) { + if (!other.cropHints_.isEmpty()) { + if (cropHints_.isEmpty()) { + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCropHintsIsMutable(); + cropHints_.addAll(other.cropHints_); + } + onChanged(); + } + } else { + if (!other.cropHints_.isEmpty()) { + if (cropHintsBuilder_.isEmpty()) { + cropHintsBuilder_.dispose(); + cropHintsBuilder_ = null; + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + cropHintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCropHintsFieldBuilder() : null; + } else { + cropHintsBuilder_.addAllMessages(other.cropHints_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List cropHints_ = + java.util.Collections.emptyList(); + private void ensureCropHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(cropHints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder> cropHintsBuilder_; + + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public java.util.List getCropHintsList() { + if (cropHintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cropHints_); + } else { + return cropHintsBuilder_.getMessageList(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public int getCropHintsCount() { + if (cropHintsBuilder_ == null) { + return cropHints_.size(); + } else { + return cropHintsBuilder_.getCount(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); + } else { + return cropHintsBuilder_.getMessage(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p3beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.set(index, value); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.set(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints(com.google.cloud.vision.v1p3beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p3beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(index, value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder addAllCropHints( + java.lang.Iterable values) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cropHints_); + onChanged(); + } else { + cropHintsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder clearCropHints() { + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public Builder removeCropHints(int index) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.remove(index); + onChanged(); + } else { + cropHintsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p3beta1.CropHint.Builder getCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().getBuilder(index); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); } else { + return cropHintsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsOrBuilderList() { + if (cropHintsBuilder_ != null) { + return cropHintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cropHints_); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder() { + return getCropHintsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsBuilderList() { + return getCropHintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder> + getCropHintsFieldBuilder() { + if (cropHintsBuilder_ == null) { + cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder>( + cropHints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cropHints_ = null; + } + return cropHintsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHintsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsAnnotation) + private static final com.google.cloud.vision.v1p3beta1.CropHintsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHintsAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java new file mode 100644 index 000000000000..9192acbf2006 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CropHintsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHintsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + int getCropHintsCount(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsOrBuilderList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java new file mode 100644 index 000000000000..35f411c116df --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java @@ -0,0 +1,696 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Parameters for crop hints annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsParams} + */ +public final class CropHintsParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHintsParams) + CropHintsParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsParams.newBuilder() to construct. + private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsParams() { + aspectRatios_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + aspectRatios_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + aspectRatios_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHintsParams.class, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder.class); + } + + public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList aspectRatios_; + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + @java.lang.Override + public java.util.List + getAspectRatiosList() { + return aspectRatios_; + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + private int aspectRatiosMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getAspectRatiosList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); + } + for (int i = 0; i < aspectRatios_.size(); i++) { + output.writeFloatNoTag(aspectRatios_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getAspectRatiosList().size(); + size += dataSize; + if (!getAspectRatiosList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + aspectRatiosMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHintsParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.CropHintsParams other = (com.google.cloud.vision.v1p3beta1.CropHintsParams) obj; + + if (!getAspectRatiosList() + .equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAspectRatiosCount() > 0) { + hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; + hash = (53 * hash) + getAspectRatiosList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHintsParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHintsParams) + com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.CropHintsParams.class, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.CropHintsParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParams build() { + com.google.cloud.vision.v1p3beta1.CropHintsParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParams buildPartial() { + com.google.cloud.vision.v1p3beta1.CropHintsParams result = new com.google.cloud.vision.v1p3beta1.CropHintsParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aspectRatios_ = aspectRatios_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.CropHintsParams) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHintsParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHintsParams other) { + if (other == com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance()) return this; + if (!other.aspectRatios_.isEmpty()) { + if (aspectRatios_.isEmpty()) { + aspectRatios_ = other.aspectRatios_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAspectRatiosIsMutable(); + aspectRatios_.addAll(other.aspectRatios_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.CropHintsParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHintsParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); + private void ensureAspectRatiosIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + public java.util.List + getAspectRatiosList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index to set the value at. + * @param value The aspectRatios to set. + * @return This builder for chaining. + */ + public Builder setAspectRatios( + int index, float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param value The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAspectRatios(float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.addFloat(value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param values The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAllAspectRatios( + java.lang.Iterable values) { + ensureAspectRatiosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aspectRatios_); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return This builder for chaining. + */ + public Builder clearAspectRatios() { + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHintsParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsParams) + private static final com.google.cloud.vision.v1p3beta1.CropHintsParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHintsParams(); + } + + public static com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java new file mode 100644 index 000000000000..a653d0de77da --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface CropHintsParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHintsParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + java.util.List getAspectRatiosList(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + int getAspectRatiosCount(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + float getAspectRatios(int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java new file mode 100644 index 000000000000..719318c2ace9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `DeleteProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductRequest} + */ +public final class DeleteProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteProductRequest) + DeleteProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductRequest.newBuilder() to construct. + private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteProductRequest) + com.google.cloud.vision.v1p3beta1.DeleteProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.DeleteProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductRequest build() { + com.google.cloud.vision.v1p3beta1.DeleteProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.DeleteProductRequest result = new com.google.cloud.vision.v1p3beta1.DeleteProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteProductRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.DeleteProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductRequest) + private static final com.google.cloud.vision.v1p3beta1.DeleteProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteProductRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java new file mode 100644 index 000000000000..7f8ba581ae92 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface DeleteProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java new file mode 100644 index 000000000000..8235fd8f94f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `DeleteProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductSetRequest} + */ +public final class DeleteProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) + DeleteProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductSetRequest.newBuilder() to construct. + private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest result = new com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..0467f25bc398 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface DeleteProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java new file mode 100644 index 000000000000..8a6f19c9c97e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `DeleteReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} + */ +public final class DeleteReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) + DeleteReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteReferenceImageRequest.newBuilder() to construct. + private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest build() { + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) + private static final com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..da3ee934e47e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface DeleteReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java new file mode 100644 index 000000000000..8ea9a6af680c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Set of dominant colors and their corresponding scores.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DominantColorsAnnotation} + */ +public final class DominantColorsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) + DominantColorsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DominantColorsAnnotation.newBuilder() to construct. + private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DominantColorsAnnotation() { + colors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DominantColorsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DominantColorsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + colors_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ColorInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder.class); + } + + public static final int COLORS_FIELD_NUMBER = 1; + private java.util.List colors_; + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List getColorsList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List + getColorsOrBuilderList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public int getColorsCount() { + return colors_.size(); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index) { + return colors_.get(index); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + return colors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < colors_.size(); i++) { + output.writeMessage(1, colors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < colors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, colors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) obj; + + if (!getColorsList() + .equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColorsCount() > 0) { + hash = (37 * hash) + COLORS_FIELD_NUMBER; + hash = (53 * hash) + getColorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of dominant colors and their corresponding scores.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.DominantColorsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + colorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation build() { + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation(this); + int from_bitField0_ = bitField0_; + if (colorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.colors_ = colors_; + } else { + result.colors_ = colorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance()) return this; + if (colorsBuilder_ == null) { + if (!other.colors_.isEmpty()) { + if (colors_.isEmpty()) { + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColorsIsMutable(); + colors_.addAll(other.colors_); + } + onChanged(); + } + } else { + if (!other.colors_.isEmpty()) { + if (colorsBuilder_.isEmpty()) { + colorsBuilder_.dispose(); + colorsBuilder_ = null; + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + colorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getColorsFieldBuilder() : null; + } else { + colorsBuilder_.addAllMessages(other.colors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List colors_ = + java.util.Collections.emptyList(); + private void ensureColorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(colors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder> colorsBuilder_; + + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public java.util.List getColorsList() { + if (colorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(colors_); + } else { + return colorsBuilder_.getMessageList(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public int getColorsCount() { + if (colorsBuilder_ == null) { + return colors_.size(); + } else { + return colorsBuilder_.getCount(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); + } else { + return colorsBuilder_.getMessage(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p3beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.set(index, value); + onChanged(); + } else { + colorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.set(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder addColors(com.google.cloud.vision.v1p3beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(value); + onChanged(); + } else { + colorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p3beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(index, value); + onChanged(); + } else { + colorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder addColors( + com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder addAllColors( + java.lang.Iterable values) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, colors_); + onChanged(); + } else { + colorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder clearColors() { + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + colorsBuilder_.clear(); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public Builder removeColors(int index) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.remove(index); + onChanged(); + } else { + colorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder getColorsBuilder( + int index) { + return getColorsFieldBuilder().getBuilder(index); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); } else { + return colorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsOrBuilderList() { + if (colorsBuilder_ != null) { + return colorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(colors_); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder() { + return getColorsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder( + int index) { + return getColorsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsBuilderList() { + return getColorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder> + getColorsFieldBuilder() { + if (colorsBuilder_ == null) { + colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder>( + colors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + colors_ = null; + } + return colorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) + private static final com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DominantColorsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DominantColorsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java new file mode 100644 index 000000000000..56cf0dfcc742 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface DominantColorsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + int getColorsCount(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsOrBuilderList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java new file mode 100644 index 000000000000..b3aa0bcc4373 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java @@ -0,0 +1,2472 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Set of detected entity features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.EntityAnnotation} + */ +public final class EntityAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.EntityAnnotation) + EntityAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityAnnotation.newBuilder() to construct. + private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityAnnotation() { + mid_ = ""; + locale_ = ""; + description_ = ""; + locations_ = java.util.Collections.emptyList(); + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + locale_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + case 53: { + + topicality_ = input.readFloat(); + break; + } + case 58: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.LocationInfo.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + properties_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Property.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.class, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALE_FIELD_NUMBER = 2; + private volatile java.lang.Object locale_; + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + @java.lang.Override + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } + } + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int TOPICALITY_FIELD_NUMBER = 6; + private float topicality_; + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 7; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int LOCATIONS_FIELD_NUMBER = 8; + private java.util.List locations_; + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index) { + return locations_.get(index); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + return locations_.get(index); + } + + public static final int PROPERTIES_FIELD_NUMBER = 9; + private java.util.List properties_; + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Property getProperties(int index) { + return properties_.get(index); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + output.writeFloat(6, topicality_); + } + if (boundingPoly_ != null) { + output.writeMessage(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(9, properties_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, topicality_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, properties_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.EntityAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.EntityAnnotation other = (com.google.cloud.vision.v1p3beta1.EntityAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLocale() + .equals(other.getLocale())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits( + other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getLocationsList() + .equals(other.getLocationsList())) return false; + if (!getPropertiesList() + .equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLocale().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTopicality()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.EntityAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected entity features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.EntityAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.EntityAnnotation) + com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.EntityAnnotation.class, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.EntityAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + locale_ = ""; + + description_ = ""; + + score_ = 0F; + + confidence_ = 0F; + + topicality_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + propertiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation build() { + com.google.cloud.vision.v1p3beta1.EntityAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.EntityAnnotation result = new com.google.cloud.vision.v1p3beta1.EntityAnnotation(this); + int from_bitField0_ = bitField0_; + result.mid_ = mid_; + result.locale_ = locale_; + result.description_ = description_; + result.score_ = score_; + result.confidence_ = confidence_; + result.topicality_ = topicality_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.EntityAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.EntityAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.EntityAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLocale().isEmpty()) { + locale_ = other.locale_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getTopicality() != 0F) { + setTopicality(other.getTopicality()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPropertiesFieldBuilder() : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.EntityAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.EntityAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object mid_ = ""; + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object locale_ = ""; + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The locale. + */ + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The locale to set. + * @return This builder for chaining. + */ + public Builder setLocale( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locale_ = value; + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return This builder for chaining. + */ + public Builder clearLocale() { + + locale_ = getDefaultInstance().getLocale(); + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The bytes for locale to set. + * @return This builder for chaining. + */ + public Builder setLocaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locale_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float topicality_ ; + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @param value The topicality to set. + * @return This builder for chaining. + */ + public Builder setTopicality(float value) { + + topicality_ = value; + onChanged(); + return this; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return This builder for chaining. + */ + public Builder clearTopicality() { + + topicality_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder> locationsBuilder_; + + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p3beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder addLocations(com.google.cloud.vision.v1p3beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p3beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder getLocationsBuilder( + int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilder( + int index) { + return getLocationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder>( + locations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List properties_ = + java.util.Collections.emptyList(); + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder> propertiesBuilder_; + + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p3beta1.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p3beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder addProperties(com.google.cloud.vision.v1p3beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p3beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder addProperties( + com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p3beta1.Property.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder>( + properties_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.EntityAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.EntityAnnotation) + private static final com.google.cloud.vision.v1p3beta1.EntityAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.EntityAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java new file mode 100644 index 000000000000..a8b7a9b69a13 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java @@ -0,0 +1,256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface EntityAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.EntityAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + java.lang.String getLocale(); + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + com.google.protobuf.ByteString + getLocaleBytes(); + + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + float getTopicality(); + + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + int getLocationsCount(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsOrBuilderList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index); + + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + java.util.List + getPropertiesList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p3beta1.Property getProperties(int index); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + int getPropertiesCount(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java new file mode 100644 index 000000000000..2df9bc02055f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java @@ -0,0 +1,4300 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A face annotation object contains the results of face detection.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} + */ +public final class FaceAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) + FaceAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceAnnotation.newBuilder() to construct. + private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceAnnotation() { + landmarks_ = java.util.Collections.emptyList(); + joyLikelihood_ = 0; + sorrowLikelihood_ = 0; + angerLikelihood_ = 0; + surpriseLikelihood_ = 0; + underExposedLikelihood_ = 0; + blurredLikelihood_ = 0; + headwearLikelihood_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (fdBoundingPoly_ != null) { + subBuilder = fdBoundingPoly_.toBuilder(); + } + fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fdBoundingPoly_); + fdBoundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + landmarks_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); + break; + } + case 37: { + + rollAngle_ = input.readFloat(); + break; + } + case 45: { + + panAngle_ = input.readFloat(); + break; + } + case 53: { + + tiltAngle_ = input.readFloat(); + break; + } + case 61: { + + detectionConfidence_ = input.readFloat(); + break; + } + case 69: { + + landmarkingConfidence_ = input.readFloat(); + break; + } + case 72: { + int rawValue = input.readEnum(); + + joyLikelihood_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + sorrowLikelihood_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + angerLikelihood_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + surpriseLikelihood_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + underExposedLikelihood_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + blurredLikelihood_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + headwearLikelihood_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); + } + + public interface LandmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType(); + + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return The position. + */ + com.google.cloud.vision.v1p3beta1.Position getPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder(); + } + /** + *
+   * A face-specific landmark (for example, a face feature).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} + */ + public static final class Landmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Landmark() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Landmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Landmark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + com.google.cloud.vision.v1p3beta1.Position.Builder subBuilder = null; + if (position_ != null) { + subBuilder = position_.toBuilder(); + } + position_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Position.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(position_); + position_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); + } + + /** + *
+     * Face landmark (feature) type.
+     * Left and right are defined from the vantage of the viewer of the image
+     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
+     * typically, is the person's right eye.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + UNKNOWN_LANDMARK(0), + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + LEFT_EYE(1), + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + RIGHT_EYE(2), + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + LEFT_OF_LEFT_EYEBROW(3), + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + RIGHT_OF_LEFT_EYEBROW(4), + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + LEFT_OF_RIGHT_EYEBROW(5), + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + RIGHT_OF_RIGHT_EYEBROW(6), + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + MIDPOINT_BETWEEN_EYES(7), + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + NOSE_TIP(8), + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + UPPER_LIP(9), + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + LOWER_LIP(10), + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + MOUTH_LEFT(11), + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + MOUTH_RIGHT(12), + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + MOUTH_CENTER(13), + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + NOSE_BOTTOM_RIGHT(14), + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + NOSE_BOTTOM_LEFT(15), + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + NOSE_BOTTOM_CENTER(16), + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + LEFT_EYE_TOP_BOUNDARY(17), + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + LEFT_EYE_RIGHT_CORNER(18), + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + LEFT_EYE_BOTTOM_BOUNDARY(19), + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + LEFT_EYE_LEFT_CORNER(20), + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + RIGHT_EYE_TOP_BOUNDARY(21), + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + RIGHT_EYE_RIGHT_CORNER(22), + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + RIGHT_EYE_BOTTOM_BOUNDARY(23), + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + RIGHT_EYE_LEFT_CORNER(24), + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + LEFT_EYEBROW_UPPER_MIDPOINT(25), + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + RIGHT_EYEBROW_UPPER_MIDPOINT(26), + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + LEFT_EAR_TRAGION(27), + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + RIGHT_EAR_TRAGION(28), + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + LEFT_EYE_PUPIL(29), + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + RIGHT_EYE_PUPIL(30), + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + FOREHEAD_GLABELLA(31), + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + CHIN_GNATHION(32), + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + CHIN_LEFT_GONION(33), + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + CHIN_RIGHT_GONION(34), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + public static final int UNKNOWN_LANDMARK_VALUE = 0; + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + public static final int LEFT_EYE_VALUE = 1; + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + public static final int RIGHT_EYE_VALUE = 2; + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + public static final int NOSE_TIP_VALUE = 8; + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + public static final int UPPER_LIP_VALUE = 9; + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + public static final int LOWER_LIP_VALUE = 10; + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + public static final int MOUTH_LEFT_VALUE = 11; + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + public static final int MOUTH_RIGHT_VALUE = 12; + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + public static final int MOUTH_CENTER_VALUE = 13; + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + public static final int NOSE_BOTTOM_LEFT_VALUE = 15; + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + public static final int NOSE_BOTTOM_CENTER_VALUE = 16; + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + public static final int LEFT_EAR_TRAGION_VALUE = 27; + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + public static final int RIGHT_EAR_TRAGION_VALUE = 28; + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + public static final int LEFT_EYE_PUPIL_VALUE = 29; + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + public static final int RIGHT_EYE_PUPIL_VALUE = 30; + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + public static final int FOREHEAD_GLABELLA_VALUE = 31; + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + public static final int CHIN_GNATHION_VALUE = 32; + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + public static final int CHIN_LEFT_GONION_VALUE = 33; + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + public static final int CHIN_RIGHT_GONION_VALUE = 34; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_LANDMARK; + case 1: return LEFT_EYE; + case 2: return RIGHT_EYE; + case 3: return LEFT_OF_LEFT_EYEBROW; + case 4: return RIGHT_OF_LEFT_EYEBROW; + case 5: return LEFT_OF_RIGHT_EYEBROW; + case 6: return RIGHT_OF_RIGHT_EYEBROW; + case 7: return MIDPOINT_BETWEEN_EYES; + case 8: return NOSE_TIP; + case 9: return UPPER_LIP; + case 10: return LOWER_LIP; + case 11: return MOUTH_LEFT; + case 12: return MOUTH_RIGHT; + case 13: return MOUTH_CENTER; + case 14: return NOSE_BOTTOM_RIGHT; + case 15: return NOSE_BOTTOM_LEFT; + case 16: return NOSE_BOTTOM_CENTER; + case 17: return LEFT_EYE_TOP_BOUNDARY; + case 18: return LEFT_EYE_RIGHT_CORNER; + case 19: return LEFT_EYE_BOTTOM_BOUNDARY; + case 20: return LEFT_EYE_LEFT_CORNER; + case 21: return RIGHT_EYE_TOP_BOUNDARY; + case 22: return RIGHT_EYE_RIGHT_CORNER; + case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; + case 24: return RIGHT_EYE_LEFT_CORNER; + case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; + case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; + case 27: return LEFT_EAR_TRAGION; + case 28: return RIGHT_EAR_TRAGION; + case 29: return LEFT_EYE_PUPIL; + case 30: return RIGHT_EYE_PUPIL; + case 31: return FOREHEAD_GLABELLA; + case 32: return CHIN_GNATHION; + case 33: return CHIN_LEFT_GONION; + case 34: return CHIN_RIGHT_GONION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type) + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p3beta1.Position position_; + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return position_ != null; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return The position. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Position getPosition() { + return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { + return getPosition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + output.writeEnum(3, type_); + } + if (position_ != null) { + output.writeMessage(4, getPosition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (position_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) obj; + + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A face-specific landmark (for example, a face feature).
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) + com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + if (positionBuilder_ == null) { + position_ = null; + } else { + position_ = null; + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark build() { + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark buildPartial() { + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(this); + result.type_ = type_; + if (positionBuilder_ == null) { + result.position_ = position_; + } else { + result.position_ = positionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other) { + if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.Position position_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> positionBuilder_; + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return positionBuilder_ != null || position_ != null; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + * @return The position. + */ + public com.google.cloud.vision.v1p3beta1.Position getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public Builder setPosition(com.google.cloud.vision.v1p3beta1.Position value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + onChanged(); + } else { + positionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public Builder setPosition( + com.google.cloud.vision.v1p3beta1.Position.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + onChanged(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public Builder mergePosition(com.google.cloud.vision.v1p3beta1.Position value) { + if (positionBuilder_ == null) { + if (position_ != null) { + position_ = + com.google.cloud.vision.v1p3beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); + } else { + position_ = value; + } + onChanged(); + } else { + positionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public Builder clearPosition() { + if (positionBuilder_ == null) { + position_ = null; + onChanged(); + } else { + position_ = null; + positionBuilder_ = null; + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p3beta1.Position.Builder getPositionBuilder() { + + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Position position = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) + private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(); + } + + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Landmark(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + @java.lang.Override + public boolean hasFdBoundingPoly() { + return fdBoundingPoly_ != null; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + return getFdBoundingPoly(); + } + + public static final int LANDMARKS_FIELD_NUMBER = 3; + private java.util.List landmarks_; + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + return landmarks_.get(index); + } + + public static final int ROLL_ANGLE_FIELD_NUMBER = 4; + private float rollAngle_; + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + + public static final int PAN_ANGLE_FIELD_NUMBER = 5; + private float panAngle_; + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + + public static final int TILT_ANGLE_FIELD_NUMBER = 6; + private float tiltAngle_; + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + + public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; + private float detectionConfidence_; + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + + public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; + private float landmarkingConfidence_; + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + + public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; + private int joyLikelihood_; + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; + private int sorrowLikelihood_; + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; + private int angerLikelihood_; + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; + private int surpriseLikelihood_; + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; + private int underExposedLikelihood_; + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; + private int blurredLikelihood_; + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; + private int headwearLikelihood_; + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + output.writeMessage(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + output.writeFloat(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + output.writeFloat(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + output.writeFloat(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + output.writeFloat(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + output.writeFloat(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(15, headwearLikelihood_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, headwearLikelihood_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.FaceAnnotation other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; + if (hasFdBoundingPoly()) { + if (!getFdBoundingPoly() + .equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList() + .equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits( + other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits( + other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits( + other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits( + other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits( + other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (hasFdBoundingPoly()) { + hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getFdBoundingPoly().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRollAngle()); + hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPanAngle()); + hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTiltAngle()); + hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDetectionConfidence()); + hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLandmarkingConfidence()); + hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + joyLikelihood_; + hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + sorrowLikelihood_; + hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + angerLikelihood_; + hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + surpriseLikelihood_; + hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + underExposedLikelihood_; + hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + blurredLikelihood_; + hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + headwearLikelihood_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.FaceAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A face annotation object contains the results of face detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) + com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLandmarksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + landmarksBuilder_.clear(); + } + rollAngle_ = 0F; + + panAngle_ = 0F; + + tiltAngle_ = 0F; + + detectionConfidence_ = 0F; + + landmarkingConfidence_ = 0F; + + joyLikelihood_ = 0; + + sorrowLikelihood_ = 0; + + angerLikelihood_ = 0; + + surpriseLikelihood_ = 0; + + underExposedLikelihood_ = 0; + + blurredLikelihood_ = 0; + + headwearLikelihood_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation build() { + com.google.cloud.vision.v1p3beta1.FaceAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.FaceAnnotation result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (fdBoundingPolyBuilder_ == null) { + result.fdBoundingPoly_ = fdBoundingPoly_; + } else { + result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + result.rollAngle_ = rollAngle_; + result.panAngle_ = panAngle_; + result.tiltAngle_ = tiltAngle_; + result.detectionConfidence_ = detectionConfidence_; + result.landmarkingConfidence_ = landmarkingConfidence_; + result.joyLikelihood_ = joyLikelihood_; + result.sorrowLikelihood_ = sorrowLikelihood_; + result.angerLikelihood_ = angerLikelihood_; + result.surpriseLikelihood_ = surpriseLikelihood_; + result.underExposedLikelihood_ = underExposedLikelihood_; + result.blurredLikelihood_ = blurredLikelihood_; + result.headwearLikelihood_ = headwearLikelihood_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.hasFdBoundingPoly()) { + mergeFdBoundingPoly(other.getFdBoundingPoly()); + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarksFieldBuilder() : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (other.getRollAngle() != 0F) { + setRollAngle(other.getRollAngle()); + } + if (other.getPanAngle() != 0F) { + setPanAngle(other.getPanAngle()); + } + if (other.getTiltAngle() != 0F) { + setTiltAngle(other.getTiltAngle()); + } + if (other.getDetectionConfidence() != 0F) { + setDetectionConfidence(other.getDetectionConfidence()); + } + if (other.getLandmarkingConfidence() != 0F) { + setLandmarkingConfidence(other.getLandmarkingConfidence()); + } + if (other.joyLikelihood_ != 0) { + setJoyLikelihoodValue(other.getJoyLikelihoodValue()); + } + if (other.sorrowLikelihood_ != 0) { + setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); + } + if (other.angerLikelihood_ != 0) { + setAngerLikelihoodValue(other.getAngerLikelihoodValue()); + } + if (other.surpriseLikelihood_ != 0) { + setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); + } + if (other.underExposedLikelihood_ != 0) { + setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); + } + if (other.blurredLikelihood_ != 0) { + setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); + } + if (other.headwearLikelihood_ != 0) { + setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.FaceAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale, as returned in `ImageParams`.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + public boolean hasFdBoundingPoly() { + return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } else { + return fdBoundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fdBoundingPoly_ = value; + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = builderForValue.build(); + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (fdBoundingPoly_ != null) { + fdBoundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); + } else { + fdBoundingPoly_ = value; + } + onChanged(); + } else { + fdBoundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder clearFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + onChanged(); + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { + + onChanged(); + return getFdBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + if (fdBoundingPolyBuilder_ != null) { + return fdBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + return fdBoundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getFdBoundingPolyFieldBuilder() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getFdBoundingPoly(), + getParentForChildren(), + isClean()); + fdBoundingPoly_ = null; + } + return fdBoundingPolyBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; + + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().getBuilder(index); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { + return getLandmarksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksBuilderList() { + return getLandmarksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> + getLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder>( + landmarks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private float rollAngle_ ; + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @param value The rollAngle to set. + * @return This builder for chaining. + */ + public Builder setRollAngle(float value) { + + rollAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return This builder for chaining. + */ + public Builder clearRollAngle() { + + rollAngle_ = 0F; + onChanged(); + return this; + } + + private float panAngle_ ; + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @param value The panAngle to set. + * @return This builder for chaining. + */ + public Builder setPanAngle(float value) { + + panAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return This builder for chaining. + */ + public Builder clearPanAngle() { + + panAngle_ = 0F; + onChanged(); + return this; + } + + private float tiltAngle_ ; + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @param value The tiltAngle to set. + * @return This builder for chaining. + */ + public Builder setTiltAngle(float value) { + + tiltAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return This builder for chaining. + */ + public Builder clearTiltAngle() { + + tiltAngle_ = 0F; + onChanged(); + return this; + } + + private float detectionConfidence_ ; + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @param value The detectionConfidence to set. + * @return This builder for chaining. + */ + public Builder setDetectionConfidence(float value) { + + detectionConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return This builder for chaining. + */ + public Builder clearDetectionConfidence() { + + detectionConfidence_ = 0F; + onChanged(); + return this; + } + + private float landmarkingConfidence_ ; + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @param value The landmarkingConfidence to set. + * @return This builder for chaining. + */ + public Builder setLandmarkingConfidence(float value) { + + landmarkingConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return This builder for chaining. + */ + public Builder clearLandmarkingConfidence() { + + landmarkingConfidence_ = 0F; + onChanged(); + return this; + } + + private int joyLikelihood_ = 0; + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @param value The enum numeric value on the wire for joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihoodValue(int value) { + + joyLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @param value The joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + joyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return This builder for chaining. + */ + public Builder clearJoyLikelihood() { + + joyLikelihood_ = 0; + onChanged(); + return this; + } + + private int sorrowLikelihood_ = 0; + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @param value The enum numeric value on the wire for sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihoodValue(int value) { + + sorrowLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @param value The sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + sorrowLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return This builder for chaining. + */ + public Builder clearSorrowLikelihood() { + + sorrowLikelihood_ = 0; + onChanged(); + return this; + } + + private int angerLikelihood_ = 0; + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @param value The enum numeric value on the wire for angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihoodValue(int value) { + + angerLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @param value The angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + angerLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return This builder for chaining. + */ + public Builder clearAngerLikelihood() { + + angerLikelihood_ = 0; + onChanged(); + return this; + } + + private int surpriseLikelihood_ = 0; + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @param value The enum numeric value on the wire for surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihoodValue(int value) { + + surpriseLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @param value The surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + surpriseLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return This builder for chaining. + */ + public Builder clearSurpriseLikelihood() { + + surpriseLikelihood_ = 0; + onChanged(); + return this; + } + + private int underExposedLikelihood_ = 0; + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @param value The enum numeric value on the wire for underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihoodValue(int value) { + + underExposedLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @param value The underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + underExposedLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return This builder for chaining. + */ + public Builder clearUnderExposedLikelihood() { + + underExposedLikelihood_ = 0; + onChanged(); + return this; + } + + private int blurredLikelihood_ = 0; + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @param value The enum numeric value on the wire for blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihoodValue(int value) { + + blurredLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @param value The blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + blurredLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return This builder for chaining. + */ + public Builder clearBlurredLikelihood() { + + blurredLikelihood_ = 0; + onChanged(); + return this; + } + + private int headwearLikelihood_ = 0; + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @param value The enum numeric value on the wire for headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihoodValue(int value) { + + headwearLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @param value The headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + headwearLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return This builder for chaining. + */ + public Builder clearHeadwearLikelihood() { + + headwearLikelihood_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) + private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java new file mode 100644 index 000000000000..575709920991 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java @@ -0,0 +1,328 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface FaceAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale, as returned in `ImageParams`.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + boolean hasFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); + + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + int getLandmarksCount(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksOrBuilderList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index); + + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + float getRollAngle(); + + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + float getPanAngle(); + + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + float getTiltAngle(); + + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + float getDetectionConfidence(); + + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + float getLandmarkingConfidence(); + + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + int getJoyLikelihoodValue(); + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood(); + + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + int getSorrowLikelihoodValue(); + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood(); + + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + int getAngerLikelihoodValue(); + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood(); + + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + int getSurpriseLikelihoodValue(); + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood(); + + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + int getUnderExposedLikelihoodValue(); + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood(); + + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + int getBlurredLikelihoodValue(); + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood(); + + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + int getHeadwearLikelihoodValue(); + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java new file mode 100644 index 000000000000..30cb5ed46d71 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java @@ -0,0 +1,1153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The type of Google Cloud Vision API detection to perform, and the maximum
+ * number of results to return for that type. Multiple `Feature` objects can
+ * be specified in the `features` list.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + type_ = 0; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + maxResults_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Feature.class, com.google.cloud.vision.v1p3beta1.Feature.Builder.class); + } + + /** + *
+   * Type of Google Cloud Vision API feature to be extracted.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.Feature.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + FACE_DETECTION(1), + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + LANDMARK_DETECTION(2), + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + LOGO_DETECTION(3), + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + LABEL_DETECTION(4), + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + TEXT_DETECTION(5), + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + DOCUMENT_TEXT_DETECTION(11), + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + SAFE_SEARCH_DETECTION(6), + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + IMAGE_PROPERTIES(7), + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + CROP_HINTS(9), + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + WEB_DETECTION(10), + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + PRODUCT_SEARCH(12), + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + OBJECT_LOCALIZATION(19), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + public static final int FACE_DETECTION_VALUE = 1; + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + public static final int LANDMARK_DETECTION_VALUE = 2; + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + public static final int LOGO_DETECTION_VALUE = 3; + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + public static final int LABEL_DETECTION_VALUE = 4; + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + public static final int TEXT_DETECTION_VALUE = 5; + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + public static final int SAFE_SEARCH_DETECTION_VALUE = 6; + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + public static final int IMAGE_PROPERTIES_VALUE = 7; + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + public static final int CROP_HINTS_VALUE = 9; + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + public static final int WEB_DETECTION_VALUE = 10; + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + public static final int PRODUCT_SEARCH_VALUE = 12; + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + public static final int OBJECT_LOCALIZATION_VALUE = 19; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return FACE_DETECTION; + case 2: return LANDMARK_DETECTION; + case 3: return LOGO_DETECTION; + case 4: return LABEL_DETECTION; + case 5: return TEXT_DETECTION; + case 11: return DOCUMENT_TEXT_DETECTION; + case 6: return SAFE_SEARCH_DETECTION; + case 7: return IMAGE_PROPERTIES; + case 9: return CROP_HINTS; + case 10: return WEB_DETECTION; + case 12: return PRODUCT_SEARCH; + case 19: return OBJECT_LOCALIZATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.Feature.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Feature.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Feature.Type result = com.google.cloud.vision.v1p3beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.Feature.Type.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 2; + private int maxResults_; + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p3beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (maxResults_ != 0) { + output.writeInt32(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p3beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Feature)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Feature other = (com.google.cloud.vision.v1p3beta1.Feature) obj; + + if (type_ != other.type_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The type of Google Cloud Vision API detection to perform, and the maximum
+   * number of results to return for that type. Multiple `Feature` objects can
+   * be specified in the `features` list.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Feature) + com.google.cloud.vision.v1p3beta1.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Feature.class, com.google.cloud.vision.v1p3beta1.Feature.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + maxResults_ = 0; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature build() { + com.google.cloud.vision.v1p3beta1.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature buildPartial() { + com.google.cloud.vision.v1p3beta1.Feature result = new com.google.cloud.vision.v1p3beta1.Feature(this); + result.type_ = type_; + result.maxResults_ = maxResults_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Feature) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Feature other) { + if (other == com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Feature.Type result = com.google.cloud.vision.v1p3beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.Feature.Type.UNRECOGNIZED : result; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p3beta1.Feature.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + + maxResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The bytes for model. + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Feature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Feature) + private static final com.google.cloud.vision.v1p3beta1.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Feature(); + } + + public static com.google.cloud.vision.v1p3beta1.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java new file mode 100644 index 000000000000..a8f1cefb58d7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p3beta1.Feature.Type getType(); + + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + int getMaxResults(); + + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + java.lang.String getModel(); + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + com.google.protobuf.ByteString + getModelBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java new file mode 100644 index 000000000000..13ad7742ff1f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java @@ -0,0 +1,672 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The Google Cloud Storage location where the output will be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GcsDestination.class, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.GcsDestination other = (com.google.cloud.vision.v1p3beta1.GcsDestination) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the output will be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GcsDestination) + com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GcsDestination.class, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestination build() { + com.google.cloud.vision.v1p3beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestination buildPartial() { + com.google.cloud.vision.v1p3beta1.GcsDestination result = new com.google.cloud.vision.v1p3beta1.GcsDestination(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.GcsDestination) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GcsDestination other) { + if (other == com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI where the results will be stored. Results will
+     * be in JSON format and preceded by its corresponding input URI. This field
+     * can either represent a single file, or a prefix for multiple outputs.
+     * Prefixes must end in a `/`.
+     * Examples:
+     * *    File: gs://bucket-name/filename.json
+     * *    Prefix: gs://bucket-name/prefix/here/
+     * *    File: gs://bucket-name/prefix/here
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsDestination) + private static final com.google.cloud.vision.v1p3beta1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GcsDestination(); + } + + public static com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..a1c55c5f63bf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI where the results will be stored. Results will
+   * be in JSON format and preceded by its corresponding input URI. This field
+   * can either represent a single file, or a prefix for multiple outputs.
+   * Prefixes must end in a `/`.
+   * Examples:
+   * *    File: gs://bucket-name/filename.json
+   * *    Prefix: gs://bucket-name/prefix/here/
+   * *    File: gs://bucket-name/prefix/here
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java new file mode 100644 index 000000000000..ee6f2fd82424 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The Google Cloud Storage location where the input will be read from.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsSource} + */ +public final class GcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GcsSource) + GcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsSource() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GcsSource.class, com.google.cloud.vision.v1p3beta1.GcsSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.GcsSource other = (com.google.cloud.vision.v1p3beta1.GcsSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the input will be read from.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GcsSource) + com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GcsSource.class, com.google.cloud.vision.v1p3beta1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSource build() { + com.google.cloud.vision.v1p3beta1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSource buildPartial() { + com.google.cloud.vision.v1p3beta1.GcsSource result = new com.google.cloud.vision.v1p3beta1.GcsSource(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.GcsSource) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.GcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GcsSource other) { + if (other == com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsSource) + private static final com.google.cloud.vision.v1p3beta1.GcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GcsSource(); + } + + public static com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..72e211a1be6b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface GcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java new file mode 100644 index 000000000000..842a475477f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class GeometryProto { + private GeometryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1p3beta1/geometry" + + ".proto\022\035google.cloud.vision.v1p3beta1\"\036\n" + + "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + + "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + + "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + + "d.vision.v1p3beta1.Vertex\022L\n\023normalized_" + + "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + + "3beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.goo" + + "gle.cloud.vision.v1p3beta1B\rGeometryProt" + + "oP\001ZCgoogle.golang.org/genproto/googleap" + + "is/cloud/vision/v1p3beta1;vision\370\001\001\242\002\004GC" + + "VNb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor, + new java.lang.String[] { "Vertices", "NormalizedVertices", }); + internal_static_google_cloud_vision_v1p3beta1_Position_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Position_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java new file mode 100644 index 000000000000..9a085c0abf0d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `GetProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductRequest} + */ +public final class GetProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetProductRequest) + GetProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductRequest.newBuilder() to construct. + private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetProductRequest.class, com.google.cloud.vision.v1p3beta1.GetProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.GetProductRequest other = (com.google.cloud.vision.v1p3beta1.GetProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetProductRequest) + com.google.cloud.vision.v1p3beta1.GetProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetProductRequest.class, com.google.cloud.vision.v1p3beta1.GetProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.GetProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductRequest build() { + com.google.cloud.vision.v1p3beta1.GetProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.GetProductRequest result = new com.google.cloud.vision.v1p3beta1.GetProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.GetProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.GetProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetProductRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.GetProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.GetProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductRequest) + private static final com.google.cloud.vision.v1p3beta1.GetProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetProductRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java new file mode 100644 index 000000000000..95d3405bace7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface GetProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java new file mode 100644 index 000000000000..f2c4da83b95e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `GetProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductSetRequest} + */ +public final class GetProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetProductSetRequest) + GetProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductSetRequest.newBuilder() to construct. + private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p3beta1.GetProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p3beta1.GetProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetProductSetRequest) + com.google.cloud.vision.v1p3beta1.GetProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p3beta1.GetProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.GetProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.GetProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.GetProductSetRequest result = new com.google.cloud.vision.v1p3beta1.GetProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.GetProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.GetProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.GetProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.GetProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.GetProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..eadfb3714b1d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface GetProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java new file mode 100644 index 000000000000..9aa221b1e4eb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `GetReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetReferenceImageRequest} + */ +public final class GetReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) + GetReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetReferenceImageRequest.newBuilder() to construct. + private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.GetReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest build() { + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) + private static final com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..de9c89d5cc0b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface GetReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java new file mode 100644 index 000000000000..7e3f7392c7a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Client image to perform Google Cloud Vision API tasks over.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Image} + */ +public final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Image) + ImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + content_ = input.readBytes(); + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.ImageSource.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Image.class, com.google.cloud.vision.v1p3beta1.Image.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.ImageSource source_; + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return The source. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSource getSource() { + return source_ == null ? com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Image)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Image other = (com.google.cloud.vision.v1p3beta1.Image) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Client image to perform Google Cloud Vision API tasks over.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Image) + com.google.cloud.vision.v1p3beta1.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Image.class, com.google.cloud.vision.v1p3beta1.Image.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Image getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Image build() { + com.google.cloud.vision.v1p3beta1.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Image buildPartial() { + com.google.cloud.vision.v1p3beta1.Image result = new com.google.cloud.vision.v1p3beta1.Image(this); + result.content_ = content_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Image) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Image other) { + if (other == com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance()) return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.ImageSource source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder> sourceBuilder_; + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return The source. + */ + public com.google.cloud.vision.v1p3beta1.ImageSource getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public Builder setSource(com.google.cloud.vision.v1p3beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public Builder setSource( + com.google.cloud.vision.v1p3beta1.ImageSource.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public Builder mergeSource(com.google.cloud.vision.v1p3beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.vision.v1p3beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p3beta1.ImageSource.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Image) + private static final com.google.cloud.vision.v1p3beta1.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Image(); + } + + public static com.google.cloud.vision.v1p3beta1.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java new file mode 100644 index 000000000000..c2df44d8e5a7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java @@ -0,0 +1,681 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * If an image was produced from a file (e.g. a PDF), this message gives
+ * information about the source of that image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageAnnotationContext} + */ +public final class ImageAnnotationContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageAnnotationContext) + ImageAnnotationContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageAnnotationContext.newBuilder() to construct. + private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageAnnotationContext() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageAnnotationContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageAnnotationContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageAnnotationContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (getPageNumber() + != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * If an image was produced from a file (e.g. a PDF), this message gives
+   * information about the source of that image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageAnnotationContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageAnnotationContext) + com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + pageNumber_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext build() { + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext buildPartial() { + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p3beta1.ImageAnnotationContext(this); + result.uri_ = uri_; + result.pageNumber_ = pageNumber_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageAnnotationContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext other) { + if (other == com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageAnnotationContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageAnnotationContext) + private static final com.google.cloud.vision.v1p3beta1.ImageAnnotationContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageAnnotationContext(); + } + + public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageAnnotationContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageAnnotationContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java new file mode 100644 index 000000000000..07bbbabadf80 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImageAnnotationContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageAnnotationContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + int getPageNumber(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java new file mode 100644 index 000000000000..5c81e8c624d7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java @@ -0,0 +1,671 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class ImageAnnotatorProto { + private ImageAnnotatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p3beta1/image_an" + + "notator.proto\022\035google.cloud.vision.v1p3b" + + "eta1\032\034google/api/annotations.proto\032\027goog" + + "le/api/client.proto\032\037google/api/field_be" + + "havior.proto\032,google/cloud/vision/v1p3be" + + "ta1/geometry.proto\0322google/cloud/vision/" + + "v1p3beta1/product_search.proto\0323google/c" + + "loud/vision/v1p3beta1/text_annotation.pr" + + "oto\0321google/cloud/vision/v1p3beta1/web_d" + + "etection.proto\032#google/longrunning/opera" + + "tions.proto\032\037google/protobuf/timestamp.p" + + "roto\032\027google/rpc/status.proto\032\027google/ty" + + "pe/color.proto\032\030google/type/latlng.proto" + + "\"\216\003\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.clou" + + "d.vision.v1p3beta1.Feature.Type\022\023\n\013max_r" + + "esults\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024\n\020" + + "TYPE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026" + + "\n\022LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTION" + + "\020\003\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECTIO" + + "N\020\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE" + + "_SEARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020" + + "\007\022\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022\n\016" + + "PRODUCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATION\020" + + "\023\"7\n\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022" + + "\021\n\timage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content\030\001" + + " \001(\014\022:\n\006source\030\002 \001(\0132*.google.cloud.visi" + + "on.v1p3beta1.ImageSource\"\233\016\n\016FaceAnnotat" + + "ion\022B\n\rbounding_poly\030\001 \001(\0132+.google.clou" + + "d.vision.v1p3beta1.BoundingPoly\022E\n\020fd_bo" + + "unding_poly\030\002 \001(\0132+.google.cloud.vision." + + "v1p3beta1.BoundingPoly\022I\n\tlandmarks\030\003 \003(" + + "\01326.google.cloud.vision.v1p3beta1.FaceAn" + + "notation.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022\021\n" + + "\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024" + + "detection_confidence\030\007 \001(\002\022\036\n\026landmarkin" + + "g_confidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t \001" + + "(\0162).google.cloud.vision.v1p3beta1.Likel" + + "ihood\022D\n\021sorrow_likelihood\030\n \001(\0162).googl" + + "e.cloud.vision.v1p3beta1.Likelihood\022C\n\020a" + + "nger_likelihood\030\013 \001(\0162).google.cloud.vis" + + "ion.v1p3beta1.Likelihood\022F\n\023surprise_lik" + + "elihood\030\014 \001(\0162).google.cloud.vision.v1p3" + + "beta1.Likelihood\022K\n\030under_exposed_likeli" + + "hood\030\r \001(\0162).google.cloud.vision.v1p3bet" + + "a1.Likelihood\022E\n\022blurred_likelihood\030\016 \001(" + + "\0162).google.cloud.vision.v1p3beta1.Likeli" + + "hood\022F\n\023headwear_likelihood\030\017 \001(\0162).goog" + + "le.cloud.vision.v1p3beta1.Likelihood\032\307\007\n" + + "\010Landmark\022I\n\004type\030\003 \001(\0162;.google.cloud.v" + + "ision.v1p3beta1.FaceAnnotation.Landmark." + + "Type\0229\n\010position\030\004 \001(\0132\'.google.cloud.vi" + + "sion.v1p3beta1.Position\"\264\006\n\004Type\022\024\n\020UNKN" + + "OWN_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGHT_EY" + + "E\020\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIGHT_O" + + "F_LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EYEBRO" + + "W\020\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025MIDPO" + + "INT_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPE" + + "R_LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017" + + "\n\013MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n\021NOS" + + "E_BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026" + + "\n\022NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_TOP_B" + + "OUNDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022\022\034\n\030" + + "LEFT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_EYE_L" + + "EFT_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDARY\020\025" + + "\022\032\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGHT_EY" + + "E_BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEFT_CO" + + "RNER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOINT\020\031\022" + + " \n\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n\020LEF" + + "T_EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION\020\034\022\022" + + "\n\016LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022" + + "\025\n\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATHION\020" + + " \022\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGHT_GO" + + "NION\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 \001(\0132" + + "\023.google.type.LatLng\"=\n\010Property\022\014\n\004name" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_value\030\003 " + + "\001(\004\"\274\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n" + + "\006locale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r\n\005sc" + + "ore\030\004 \001(\002\022\022\n\nconfidence\030\005 \001(\002\022\022\n\ntopical" + + "ity\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\0132+.googl" + + "e.cloud.vision.v1p3beta1.BoundingPoly\022>\n" + + "\tlocations\030\010 \003(\0132+.google.cloud.vision.v" + + "1p3beta1.LocationInfo\022;\n\nproperties\030\t \003(" + + "\0132\'.google.cloud.vision.v1p3beta1.Proper" + + "ty\"\240\001\n\031LocalizedObjectAnnotation\022\013\n\003mid\030" + + "\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004name\030\003 \001" + + "(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_poly\030\005 \001(\013" + + "2+.google.cloud.vision.v1p3beta1.Boundin" + + "gPoly\"\274\002\n\024SafeSearchAnnotation\0228\n\005adult\030" + + "\001 \001(\0162).google.cloud.vision.v1p3beta1.Li" + + "kelihood\0228\n\005spoof\030\002 \001(\0162).google.cloud.v" + + "ision.v1p3beta1.Likelihood\022:\n\007medical\030\003 " + + "\001(\0162).google.cloud.vision.v1p3beta1.Like" + + "lihood\022;\n\010violence\030\004 \001(\0162).google.cloud." + + "vision.v1p3beta1.Likelihood\0227\n\004racy\030\t \001(" + + "\0162).google.cloud.vision.v1p3beta1.Likeli" + + "hood\"a\n\013LatLongRect\022(\n\013min_lat_lng\030\001 \001(\013" + + "2\023.google.type.LatLng\022(\n\013max_lat_lng\030\002 \001" + + "(\0132\023.google.type.LatLng\"U\n\tColorInfo\022!\n\005" + + "color\030\001 \001(\0132\022.google.type.Color\022\r\n\005score" + + "\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T\n\030Domina" + + "ntColorsAnnotation\0228\n\006colors\030\001 \003(\0132(.goo" + + "gle.cloud.vision.v1p3beta1.ColorInfo\"c\n\017" + + "ImageProperties\022P\n\017dominant_colors\030\001 \001(\013" + + "27.google.cloud.vision.v1p3beta1.Dominan" + + "tColorsAnnotation\"\177\n\010CropHint\022B\n\rboundin" + + "g_poly\030\001 \001(\0132+.google.cloud.vision.v1p3b" + + "eta1.BoundingPoly\022\022\n\nconfidence\030\002 \001(\002\022\033\n" + + "\023importance_fraction\030\003 \001(\002\"R\n\023CropHintsA" + + "nnotation\022;\n\ncrop_hints\030\001 \003(\0132\'.google.c" + + "loud.vision.v1p3beta1.CropHint\"(\n\017CropHi" + + "ntsParams\022\025\n\raspect_ratios\030\001 \003(\002\"1\n\022WebD" + + "etectionParams\022\033\n\023include_geo_results\030\002 " + + "\001(\010\"c\n\023TextDetectionParams\022.\n&enable_tex" + + "t_detection_confidence_score\030\t \001(\010\022\034\n\024ad" + + "vanced_ocr_options\030\013 \003(\t\"\253\003\n\014ImageContex" + + "t\022A\n\rlat_long_rect\030\001 \001(\0132*.google.cloud." + + "vision.v1p3beta1.LatLongRect\022\026\n\016language" + + "_hints\030\002 \003(\t\022I\n\021crop_hints_params\030\004 \001(\0132" + + "..google.cloud.vision.v1p3beta1.CropHint" + + "sParams\022Q\n\025product_search_params\030\005 \001(\01322" + + ".google.cloud.vision.v1p3beta1.ProductSe" + + "archParams\022O\n\024web_detection_params\030\006 \001(\013" + + "21.google.cloud.vision.v1p3beta1.WebDete" + + "ctionParams\022Q\n\025text_detection_params\030\014 \001" + + "(\01322.google.cloud.vision.v1p3beta1.TextD" + + "etectionParams\"\311\001\n\024AnnotateImageRequest\022" + + "3\n\005image\030\001 \001(\0132$.google.cloud.vision.v1p" + + "3beta1.Image\0228\n\010features\030\002 \003(\0132&.google." + + "cloud.vision.v1p3beta1.Feature\022B\n\rimage_" + + "context\030\003 \001(\0132+.google.cloud.vision.v1p3" + + "beta1.ImageContext\":\n\026ImageAnnotationCon" + + "text\022\013\n\003uri\030\001 \001(\t\022\023\n\013page_number\030\002 \001(\005\"\277" + + "\010\n\025AnnotateImageResponse\022G\n\020face_annotat" + + "ions\030\001 \003(\0132-.google.cloud.vision.v1p3bet" + + "a1.FaceAnnotation\022M\n\024landmark_annotation" + + "s\030\002 \003(\0132/.google.cloud.vision.v1p3beta1." + + "EntityAnnotation\022I\n\020logo_annotations\030\003 \003" + + "(\0132/.google.cloud.vision.v1p3beta1.Entit" + + "yAnnotation\022J\n\021label_annotations\030\004 \003(\0132/" + + ".google.cloud.vision.v1p3beta1.EntityAnn" + + "otation\022^\n\034localized_object_annotations\030" + + "\026 \003(\01328.google.cloud.vision.v1p3beta1.Lo" + + "calizedObjectAnnotation\022I\n\020text_annotati" + + "ons\030\005 \003(\0132/.google.cloud.vision.v1p3beta" + + "1.EntityAnnotation\022K\n\024full_text_annotati" + + "on\030\014 \001(\0132-.google.cloud.vision.v1p3beta1" + + ".TextAnnotation\022S\n\026safe_search_annotatio" + + "n\030\006 \001(\01323.google.cloud.vision.v1p3beta1." + + "SafeSearchAnnotation\022S\n\033image_properties" + + "_annotation\030\010 \001(\0132..google.cloud.vision." + + "v1p3beta1.ImageProperties\022Q\n\025crop_hints_" + + "annotation\030\013 \001(\01322.google.cloud.vision.v" + + "1p3beta1.CropHintsAnnotation\022B\n\rweb_dete" + + "ction\030\r \001(\0132+.google.cloud.vision.v1p3be" + + "ta1.WebDetection\022S\n\026product_search_resul" + + "ts\030\016 \001(\01323.google.cloud.vision.v1p3beta1" + + ".ProductSearchResults\022!\n\005error\030\t \001(\0132\022.g" + + "oogle.rpc.Status\022F\n\007context\030\025 \001(\01325.goog" + + "le.cloud.vision.v1p3beta1.ImageAnnotatio" + + "nContext\"\241\001\n\024AnnotateFileResponse\022@\n\014inp" + + "ut_config\030\001 \001(\0132*.google.cloud.vision.v1" + + "p3beta1.InputConfig\022G\n\tresponses\030\002 \003(\01324" + + ".google.cloud.vision.v1p3beta1.AnnotateI" + + "mageResponse\"h\n\032BatchAnnotateImagesReque" + + "st\022J\n\010requests\030\001 \003(\01323.google.cloud.visi" + + "on.v1p3beta1.AnnotateImageRequestB\003\340A\002\"f" + + "\n\033BatchAnnotateImagesResponse\022G\n\trespons" + + "es\030\001 \003(\01324.google.cloud.vision.v1p3beta1" + + ".AnnotateImageResponse\"\236\002\n\030AsyncAnnotate" + + "FileRequest\022@\n\014input_config\030\001 \001(\0132*.goog" + + "le.cloud.vision.v1p3beta1.InputConfig\0228\n" + + "\010features\030\002 \003(\0132&.google.cloud.vision.v1" + + "p3beta1.Feature\022B\n\rimage_context\030\003 \001(\0132+" + + ".google.cloud.vision.v1p3beta1.ImageCont" + + "ext\022B\n\routput_config\030\004 \001(\0132+.google.clou" + + "d.vision.v1p3beta1.OutputConfig\"_\n\031Async" + + "AnnotateFileResponse\022B\n\routput_config\030\001 " + + "\001(\0132+.google.cloud.vision.v1p3beta1.Outp" + + "utConfig\"p\n\036AsyncBatchAnnotateFilesReque" + + "st\022N\n\010requests\030\001 \003(\01327.google.cloud.visi" + + "on.v1p3beta1.AsyncAnnotateFileRequestB\003\340" + + "A\002\"n\n\037AsyncBatchAnnotateFilesResponse\022K\n" + + "\tresponses\030\001 \003(\01328.google.cloud.vision.v" + + "1p3beta1.AsyncAnnotateFileResponse\"^\n\013In" + + "putConfig\022<\n\ngcs_source\030\001 \001(\0132(.google.c" + + "loud.vision.v1p3beta1.GcsSource\022\021\n\tmime_" + + "type\030\002 \001(\t\"j\n\014OutputConfig\022F\n\017gcs_destin" + + "ation\030\001 \001(\0132-.google.cloud.vision.v1p3be" + + "ta1.GcsDestination\022\022\n\nbatch_size\030\002 \001(\005\"\030" + + "\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestinati" + + "on\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021OperationMetadata\022E\n" + + "\005state\030\001 \001(\01626.google.cloud.vision.v1p3b" + + "eta1.OperationMetadata.State\022/\n\013create_t" + + "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\022/\n" + + "\013update_time\030\006 \001(\0132\032.google.protobuf.Tim" + + "estamp\"Q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013" + + "\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\r\n\tCA" + + "NCELLED\020\004*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022\021\n\r" + + "VERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSSIBL" + + "E\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\265\004\n\016Ima" + + "geAnnotator\022\276\001\n\023BatchAnnotateImages\0229.go" + + "ogle.cloud.vision.v1p3beta1.BatchAnnotat" + + "eImagesRequest\032:.google.cloud.vision.v1p" + + "3beta1.BatchAnnotateImagesResponse\"0\202\323\344\223" + + "\002\037\"\032/v1p3beta1/images:annotate:\001*\332A\010requ" + + "ests\022\351\001\n\027AsyncBatchAnnotateFiles\022=.googl" + + "e.cloud.vision.v1p3beta1.AsyncBatchAnnot" + + "ateFilesRequest\032\035.google.longrunning.Ope" + + "ration\"p\202\323\344\223\002(\"#/v1p3beta1/files:asyncBa" + + "tchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatch" + + "AnnotateFilesResponse\022\021OperationMetadata" + + "\032v\312A\025vision.googleapis.com\322A[https://www" + + ".googleapis.com/auth/cloud-platform,http" + + "s://www.googleapis.com/auth/cloud-vision" + + "B\202\001\n!com.google.cloud.vision.v1p3beta1B\023" + + "ImageAnnotatorProtoP\001ZCgoogle.golang.org" + + "/genproto/googleapis/cloud/vision/v1p3be" + + "ta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.ProductSearchProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.TextAnnotationProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.WebDetectionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.ColorProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor, + new java.lang.String[] { "Type", "MaxResults", "Model", }); + internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor, + new java.lang.String[] { "GcsImageUri", "ImageUri", }); + internal_static_google_cloud_vision_v1p3beta1_Image_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Image_descriptor, + new java.lang.String[] { "Content", "Source", }); + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor, + new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor = + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor, + new java.lang.String[] { "Type", "Position", }); + internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor, + new java.lang.String[] { "LatLng", }); + internal_static_google_cloud_vision_v1p3beta1_Property_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Property_descriptor, + new java.lang.String[] { "Name", "Value", "Uint64Value", }); + internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor, + new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); + internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor, + new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", "BoundingPoly", }); + internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor, + new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); + internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor, + new java.lang.String[] { "MinLatLng", "MaxLatLng", }); + internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor, + new java.lang.String[] { "Color", "Score", "PixelFraction", }); + internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor, + new java.lang.String[] { "Colors", }); + internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor, + new java.lang.String[] { "DominantColors", }); + internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor, + new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); + internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor, + new java.lang.String[] { "CropHints", }); + internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor, + new java.lang.String[] { "AspectRatios", }); + internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor, + new java.lang.String[] { "IncludeGeoResults", }); + internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor, + new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); + internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor, + new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "ProductSearchParams", "WebDetectionParams", "TextDetectionParams", }); + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor, + new java.lang.String[] { "Image", "Features", "ImageContext", }); + internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor, + new java.lang.String[] { "Uri", "PageNumber", }); + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor, + new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "LocalizedObjectAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "ProductSearchResults", "Error", "Context", }); + internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor, + new java.lang.String[] { "InputConfig", "Responses", }); + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor, + new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor, + new java.lang.String[] { "OutputConfig", }); + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor, + new java.lang.String[] { "GcsSource", "MimeType", }); + internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BatchSize", }); + internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor, + new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.ProductSearchProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.TextAnnotationProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.WebDetectionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.ColorProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java new file mode 100644 index 000000000000..f6ca3fd2e3a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java @@ -0,0 +1,1947 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Image context and/or feature-specific parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageContext} + */ +public final class ImageContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageContext) + ImageContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageContext.newBuilder() to construct. + private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageContext() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.LatLongRect.Builder subBuilder = null; + if (latLongRect_ != null) { + subBuilder = latLongRect_.toBuilder(); + } + latLongRect_ = input.readMessage(com.google.cloud.vision.v1p3beta1.LatLongRect.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLongRect_); + latLongRect_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + case 34: { + com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder subBuilder = null; + if (cropHintsParams_ != null) { + subBuilder = cropHintsParams_.toBuilder(); + } + cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.CropHintsParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsParams_); + cropHintsParams_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder subBuilder = null; + if (productSearchParams_ != null) { + subBuilder = productSearchParams_.toBuilder(); + } + productSearchParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchParams_); + productSearchParams_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder subBuilder = null; + if (webDetectionParams_ != null) { + subBuilder = webDetectionParams_.toBuilder(); + } + webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetectionParams_); + webDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder subBuilder = null; + if (textDetectionParams_ != null) { + subBuilder = textDetectionParams_.toBuilder(); + } + textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionParams_); + textDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageContext.class, com.google.cloud.vision.v1p3beta1.ImageContext.Builder.class); + } + + public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_; + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + @java.lang.Override + public boolean hasLatLongRect() { + return latLongRect_ != null; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect() { + return latLongRect_ == null ? com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + return getLatLongRect(); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList languageHints_; + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_; + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_; + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + @java.lang.Override + public boolean hasCropHintsParams() { + return cropHintsParams_ != null; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams() { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + return getCropHintsParams(); + } + + public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_; + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + @java.lang.Override + public boolean hasProductSearchParams() { + return productSearchParams_ != null; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams() { + return productSearchParams_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + return getProductSearchParams(); + } + + public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_; + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + @java.lang.Override + public boolean hasWebDetectionParams() { + return webDetectionParams_ != null; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams() { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + return getWebDetectionParams(); + } + + public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p3beta1.TextDetectionParams textDetectionParams_; + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + @java.lang.Override + public boolean hasTextDetectionParams() { + return textDetectionParams_ != null; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams() { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + return getTextDetectionParams(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLongRect_ != null) { + output.writeMessage(1, getLatLongRect()); + } + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); + } + if (cropHintsParams_ != null) { + output.writeMessage(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + output.writeMessage(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + output.writeMessage(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + output.writeMessage(12, getTextDetectionParams()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLongRect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLongRect()); + } + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + if (cropHintsParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getWebDetectionParams()); + } + if (textDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTextDetectionParams()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImageContext other = (com.google.cloud.vision.v1p3beta1.ImageContext) obj; + + if (hasLatLongRect() != other.hasLatLongRect()) return false; + if (hasLatLongRect()) { + if (!getLatLongRect() + .equals(other.getLatLongRect())) return false; + } + if (!getLanguageHintsList() + .equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; + if (hasCropHintsParams()) { + if (!getCropHintsParams() + .equals(other.getCropHintsParams())) return false; + } + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; + if (hasProductSearchParams()) { + if (!getProductSearchParams() + .equals(other.getProductSearchParams())) return false; + } + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; + if (hasWebDetectionParams()) { + if (!getWebDetectionParams() + .equals(other.getWebDetectionParams())) return false; + } + if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; + if (hasTextDetectionParams()) { + if (!getTextDetectionParams() + .equals(other.getTextDetectionParams())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLongRect()) { + hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; + hash = (53 * hash) + getLatLongRect().hashCode(); + } + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + if (hasCropHintsParams()) { + hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsParams().hashCode(); + } + if (hasProductSearchParams()) { + hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchParams().hashCode(); + } + if (hasWebDetectionParams()) { + hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getWebDetectionParams().hashCode(); + } + if (hasTextDetectionParams()) { + hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Image context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageContext) + com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageContext.class, com.google.cloud.vision.v1p3beta1.ImageContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext build() { + com.google.cloud.vision.v1p3beta1.ImageContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext buildPartial() { + com.google.cloud.vision.v1p3beta1.ImageContext result = new com.google.cloud.vision.v1p3beta1.ImageContext(this); + int from_bitField0_ = bitField0_; + if (latLongRectBuilder_ == null) { + result.latLongRect_ = latLongRect_; + } else { + result.latLongRect_ = latLongRectBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + if (cropHintsParamsBuilder_ == null) { + result.cropHintsParams_ = cropHintsParams_; + } else { + result.cropHintsParams_ = cropHintsParamsBuilder_.build(); + } + if (productSearchParamsBuilder_ == null) { + result.productSearchParams_ = productSearchParams_; + } else { + result.productSearchParams_ = productSearchParamsBuilder_.build(); + } + if (webDetectionParamsBuilder_ == null) { + result.webDetectionParams_ = webDetectionParams_; + } else { + result.webDetectionParams_ = webDetectionParamsBuilder_.build(); + } + if (textDetectionParamsBuilder_ == null) { + result.textDetectionParams_ = textDetectionParams_; + } else { + result.textDetectionParams_ = textDetectionParamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImageContext) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageContext other) { + if (other == com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance()) return this; + if (other.hasLatLongRect()) { + mergeLatLongRect(other.getLatLongRect()); + } + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + if (other.hasCropHintsParams()) { + mergeCropHintsParams(other.getCropHintsParams()); + } + if (other.hasProductSearchParams()) { + mergeProductSearchParams(other.getProductSearchParams()); + } + if (other.hasWebDetectionParams()) { + mergeWebDetectionParams(other.getWebDetectionParams()); + } + if (other.hasTextDetectionParams()) { + mergeTextDetectionParams(other.getTextDetectionParams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImageContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder> latLongRectBuilder_; + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + public boolean hasLatLongRect() { + return latLongRectBuilder_ != null || latLongRect_ != null; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + public com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect() { + if (latLongRectBuilder_ == null) { + return latLongRect_ == null ? com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } else { + return latLongRectBuilder_.getMessage(); + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect(com.google.cloud.vision.v1p3beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLongRect_ = value; + onChanged(); + } else { + latLongRectBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect( + com.google.cloud.vision.v1p3beta1.LatLongRect.Builder builderForValue) { + if (latLongRectBuilder_ == null) { + latLongRect_ = builderForValue.build(); + onChanged(); + } else { + latLongRectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public Builder mergeLatLongRect(com.google.cloud.vision.v1p3beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (latLongRect_ != null) { + latLongRect_ = + com.google.cloud.vision.v1p3beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); + } else { + latLongRect_ = value; + } + onChanged(); + } else { + latLongRectBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public Builder clearLatLongRect() { + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + onChanged(); + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p3beta1.LatLongRect.Builder getLatLongRectBuilder() { + + onChanged(); + return getLatLongRectFieldBuilder().getBuilder(); + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + if (latLongRectBuilder_ != null) { + return latLongRectBuilder_.getMessageOrBuilder(); + } else { + return latLongRect_ == null ? + com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder> + getLatLongRectFieldBuilder() { + if (latLongRectBuilder_ == null) { + latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder>( + getLatLongRect(), + getParentForChildren(), + isClean()); + latLongRect_ = null; + } + return latLongRectBuilder_; + } + + private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints( + java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languageHints_); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + public boolean hasCropHintsParams() { + return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + public com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } else { + return cropHintsParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams(com.google.cloud.vision.v1p3beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsParams_ = value; + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams( + com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder builderForValue) { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = builderForValue.build(); + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder mergeCropHintsParams(com.google.cloud.vision.v1p3beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (cropHintsParams_ != null) { + cropHintsParams_ = + com.google.cloud.vision.v1p3beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); + } else { + cropHintsParams_ = value; + } + onChanged(); + } else { + cropHintsParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder clearCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + onChanged(); + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { + + onChanged(); + return getCropHintsParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + if (cropHintsParamsBuilder_ != null) { + return cropHintsParamsBuilder_.getMessageOrBuilder(); + } else { + return cropHintsParams_ == null ? + com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder> + getCropHintsParamsFieldBuilder() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder>( + getCropHintsParams(), + getParentForChildren(), + isClean()); + cropHintsParams_ = null; + } + return cropHintsParamsBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + public boolean hasProductSearchParams() { + return productSearchParamsBuilder_ != null || productSearchParams_ != null; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + return productSearchParams_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } else { + return productSearchParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams(com.google.cloud.vision.v1p3beta1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchParams_ = value; + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams( + com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder builderForValue) { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = builderForValue.build(); + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public Builder mergeProductSearchParams(com.google.cloud.vision.v1p3beta1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (productSearchParams_ != null) { + productSearchParams_ = + com.google.cloud.vision.v1p3beta1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); + } else { + productSearchParams_ = value; + } + onChanged(); + } else { + productSearchParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public Builder clearProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + onChanged(); + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder getProductSearchParamsBuilder() { + + onChanged(); + return getProductSearchParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + if (productSearchParamsBuilder_ != null) { + return productSearchParamsBuilder_.getMessageOrBuilder(); + } else { + return productSearchParams_ == null ? + com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder> + getProductSearchParamsFieldBuilder() { + if (productSearchParamsBuilder_ == null) { + productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder>( + getProductSearchParams(), + getParentForChildren(), + isClean()); + productSearchParams_ = null; + } + return productSearchParamsBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + public boolean hasWebDetectionParams() { + return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + public com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } else { + return webDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams(com.google.cloud.vision.v1p3beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetectionParams_ = value; + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams( + com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder builderForValue) { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p3beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (webDetectionParams_ != null) { + webDetectionParams_ = + com.google.cloud.vision.v1p3beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); + } else { + webDetectionParams_ = value; + } + onChanged(); + } else { + webDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder clearWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + onChanged(); + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { + + onChanged(); + return getWebDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + if (webDetectionParamsBuilder_ != null) { + return webDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return webDetectionParams_ == null ? + com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder> + getWebDetectionParamsFieldBuilder() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder>( + getWebDetectionParams(), + getParentForChildren(), + isClean()); + webDetectionParams_ = null; + } + return webDetectionParamsBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.TextDetectionParams textDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + public boolean hasTextDetectionParams() { + return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + public com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } else { + return textDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams(com.google.cloud.vision.v1p3beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionParams_ = value; + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams( + com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder builderForValue) { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p3beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (textDetectionParams_ != null) { + textDetectionParams_ = + com.google.cloud.vision.v1p3beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); + } else { + textDetectionParams_ = value; + } + onChanged(); + } else { + textDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder clearTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + onChanged(); + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { + + onChanged(); + return getTextDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + if (textDetectionParamsBuilder_ != null) { + return textDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return textDetectionParams_ == null ? + com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder> + getTextDetectionParamsFieldBuilder() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder>( + getTextDetectionParams(), + getParentForChildren(), + isClean()); + textDetectionParams_ = null; + } + return textDetectionParamsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageContext) + private static final com.google.cloud.vision.v1p3beta1.ImageContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageContext(); + } + + public static com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java new file mode 100644 index 000000000000..2e2e5fc02057 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java @@ -0,0 +1,213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImageContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + boolean hasLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; + */ + com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); + + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + java.util.List + getLanguageHintsList(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString + getLanguageHintsBytes(int index); + + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + boolean hasCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; + */ + com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); + + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + boolean hasProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); + + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + boolean hasWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; + */ + com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); + + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + boolean hasTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; + */ + com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java new file mode 100644 index 000000000000..f4b4b6f0eadb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + * @return The source. + */ + com.google.cloud.vision.v1p3beta1.ImageSource getSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImageSource source = 2; + */ + com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java new file mode 100644 index 000000000000..7772d5dc3ec9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Stores image properties, such as dominant colors.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageProperties} + */ +public final class ImageProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageProperties) + ImagePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageProperties.newBuilder() to construct. + private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageProperties() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder subBuilder = null; + if (dominantColors_ != null) { + subBuilder = dominantColors_.toBuilder(); + } + dominantColors_ = input.readMessage(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dominantColors_); + dominantColors_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageProperties.class, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder.class); + } + + public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_; + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + @java.lang.Override + public boolean hasDominantColors() { + return dominantColors_ != null; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors() { + return dominantColors_ == null ? com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + return getDominantColors(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dominantColors_ != null) { + output.writeMessage(1, getDominantColors()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dominantColors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDominantColors()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageProperties)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImageProperties other = (com.google.cloud.vision.v1p3beta1.ImageProperties) obj; + + if (hasDominantColors() != other.hasDominantColors()) return false; + if (hasDominantColors()) { + if (!getDominantColors() + .equals(other.getDominantColors())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDominantColors()) { + hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; + hash = (53 * hash) + getDominantColors().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores image properties, such as dominant colors.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageProperties) + com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageProperties.class, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImageProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageProperties build() { + com.google.cloud.vision.v1p3beta1.ImageProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageProperties buildPartial() { + com.google.cloud.vision.v1p3beta1.ImageProperties result = new com.google.cloud.vision.v1p3beta1.ImageProperties(this); + if (dominantColorsBuilder_ == null) { + result.dominantColors_ = dominantColors_; + } else { + result.dominantColors_ = dominantColorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImageProperties) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageProperties other) { + if (other == com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance()) return this; + if (other.hasDominantColors()) { + mergeDominantColors(other.getDominantColors()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImageProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + public boolean hasDominantColors() { + return dominantColorsBuilder_ != null || dominantColors_ != null; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors() { + if (dominantColorsBuilder_ == null) { + return dominantColors_ == null ? com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } else { + return dominantColorsBuilder_.getMessage(); + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dominantColors_ = value; + onChanged(); + } else { + dominantColorsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors( + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder builderForValue) { + if (dominantColorsBuilder_ == null) { + dominantColors_ = builderForValue.build(); + onChanged(); + } else { + dominantColorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder mergeDominantColors(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (dominantColors_ != null) { + dominantColors_ = + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); + } else { + dominantColors_ = value; + } + onChanged(); + } else { + dominantColorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder clearDominantColors() { + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + onChanged(); + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { + + onChanged(); + return getDominantColorsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + if (dominantColorsBuilder_ != null) { + return dominantColorsBuilder_.getMessageOrBuilder(); + } else { + return dominantColors_ == null ? + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder> + getDominantColorsFieldBuilder() { + if (dominantColorsBuilder_ == null) { + dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder>( + getDominantColors(), + getParentForChildren(), + isClean()); + dominantColors_ = null; + } + return dominantColorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageProperties) + private static final com.google.cloud.vision.v1p3beta1.ImageProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageProperties(); + } + + public static com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java new file mode 100644 index 000000000000..51261f94c151 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImagePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + boolean hasDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; + */ + com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java new file mode 100644 index 000000000000..bdbdb8302b88 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java @@ -0,0 +1,880 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * External image source (Google Cloud Storage or web URL image location).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageSource} + */ +public final class ImageSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageSource) + ImageSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageSource.newBuilder() to construct. + private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageSource() { + gcsImageUri_ = ""; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + gcsImageUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageSource.class, com.google.cloud.vision.v1p3beta1.ImageSource.Builder.class); + } + + public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsImageUri_; + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + @java.lang.Override + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } + } + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImageSource other = (com.google.cloud.vision.v1p3beta1.ImageSource) obj; + + if (!getGcsImageUri() + .equals(other.getGcsImageUri())) return false; + if (!getImageUri() + .equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsImageUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * External image source (Google Cloud Storage or web URL image location).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageSource) + com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImageSource.class, com.google.cloud.vision.v1p3beta1.ImageSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImageSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + gcsImageUri_ = ""; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSource build() { + com.google.cloud.vision.v1p3beta1.ImageSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSource buildPartial() { + com.google.cloud.vision.v1p3beta1.ImageSource result = new com.google.cloud.vision.v1p3beta1.ImageSource(this); + result.gcsImageUri_ = gcsImageUri_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImageSource) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageSource other) { + if (other == com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance()) return this; + if (!other.getGcsImageUri().isEmpty()) { + gcsImageUri_ = other.gcsImageUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImageSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsImageUri_ = ""; + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsImageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return This builder for chaining. + */ + public Builder clearGcsImageUri() { + + gcsImageUri_ = getDefaultInstance().getGcsImageUri(); + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The bytes for gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageSource) + private static final com.google.cloud.vision.v1p3beta1.ImageSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageSource(); + } + + public static com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java new file mode 100644 index 000000000000..feacbe05b190 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImageSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + java.lang.String getGcsImageUri(); + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + com.google.protobuf.ByteString + getGcsImageUriBytes(); + + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString + getImageUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java new file mode 100644 index 000000000000..3e48dda77da3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java @@ -0,0 +1,905 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The Google Cloud Storage location for a csv file which preserves a list of
+ * ImportProductSetRequests in each line.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} + */ +public final class ImportProductSetsGcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) + ImportProductSetsGcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsGcsSource.newBuilder() to construct. + private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsGcsSource() { + csvFileUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsGcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsGcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + csvFileUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder.class); + } + + public static final int CSV_FILE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object csvFileUri_; + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 6 columns.
+   * 1. image_uri
+   * 2, image_id
+   * 3. product_set_id
+   * 4. product_id
+   * 5, product_category
+   * 6, product_display_name
+   * 7, labels
+   * 8. bounding_poly
+   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+   * ProductSet/Product with the same id will be created on the fly
+   * if the ProductSet/Product specified by product_set_id/product_id does not
+   * exist.
+   * The image_id field is optional but has to be unique if provided. If it is
+   * empty, we will automatically assign an unique id to the image.
+   * The product_display_name field is optional. If it is empty, a space (" ")
+   * is used as the place holder for the product display_name, which can
+   * be updated later through the realtime API.
+   * If the Product with product_id already exists, the fields
+   * product_display_name, product_category and labels are ignored.
+   * If a Product doesn't exist and needs to be created on the fly, the
+   * product_display_name field refers to
+   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+   * the product_category field refers to
+   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+   * and the labels field refers to [Product.labels][].
+   * Labels (optional) should be a line containing a list of comma-separated
+   * key-value pairs, with the format
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+   * The bounding_poly (optional) field is used to identify one region of
+   * interest from the image in the same manner as CreateReferenceImage. If no
+   * bounding_poly is specified, the system will try to detect regions of
+   * interest automatically.
+   * Note that the pipeline will resize the image if the image resolution is too
+   * large to process (above 20MP).
+   * Also note that at most one bounding_poly is allowed per line. If the image
+   * contains multiple regions of interest, the csv should contain one line per
+   * region of interest.
+   * The bounding_poly column should contain an even number of comma-separated
+   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+   * integers should be used for absolute bounding polygons, and float values
+   * in [0, 1] should be used for normalized bounding polygons.
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + @java.lang.Override + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } + } + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 6 columns.
+   * 1. image_uri
+   * 2, image_id
+   * 3. product_set_id
+   * 4. product_id
+   * 5, product_category
+   * 6, product_display_name
+   * 7, labels
+   * 8. bounding_poly
+   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+   * ProductSet/Product with the same id will be created on the fly
+   * if the ProductSet/Product specified by product_set_id/product_id does not
+   * exist.
+   * The image_id field is optional but has to be unique if provided. If it is
+   * empty, we will automatically assign an unique id to the image.
+   * The product_display_name field is optional. If it is empty, a space (" ")
+   * is used as the place holder for the product display_name, which can
+   * be updated later through the realtime API.
+   * If the Product with product_id already exists, the fields
+   * product_display_name, product_category and labels are ignored.
+   * If a Product doesn't exist and needs to be created on the fly, the
+   * product_display_name field refers to
+   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+   * the product_category field refers to
+   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+   * and the labels field refers to [Product.labels][].
+   * Labels (optional) should be a line containing a list of comma-separated
+   * key-value pairs, with the format
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+   * The bounding_poly (optional) field is used to identify one region of
+   * interest from the image in the same manner as CreateReferenceImage. If no
+   * bounding_poly is specified, the system will try to detect regions of
+   * interest automatically.
+   * Note that the pipeline will resize the image if the image resolution is too
+   * large to process (above 20MP).
+   * Also note that at most one bounding_poly is allowed per line. If the image
+   * contains multiple regions of interest, the csv should contain one line per
+   * region of interest.
+   * The bounding_poly column should contain an even number of comma-separated
+   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+   * integers should be used for absolute bounding polygons, and float values
+   * in [0, 1] should be used for normalized bounding polygons.
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) obj; + + if (!getCsvFileUri() + .equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCsvFileUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list of
+   * ImportProductSetRequests in each line.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + csvFileUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource build() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource buildPartial() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource(this); + result.csvFileUri_ = csvFileUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource other) { + if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance()) return this; + if (!other.getCsvFileUri().isEmpty()) { + csvFileUri_ = other.csvFileUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object csvFileUri_ = ""; + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 6 columns.
+     * 1. image_uri
+     * 2, image_id
+     * 3. product_set_id
+     * 4. product_id
+     * 5, product_category
+     * 6, product_display_name
+     * 7, labels
+     * 8. bounding_poly
+     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+     * ProductSet/Product with the same id will be created on the fly
+     * if the ProductSet/Product specified by product_set_id/product_id does not
+     * exist.
+     * The image_id field is optional but has to be unique if provided. If it is
+     * empty, we will automatically assign an unique id to the image.
+     * The product_display_name field is optional. If it is empty, a space (" ")
+     * is used as the place holder for the product display_name, which can
+     * be updated later through the realtime API.
+     * If the Product with product_id already exists, the fields
+     * product_display_name, product_category and labels are ignored.
+     * If a Product doesn't exist and needs to be created on the fly, the
+     * product_display_name field refers to
+     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+     * the product_category field refers to
+     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+     * and the labels field refers to [Product.labels][].
+     * Labels (optional) should be a line containing a list of comma-separated
+     * key-value pairs, with the format
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+     * The bounding_poly (optional) field is used to identify one region of
+     * interest from the image in the same manner as CreateReferenceImage. If no
+     * bounding_poly is specified, the system will try to detect regions of
+     * interest automatically.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 20MP).
+     * Also note that at most one bounding_poly is allowed per line. If the image
+     * contains multiple regions of interest, the csv should contain one line per
+     * region of interest.
+     * The bounding_poly column should contain an even number of comma-separated
+     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+     * integers should be used for absolute bounding polygons, and float values
+     * in [0, 1] should be used for normalized bounding polygons.
+     * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 6 columns.
+     * 1. image_uri
+     * 2, image_id
+     * 3. product_set_id
+     * 4. product_id
+     * 5, product_category
+     * 6, product_display_name
+     * 7, labels
+     * 8. bounding_poly
+     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+     * ProductSet/Product with the same id will be created on the fly
+     * if the ProductSet/Product specified by product_set_id/product_id does not
+     * exist.
+     * The image_id field is optional but has to be unique if provided. If it is
+     * empty, we will automatically assign an unique id to the image.
+     * The product_display_name field is optional. If it is empty, a space (" ")
+     * is used as the place holder for the product display_name, which can
+     * be updated later through the realtime API.
+     * If the Product with product_id already exists, the fields
+     * product_display_name, product_category and labels are ignored.
+     * If a Product doesn't exist and needs to be created on the fly, the
+     * product_display_name field refers to
+     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+     * the product_category field refers to
+     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+     * and the labels field refers to [Product.labels][].
+     * Labels (optional) should be a line containing a list of comma-separated
+     * key-value pairs, with the format
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+     * The bounding_poly (optional) field is used to identify one region of
+     * interest from the image in the same manner as CreateReferenceImage. If no
+     * bounding_poly is specified, the system will try to detect regions of
+     * interest automatically.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 20MP).
+     * Also note that at most one bounding_poly is allowed per line. If the image
+     * contains multiple regions of interest, the csv should contain one line per
+     * region of interest.
+     * The bounding_poly column should contain an even number of comma-separated
+     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+     * integers should be used for absolute bounding polygons, and float values
+     * in [0, 1] should be used for normalized bounding polygons.
+     * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 6 columns.
+     * 1. image_uri
+     * 2, image_id
+     * 3. product_set_id
+     * 4. product_id
+     * 5, product_category
+     * 6, product_display_name
+     * 7, labels
+     * 8. bounding_poly
+     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+     * ProductSet/Product with the same id will be created on the fly
+     * if the ProductSet/Product specified by product_set_id/product_id does not
+     * exist.
+     * The image_id field is optional but has to be unique if provided. If it is
+     * empty, we will automatically assign an unique id to the image.
+     * The product_display_name field is optional. If it is empty, a space (" ")
+     * is used as the place holder for the product display_name, which can
+     * be updated later through the realtime API.
+     * If the Product with product_id already exists, the fields
+     * product_display_name, product_category and labels are ignored.
+     * If a Product doesn't exist and needs to be created on the fly, the
+     * product_display_name field refers to
+     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+     * the product_category field refers to
+     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+     * and the labels field refers to [Product.labels][].
+     * Labels (optional) should be a line containing a list of comma-separated
+     * key-value pairs, with the format
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+     * The bounding_poly (optional) field is used to identify one region of
+     * interest from the image in the same manner as CreateReferenceImage. If no
+     * bounding_poly is specified, the system will try to detect regions of
+     * interest automatically.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 20MP).
+     * Also note that at most one bounding_poly is allowed per line. If the image
+     * contains multiple regions of interest, the csv should contain one line per
+     * region of interest.
+     * The bounding_poly column should contain an even number of comma-separated
+     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+     * integers should be used for absolute bounding polygons, and float values
+     * in [0, 1] should be used for normalized bounding polygons.
+     * 
+ * + * string csv_file_uri = 1; + * @param value The csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + csvFileUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 6 columns.
+     * 1. image_uri
+     * 2, image_id
+     * 3. product_set_id
+     * 4. product_id
+     * 5, product_category
+     * 6, product_display_name
+     * 7, labels
+     * 8. bounding_poly
+     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+     * ProductSet/Product with the same id will be created on the fly
+     * if the ProductSet/Product specified by product_set_id/product_id does not
+     * exist.
+     * The image_id field is optional but has to be unique if provided. If it is
+     * empty, we will automatically assign an unique id to the image.
+     * The product_display_name field is optional. If it is empty, a space (" ")
+     * is used as the place holder for the product display_name, which can
+     * be updated later through the realtime API.
+     * If the Product with product_id already exists, the fields
+     * product_display_name, product_category and labels are ignored.
+     * If a Product doesn't exist and needs to be created on the fly, the
+     * product_display_name field refers to
+     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+     * the product_category field refers to
+     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+     * and the labels field refers to [Product.labels][].
+     * Labels (optional) should be a line containing a list of comma-separated
+     * key-value pairs, with the format
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+     * The bounding_poly (optional) field is used to identify one region of
+     * interest from the image in the same manner as CreateReferenceImage. If no
+     * bounding_poly is specified, the system will try to detect regions of
+     * interest automatically.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 20MP).
+     * Also note that at most one bounding_poly is allowed per line. If the image
+     * contains multiple regions of interest, the csv should contain one line per
+     * region of interest.
+     * The bounding_poly column should contain an even number of comma-separated
+     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+     * integers should be used for absolute bounding polygons, and float values
+     * in [0, 1] should be used for normalized bounding polygons.
+     * 
+ * + * string csv_file_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCsvFileUri() { + + csvFileUri_ = getDefaultInstance().getCsvFileUri(); + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 6 columns.
+     * 1. image_uri
+     * 2, image_id
+     * 3. product_set_id
+     * 4. product_id
+     * 5, product_category
+     * 6, product_display_name
+     * 7, labels
+     * 8. bounding_poly
+     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+     * ProductSet/Product with the same id will be created on the fly
+     * if the ProductSet/Product specified by product_set_id/product_id does not
+     * exist.
+     * The image_id field is optional but has to be unique if provided. If it is
+     * empty, we will automatically assign an unique id to the image.
+     * The product_display_name field is optional. If it is empty, a space (" ")
+     * is used as the place holder for the product display_name, which can
+     * be updated later through the realtime API.
+     * If the Product with product_id already exists, the fields
+     * product_display_name, product_category and labels are ignored.
+     * If a Product doesn't exist and needs to be created on the fly, the
+     * product_display_name field refers to
+     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+     * the product_category field refers to
+     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+     * and the labels field refers to [Product.labels][].
+     * Labels (optional) should be a line containing a list of comma-separated
+     * key-value pairs, with the format
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+     * The bounding_poly (optional) field is used to identify one region of
+     * interest from the image in the same manner as CreateReferenceImage. If no
+     * bounding_poly is specified, the system will try to detect regions of
+     * interest automatically.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 20MP).
+     * Also note that at most one bounding_poly is allowed per line. If the image
+     * contains multiple regions of interest, the csv should contain one line per
+     * region of interest.
+     * The bounding_poly column should contain an even number of comma-separated
+     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+     * integers should be used for absolute bounding polygons, and float values
+     * in [0, 1] should be used for normalized bounding polygons.
+     * 
+ * + * string csv_file_uri = 1; + * @param value The bytes for csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + csvFileUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) + private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource(); + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsGcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsGcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java new file mode 100644 index 000000000000..0b064fea9bf7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImportProductSetsGcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 6 columns.
+   * 1. image_uri
+   * 2, image_id
+   * 3. product_set_id
+   * 4. product_id
+   * 5, product_category
+   * 6, product_display_name
+   * 7, labels
+   * 8. bounding_poly
+   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+   * ProductSet/Product with the same id will be created on the fly
+   * if the ProductSet/Product specified by product_set_id/product_id does not
+   * exist.
+   * The image_id field is optional but has to be unique if provided. If it is
+   * empty, we will automatically assign an unique id to the image.
+   * The product_display_name field is optional. If it is empty, a space (" ")
+   * is used as the place holder for the product display_name, which can
+   * be updated later through the realtime API.
+   * If the Product with product_id already exists, the fields
+   * product_display_name, product_category and labels are ignored.
+   * If a Product doesn't exist and needs to be created on the fly, the
+   * product_display_name field refers to
+   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+   * the product_category field refers to
+   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+   * and the labels field refers to [Product.labels][].
+   * Labels (optional) should be a line containing a list of comma-separated
+   * key-value pairs, with the format
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+   * The bounding_poly (optional) field is used to identify one region of
+   * interest from the image in the same manner as CreateReferenceImage. If no
+   * bounding_poly is specified, the system will try to detect regions of
+   * interest automatically.
+   * Note that the pipeline will resize the image if the image resolution is too
+   * large to process (above 20MP).
+   * Also note that at most one bounding_poly is allowed per line. If the image
+   * contains multiple regions of interest, the csv should contain one line per
+   * region of interest.
+   * The bounding_poly column should contain an even number of comma-separated
+   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+   * integers should be used for absolute bounding polygons, and float values
+   * in [0, 1] should be used for normalized bounding polygons.
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + java.lang.String getCsvFileUri(); + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 6 columns.
+   * 1. image_uri
+   * 2, image_id
+   * 3. product_set_id
+   * 4. product_id
+   * 5, product_category
+   * 6, product_display_name
+   * 7, labels
+   * 8. bounding_poly
+   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
+   * ProductSet/Product with the same id will be created on the fly
+   * if the ProductSet/Product specified by product_set_id/product_id does not
+   * exist.
+   * The image_id field is optional but has to be unique if provided. If it is
+   * empty, we will automatically assign an unique id to the image.
+   * The product_display_name field is optional. If it is empty, a space (" ")
+   * is used as the place holder for the product display_name, which can
+   * be updated later through the realtime API.
+   * If the Product with product_id already exists, the fields
+   * product_display_name, product_category and labels are ignored.
+   * If a Product doesn't exist and needs to be created on the fly, the
+   * product_display_name field refers to
+   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
+   * the product_category field refers to
+   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
+   * and the labels field refers to [Product.labels][].
+   * Labels (optional) should be a line containing a list of comma-separated
+   * key-value pairs, with the format
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
+   * The bounding_poly (optional) field is used to identify one region of
+   * interest from the image in the same manner as CreateReferenceImage. If no
+   * bounding_poly is specified, the system will try to detect regions of
+   * interest automatically.
+   * Note that the pipeline will resize the image if the image resolution is too
+   * large to process (above 20MP).
+   * Also note that at most one bounding_poly is allowed per line. If the image
+   * contains multiple regions of interest, the csv should contain one line per
+   * region of interest.
+   * The bounding_poly column should contain an even number of comma-separated
+   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
+   * integers should be used for absolute bounding polygons, and float values
+   * in [0, 1] should be used for normalized bounding polygons.
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + com.google.protobuf.ByteString + getCsvFileUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java new file mode 100644 index 000000000000..3dcc0104ad31 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The input content for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} + */ +public final class ImportProductSetsInputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) + ImportProductSetsInputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsInputConfig.newBuilder() to construct. + private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsInputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: return GCS_SOURCE; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The input content for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig build() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig buildPartial() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig(this); + if (sourceCase_ == 1) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig other) { + if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case GCS_SOURCE: { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 && + source_ != com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance()) { + source_ = com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder>( + (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged();; + return gcsSourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) + private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig(); + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsInputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsInputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java new file mode 100644 index 000000000000..e41acb199463 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImportProductSetsInputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); + + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.SourceCase getSourceCase(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java new file mode 100644 index 000000000000..aa8b67459389 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsRequest} + */ +public final class ImportProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) + ImportProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsRequest.newBuilder() to construct. + private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_; + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inputConfig_ != null) { + output.writeMessage(2, getInputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest build() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest(this); + result.parent_ = parent_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) + private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..7478ab727492 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImportProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java new file mode 100644 index 000000000000..52a83bf53595 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java @@ -0,0 +1,1414 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response message for the `ImportProductSets` method.
+ * This message is returned by the
+ * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+ * method in the returned
+ * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsResponse} + */ +public final class ImportProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) + ImportProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsResponse.newBuilder() to construct. + private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsResponse() { + referenceImages_ = java.util.Collections.emptyList(); + statuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + statuses_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int STATUSES_FIELD_NUMBER = 2; + private java.util.List statuses_; + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List getStatusesList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List + getStatusesOrBuilderList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public int getStatusesCount() { + return statuses_.size(); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.Status getStatuses(int index) { + return statuses_.get(index); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + return statuses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + output.writeMessage(2, statuses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, statuses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (!getStatusesList() + .equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + if (getStatusesCount() > 0) { + hash = (37 * hash) + STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getStatusesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ImportProductSets` method.
+   * This message is returned by the
+   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+   * method in the returned
+   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + getStatusesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + statusesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse build() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + if (statusesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.statuses_ = statuses_; + } else { + result.statuses_ = statusesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (statusesBuilder_ == null) { + if (!other.statuses_.isEmpty()) { + if (statuses_.isEmpty()) { + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatusesIsMutable(); + statuses_.addAll(other.statuses_); + } + onChanged(); + } + } else { + if (!other.statuses_.isEmpty()) { + if (statusesBuilder_.isEmpty()) { + statusesBuilder_.dispose(); + statusesBuilder_ = null; + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + statusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStatusesFieldBuilder() : null; + } else { + statusesBuilder_.addAllMessages(other.statuses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private java.util.List statuses_ = + java.util.Collections.emptyList(); + private void ensureStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(statuses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; + + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List getStatusesList() { + if (statusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(statuses_); + } else { + return statusesBuilder_.getMessageList(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public int getStatusesCount() { + if (statusesBuilder_ == null) { + return statuses_.size(); + } else { + return statusesBuilder_.getCount(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status getStatuses(int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); + } else { + return statusesBuilder_.getMessage(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.set(index, value); + onChanged(); + } else { + statusesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.set(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses(com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(value); + onChanged(); + } else { + statusesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(index, value); + onChanged(); + } else { + statusesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addAllStatuses( + java.lang.Iterable values) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, statuses_); + onChanged(); + } else { + statusesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder clearStatuses() { + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + statusesBuilder_.clear(); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder removeStatuses(int index) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.remove(index); + onChanged(); + } else { + statusesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder getStatusesBuilder( + int index) { + return getStatusesFieldBuilder().getBuilder(index); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); } else { + return statusesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesOrBuilderList() { + if (statusesBuilder_ != null) { + return statusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(statuses_); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder() { + return getStatusesFieldBuilder().addBuilder( + com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder( + int index) { + return getStatusesFieldBuilder().addBuilder( + index, com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesBuilderList() { + return getStatusesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusesFieldBuilder() { + if (statusesBuilder_ == null) { + statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + statuses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + statuses_ = null; + } + return statusesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) + private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..cc734e56af59 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ImportProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.Status getStatuses(int index); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + int getStatusesCount(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesOrBuilderList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java new file mode 100644 index 000000000000..78c39ced7f67 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The desired input location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.InputConfig} + */ +public final class InputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.InputConfig) + InputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputConfig() { + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.GcsSource.Builder subBuilder = null; + if (gcsSource_ != null) { + subBuilder = gcsSource_.toBuilder(); + } + gcsSource_ = input.readMessage(com.google.cloud.vision.v1p3beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsSource_); + gcsSource_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.InputConfig.class, com.google.cloud.vision.v1p3beta1.InputConfig.Builder.class); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_; + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return gcsSource_ != null; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource() { + return gcsSource_ == null ? com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + return getGcsSource(); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsSource_ != null) { + output.writeMessage(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.InputConfig other = (com.google.cloud.vision.v1p3beta1.InputConfig) obj; + + if (hasGcsSource() != other.hasGcsSource()) return false; + if (hasGcsSource()) { + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + } + if (!getMimeType() + .equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsSource()) { + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired input location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.InputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.InputConfig) + com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.InputConfig.class, com.google.cloud.vision.v1p3beta1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig build() { + com.google.cloud.vision.v1p3beta1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig buildPartial() { + com.google.cloud.vision.v1p3beta1.InputConfig result = new com.google.cloud.vision.v1p3beta1.InputConfig(this); + if (gcsSourceBuilder_ == null) { + result.gcsSource_ = gcsSource_; + } else { + result.gcsSource_ = gcsSourceBuilder_.build(); + } + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.InputConfig) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.InputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.InputConfig other) { + if (other == com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance()) return this; + if (other.hasGcsSource()) { + mergeGcsSource(other.getGcsSource()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + public boolean hasGcsSource() { + return gcsSourceBuilder_ != null || gcsSource_ != null; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + public com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + return gcsSource_ == null ? com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; + } else { + return gcsSourceBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1p3beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1p3beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + gcsSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1p3beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (gcsSource_ != null) { + gcsSource_ = + com.google.cloud.vision.v1p3beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); + } else { + gcsSource_ = value; + } + onChanged(); + } else { + gcsSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + onChanged(); + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p3beta1.GcsSource.Builder getGcsSourceBuilder() { + + onChanged(); + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (gcsSourceBuilder_ != null) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + return gcsSource_ == null ? + com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder>( + getGcsSource(), + getParentForChildren(), + isClean()); + gcsSource_ = null; + } + return gcsSourceBuilder_; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf" and "image/tiff"
+     * are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.InputConfig) + private static final com.google.cloud.vision.v1p3beta1.InputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.InputConfig(); + } + + public static com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..f7b7456d33f3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface InputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * The type of the file. Currently only "application/pdf" and "image/tiff"
+   * are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java new file mode 100644 index 000000000000..472166170ab1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Rectangle determined by min and max `LatLng` pairs.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LatLongRect} + */ +public final class LatLongRect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LatLongRect) + LatLongRectOrBuilder { +private static final long serialVersionUID = 0L; + // Use LatLongRect.newBuilder() to construct. + private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LatLongRect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LatLongRect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LatLongRect( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (minLatLng_ != null) { + subBuilder = minLatLng_.toBuilder(); + } + minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minLatLng_); + minLatLng_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.type.LatLng.Builder subBuilder = null; + if (maxLatLng_ != null) { + subBuilder = maxLatLng_.toBuilder(); + } + maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxLatLng_); + maxLatLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LatLongRect.class, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder.class); + } + + public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng minLatLng_; + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + @java.lang.Override + public boolean hasMinLatLng() { + return minLatLng_ != null; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMinLatLng() { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + return getMinLatLng(); + } + + public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; + private com.google.type.LatLng maxLatLng_; + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + @java.lang.Override + public boolean hasMaxLatLng() { + return maxLatLng_ != null; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMaxLatLng() { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + return getMaxLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minLatLng_ != null) { + output.writeMessage(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + output.writeMessage(2, getMaxLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LatLongRect)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.LatLongRect other = (com.google.cloud.vision.v1p3beta1.LatLongRect) obj; + + if (hasMinLatLng() != other.hasMinLatLng()) return false; + if (hasMinLatLng()) { + if (!getMinLatLng() + .equals(other.getMinLatLng())) return false; + } + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; + if (hasMaxLatLng()) { + if (!getMaxLatLng() + .equals(other.getMaxLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinLatLng()) { + hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMinLatLng().hashCode(); + } + if (hasMaxLatLng()) { + hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMaxLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LatLongRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rectangle determined by min and max `LatLng` pairs.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LatLongRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LatLongRect) + com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LatLongRect.class, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.LatLongRect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRect build() { + com.google.cloud.vision.v1p3beta1.LatLongRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRect buildPartial() { + com.google.cloud.vision.v1p3beta1.LatLongRect result = new com.google.cloud.vision.v1p3beta1.LatLongRect(this); + if (minLatLngBuilder_ == null) { + result.minLatLng_ = minLatLng_; + } else { + result.minLatLng_ = minLatLngBuilder_.build(); + } + if (maxLatLngBuilder_ == null) { + result.maxLatLng_ = maxLatLng_; + } else { + result.maxLatLng_ = maxLatLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.LatLongRect) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.LatLongRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LatLongRect other) { + if (other == com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance()) return this; + if (other.hasMinLatLng()) { + mergeMinLatLng(other.getMinLatLng()); + } + if (other.hasMaxLatLng()) { + mergeMaxLatLng(other.getMaxLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.LatLongRect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.LatLongRect) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng minLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + public boolean hasMinLatLng() { + return minLatLngBuilder_ != null || minLatLng_ != null; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + public com.google.type.LatLng getMinLatLng() { + if (minLatLngBuilder_ == null) { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } else { + return minLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minLatLng_ = value; + onChanged(); + } else { + minLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (minLatLngBuilder_ == null) { + minLatLng_ = builderForValue.build(); + onChanged(); + } else { + minLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder mergeMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (minLatLng_ != null) { + minLatLng_ = + com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); + } else { + minLatLng_ = value; + } + onChanged(); + } else { + minLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder clearMinLatLng() { + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + onChanged(); + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLng.Builder getMinLatLngBuilder() { + + onChanged(); + return getMinLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + if (minLatLngBuilder_ != null) { + return minLatLngBuilder_.getMessageOrBuilder(); + } else { + return minLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMinLatLngFieldBuilder() { + if (minLatLngBuilder_ == null) { + minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMinLatLng(), + getParentForChildren(), + isClean()); + minLatLng_ = null; + } + return minLatLngBuilder_; + } + + private com.google.type.LatLng maxLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + public boolean hasMaxLatLng() { + return maxLatLngBuilder_ != null || maxLatLng_ != null; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + public com.google.type.LatLng getMaxLatLng() { + if (maxLatLngBuilder_ == null) { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } else { + return maxLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxLatLng_ = value; + onChanged(); + } else { + maxLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = builderForValue.build(); + onChanged(); + } else { + maxLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder mergeMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (maxLatLng_ != null) { + maxLatLng_ = + com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); + } else { + maxLatLng_ = value; + } + onChanged(); + } else { + maxLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder clearMaxLatLng() { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + onChanged(); + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLng.Builder getMaxLatLngBuilder() { + + onChanged(); + return getMaxLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + if (maxLatLngBuilder_ != null) { + return maxLatLngBuilder_.getMessageOrBuilder(); + } else { + return maxLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMaxLatLngFieldBuilder() { + if (maxLatLngBuilder_ == null) { + maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMaxLatLng(), + getParentForChildren(), + isClean()); + maxLatLng_ = null; + } + return maxLatLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LatLongRect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LatLongRect) + private static final com.google.cloud.vision.v1p3beta1.LatLongRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LatLongRect(); + } + + public static com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatLongRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatLongRect(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java new file mode 100644 index 000000000000..e9f0fe1558ed --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface LatLongRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LatLongRect) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + boolean hasMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + com.google.type.LatLng getMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); + + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + boolean hasMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + com.google.type.LatLng getMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java new file mode 100644 index 000000000000..d3ec51d01d7c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A bucketized representation of likelihood, which is intended to give clients
+ * highly stable results across model upgrades.
+ * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * It is very unlikely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + *
+   * It is unlikely that the image belongs to the specified vertical.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * It is possible that the image belongs to the specified vertical.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + *
+   * It is likely that the image belongs to the specified vertical.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * It is very likely that the image belongs to the specified vertical.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Likelihood) +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java new file mode 100644 index 000000000000..6d934e0cfdb3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsRequest} + */ +public final class ListProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductSetsRequest) + ListProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsRequest.newBuilder() to construct. + private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductSetsRequest) + com.google.cloud.vision.v1p3beta1.ListProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest build() { + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest result = new com.google.cloud.vision.v1p3beta1.ListProductSetsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsRequest) + private static final com.google.cloud.vision.v1p3beta1.ListProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductSetsRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..cd3c24f417f6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java new file mode 100644 index 000000000000..0805ca2bf1fa --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsResponse} + */ +public final class ListProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductSetsResponse) + ListProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsResponse.newBuilder() to construct. + private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsResponse() { + productSets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productSets_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.Builder.class); + } + + public static final int PRODUCT_SETS_FIELD_NUMBER = 1; + private java.util.List productSets_; + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List getProductSetsList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List + getProductSetsOrBuilderList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public int getProductSetsCount() { + return productSets_.size(); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index) { + return productSets_.get(index); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + return productSets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < productSets_.size(); i++) { + output.writeMessage(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < productSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) obj; + + if (!getProductSetsList() + .equals(other.getProductSetsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductSetsCount() > 0) { + hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getProductSetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductSetsResponse) + com.google.cloud.vision.v1p3beta1.ListProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductSetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productSetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse build() { + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse result = new com.google.cloud.vision.v1p3beta1.ListProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (productSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productSets_ = productSets_; + } else { + result.productSets_ = productSetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductSetsResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance()) return this; + if (productSetsBuilder_ == null) { + if (!other.productSets_.isEmpty()) { + if (productSets_.isEmpty()) { + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductSetsIsMutable(); + productSets_.addAll(other.productSets_); + } + onChanged(); + } + } else { + if (!other.productSets_.isEmpty()) { + if (productSetsBuilder_.isEmpty()) { + productSetsBuilder_.dispose(); + productSetsBuilder_ = null; + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + productSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductSetsFieldBuilder() : null; + } else { + productSetsBuilder_.addAllMessages(other.productSets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List productSets_ = + java.util.Collections.emptyList(); + private void ensureProductSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(productSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetsBuilder_; + + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public java.util.List getProductSetsList() { + if (productSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productSets_); + } else { + return productSetsBuilder_.getMessageList(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public int getProductSetsCount() { + if (productSetsBuilder_ == null) { + return productSets_.size(); + } else { + return productSetsBuilder_.getCount(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); + } else { + return productSetsBuilder_.getMessage(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.set(index, value); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.set(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets(com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(value); + onChanged(); + } else { + productSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(index, value); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder addAllProductSets( + java.lang.Iterable values) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productSets_); + onChanged(); + } else { + productSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder clearProductSets() { + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productSetsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public Builder removeProductSets(int index) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.remove(index); + onChanged(); + } else { + productSetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); } else { + return productSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsOrBuilderList() { + if (productSetsBuilder_ != null) { + return productSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productSets_); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet.Builder addProductSetsBuilder() { + return getProductSetsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet.Builder addProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsBuilderList() { + return getProductSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> + getProductSetsFieldBuilder() { + if (productSetsBuilder_ == null) { + productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( + productSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productSets_ = null; + } + return productSetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsResponse) + private static final com.google.cloud.vision.v1p3beta1.ListProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductSetsResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..e82e82db1b76 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + int getProductSetsCount(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsOrBuilderList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java new file mode 100644 index 000000000000..84283be7a508 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} + */ +public final class ListProductsInProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) + ListProductsInProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetRequest.newBuilder() to construct. + private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest(this); + result.name_ = name_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..279289c11803 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductsInProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java new file mode 100644 index 000000000000..e72c1a92cf03 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} + */ +public final class ListProductsInProductSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) + ListProductsInProductSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetResponse.newBuilder() to construct. + private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse build() { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) + private static final com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java new file mode 100644 index 000000000000..74d59602c976 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductsInProductSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + com.google.cloud.vision.v1p3beta1.Product getProducts(int index); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java new file mode 100644 index 000000000000..8c5c19bb4e2e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsRequest} + */ +public final class ListProductsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsRequest) + ListProductsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsRequest.newBuilder() to construct. + private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsRequest) + com.google.cloud.vision.v1p3beta1.ListProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsRequest build() { + com.google.cloud.vision.v1p3beta1.ListProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductsRequest result = new com.google.cloud.vision.v1p3beta1.ListProductsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsRequest) + private static final com.google.cloud.vision.v1p3beta1.ListProductsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java new file mode 100644 index 000000000000..bd256296d909 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java new file mode 100644 index 000000000000..246d0991d026 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsResponse} + */ +public final class ListProductsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsResponse) + ListProductsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsResponse.newBuilder() to construct. + private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListProductsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsResponse) + com.google.cloud.vision.v1p3beta1.ListProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListProductsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsResponse build() { + com.google.cloud.vision.v1p3beta1.ListProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.ListProductsResponse result = new com.google.cloud.vision.v1p3beta1.ListProductsResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListProductsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p3beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsResponse) + private static final com.google.cloud.vision.v1p3beta1.ListProductsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java new file mode 100644 index 000000000000..f631a84f3601 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListProductsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + com.google.cloud.vision.v1p3beta1.Product getProducts(int index); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product products = 1; + */ + com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java new file mode 100644 index 000000000000..b9d9393754ce --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java @@ -0,0 +1,869 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} + */ +public final class ListReferenceImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) + ListReferenceImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesRequest.newBuilder() to construct. + private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest build() { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) + private static final com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java new file mode 100644 index 000000000000..4b55938d66eb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListReferenceImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java new file mode 100644 index 000000000000..1d504986df93 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java @@ -0,0 +1,1118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Response message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} + */ +public final class ListReferenceImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) + ListReferenceImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesResponse.newBuilder() to construct. + private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesResponse() { + referenceImages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + pageSize_ = 0; + + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse build() { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse buildPartial() { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + result.pageSize_ = pageSize_; + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse other) { + if (other == com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) + private static final com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse(); + } + + public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java new file mode 100644 index 000000000000..5347819265f8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ListReferenceImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java new file mode 100644 index 000000000000..3be306bf3665 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java @@ -0,0 +1,1259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Set of detected objects with bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} + */ +public final class LocalizedObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) + LocalizedObjectAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocalizedObjectAnnotation.newBuilder() to construct. + private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocalizedObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocalizedObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocalizedObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 42: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (boundingPoly_ != null) { + output.writeMessage(5, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected objects with bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation build() { + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) + private static final com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalizedObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalizedObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java new file mode 100644 index 000000000000..ea1bae037f7f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface LocalizedObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java new file mode 100644 index 000000000000..c96641fbcb24 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Detected entity location information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LocationInfo} + */ +public final class LocationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LocationInfo) + LocationInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LocationInfo.class, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder.class); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng latLng_; + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLng_ != null) { + output.writeMessage(1, getLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LocationInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.LocationInfo other = (com.google.cloud.vision.v1p3beta1.LocationInfo) obj; + + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng() + .equals(other.getLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LocationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected entity location information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.LocationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LocationInfo) + com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.LocationInfo.class, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.LocationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfo build() { + com.google.cloud.vision.v1p3beta1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfo buildPartial() { + com.google.cloud.vision.v1p3beta1.LocationInfo result = new com.google.cloud.vision.v1p3beta1.LocationInfo(this); + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.LocationInfo) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.LocationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LocationInfo other) { + if (other == com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()) return this; + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.LocationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.LocationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = + com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getLatLng(), + getParentForChildren(), + isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocationInfo) + private static final com.google.cloud.vision.v1p3beta1.LocationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LocationInfo(); + } + + public static com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..56b58f709470 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface LocationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java new file mode 100644 index 000000000000..889a41418e98 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java new file mode 100644 index 000000000000..8d6bb76b530a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java @@ -0,0 +1,597 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.NormalizedVertex} + */ +public final class NormalizedVertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.NormalizedVertex) + NormalizedVertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NormalizedVertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NormalizedVertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.NormalizedVertex.class, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.NormalizedVertex other = (com.google.cloud.vision.v1p3beta1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.NormalizedVertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.NormalizedVertex) + com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.NormalizedVertex.class, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertex build() { + com.google.cloud.vision.v1p3beta1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertex buildPartial() { + com.google.cloud.vision.v1p3beta1.NormalizedVertex result = new com.google.cloud.vision.v1p3beta1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.NormalizedVertex) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.NormalizedVertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.NormalizedVertex other) { + if (other == com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.NormalizedVertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.NormalizedVertex) + private static final com.google.cloud.vision.v1p3beta1.NormalizedVertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.NormalizedVertex(); + } + + public static com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..822dd4c71ca9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface NormalizedVertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java new file mode 100644 index 000000000000..85f49d72122e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java @@ -0,0 +1,1204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Contains metadata for the BatchAnnotateImages operation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.OperationMetadata.class, com.google.cloud.vision.v1p3beta1.OperationMetadata.Builder.class); + } + + /** + *
+   * Batch operation states.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.OperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATED; + case 2: return RUNNING; + case 3: return DONE; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.OperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.OperationMetadata.State result = com.google.cloud.vision.v1p3beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p3beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1p3beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1p3beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.OperationMetadata other = (com.google.cloud.vision.v1p3beta1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Contains metadata for the BatchAnnotateImages operation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.OperationMetadata) + com.google.cloud.vision.v1p3beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.OperationMetadata.class, com.google.cloud.vision.v1p3beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OperationMetadata build() { + com.google.cloud.vision.v1p3beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OperationMetadata buildPartial() { + com.google.cloud.vision.v1p3beta1.OperationMetadata result = new com.google.cloud.vision.v1p3beta1.OperationMetadata(this); + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.OperationMetadata other) { + if (other == com.google.cloud.vision.v1p3beta1.OperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.OperationMetadata.State result = com.google.cloud.vision.v1p3beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p3beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1p3beta1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OperationMetadata) + private static final com.google.cloud.vision.v1p3beta1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.OperationMetadata(); + } + + public static com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7e482eb978a2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java new file mode 100644 index 000000000000..a56e3cbd7de6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java @@ -0,0 +1,777 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * The desired output location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.GcsDestination.Builder subBuilder = null; + if (gcsDestination_ != null) { + subBuilder = gcsDestination_.toBuilder(); + } + gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p3beta1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsDestination_); + gcsDestination_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + batchSize_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.OutputConfig.class, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder.class); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_; + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return gcsDestination_ != null; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination() { + return gcsDestination_ == null ? com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + return getGcsDestination(); + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_; + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsDestination_ != null) { + output.writeMessage(1, getGcsDestination()); + } + if (batchSize_ != 0) { + output.writeInt32(2, batchSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsDestination_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsDestination()); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, batchSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.OutputConfig other = (com.google.cloud.vision.v1p3beta1.OutputConfig) obj; + + if (hasGcsDestination() != other.hasGcsDestination()) return false; + if (hasGcsDestination()) { + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + } + if (getBatchSize() + != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsDestination()) { + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + } + hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired output location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.OutputConfig) + com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.OutputConfig.class, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + batchSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig build() { + com.google.cloud.vision.v1p3beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig buildPartial() { + com.google.cloud.vision.v1p3beta1.OutputConfig result = new com.google.cloud.vision.v1p3beta1.OutputConfig(this); + if (gcsDestinationBuilder_ == null) { + result.gcsDestination_ = gcsDestination_; + } else { + result.gcsDestination_ = gcsDestinationBuilder_.build(); + } + result.batchSize_ = batchSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.OutputConfig) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.OutputConfig other) { + if (other == com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance()) return this; + if (other.hasGcsDestination()) { + mergeGcsDestination(other.getGcsDestination()); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return gcsDestinationBuilder_ != null || gcsDestination_ != null; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + public com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + return gcsDestination_ == null ? com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } else { + return gcsDestinationBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.vision.v1p3beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsDestination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.vision.v1p3beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.vision.v1p3beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (gcsDestination_ != null) { + gcsDestination_ = + com.google.cloud.vision.v1p3beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); + } else { + gcsDestination_ = value; + } + onChanged(); + } else { + gcsDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + onChanged(); + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p3beta1.GcsDestination.Builder getGcsDestinationBuilder() { + + onChanged(); + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (gcsDestinationBuilder_ != null) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + return gcsDestination_ == null ? + com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder>( + getGcsDestination(), + getParentForChildren(), + isClean()); + gcsDestination_ = null; + } + return gcsDestinationBuilder_; + } + + private int batchSize_ ; + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + + batchSize_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OutputConfig) + private static final com.google.cloud.vision.v1p3beta1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.OutputConfig(); + } + + public static com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..413dd4f7b100 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + int getBatchSize(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java new file mode 100644 index 000000000000..5f3c9a4443cd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java @@ -0,0 +1,1358 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Detected page from OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Page} + */ +public final class Page extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Page) + PageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Page() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Page(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blocks_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Block.parser(), extensionRegistry)); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Page.class, com.google.cloud.vision.v1p3beta1.Page.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int BLOCKS_FIELD_NUMBER = 4; + private java.util.List blocks_; + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Page)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Page other = (com.google.cloud.vision.v1p3beta1.Page) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getBlocksList() + .equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Page prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected page from OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Page} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Page) + com.google.cloud.vision.v1p3beta1.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Page.class, com.google.cloud.vision.v1p3beta1.Page.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + width_ = 0; + + height_ = 0; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Page getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Page build() { + com.google.cloud.vision.v1p3beta1.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Page buildPartial() { + com.google.cloud.vision.v1p3beta1.Page result = new com.google.cloud.vision.v1p3beta1.Page(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + result.width_ = width_; + result.height_ = height_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Page) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Page other) { + if (other == com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Page) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private int width_ ; + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder> blocksBuilder_; + + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p3beta1.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p3beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder addBlocks(com.google.cloud.vision.v1p3beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p3beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder addBlocks( + com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p3beta1.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p3beta1.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p3beta1.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Page) + private static final com.google.cloud.vision.v1p3beta1.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Page(); + } + + public static com.google.cloud.vision.v1p3beta1.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Page(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java new file mode 100644 index 000000000000..56bbe5781c6b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Page) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + int getHeight(); + + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + java.util.List + getBlocksList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p3beta1.Block getBlocks(int index); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + int getBlocksCount(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java new file mode 100644 index 000000000000..3442ff17f224 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Structural unit of text representing a number of words in certain order.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Paragraph} + */ +public final class Paragraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Paragraph) + ParagraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Paragraph() { + words_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Paragraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Paragraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Word.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Paragraph.class, com.google.cloud.vision.v1p3beta1.Paragraph.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int WORDS_FIELD_NUMBER = 3; + private java.util.List words_; + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List getWordsList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List + getWordsOrBuilderList() { + return words_; + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + @java.lang.Override + public int getWordsCount() { + return words_.size(); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Word getWords(int index) { + return words_.get(index); + } + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( + int index) { + return words_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + output.writeMessage(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Paragraph other = (com.google.cloud.vision.v1p3beta1.Paragraph) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Paragraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structural unit of text representing a number of words in certain order.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Paragraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Paragraph) + com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Paragraph.class, com.google.cloud.vision.v1p3beta1.Paragraph.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Paragraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + wordsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Paragraph build() { + com.google.cloud.vision.v1p3beta1.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Paragraph buildPartial() { + com.google.cloud.vision.v1p3beta1.Paragraph result = new com.google.cloud.vision.v1p3beta1.Paragraph(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (wordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + } else { + result.words_ = wordsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Paragraph) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Paragraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Paragraph other) { + if (other == com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (wordsBuilder_ == null) { + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + } else { + if (!other.words_.isEmpty()) { + if (wordsBuilder_.isEmpty()) { + wordsBuilder_.dispose(); + wordsBuilder_ = null; + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + wordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWordsFieldBuilder() : null; + } else { + wordsBuilder_.addAllMessages(other.words_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Paragraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Paragraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List words_ = + java.util.Collections.emptyList(); + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(words_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder> wordsBuilder_; + + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public java.util.List getWordsList() { + if (wordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(words_); + } else { + return wordsBuilder_.getMessageList(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public int getWordsCount() { + if (wordsBuilder_ == null) { + return words_.size(); + } else { + return wordsBuilder_.getCount(); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p3beta1.Word getWords(int index) { + if (wordsBuilder_ == null) { + return words_.get(index); + } else { + return wordsBuilder_.getMessage(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p3beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + } else { + wordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.set(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder addWords(com.google.cloud.vision.v1p3beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + } else { + wordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p3beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(index, value); + onChanged(); + } else { + wordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder addWords( + com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder addAllWords( + java.lang.Iterable values) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + } else { + wordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder clearWords() { + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wordsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public Builder removeWords(int index) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.remove(index); + onChanged(); + } else { + wordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p3beta1.Word.Builder getWordsBuilder( + int index) { + return getWordsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( + int index) { + if (wordsBuilder_ == null) { + return words_.get(index); } else { + return wordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public java.util.List + getWordsOrBuilderList() { + if (wordsBuilder_ != null) { + return wordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(words_); + } + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p3beta1.Word.Builder addWordsBuilder() { + return getWordsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p3beta1.Word.Builder addWordsBuilder( + int index) { + return getWordsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + public java.util.List + getWordsBuilderList() { + return getWordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder> + getWordsFieldBuilder() { + if (wordsBuilder_ == null) { + wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder>( + words_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + words_ = null; + } + return wordsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Paragraph) + private static final com.google.cloud.vision.v1p3beta1.Paragraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Paragraph(); + } + + public static com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Paragraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java new file mode 100644 index 000000000000..1cfb7f3a0d09 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ParagraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Paragraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + java.util.List + getWordsList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + com.google.cloud.vision.v1p3beta1.Word getWords(int index); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + int getWordsCount(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + java.util.List + getWordsOrBuilderList(); + /** + *
+   * List of words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Word words = 3; + */ + com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java new file mode 100644 index 000000000000..896bf0e4f749 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A 3D position in the image, used primarily for Face detection landmarks.
+ * A valid Position must have both x and y coordinates.
+ * The position coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Position} + */ +public final class Position extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Position) + PositionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Position.newBuilder() to construct. + private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Position() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Position(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Position( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + case 29: { + + z_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Position.class, com.google.cloud.vision.v1p3beta1.Position.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_; + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Position)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Position other = (com.google.cloud.vision.v1p3beta1.Position) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Position parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Position parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 3D position in the image, used primarily for Face detection landmarks.
+   * A valid Position must have both x and y coordinates.
+   * The position coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Position} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Position) + com.google.cloud.vision.v1p3beta1.PositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Position.class, com.google.cloud.vision.v1p3beta1.Position.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Position.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + z_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Position getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Position build() { + com.google.cloud.vision.v1p3beta1.Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Position buildPartial() { + com.google.cloud.vision.v1p3beta1.Position result = new com.google.cloud.vision.v1p3beta1.Position(this); + result.x_ = x_; + result.y_ = y_; + result.z_ = z_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Position) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Position)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Position other) { + if (other == com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Position parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + onChanged(); + return this; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + + z_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Position) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Position) + private static final com.google.cloud.vision.v1p3beta1.Position DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Position(); + } + + public static com.google.cloud.vision.v1p3beta1.Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Position parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Position(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java new file mode 100644 index 000000000000..f539aa66e850 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface PositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Position) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); + + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + float getZ(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java new file mode 100644 index 000000000000..34bb9a42e219 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java @@ -0,0 +1,2548 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A Product contains ReferenceImages.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Product} + */ +public final class Product extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Product) + ProductOrBuilder { +private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Product() { + name_ = ""; + displayName_ = ""; + description_ = ""; + productCategory_ = ""; + productLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Product( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + productCategory_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productLabels_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Product.KeyValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Product.class, com.google.cloud.vision.v1p3beta1.Product.Builder.class); + } + + public interface KeyValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Product.KeyValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + *
+   * A product label represented as a key-value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Product.KeyValue} + */ + public static final class KeyValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Product.KeyValue) + KeyValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyValue.newBuilder() to construct. + private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KeyValue() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KeyValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KeyValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Product.KeyValue.class, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Product.KeyValue)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Product.KeyValue other = (com.google.cloud.vision.v1p3beta1.Product.KeyValue) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Product.KeyValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A product label represented as a key-value pair.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Product.KeyValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Product.KeyValue) + com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Product.KeyValue.class, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Product.KeyValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValue build() { + com.google.cloud.vision.v1p3beta1.Product.KeyValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValue buildPartial() { + com.google.cloud.vision.v1p3beta1.Product.KeyValue result = new com.google.cloud.vision.v1p3beta1.Product.KeyValue(this); + result.key_ = key_; + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Product.KeyValue) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Product.KeyValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Product.KeyValue other) { + if (other == com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Product.KeyValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Product.KeyValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Product.KeyValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product.KeyValue) + private static final com.google.cloud.vision.v1p3beta1.Product.KeyValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Product.KeyValue(); + } + + public static com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; + private volatile java.lang.Object productCategory_; + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+   * "homegoods", "apparel", and "toys" are still supported, but these should
+   * not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + @java.lang.Override + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } + } + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+   * "homegoods", "apparel", and "toys" are still supported, but these should
+   * not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; + private java.util.List productLabels_; + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List getProductLabelsList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List + getProductLabelsOrBuilderList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public int getProductLabelsCount() { + return productLabels_.size(); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index) { + return productLabels_.get(index); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + return productLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + output.writeMessage(5, productLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, productLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Product)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Product other = (com.google.cloud.vision.v1p3beta1.Product) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getProductCategory() + .equals(other.getProductCategory())) return false; + if (!getProductLabelsList() + .equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getProductCategory().hashCode(); + if (getProductLabelsCount() > 0) { + hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getProductLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Product contains ReferenceImages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Product} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Product) + com.google.cloud.vision.v1p3beta1.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Product.class, com.google.cloud.vision.v1p3beta1.Product.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Product.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + productCategory_ = ""; + + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product build() { + com.google.cloud.vision.v1p3beta1.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product buildPartial() { + com.google.cloud.vision.v1p3beta1.Product result = new com.google.cloud.vision.v1p3beta1.Product(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.productCategory_ = productCategory_; + if (productLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productLabels_ = productLabels_; + } else { + result.productLabels_ = productLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Product) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Product)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Product other) { + if (other == com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getProductCategory().isEmpty()) { + productCategory_ = other.productCategory_; + onChanged(); + } + if (productLabelsBuilder_ == null) { + if (!other.productLabels_.isEmpty()) { + if (productLabels_.isEmpty()) { + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductLabelsIsMutable(); + productLabels_.addAll(other.productLabels_); + } + onChanged(); + } + } else { + if (!other.productLabels_.isEmpty()) { + if (productLabelsBuilder_.isEmpty()) { + productLabelsBuilder_.dispose(); + productLabelsBuilder_ = null; + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + productLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductLabelsFieldBuilder() : null; + } else { + productLabelsBuilder_.addAllMessages(other.productLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Product parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Product) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object productCategory_ = ""; + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+     * "homegoods", "apparel", and "toys" are still supported, but these should
+     * not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+     * "homegoods", "apparel", and "toys" are still supported, but these should
+     * not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+     * "homegoods", "apparel", and "toys" are still supported, but these should
+     * not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productCategory_ = value; + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+     * "homegoods", "apparel", and "toys" are still supported, but these should
+     * not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearProductCategory() { + + productCategory_ = getDefaultInstance().getProductCategory(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image. This should
+     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+     * "homegoods", "apparel", and "toys" are still supported, but these should
+     * not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productCategory_ = value; + onChanged(); + return this; + } + + private java.util.List productLabels_ = + java.util.Collections.emptyList(); + private void ensureProductLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(productLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder> productLabelsBuilder_; + + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List getProductLabelsList() { + if (productLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productLabels_); + } else { + return productLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public int getProductLabelsCount() { + if (productLabelsBuilder_ == null) { + return productLabels_.size(); + } else { + return productLabelsBuilder_.getCount(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); + } else { + return productLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.set(index, value); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels(com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(index, value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder addAllProductLabels( + java.lang.Iterable values) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productLabels_); + onChanged(); + } else { + productLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder clearProductLabels() { + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public Builder removeProductLabels(int index) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.remove(index); + onChanged(); + } else { + productLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder getProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); } else { + return productLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsOrBuilderList() { + if (productLabelsBuilder_ != null) { + return productLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productLabels_); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabelsBuilder() { + return getProductLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 100 product_labels.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsBuilderList() { + return getProductLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder> + getProductLabelsFieldBuilder() { + if (productLabelsBuilder_ == null) { + productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder>( + productLabels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productLabels_ = null; + } + return productLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Product) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product) + private static final com.google.cloud.vision.v1p3beta1.Product DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Product(); + } + + public static com.google.cloud.vision.v1p3beta1.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Product(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java new file mode 100644 index 000000000000..430d421eda42 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + + @Deprecated + protected ProductName() { + project = null; + location = null; + product = null; + } + + private ProductName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductName of(String project, String location, String product) { + return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); + } + + public static String format(String project, String location, String product) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .build() + .toString(); + } + + public static ProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT.validatedMatch( + formattedString, "ProductName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT.instantiate( + "project", project, "location", location, "product", product); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductName that = ((ProductName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + return h; + } + + /** Builder for projects/{project}/locations/{location}/products/{product}. */ + public static class Builder { + private String project; + private String location; + private String product; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + private Builder(ProductName productName) { + this.project = productName.project; + this.location = productName.location; + this.product = productName.product; + } + + public ProductName build() { + return new ProductName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java new file mode 100644 index 000000000000..6bd8499fb0f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java @@ -0,0 +1,179 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ProductOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Product) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+   * "homegoods", "apparel", and "toys" are still supported, but these should
+   * not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + java.lang.String getProductCategory(); + /** + *
+   * Immutable. The category for the product identified by the reference image. This should
+   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
+   * "homegoods", "apparel", and "toys" are still supported, but these should
+   * not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + com.google.protobuf.ByteString + getProductCategoryBytes(); + + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + int getProductLabelsCount(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsOrBuilderList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 100 product_labels.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java new file mode 100644 index 000000000000..831ade070cab --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java @@ -0,0 +1,1390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Parameters for a product search request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchParams} + */ +public final class ProductSearchParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchParams) + ProductSearchParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchParams.newBuilder() to construct. + private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchParams() { + productSet_ = ""; + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + productSet_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productCategories_.add(s); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 74: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchParams.class, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 9; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 6; + private volatile java.lang.Object productSet_; + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + @java.lang.Override + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } + } + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList productCategories_; + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_; + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + + public static final int FILTER_FIELD_NUMBER = 8; + private volatile java.lang.Object filter_; + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); + } + for (int i = 0; i < productCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); + } + if (boundingPoly_ != null) { + output.writeMessage(9, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); + } + { + int dataSize = 0; + for (int i = 0; i < productCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getProductCategoriesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSearchParams other = (com.google.cloud.vision.v1p3beta1.ProductSearchParams) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getProductSet() + .equals(other.getProductSet())) return false; + if (!getProductCategoriesList() + .equals(other.getProductCategoriesList())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + if (getProductCategoriesCount() > 0) { + hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getProductCategoriesList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchParams) + com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchParams.class, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + productSet_ = ""; + + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParams build() { + com.google.cloud.vision.v1p3beta1.ProductSearchParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParams buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSearchParams result = new com.google.cloud.vision.v1p3beta1.ProductSearchParams(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.productSet_ = productSet_; + if (((bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productCategories_ = productCategories_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchParams) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchParams other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (!other.getProductSet().isEmpty()) { + productSet_ = other.productSet_; + onChanged(); + } + if (!other.productCategories_.isEmpty()) { + if (productCategories_.isEmpty()) { + productCategories_ = other.productCategories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductCategoriesIsMutable(); + productCategories_.addAll(other.productCategories_); + } + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSearchParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.lang.Object productSet_ = ""; + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSet_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProductSet() { + + productSet_ = getDefaultInstance().getProductSet(); + onChanged(); + return this; + } + /** + *
+     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The bytes for productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSet_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProductCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_.getUnmodifiableView(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index to set the value at. + * @param value The productCategories to set. + * @return This builder for chaining. + */ + public Builder setProductCategories( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategories( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param values The productCategories to add. + * @return This builder for chaining. + */ + public Builder addAllProductCategories( + java.lang.Iterable values) { + ensureProductCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productCategories_); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return This builder for chaining. + */ + public Builder clearProductCategories() { + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The bytes of the productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategoriesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchParams) + private static final com.google.cloud.vision.v1p3beta1.ProductSearchParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchParams(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java new file mode 100644 index 000000000000..33e89992cb8a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ProductSearchParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + java.lang.String getProductSet(); + /** + *
+   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + com.google.protobuf.ByteString + getProductSetBytes(); + + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + java.util.List + getProductCategoriesList(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + int getProductCategoriesCount(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + java.lang.String getProductCategories(int index); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + com.google.protobuf.ByteString + getProductCategoriesBytes(int index); + + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java new file mode 100644 index 000000000000..741f1f89148f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class ProductSearchProto { + private ProductSearchProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/vision/v1p3beta1/product_" + + "search.proto\022\035google.cloud.vision.v1p3be" + + "ta1\032\031google/api/resource.proto\032,google/c" + + "loud/vision/v1p3beta1/geometry.proto\032:go" + + "ogle/cloud/vision/v1p3beta1/product_sear" + + "ch_service.proto\032\037google/protobuf/timest" + + "amp.proto\"\301\001\n\023ProductSearchParams\022B\n\rbou" + + "nding_poly\030\t \001(\0132+.google.cloud.vision.v" + + "1p3beta1.BoundingPoly\022:\n\013product_set\030\006 \001" + + "(\tB%\372A\"\n vision.googleapis.com/ProductSe" + + "t\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006filter\030" + + "\010 \001(\t\"\262\005\n\024ProductSearchResults\022.\n\nindex_" + + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022K" + + "\n\007results\030\005 \003(\0132:.google.cloud.vision.v1" + + "p3beta1.ProductSearchResults.Result\022b\n\027p" + + "roduct_grouped_results\030\006 \003(\0132A.google.cl" + + "oud.vision.v1p3beta1.ProductSearchResult" + + "s.GroupedResult\032_\n\006Result\0227\n\007product\030\001 \001" + + "(\0132&.google.cloud.vision.v1p3beta1.Produ" + + "ct\022\r\n\005score\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020Obje" + + "ctAnnotation\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_co" + + "de\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002" + + "\n\rGroupedResult\022B\n\rbounding_poly\030\001 \001(\0132+" + + ".google.cloud.vision.v1p3beta1.BoundingP" + + "oly\022K\n\007results\030\002 \003(\0132:.google.cloud.visi" + + "on.v1p3beta1.ProductSearchResults.Result" + + "\022`\n\022object_annotations\030\003 \003(\0132D.google.cl" + + "oud.vision.v1p3beta1.ProductSearchResult" + + "s.ObjectAnnotationB\210\001\n!com.google.cloud." + + "vision.v1p3beta1B\022ProductSearchProtoP\001ZC" + + "google.golang.org/genproto/googleapis/cl" + + "oud/vision/v1p3beta1;vision\370\001\001\242\002\004GCVNb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor, + new java.lang.String[] { "BoundingPoly", "ProductSet", "ProductCategories", "Filter", }); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor, + new java.lang.String[] { "IndexTime", "Results", "ProductGroupedResults", }); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor = + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor, + new java.lang.String[] { "Product", "Score", "Image", }); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor = + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor, + new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", }); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor = + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor, + new java.lang.String[] { "BoundingPoly", "Results", "ObjectAnnotations", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java new file mode 100644 index 000000000000..052e0b19812f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java @@ -0,0 +1,5384 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Results for a product search request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults} + */ +public final class ProductSearchResults extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults) + ProductSearchResultsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchResults.newBuilder() to construct. + private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchResults() { + results_ = java.util.Collections.emptyList(); + productGroupedResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchResults(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + productGroupedResults_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder.class); + } + + public interface ResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return The product. + */ + com.google.cloud.vision.v1p3beta1.Product getProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + java.lang.String getImage(); + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + com.google.protobuf.ByteString + getImageBytes(); + } + /** + *
+   * Information about a product.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.Result} + */ + public static final class Result extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Result() { + image_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.Product product_; + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object image_; + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + @java.lang.Override + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getImage() + .equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about a product.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.Result} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + score_ = 0F; + + image_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result build() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.score_ = score_; + result.image_ = image_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + * @return The product. + */ + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public Builder setProduct( + com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private float score_ ; + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object image_ = ""; + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The image. + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The bytes for image. + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The image to set. + * @return This builder for chaining. + */ + public Builder setImage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return This builder for chaining. + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The bytes for image to set. + * @return This builder for chaining. + */ + public Builder setImageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) + private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Prediction for what the object in the bounding box is.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} + */ + public static final class ObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) + ObjectAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectAnnotation.newBuilder() to construct. + private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Prediction for what the object in the bounding box is.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation build() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) + private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupedResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + int getResultsCount(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + int getObjectAnnotationsCount(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsOrBuilderList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index); + } + /** + *
+   * Information about the products similar to a single product in a query
+   * image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} + */ + public static final class GroupedResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) + GroupedResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupedResult.newBuilder() to construct. + private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupedResult() { + results_ = java.util.Collections.emptyList(); + objectAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GroupedResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupedResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + objectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int RESULTS_FIELD_NUMBER = 2; + private java.util.List results_; + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List objectAnnotations_; + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List getObjectAnnotationsList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List + getObjectAnnotationsOrBuilderList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public int getObjectAnnotationsCount() { + return objectAnnotations_.size(); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + return objectAnnotations_.get(index); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + return objectAnnotations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + output.writeMessage(3, objectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, objectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getObjectAnnotationsList() + .equals(other.getObjectAnnotationsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getObjectAnnotationsCount() > 0) { + hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectAnnotationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about the products similar to a single product in a query
+     * image.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getObjectAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult build() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (objectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.objectAnnotations_ = objectAnnotations_; + } else { + result.objectAnnotations_ = objectAnnotationsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (objectAnnotationsBuilder_ == null) { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotations_.isEmpty()) { + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.addAll(other.objectAnnotations_); + } + onChanged(); + } + } else { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotationsBuilder_.isEmpty()) { + objectAnnotationsBuilder_.dispose(); + objectAnnotationsBuilder_ = null; + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + objectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getObjectAnnotationsFieldBuilder() : null; + } else { + objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List objectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; + + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List getObjectAnnotationsList() { + if (objectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } else { + return objectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public int getObjectAnnotationsCount() { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.size(); + } else { + return objectAnnotationsBuilder_.getCount(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addAllObjectAnnotations( + java.lang.Iterable values) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectAnnotations_); + onChanged(); + } else { + objectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder clearObjectAnnotations() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder removeObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.remove(index); + onChanged(); + } else { + objectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); } else { + return objectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsOrBuilderList() { + if (objectAnnotationsBuilder_ != null) { + return objectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { + return getObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsBuilderList() { + return getObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder> + getObjectAnnotationsFieldBuilder() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder>( + objectAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + objectAnnotations_ = null; + } + return objectAnnotationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) + private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupedResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupedResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int INDEX_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int RESULTS_FIELD_NUMBER = 5; + private java.util.List results_; + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; + private java.util.List productGroupedResults_; + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List getProductGroupedResultsList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List + getProductGroupedResultsOrBuilderList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public int getProductGroupedResultsCount() { + return productGroupedResults_.size(); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + return productGroupedResults_.get(index); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + return productGroupedResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (indexTime_ != null) { + output.writeMessage(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + output.writeMessage(6, productGroupedResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, productGroupedResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSearchResults other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults) obj; + + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getProductGroupedResultsList() + .equals(other.getProductGroupedResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getProductGroupedResultsCount() > 0) { + hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductGroupedResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults) + com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getProductGroupedResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults build() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSearchResults result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults(this); + int from_bitField0_ = bitField0_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (productGroupedResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.productGroupedResults_ = productGroupedResults_; + } else { + result.productGroupedResults_ = productGroupedResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance()) return this; + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (productGroupedResultsBuilder_ == null) { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResults_.isEmpty()) { + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.addAll(other.productGroupedResults_); + } + onChanged(); + } + } else { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResultsBuilder_.isEmpty()) { + productGroupedResultsBuilder_.dispose(); + productGroupedResultsBuilder_ = null; + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + productGroupedResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductGroupedResultsFieldBuilder() : null; + } else { + productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSearchResults parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List productGroupedResults_ = + java.util.Collections.emptyList(); + private void ensureProductGroupedResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; + + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List getProductGroupedResultsList() { + if (productGroupedResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } else { + return productGroupedResultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public int getProductGroupedResultsCount() { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.size(); + } else { + return productGroupedResultsBuilder_.getCount(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); + } else { + return productGroupedResultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addAllProductGroupedResults( + java.lang.Iterable values) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productGroupedResults_); + onChanged(); + } else { + productGroupedResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder clearProductGroupedResults() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder removeProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.remove(index); + onChanged(); + } else { + productGroupedResultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); } else { + return productGroupedResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsOrBuilderList() { + if (productGroupedResultsBuilder_ != null) { + return productGroupedResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { + return getProductGroupedResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsBuilderList() { + return getProductGroupedResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder> + getProductGroupedResultsFieldBuilder() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder>( + productGroupedResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + productGroupedResults_ = null; + } + return productGroupedResultsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults) + private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchResults(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java new file mode 100644 index 000000000000..257811bbb176 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ProductSearchResultsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + int getResultsCount(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + int getProductGroupedResultsCount(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsOrBuilderList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java new file mode 100644 index 000000000000..4d599dfee7a1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java @@ -0,0 +1,614 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class ProductSearchServiceProto { + private ProductSearchServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n:google/cloud/vision/v1p3beta1/product_" + + "search_service.proto\022\035google.cloud.visio" + + "n.v1p3beta1\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032,google/cloud/vision/v1p3beta1/ge" + + "ometry.proto\032#google/longrunning/operati" + + "ons.proto\032\033google/protobuf/empty.proto\032 " + + "google/protobuf/field_mask.proto\032\037google" + + "/protobuf/timestamp.proto\032\027google/rpc/st" + + "atus.proto\"\262\002\n\007Product\022\014\n\004name\030\001 \001(\t\022\024\n\014" + + "display_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022" + + "\035\n\020product_category\030\004 \001(\tB\003\340A\005\022G\n\016produc" + + "t_labels\030\005 \003(\0132/.google.cloud.vision.v1p" + + "3beta1.Product.KeyValue\032&\n\010KeyValue\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[\n\035vision.goo" + + "gleapis.com/Product\022:projects/{project}/" + + "locations/{location}/products/{product}\"" + + "\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t\022\024\n\014display_" + + "name\030\002 \001(\t\0223\n\nindex_time\030\003 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022,\n\013index_error\030\004" + + " \001(\0132\022.google.rpc.StatusB\003\340A\003:h\352Ae\n visi" + + "on.googleapis.com/ProductSet\022Aprojects/{" + + "project}/locations/{location}/productSet" + + "s/{product_set}\"\205\002\n\016ReferenceImage\022\014\n\004na" + + "me\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022H\n\016bounding_p" + + "olys\030\003 \003(\0132+.google.cloud.vision.v1p3bet" + + "a1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision.goog" + + "leapis.com/ReferenceImage\022\\projects/{pro" + + "ject}/locations/{location}/products/{pro" + + "duct}/referenceImages/{reference_image}\"" + + "\243\001\n\024CreateProductRequest\0229\n\006parent\030\001 \001(\t" + + "B)\340A\002\372A#\n!locations.googleapis.com/Locat" + + "ion\022<\n\007product\030\002 \001(\0132&.google.cloud.visi" + + "on.v1p3beta1.ProductB\003\340A\002\022\022\n\nproduct_id\030" + + "\003 \001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + + "ocation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"i\n\024ListProductsResponse\0228\n\010produc" + + "ts\030\001 \003(\0132&.google.cloud.vision.v1p3beta1" + + ".Product\022\027\n\017next_page_token\030\002 \001(\t\"H\n\021Get" + + "ProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vi" + + "sion.googleapis.com/Product\"\205\001\n\024UpdatePr" + + "oductRequest\022<\n\007product\030\001 \001(\0132&.google.c" + + "loud.vision.v1p3beta1.ProductB\003\340A\002\022/\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "ask\"K\n\024DeleteProductRequest\0223\n\004name\030\001 \001(" + + "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + + "\"\261\001\n\027CreateProductSetRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + + "ocation\022C\n\013product_set\030\002 \001(\0132).google.cl" + + "oud.vision.v1p3beta1.ProductSetB\003\340A\002\022\026\n\016" + + "product_set_id\030\003 \001(\t\"z\n\026ListProductSetsR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\021\n\tpage_size\030\002" + + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027ListProductS" + + "etsResponse\022?\n\014product_sets\030\001 \003(\0132).goog" + + "le.cloud.vision.v1p3beta1.ProductSet\022\027\n\017" + + "next_page_token\030\002 \001(\t\"N\n\024GetProductSetRe" + + "quest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.goog" + + "leapis.com/ProductSet\"\217\001\n\027UpdateProductS" + + "etRequest\022C\n\013product_set\030\001 \001(\0132).google." + + "cloud.vision.v1p3beta1.ProductSetB\003\340A\002\022/" + + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"Q\n\027DeleteProductSetRequest\0226\n\004na" + + "me\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.com/" + + "ProductSet\"\275\001\n\033CreateReferenceImageReque" + + "st\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googl" + + "eapis.com/Product\022K\n\017reference_image\030\002 \001" + + "(\0132-.google.cloud.vision.v1p3beta1.Refer" + + "enceImageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001" + + "(\t\"z\n\032ListReferenceImagesRequest\0225\n\006pare" + + "nt\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/" + + "Product\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"\222\001\n\033ListReferenceImagesResponse\022G" + + "\n\020reference_images\030\001 \003(\0132-.google.cloud." + + "vision.v1p3beta1.ReferenceImage\022\021\n\tpage_" + + "size\030\002 \001(\005\022\027\n\017next_page_token\030\003 \001(\t\"V\n\030G" + + "etReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340" + + "A\002\372A&\n$vision.googleapis.com/ReferenceIm" + + "age\"Y\n\033DeleteReferenceImageRequest\022:\n\004na" + + "me\030\001 \001(\tB,\340A\002\372A&\n$vision.googleapis.com/" + + "ReferenceImage\"\217\001\n\035AddProductToProductSe" + + "tRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.g" + + "oogleapis.com/ProductSet\0226\n\007product\030\002 \001(" + + "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + + "\"\224\001\n\"RemoveProductFromProductSetRequest\022" + + "6\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis" + + ".com/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037" + + "\n\035vision.googleapis.com/Product\"\200\001\n\037List" + + "ProductsInProductSetRequest\0226\n\004name\030\001 \001(" + + "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + + "Set\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"u\n ListProductsInProductSetResponse\0228" + + "\n\010products\030\001 \003(\0132&.google.cloud.vision.v" + + "1p3beta1.Product\022\027\n\017next_page_token\030\002 \001(" + + "\t\"2\n\032ImportProductSetsGcsSource\022\024\n\014csv_f" + + "ile_uri\030\001 \001(\t\"y\n\034ImportProductSetsInputC" + + "onfig\022O\n\ngcs_source\030\001 \001(\01329.google.cloud" + + ".vision.v1p3beta1.ImportProductSetsGcsSo" + + "urceH\000B\010\n\006source\"\255\001\n\030ImportProductSetsRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022V\n\014input_config" + + "\030\002 \001(\0132;.google.cloud.vision.v1p3beta1.I" + + "mportProductSetsInputConfigB\003\340A\002\"\212\001\n\031Imp" + + "ortProductSetsResponse\022G\n\020reference_imag" + + "es\030\001 \003(\0132-.google.cloud.vision.v1p3beta1" + + ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + + "le.rpc.Status\"\236\002\n\026BatchOperationMetadata" + + "\022J\n\005state\030\001 \001(\0162;.google.cloud.vision.v1" + + "p3beta1.BatchOperationMetadata.State\022/\n\013" + + "submit_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" + + "f.Timestamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\016\n\nPROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006F" + + "AILED\020\003\022\r\n\tCANCELLED\020\0042\353\036\n\rProductSearch" + + "\022\346\001\n\020CreateProductSet\0226.google.cloud.vis" + + "ion.v1p3beta1.CreateProductSetRequest\032)." + + "google.cloud.vision.v1p3beta1.ProductSet" + + "\"o\202\323\344\223\002E\"6/v1p3beta1/{parent=projects/*/" + + "locations/*}/productSets:\013product_set\332A!" + + "parent,product_set,product_set_id\022\311\001\n\017Li" + + "stProductSets\0225.google.cloud.vision.v1p3" + + "beta1.ListProductSetsRequest\0326.google.cl" + + "oud.vision.v1p3beta1.ListProductSetsResp" + + "onse\"G\202\323\344\223\0028\0226/v1p3beta1/{parent=project" + + "s/*/locations/*}/productSets\332A\006parent\022\266\001" + + "\n\rGetProductSet\0223.google.cloud.vision.v1" + + "p3beta1.GetProductSetRequest\032).google.cl" + + "oud.vision.v1p3beta1.ProductSet\"E\202\323\344\223\0028\022" + + "6/v1p3beta1/{name=projects/*/locations/*" + + "/productSets/*}\332A\004name\022\350\001\n\020UpdateProduct" + + "Set\0226.google.cloud.vision.v1p3beta1.Upda" + + "teProductSetRequest\032).google.cloud.visio" + + "n.v1p3beta1.ProductSet\"q\202\323\344\223\002Q2B/v1p3bet" + + "a1/{product_set.name=projects/*/location" + + "s/*/productSets/*}:\013product_set\332A\027produc" + + "t_set,update_mask\022\251\001\n\020DeleteProductSet\0226" + + ".google.cloud.vision.v1p3beta1.DeletePro" + + "ductSetRequest\032\026.google.protobuf.Empty\"E" + + "\202\323\344\223\0028*6/v1p3beta1/{name=projects/*/loca" + + "tions/*/productSets/*}\332A\004name\022\316\001\n\rCreate" + + "Product\0223.google.cloud.vision.v1p3beta1." + + "CreateProductRequest\032&.google.cloud.visi" + + "on.v1p3beta1.Product\"`\202\323\344\223\002>\"3/v1p3beta1" + + "/{parent=projects/*/locations/*}/product" + + "s:\007product\332A\031parent,product,product_id\022\275" + + "\001\n\014ListProducts\0222.google.cloud.vision.v1" + + "p3beta1.ListProductsRequest\0323.google.clo" + + "ud.vision.v1p3beta1.ListProductsResponse" + + "\"D\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/" + + "locations/*}/products\332A\006parent\022\252\001\n\nGetPr" + + "oduct\0220.google.cloud.vision.v1p3beta1.Ge" + + "tProductRequest\032&.google.cloud.vision.v1" + + "p3beta1.Product\"B\202\323\344\223\0025\0223/v1p3beta1/{nam" + + "e=projects/*/locations/*/products/*}\332A\004n" + + "ame\022\320\001\n\rUpdateProduct\0223.google.cloud.vis" + + "ion.v1p3beta1.UpdateProductRequest\032&.goo" + + "gle.cloud.vision.v1p3beta1.Product\"b\202\323\344\223" + + "\002F2;/v1p3beta1/{product.name=projects/*/" + + "locations/*/products/*}:\007product\332A\023produ" + + "ct,update_mask\022\240\001\n\rDeleteProduct\0223.googl" + + "e.cloud.vision.v1p3beta1.DeleteProductRe" + + "quest\032\026.google.protobuf.Empty\"B\202\323\344\223\0025*3/" + + "v1p3beta1/{name=projects/*/locations/*/p" + + "roducts/*}\332A\004name\022\216\002\n\024CreateReferenceIma" + + "ge\022:.google.cloud.vision.v1p3beta1.Creat" + + "eReferenceImageRequest\032-.google.cloud.vi" + + "sion.v1p3beta1.ReferenceImage\"\212\001\202\323\344\223\002X\"E" + + "/v1p3beta1/{parent=projects/*/locations/" + + "*/products/*}/referenceImages:\017reference" + + "_image\332A)parent,reference_image,referenc" + + "e_image_id\022\300\001\n\024DeleteReferenceImage\022:.go" + + "ogle.cloud.vision.v1p3beta1.DeleteRefere" + + "nceImageRequest\032\026.google.protobuf.Empty\"" + + "T\202\323\344\223\002G*E/v1p3beta1/{name=projects/*/loc" + + "ations/*/products/*/referenceImages/*}\332A" + + "\004name\022\344\001\n\023ListReferenceImages\0229.google.c" + + "loud.vision.v1p3beta1.ListReferenceImage" + + "sRequest\032:.google.cloud.vision.v1p3beta1" + + ".ListReferenceImagesResponse\"V\202\323\344\223\002G\022E/v" + + "1p3beta1/{parent=projects/*/locations/*/" + + "products/*}/referenceImages\332A\006parent\022\321\001\n" + + "\021GetReferenceImage\0227.google.cloud.vision" + + ".v1p3beta1.GetReferenceImageRequest\032-.go" + + "ogle.cloud.vision.v1p3beta1.ReferenceIma" + + "ge\"T\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/" + + "locations/*/products/*/referenceImages/*" + + "}\332A\004name\022\313\001\n\026AddProductToProductSet\022<.go" + + "ogle.cloud.vision.v1p3beta1.AddProductTo" + + "ProductSetRequest\032\026.google.protobuf.Empt" + + "y\"[\202\323\344\223\002F\"A/v1p3beta1/{name=projects/*/l" + + "ocations/*/productSets/*}:addProduct:\001*\332" + + "A\014name,product\022\330\001\n\033RemoveProductFromProd" + + "uctSet\022A.google.cloud.vision.v1p3beta1.R" + + "emoveProductFromProductSetRequest\032\026.goog" + + "le.protobuf.Empty\"^\202\323\344\223\002I\"D/v1p3beta1/{n" + + "ame=projects/*/locations/*/productSets/*" + + "}:removeProduct:\001*\332A\014name,product\022\353\001\n\030Li" + + "stProductsInProductSet\022>.google.cloud.vi" + + "sion.v1p3beta1.ListProductsInProductSetR" + + "equest\032?.google.cloud.vision.v1p3beta1.L" + + "istProductsInProductSetResponse\"N\202\323\344\223\002A\022" + + "?/v1p3beta1/{name=projects/*/locations/*" + + "/productSets/*}/products\332A\004name\022\202\002\n\021Impo" + + "rtProductSets\0227.google.cloud.vision.v1p3" + + "beta1.ImportProductSetsRequest\032\035.google." + + "longrunning.Operation\"\224\001\202\323\344\223\002B\"=/v1p3bet" + + "a1/{parent=projects/*/locations/*}/produ" + + "ctSets:import:\001*\332A\023parent,input_config\312A" + + "3\n\031ImportProductSetsResponse\022\026BatchOpera" + + "tionMetadata\032v\312A\025vision.googleapis.com\322A" + + "[https://www.googleapis.com/auth/cloud-p" + + "latform,https://www.googleapis.com/auth/" + + "cloud-visionB\210\001\n!com.google.cloud.vision" + + ".v1p3beta1B\031ProductSearchServiceProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/vision/v1p3beta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p3beta1_Product_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Product_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", "ProductCategory", "ProductLabels", }); + internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor = + internal_static_google_cloud_vision_v1p3beta1_Product_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor, + new java.lang.String[] { "Name", "DisplayName", "IndexTime", "IndexError", }); + internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor, + new java.lang.String[] { "Name", "Uri", "BoundingPolys", }); + internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor, + new java.lang.String[] { "Parent", "Product", "ProductId", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor, + new java.lang.String[] { "Products", "NextPageToken", }); + internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor, + new java.lang.String[] { "Product", "UpdateMask", }); + internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor, + new java.lang.String[] { "Parent", "ProductSet", "ProductSetId", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor, + new java.lang.String[] { "ProductSets", "NextPageToken", }); + internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor, + new java.lang.String[] { "ProductSet", "UpdateMask", }); + internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor, + new java.lang.String[] { "Parent", "ReferenceImage", "ReferenceImageId", }); + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor, + new java.lang.String[] { "ReferenceImages", "PageSize", "NextPageToken", }); + internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor, + new java.lang.String[] { "Name", "Product", }); + internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor, + new java.lang.String[] { "Name", "Product", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor, + new java.lang.String[] { "Name", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor, + new java.lang.String[] { "Products", "NextPageToken", }); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor, + new java.lang.String[] { "CsvFileUri", }); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor, + new java.lang.String[] { "GcsSource", "Source", }); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor, + new java.lang.String[] { "Parent", "InputConfig", }); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor, + new java.lang.String[] { "ReferenceImages", "Statuses", }); + internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor, + new java.lang.String[] { "State", "SubmitTime", "EndTime", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java new file mode 100644 index 000000000000..2817b79b511f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java @@ -0,0 +1,1325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A ProductSet contains Products. A ProductSet can contain a maximum of 1
+ * million reference images. If the limit is exceeded, periodic indexing will
+ * fail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSet} + */ +public final class ProductSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSet) + ProductSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSet.newBuilder() to construct. + private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSet() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (indexError_ != null) { + subBuilder = indexError_.toBuilder(); + } + indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexError_); + indexError_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSet.class, com.google.cloud.vision.v1p3beta1.ProductSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int INDEX_ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status indexError_; + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + @java.lang.Override + public boolean hasIndexError() { + return indexError_ != null; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + @java.lang.Override + public com.google.rpc.Status getIndexError() { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + return getIndexError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (indexTime_ != null) { + output.writeMessage(3, getIndexTime()); + } + if (indexError_ != null) { + output.writeMessage(4, getIndexError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIndexTime()); + } + if (indexError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIndexError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSet)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ProductSet other = (com.google.cloud.vision.v1p3beta1.ProductSet) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (hasIndexError() != other.hasIndexError()) return false; + if (hasIndexError()) { + if (!getIndexError() + .equals(other.getIndexError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (hasIndexError()) { + hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getIndexError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
+   * million reference images. If the limit is exceeded, periodic indexing will
+   * fail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSet) + com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ProductSet.class, com.google.cloud.vision.v1p3beta1.ProductSet.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (indexErrorBuilder_ == null) { + indexError_ = null; + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet build() { + com.google.cloud.vision.v1p3beta1.ProductSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet buildPartial() { + com.google.cloud.vision.v1p3beta1.ProductSet result = new com.google.cloud.vision.v1p3beta1.ProductSet(this); + result.name_ = name_; + result.displayName_ = displayName_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (indexErrorBuilder_ == null) { + result.indexError_ = indexError_; + } else { + result.indexError_ = indexErrorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSet) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSet other) { + if (other == com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (other.hasIndexError()) { + mergeIndexError(other.getIndexError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ProductSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this field is 0.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private com.google.rpc.Status indexError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + public boolean hasIndexError() { + return indexErrorBuilder_ != null || indexError_ != null; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + public com.google.rpc.Status getIndexError() { + if (indexErrorBuilder_ == null) { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } else { + return indexErrorBuilder_.getMessage(); + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexError_ = value; + onChanged(); + } else { + indexErrorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError( + com.google.rpc.Status.Builder builderForValue) { + if (indexErrorBuilder_ == null) { + indexError_ = builderForValue.build(); + onChanged(); + } else { + indexErrorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (indexError_ != null) { + indexError_ = + com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); + } else { + indexError_ = value; + } + onChanged(); + } else { + indexErrorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexError() { + if (indexErrorBuilder_ == null) { + indexError_ = null; + onChanged(); + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getIndexErrorBuilder() { + + onChanged(); + return getIndexErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + if (indexErrorBuilder_ != null) { + return indexErrorBuilder_.getMessageOrBuilder(); + } else { + return indexError_ == null ? + com.google.rpc.Status.getDefaultInstance() : indexError_; + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getIndexErrorFieldBuilder() { + if (indexErrorBuilder_ == null) { + indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getIndexError(), + getParentForChildren(), + isClean()); + indexError_ = null; + } + return indexErrorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSet) + private static final com.google.cloud.vision.v1p3beta1.ProductSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSet(); + } + + public static com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java new file mode 100644 index 000000000000..799c706cd59c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductSetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/productSets/{product_set}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String productSet; + + @Deprecated + protected ProductSetName() { + project = null; + location = null; + productSet = null; + } + + private ProductSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + productSet = Preconditions.checkNotNull(builder.getProductSet()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductSetName of(String project, String location, String productSet) { + return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); + } + + public static String format(String project, String location, String productSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProductSet(productSet) + .build() + .toString(); + } + + public static ProductSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_SET.validatedMatch( + formattedString, "ProductSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductSetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (productSet != null) { + fieldMapBuilder.put("product_set", productSet); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_SET.instantiate( + "project", project, "location", location, "product_set", productSet); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductSetName that = ((ProductSetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.productSet, that.productSet); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(productSet); + return h; + } + + /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ + public static class Builder { + private String project; + private String location; + private String productSet; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProductSet(String productSet) { + this.productSet = productSet; + return this; + } + + private Builder(ProductSetName productSetName) { + this.project = productSetName.project; + this.location = productSetName.location; + this.productSet = productSetName.productSet; + } + + public ProductSetName build() { + return new ProductSetName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java new file mode 100644 index 000000000000..1976bf7ae715 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ProductSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this field is 0.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + boolean hasIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + com.google.rpc.Status getIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java new file mode 100644 index 000000000000..1172fb053fe4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A `Property` consists of a user-supplied name/value pair.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Property} + */ +public final class Property extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Property) + PropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Property() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: { + + uint64Value_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Property.class, com.google.cloud.vision.v1p3beta1.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UINT64_VALUE_FIELD_NUMBER = 3; + private long uint64Value_; + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (uint64Value_ != 0L) { + output.writeUInt64(3, uint64Value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (uint64Value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, uint64Value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Property)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Property other = (com.google.cloud.vision.v1p3beta1.Property) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getUint64Value() + != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint64Value()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Property parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Property prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `Property` consists of a user-supplied name/value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Property} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Property) + com.google.cloud.vision.v1p3beta1.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Property.class, com.google.cloud.vision.v1p3beta1.Property.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + uint64Value_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Property getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Property build() { + com.google.cloud.vision.v1p3beta1.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Property buildPartial() { + com.google.cloud.vision.v1p3beta1.Property result = new com.google.cloud.vision.v1p3beta1.Property(this); + result.name_ = name_; + result.value_ = value_; + result.uint64Value_ = uint64Value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Property) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Property)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Property other) { + if (other == com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getUint64Value() != 0L) { + setUint64Value(other.getUint64Value()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private long uint64Value_ ; + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @param value The uint64Value to set. + * @return This builder for chaining. + */ + public Builder setUint64Value(long value) { + + uint64Value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return This builder for chaining. + */ + public Builder clearUint64Value() { + + uint64Value_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Property) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Property) + private static final com.google.cloud.vision.v1p3beta1.Property DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Property(); + } + + public static com.google.cloud.vision.v1p3beta1.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java new file mode 100644 index 000000000000..928b9afa858d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface PropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Property) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + long getUint64Value(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java new file mode 100644 index 000000000000..6f68eac1a471 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java @@ -0,0 +1,1372 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A `ReferenceImage` represents a product image and its associated metadata,
+ * such as bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ReferenceImage} + */ +public final class ReferenceImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ReferenceImage) + ReferenceImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReferenceImage.newBuilder() to construct. + private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReferenceImage() { + name_ = ""; + uri_ = ""; + boundingPolys_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReferenceImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReferenceImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boundingPolys_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ReferenceImage.class, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; + private java.util.List boundingPolys_; + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List getBoundingPolysList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List + getBoundingPolysOrBuilderList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public int getBoundingPolysCount() { + return boundingPolys_.size(); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index) { + return boundingPolys_.get(index); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + return boundingPolys_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + output.writeMessage(3, boundingPolys_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, boundingPolys_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ReferenceImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.ReferenceImage other = (com.google.cloud.vision.v1p3beta1.ReferenceImage) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (!getBoundingPolysList() + .equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getBoundingPolysCount() > 0) { + hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPolysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ReferenceImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `ReferenceImage` represents a product image and its associated metadata,
+   * such as bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.ReferenceImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ReferenceImage) + com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.ReferenceImage.class, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.ReferenceImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoundingPolysFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uri_ = ""; + + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage build() { + com.google.cloud.vision.v1p3beta1.ReferenceImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage buildPartial() { + com.google.cloud.vision.v1p3beta1.ReferenceImage result = new com.google.cloud.vision.v1p3beta1.ReferenceImage(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uri_ = uri_; + if (boundingPolysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boundingPolys_ = boundingPolys_; + } else { + result.boundingPolys_ = boundingPolysBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.ReferenceImage) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.ReferenceImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ReferenceImage other) { + if (other == com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (boundingPolysBuilder_ == null) { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolys_.isEmpty()) { + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundingPolysIsMutable(); + boundingPolys_.addAll(other.boundingPolys_); + } + onChanged(); + } + } else { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolysBuilder_.isEmpty()) { + boundingPolysBuilder_.dispose(); + boundingPolysBuilder_ = null; + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + boundingPolysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoundingPolysFieldBuilder() : null; + } else { + boundingPolysBuilder_.addAllMessages(other.boundingPolys_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.ReferenceImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.ReferenceImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.util.List boundingPolys_ = + java.util.Collections.emptyList(); + private void ensureBoundingPolysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(boundingPolys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolysBuilder_; + + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List getBoundingPolysList() { + if (boundingPolysBuilder_ == null) { + return java.util.Collections.unmodifiableList(boundingPolys_); + } else { + return boundingPolysBuilder_.getMessageList(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public int getBoundingPolysCount() { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.size(); + } else { + return boundingPolysBuilder_.getCount(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); + } else { + return boundingPolysBuilder_.getMessage(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, value); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addAllBoundingPolys( + java.lang.Iterable values) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boundingPolys_); + onChanged(); + } else { + boundingPolysBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearBoundingPolys() { + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.remove(index); + onChanged(); + } else { + boundingPolysBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); } else { + return boundingPolysBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysOrBuilderList() { + if (boundingPolysBuilder_ != null) { + return boundingPolysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boundingPolys_); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBuilder() { + return getBoundingPolysFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference image.
+     * If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysBuilderList() { + return getBoundingPolysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingPolysFieldBuilder() { + if (boundingPolysBuilder_ == null) { + boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + boundingPolys_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boundingPolys_ = null; + } + return boundingPolysBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ReferenceImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ReferenceImage) + private static final com.google.cloud.vision.v1p3beta1.ReferenceImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ReferenceImage(); + } + + public static com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReferenceImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReferenceImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java new file mode 100644 index 000000000000..564f1e0f1551 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ReferenceImageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + private final String referenceImage; + + @Deprecated + protected ReferenceImageName() { + project = null; + location = null; + product = null; + referenceImage = null; + } + + private ReferenceImageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReferenceImageName of( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build(); + } + + public static String format( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build() + .toString(); + } + + public static ReferenceImageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( + formattedString, "ReferenceImageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("product"), + matchMap.get("reference_image")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ReferenceImageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + if (referenceImage != null) { + fieldMapBuilder.put("reference_image", referenceImage); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( + "project", + project, + "location", + location, + "product", + product, + "reference_image", + referenceImage); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReferenceImageName that = ((ReferenceImageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product) + && Objects.equals(this.referenceImage, that.referenceImage); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + h *= 1000003; + h ^= Objects.hashCode(referenceImage); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. + */ + public static class Builder { + private String project; + private String location; + private String product; + private String referenceImage; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + public Builder setReferenceImage(String referenceImage) { + this.referenceImage = referenceImage; + return this; + } + + private Builder(ReferenceImageName referenceImageName) { + this.project = referenceImageName.project; + this.location = referenceImageName.location; + this.product = referenceImageName.product; + this.referenceImage = referenceImageName.referenceImage; + } + + public ReferenceImageName build() { + return new ReferenceImageName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java new file mode 100644 index 000000000000..c75a5c384cae --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface ReferenceImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ReferenceImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getBoundingPolysCount(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysOrBuilderList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference image.
+   * If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java new file mode 100644 index 000000000000..97e79fa4e7b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `RemoveProductFromProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} + */ +public final class RemoveProductFromProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) + RemoveProductFromProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveProductFromProductSetRequest.newBuilder() to construct. + private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveProductFromProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveProductFromProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RemoveProductFromProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `RemoveProductFromProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveProductFromProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveProductFromProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..9679f72dd426 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface RemoveProductFromProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be removed from this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java new file mode 100644 index 000000000000..f53de0cb3387 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Set of features pertaining to the image, computed by computer vision
+ * methods over safe-search verticals (for example, adult, spoof, medical,
+ * violence).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.SafeSearchAnnotation} + */ +public final class SafeSearchAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) + SafeSearchAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use SafeSearchAnnotation.newBuilder() to construct. + private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SafeSearchAnnotation() { + adult_ = 0; + spoof_ = 0; + medical_ = 0; + violence_ = 0; + racy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SafeSearchAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SafeSearchAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + adult_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + spoof_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + medical_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + violence_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + racy_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder.class); + } + + public static final int ADULT_FIELD_NUMBER = 1; + private int adult_; + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SPOOF_FIELD_NUMBER = 2; + private int spoof_; + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int MEDICAL_FIELD_NUMBER = 3; + private int medical_; + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int VIOLENCE_FIELD_NUMBER = 4; + private int violence_; + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RACY_FIELD_NUMBER = 9; + private int racy_; + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adult_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, racy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adult_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, racy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) obj; + + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADULT_FIELD_NUMBER; + hash = (53 * hash) + adult_; + hash = (37 * hash) + SPOOF_FIELD_NUMBER; + hash = (53 * hash) + spoof_; + hash = (37 * hash) + MEDICAL_FIELD_NUMBER; + hash = (53 * hash) + medical_; + hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; + hash = (53 * hash) + violence_; + hash = (37 * hash) + RACY_FIELD_NUMBER; + hash = (53 * hash) + racy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of features pertaining to the image, computed by computer vision
+   * methods over safe-search verticals (for example, adult, spoof, medical,
+   * violence).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.SafeSearchAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adult_ = 0; + + spoof_ = 0; + + medical_ = 0; + + violence_ = 0; + + racy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation build() { + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation(this); + result.adult_ = adult_; + result.spoof_ = spoof_; + result.medical_ = medical_; + result.violence_ = violence_; + result.racy_ = racy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance()) return this; + if (other.adult_ != 0) { + setAdultValue(other.getAdultValue()); + } + if (other.spoof_ != 0) { + setSpoofValue(other.getSpoofValue()); + } + if (other.medical_ != 0) { + setMedicalValue(other.getMedicalValue()); + } + if (other.violence_ != 0) { + setViolenceValue(other.getViolenceValue()); + } + if (other.racy_ != 0) { + setRacyValue(other.getRacyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int adult_ = 0; + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @param value The enum numeric value on the wire for adult to set. + * @return This builder for chaining. + */ + public Builder setAdultValue(int value) { + + adult_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @param value The adult to set. + * @return This builder for chaining. + */ + public Builder setAdult(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + adult_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return This builder for chaining. + */ + public Builder clearAdult() { + + adult_ = 0; + onChanged(); + return this; + } + + private int spoof_ = 0; + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @param value The enum numeric value on the wire for spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoofValue(int value) { + + spoof_ = value; + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @param value The spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoof(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + spoof_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return This builder for chaining. + */ + public Builder clearSpoof() { + + spoof_ = 0; + onChanged(); + return this; + } + + private int medical_ = 0; + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @param value The enum numeric value on the wire for medical to set. + * @return This builder for chaining. + */ + public Builder setMedicalValue(int value) { + + medical_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @param value The medical to set. + * @return This builder for chaining. + */ + public Builder setMedical(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + medical_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return This builder for chaining. + */ + public Builder clearMedical() { + + medical_ = 0; + onChanged(); + return this; + } + + private int violence_ = 0; + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @param value The enum numeric value on the wire for violence to set. + * @return This builder for chaining. + */ + public Builder setViolenceValue(int value) { + + violence_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @param value The violence to set. + * @return This builder for chaining. + */ + public Builder setViolence(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + violence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return This builder for chaining. + */ + public Builder clearViolence() { + + violence_ = 0; + onChanged(); + return this; + } + + private int racy_ = 0; + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @param value The enum numeric value on the wire for racy to set. + * @return This builder for chaining. + */ + public Builder setRacyValue(int value) { + + racy_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @param value The racy to set. + * @return This builder for chaining. + */ + public Builder setRacy(com.google.cloud.vision.v1p3beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + racy_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return This builder for chaining. + */ + public Builder clearRacy() { + + racy_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) + private static final com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafeSearchAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SafeSearchAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java new file mode 100644 index 000000000000..0f2e34f1243a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface SafeSearchAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + int getAdultValue(); + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; + * @return The adult. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getAdult(); + + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + int getSpoofValue(); + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; + * @return The spoof. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getSpoof(); + + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + int getMedicalValue(); + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; + * @return The medical. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getMedical(); + + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + int getViolenceValue(); + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; + * @return The violence. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getViolence(); + + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + int getRacyValue(); + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; + * @return The racy. + */ + com.google.cloud.vision.v1p3beta1.Likelihood getRacy(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java new file mode 100644 index 000000000000..4f88977e08e6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A single symbol representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Symbol} + */ +public final class Symbol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Symbol) + SymbolOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symbol() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symbol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Symbol.class, com.google.cloud.vision.v1p3beta1.Symbol.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int TEXT_FIELD_NUMBER = 3; + private volatile java.lang.Object text_; + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Symbol)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Symbol other = (com.google.cloud.vision.v1p3beta1.Symbol) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getText() + .equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Symbol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single symbol representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Symbol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Symbol) + com.google.cloud.vision.v1p3beta1.SymbolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Symbol.class, com.google.cloud.vision.v1p3beta1.Symbol.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Symbol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + text_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Symbol build() { + com.google.cloud.vision.v1p3beta1.Symbol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Symbol buildPartial() { + com.google.cloud.vision.v1p3beta1.Symbol result = new com.google.cloud.vision.v1p3beta1.Symbol(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + result.text_ = text_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Symbol) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Symbol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Symbol other) { + if (other == com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Symbol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Symbol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Symbol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Symbol) + private static final com.google.cloud.vision.v1p3beta1.Symbol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Symbol(); + } + + public static com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java new file mode 100644 index 000000000000..7dae2af844df --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Symbol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java new file mode 100644 index 000000000000..ca173114db24 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java @@ -0,0 +1,3814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * TextAnnotation contains a structured representation of OCR extracted text.
+ * The hierarchy of an OCR extracted text structure is like this:
+ *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+ * Each structural component, starting from Page, may further have their own
+ * properties. Properties describe detected languages, breaks etc.. Please refer
+ * to the
+ * [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty]
+ * message definition below for more detail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation} + */ +public final class TextAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation) + TextAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextAnnotation() { + pages_ = java.util.Collections.emptyList(); + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Page.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder.class); + } + + public interface DetectedLanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + } + /** + *
+   * Detected language for a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} + */ + public static final class DetectedLanguage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedLanguage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) obj; + + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage build() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage buildPartial() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage(this); + result.languageCode_ = languageCode_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage other) { + if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) + private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage(); + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedLanguage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedBreakOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType(); + + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + boolean getIsPrefix(); + } + /** + *
+   * Detected start or end of a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} + */ + public static final class DetectedBreak extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedBreak() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedBreak(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedBreak( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + isPrefix_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + /** + *
+     * Enum to denote the type of break found. New line, space etc.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType} + */ + public enum BreakType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + SURE_SPACE(2), + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + EOL_SURE_SPACE(3), + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + HYPHEN(4), + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + LINE_BREAK(5), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + public static final int SURE_SPACE_VALUE = 2; + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + public static final int EOL_SURE_SPACE_VALUE = 3; + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + public static final int HYPHEN_VALUE = 4; + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + public static final int LINE_BREAK_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BreakType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BreakType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SPACE; + case 2: return SURE_SPACE; + case 3: return EOL_SURE_SPACE; + case 4: return HYPHEN; + case 5: return LINE_BREAK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BreakType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BreakType findValueByNumber(int number) { + return BreakType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); + } + + private static final BreakType[] VALUES = values(); + + public static BreakType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BreakType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + + public static final int IS_PREFIX_FIELD_NUMBER = 2; + private boolean isPrefix_; + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (isPrefix_ != false) { + output.writeBool(2, isPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (isPrefix_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) obj; + + if (type_ != other.type_) return false; + if (getIsPrefix() + != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPrefix()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected start or end of a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + isPrefix_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak build() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak buildPartial() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak(this); + result.type_ = type_; + result.isPrefix_ = isPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak other) { + if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getIsPrefix() != false) { + setIsPrefix(other.getIsPrefix()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean isPrefix_ ; + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @param value The isPrefix to set. + * @return This builder for chaining. + */ + public Builder setIsPrefix(boolean value) { + + isPrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearIsPrefix() { + + isPrefix_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) + private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak(); + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedBreak(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TextPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + int getDetectedLanguagesCount(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesOrBuilderList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index); + + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + boolean hasDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); + } + /** + *
+   * Additional information detected on the structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} + */ + public static final class TextProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) + TextPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextProperty.newBuilder() to construct. + private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextProperty() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextProperty(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextProperty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectedLanguages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; + if (detectedBreak_ != null) { + subBuilder = detectedBreak_.toBuilder(); + } + detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectedBreak_); + detectedBreak_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder.class); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; + private java.util.List detectedLanguages_; + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + return detectedLanguages_.get(index); + } + + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_; + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + return detectedBreak_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + return getDetectedBreak(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectedBreak()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) obj; + + if (!getDetectedLanguagesList() + .equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak() + .equals(other.getDetectedBreak())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Additional information detected on the structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectedLanguagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectedLanguagesBuilder_.clear(); + } + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty build() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty buildPartial() { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty(this); + int from_bitField0_ = bitField0_; + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (detectedBreakBuilder_ == null) { + result.detectedBreak_ = detectedBreak_; + } else { + result.detectedBreak_ = detectedBreakBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty other) { + if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectedLanguagesFieldBuilder() : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List detectedLanguages_ = + java.util.Collections.emptyList(); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; + + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return detectedBreakBuilder_ != null || detectedBreak_ != null; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + onChanged(); + } else { + detectedBreakBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak( + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + onChanged(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder mergeDetectedBreak(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (detectedBreak_ != null) { + detectedBreak_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); + } else { + detectedBreak_ = value; + } + onChanged(); + } else { + detectedBreakBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder clearDetectedBreak() { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + onChanged(); + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { + + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder>( + getDetectedBreak(), + getParentForChildren(), + isClean()); + detectedBreak_ = null; + } + return detectedBreakBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) + private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty(); + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextProperty(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PAGES_FIELD_NUMBER = 1; + private java.util.List pages_; + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Page getPages(int index) { + return pages_.get(index); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object text_; + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.TextAnnotation other = (com.google.cloud.vision.v1p3beta1.TextAnnotation) obj; + + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * TextAnnotation contains a structured representation of OCR extracted text.
+   * The hierarchy of an OCR extracted text structure is like this:
+   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+   * Each structural component, starting from Page, may further have their own
+   * properties. Properties describe detected languages, breaks etc.. Please refer
+   * to the
+   * [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty]
+   * message definition below for more detail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation) + com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextAnnotation.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pagesBuilder_.clear(); + } + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation build() { + com.google.cloud.vision.v1p3beta1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation buildPartial() { + com.google.cloud.vision.v1p3beta1.TextAnnotation result = new com.google.cloud.vision.v1p3beta1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation other) { + if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance()) return this; + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder> pagesBuilder_; + + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p3beta1.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p3beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder addPages(com.google.cloud.vision.v1p3beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p3beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder addPages( + com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p3beta1.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p3beta1.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p3beta1.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation) + private static final com.google.cloud.vision.v1p3beta1.TextAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation(); + } + + public static com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..b2692137bad7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface TextAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + java.util.List + getPagesList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p3beta1.Page getPages(int index); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + int getPagesCount(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + java.util.List + getPagesOrBuilderList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( + int index); + + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java new file mode 100644 index 000000000000..90a57121c941 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class TextAnnotationProto { + private TextAnnotationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p3beta1/text_ann" + + "otation.proto\022\035google.cloud.vision.v1p3b" + + "eta1\032,google/cloud/vision/v1p3beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p3beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p3beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p3beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p3beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p3beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p3beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p3beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p3beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p3beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p3beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p3beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p3beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p3bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "3beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p3beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p3beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p3beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p3beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p3" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p3beta1;vision\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor, + new java.lang.String[] { "Pages", "Text", }); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor = + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor, + new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor = + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor, + new java.lang.String[] { "Type", "IsPrefix", }); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor = + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor, + new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); + internal_static_google_cloud_vision_v1p3beta1_Page_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Page_descriptor, + new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); + internal_static_google_cloud_vision_v1p3beta1_Block_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Block_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); + internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); + internal_static_google_cloud_vision_v1p3beta1_Word_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Word_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); + internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); + com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java new file mode 100644 index 000000000000..040102d98ae1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Parameters for text detections. This is used to control TEXT_DETECTION and
+ * DOCUMENT_TEXT_DETECTION features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextDetectionParams} + */ +public final class TextDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextDetectionParams) + TextDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextDetectionParams.newBuilder() to construct. + private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextDetectionParams() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 72: { + + enableTextDetectionConfidenceScore_ = input.readBool(); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + advancedOcrOptions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextDetectionParams.class, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder.class); + } + + public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; + private boolean enableTextDetectionConfidenceScore_; + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList advancedOcrOptions_; + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableTextDetectionConfidenceScore_ != false) { + output.writeBool(9, enableTextDetectionConfidenceScore_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTextDetectionConfidenceScore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, enableTextDetectionConfidenceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.TextDetectionParams other = (com.google.cloud.vision.v1p3beta1.TextDetectionParams) obj; + + if (getEnableTextDetectionConfidenceScore() + != other.getEnableTextDetectionConfidenceScore()) return false; + if (!getAdvancedOcrOptionsList() + .equals(other.getAdvancedOcrOptionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableTextDetectionConfidenceScore()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for text detections. This is used to control TEXT_DETECTION and
+   * DOCUMENT_TEXT_DETECTION features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.TextDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextDetectionParams) + com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.TextDetectionParams.class, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.TextDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableTextDetectionConfidenceScore_ = false; + + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParams build() { + com.google.cloud.vision.v1p3beta1.TextDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParams buildPartial() { + com.google.cloud.vision.v1p3beta1.TextDetectionParams result = new com.google.cloud.vision.v1p3beta1.TextDetectionParams(this); + int from_bitField0_ = bitField0_; + result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; + if (((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.advancedOcrOptions_ = advancedOcrOptions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.TextDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.TextDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextDetectionParams other) { + if (other == com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance()) return this; + if (other.getEnableTextDetectionConfidenceScore() != false) { + setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.TextDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.TextDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean enableTextDetectionConfidenceScore_ ; + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @param value The enableTextDetectionConfidenceScore to set. + * @return This builder for chaining. + */ + public Builder setEnableTextDetectionConfidenceScore(boolean value) { + + enableTextDetectionConfidenceScore_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return This builder for chaining. + */ + public Builder clearEnableTextDetectionConfidenceScore() { + + enableTextDetectionConfidenceScore_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdvancedOcrOptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_.getUnmodifiableView(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions( + java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, advancedOcrOptions_); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextDetectionParams) + private static final com.google.cloud.vision.v1p3beta1.TextDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextDetectionParams(); + } + + public static com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..3b8eedebf1a3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface TextDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + boolean getEnableTextDetectionConfidenceScore(); + + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + java.util.List + getAdvancedOcrOptionsList(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java new file mode 100644 index 000000000000..180b0d570a95 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java @@ -0,0 +1,961 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `UpdateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductRequest} + */ +public final class UpdateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.UpdateProductRequest) + UpdateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductRequest.newBuilder() to construct. + private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductRequest.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.Product product_; + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.UpdateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductRequest) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.UpdateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.UpdateProductRequest) + com.google.cloud.vision.v1p3beta1.UpdateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.UpdateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductRequest build() { + com.google.cloud.vision.v1p3beta1.UpdateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.UpdateProductRequest result = new com.google.cloud.vision.v1p3beta1.UpdateProductRequest(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.UpdateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.UpdateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.UpdateProductRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.UpdateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.UpdateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1p3beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) + private static final com.google.cloud.vision.v1p3beta1.UpdateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.UpdateProductRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java new file mode 100644 index 000000000000..a7115ee346b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface UpdateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.UpdateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1p3beta1.Product getProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java new file mode 100644 index 000000000000..3488a6498dc5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java @@ -0,0 +1,937 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Request message for the `UpdateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductSetRequest} + */ +public final class UpdateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) + UpdateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductSetRequest.newBuilder() to construct. + private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductSetRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.Builder.class); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (productSet_ != null) { + output.writeMessage(1, getProductSet()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProductSet()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) obj; + + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest build() { + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest buildPartial() { + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest result = new com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest(this); + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest other) { + if (other == com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance()) return this; + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) + private static final com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest(); + } + + public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..9ee7743a6987 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/product_search_service.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface UpdateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java new file mode 100644 index 000000000000..45b59ccaba1a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Vertex} + */ +public final class Vertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Vertex) + VertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Vertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Vertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + x_ = input.readInt32(); + break; + } + case 16: { + + y_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Vertex.class, com.google.cloud.vision.v1p3beta1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Vertex other = (com.google.cloud.vision.v1p3beta1.Vertex) obj; + + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Vertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Vertex) + com.google.cloud.vision.v1p3beta1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Vertex.class, com.google.cloud.vision.v1p3beta1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Vertex build() { + com.google.cloud.vision.v1p3beta1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Vertex buildPartial() { + com.google.cloud.vision.v1p3beta1.Vertex result = new com.google.cloud.vision.v1p3beta1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Vertex) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Vertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Vertex other) { + if (other == com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Vertex) + private static final com.google.cloud.vision.v1p3beta1.Vertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Vertex(); + } + + public static com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java new file mode 100644 index 000000000000..f1a73eebcad1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/geometry.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface VertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + int getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + int getY(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java new file mode 100644 index 000000000000..1f4bd5944e98 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java @@ -0,0 +1,7537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/web_detection.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Relevant information for the image from the Internet.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection} + */ +public final class WebDetection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection) + WebDetectionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetection.newBuilder() to construct. + private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetection() { + webEntities_ = java.util.Collections.emptyList(); + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + visuallySimilarImages_ = java.util.Collections.emptyList(); + bestGuessLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + webEntities_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pagesWithMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + visuallySimilarImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + bestGuessLabels_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.class, com.google.cloud.vision.v1p3beta1.WebDetection.Builder.class); + } + + public interface WebEntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Entity deduced from similar images on the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebEntity} + */ + public static final class WebEntity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) + WebEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebEntity.newBuilder() to construct. + private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebEntity() { + entityId_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebEntity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebEntity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Entity deduced from similar images on the Internet.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebEntity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + score_ = 0F; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity build() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity(this); + result.entityId_ = entityId_; + result.score_ = score_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) + private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebEntity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Metadata for online images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebImage} + */ + public static final class WebImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebImage) + WebImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebImage.newBuilder() to construct. + private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebImage() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for online images.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebImage) + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage build() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebImage(this); + result.url_ = url_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebImage) + private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebImage(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebPageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebPage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + java.lang.String getPageTitle(); + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + com.google.protobuf.ByteString + getPageTitleBytes(); + + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + int getFullMatchingImagesCount(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + int getPartialMatchingImagesCount(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + } + /** + *
+   * Metadata for web pages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebPage} + */ + public static final class WebPage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebPage) + WebPageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebPage.newBuilder() to construct. + private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebPage() { + url_ = ""; + pageTitle_ = ""; + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebPage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebPage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageTitle_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PAGE_TITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pageTitle_; + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + @java.lang.Override + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } + } + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List fullMatchingImages_; + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; + private java.util.List partialMatchingImages_; + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(5, partialMatchingImages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, partialMatchingImages_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebPage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getPageTitle() + .equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPageTitle().hashCode(); + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for web pages.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebPage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebPage) + com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + pageTitle_ = ""; + + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage build() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebPage(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + result.score_ = score_; + result.pageTitle_ = pageTitle_; + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebPage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getPageTitle().isEmpty()) { + pageTitle_ = other.pageTitle_; + onChanged(); + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object pageTitle_ = ""; + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageTitle_ = value; + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return This builder for chaining. + */ + public Builder clearPageTitle() { + + pageTitle_ = getDefaultInstance().getPageTitle(); + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The bytes for pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageTitle_ = value; + onChanged(); + return this; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebPage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebPage) + private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebPage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebPage(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebPage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebPage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + } + /** + *
+   * Label to provide extra metadata for the web detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebLabel} + */ + public static final class WebLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) + WebLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLabel.newBuilder() to construct. + private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLabel() { + label_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder.class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) obj; + + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Label to provide extra metadata for the web detection.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + label_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel build() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel(this); + result.label_ = label_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) + private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int WEB_ENTITIES_FIELD_NUMBER = 1; + private java.util.List webEntities_; + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List getWebEntitiesList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List + getWebEntitiesOrBuilderList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public int getWebEntitiesCount() { + return webEntities_.size(); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index) { + return webEntities_.get(index); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + return webEntities_.get(index); + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; + private java.util.List fullMatchingImages_; + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; + private java.util.List partialMatchingImages_; + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List pagesWithMatchingImages_; + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List getPagesWithMatchingImagesList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public int getPagesWithMatchingImagesCount() { + return pagesWithMatchingImages_.size(); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + return pagesWithMatchingImages_.get(index); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + return pagesWithMatchingImages_.get(index); + } + + public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; + private java.util.List visuallySimilarImages_; + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List getVisuallySimilarImagesList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public int getVisuallySimilarImagesCount() { + return visuallySimilarImages_.size(); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + return visuallySimilarImages_.get(index); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + return visuallySimilarImages_.get(index); + } + + public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; + private java.util.List bestGuessLabels_; + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List getBestGuessLabelsList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List + getBestGuessLabelsOrBuilderList() { + return bestGuessLabels_; + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public int getBestGuessLabelsCount() { + return bestGuessLabels_.size(); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + return bestGuessLabels_.get(index); + } + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + return bestGuessLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < webEntities_.size(); i++) { + output.writeMessage(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + output.writeMessage(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + output.writeMessage(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + output.writeMessage(8, bestGuessLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < webEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, bestGuessLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetection other = (com.google.cloud.vision.v1p3beta1.WebDetection) obj; + + if (!getWebEntitiesList() + .equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList() + .equals(other.getPagesWithMatchingImagesList())) return false; + if (!getVisuallySimilarImagesList() + .equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList() + .equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWebEntitiesCount() > 0) { + hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getWebEntitiesList().hashCode(); + } + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + if (getPagesWithMatchingImagesCount() > 0) { + hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); + } + if (getVisuallySimilarImagesCount() > 0) { + hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); + } + if (getBestGuessLabelsCount() > 0) { + hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getBestGuessLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Relevant information for the image from the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection) + com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetection.class, com.google.cloud.vision.v1p3beta1.WebDetection.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWebEntitiesFieldBuilder(); + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + getPagesWithMatchingImagesFieldBuilder(); + getVisuallySimilarImagesFieldBuilder(); + getBestGuessLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + webEntitiesBuilder_.clear(); + } + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + partialMatchingImagesBuilder_.clear(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + visuallySimilarImagesBuilder_.clear(); + } + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection build() { + com.google.cloud.vision.v1p3beta1.WebDetection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetection result = new com.google.cloud.vision.v1p3beta1.WebDetection(this); + int from_bitField0_ = bitField0_; + if (webEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.webEntities_ = webEntities_; + } else { + result.webEntities_ = webEntitiesBuilder_.build(); + } + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pagesWithMatchingImages_ = pagesWithMatchingImages_; + } else { + result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); + } + if (visuallySimilarImagesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.visuallySimilarImages_ = visuallySimilarImages_; + } else { + result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); + } + if (bestGuessLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bestGuessLabels_ = bestGuessLabels_; + } else { + result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance()) return this; + if (webEntitiesBuilder_ == null) { + if (!other.webEntities_.isEmpty()) { + if (webEntities_.isEmpty()) { + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWebEntitiesIsMutable(); + webEntities_.addAll(other.webEntities_); + } + onChanged(); + } + } else { + if (!other.webEntities_.isEmpty()) { + if (webEntitiesBuilder_.isEmpty()) { + webEntitiesBuilder_.dispose(); + webEntitiesBuilder_ = null; + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + webEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWebEntitiesFieldBuilder() : null; + } else { + webEntitiesBuilder_.addAllMessages(other.webEntities_); + } + } + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImages_.isEmpty()) { + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); + } + onChanged(); + } + } else { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImagesBuilder_.isEmpty()) { + pagesWithMatchingImagesBuilder_.dispose(); + pagesWithMatchingImagesBuilder_ = null; + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + pagesWithMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesWithMatchingImagesFieldBuilder() : null; + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); + } + } + } + if (visuallySimilarImagesBuilder_ == null) { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImages_.isEmpty()) { + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.addAll(other.visuallySimilarImages_); + } + onChanged(); + } + } else { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImagesBuilder_.isEmpty()) { + visuallySimilarImagesBuilder_.dispose(); + visuallySimilarImagesBuilder_ = null; + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + visuallySimilarImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVisuallySimilarImagesFieldBuilder() : null; + } else { + visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); + } + } + } + if (bestGuessLabelsBuilder_ == null) { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabels_.isEmpty()) { + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.addAll(other.bestGuessLabels_); + } + onChanged(); + } + } else { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabelsBuilder_.isEmpty()) { + bestGuessLabelsBuilder_.dispose(); + bestGuessLabelsBuilder_ = null; + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + bestGuessLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBestGuessLabelsFieldBuilder() : null; + } else { + bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List webEntities_ = + java.util.Collections.emptyList(); + private void ensureWebEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(webEntities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; + + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List getWebEntitiesList() { + if (webEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webEntities_); + } else { + return webEntitiesBuilder_.getMessageList(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public int getWebEntitiesCount() { + if (webEntitiesBuilder_ == null) { + return webEntities_.size(); + } else { + return webEntitiesBuilder_.getCount(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); + } else { + return webEntitiesBuilder_.getMessage(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.set(index, value); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(index, value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addAllWebEntities( + java.lang.Iterable values) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, webEntities_); + onChanged(); + } else { + webEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder clearWebEntities() { + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + webEntitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder removeWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.remove(index); + onChanged(); + } else { + webEntitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); } else { + return webEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesOrBuilderList() { + if (webEntitiesBuilder_ != null) { + return webEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webEntities_); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { + return getWebEntitiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesBuilderList() { + return getWebEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder> + getWebEntitiesFieldBuilder() { + if (webEntitiesBuilder_ == null) { + webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder>( + webEntities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + webEntities_ = null; + } + return webEntitiesBuilder_; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + + private java.util.List pagesWithMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePagesWithMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; + + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List getPagesWithMatchingImagesList() { + if (pagesWithMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } else { + return pagesWithMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public int getPagesWithMatchingImagesCount() { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.size(); + } else { + return pagesWithMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); + } else { + return pagesWithMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addAllPagesWithMatchingImages( + java.lang.Iterable values) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pagesWithMatchingImages_); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder clearPagesWithMatchingImages() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder removePagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.remove(index); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); } else { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + if (pagesWithMatchingImagesBuilder_ != null) { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesBuilderList() { + return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder> + getPagesWithMatchingImagesFieldBuilder() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder>( + pagesWithMatchingImages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pagesWithMatchingImages_ = null; + } + return pagesWithMatchingImagesBuilder_; + } + + private java.util.List visuallySimilarImages_ = + java.util.Collections.emptyList(); + private void ensureVisuallySimilarImagesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; + + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List getVisuallySimilarImagesList() { + if (visuallySimilarImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } else { + return visuallySimilarImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public int getVisuallySimilarImagesCount() { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.size(); + } else { + return visuallySimilarImagesBuilder_.getCount(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); + } else { + return visuallySimilarImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addAllVisuallySimilarImages( + java.lang.Iterable values) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, visuallySimilarImages_); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder clearVisuallySimilarImages() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + visuallySimilarImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder removeVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.remove(index); + onChanged(); + } else { + visuallySimilarImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); } else { + return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + if (visuallySimilarImagesBuilder_ != null) { + return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesBuilderList() { + return getVisuallySimilarImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> + getVisuallySimilarImagesFieldBuilder() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( + visuallySimilarImages_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + visuallySimilarImages_ = null; + } + return visuallySimilarImagesBuilder_; + } + + private java.util.List bestGuessLabels_ = + java.util.Collections.emptyList(); + private void ensureBestGuessLabelsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; + + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List getBestGuessLabelsList() { + if (bestGuessLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } else { + return bestGuessLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public int getBestGuessLabelsCount() { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.size(); + } else { + return bestGuessLabelsBuilder_.getCount(); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); + } else { + return bestGuessLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addAllBestGuessLabels( + java.lang.Iterable values) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bestGuessLabels_); + onChanged(); + } else { + bestGuessLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder clearBestGuessLabels() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder removeBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.remove(index); + onChanged(); + } else { + bestGuessLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); } else { + return bestGuessLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsOrBuilderList() { + if (bestGuessLabelsBuilder_ != null) { + return bestGuessLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { + return getBestGuessLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * Best guess text labels for the request image.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsBuilderList() { + return getBestGuessLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder> + getBestGuessLabelsFieldBuilder() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder>( + bestGuessLabels_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + bestGuessLabels_ = null; + } + return bestGuessLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection) + private static final com.google.cloud.vision.v1p3beta1.WebDetection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java new file mode 100644 index 000000000000..d4d1d2ed6404 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java @@ -0,0 +1,288 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/web_detection.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface WebDetectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + int getWebEntitiesCount(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesOrBuilderList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index); + + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + int getFullMatchingImagesCount(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + int getPartialMatchingImagesCount(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + int getPagesWithMatchingImagesCount(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesOrBuilderList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index); + + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + int getVisuallySimilarImagesCount(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesOrBuilderList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index); + + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + int getBestGuessLabelsCount(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsOrBuilderList(); + /** + *
+   * Best guess text labels for the request image.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java new file mode 100644 index 000000000000..226d434498fb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * Parameters for web detection request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetectionParams} + */ +public final class WebDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetectionParams) + WebDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetectionParams.newBuilder() to construct. + private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetectionParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + includeGeoResults_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetectionParams.class, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder.class); + } + + public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; + private boolean includeGeoResults_; + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (includeGeoResults_ != false) { + output.writeBool(2, includeGeoResults_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeGeoResults_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, includeGeoResults_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.WebDetectionParams other = (com.google.cloud.vision.v1p3beta1.WebDetectionParams) obj; + + if (getIncludeGeoResults() + != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeGeoResults()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for web detection request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetectionParams) + com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.WebDetectionParams.class, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.WebDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + includeGeoResults_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParams build() { + com.google.cloud.vision.v1p3beta1.WebDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParams buildPartial() { + com.google.cloud.vision.v1p3beta1.WebDetectionParams result = new com.google.cloud.vision.v1p3beta1.WebDetectionParams(this); + result.includeGeoResults_ = includeGeoResults_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetectionParams other) { + if (other == com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance()) return this; + if (other.getIncludeGeoResults() != false) { + setIncludeGeoResults(other.getIncludeGeoResults()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.WebDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeGeoResults_ ; + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @param value The includeGeoResults to set. + * @return This builder for chaining. + */ + public Builder setIncludeGeoResults(boolean value) { + + includeGeoResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeGeoResults() { + + includeGeoResults_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetectionParams) + private static final com.google.cloud.vision.v1p3beta1.WebDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetectionParams(); + } + + public static com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..75f49a3fbff7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/image_annotator.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface WebDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + boolean getIncludeGeoResults(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java new file mode 100644 index 000000000000..3d64a2139492 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/web_detection.proto + +package com.google.cloud.vision.v1p3beta1; + +public final class WebDetectionProto { + private WebDetectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/vision/v1p3beta1/web_dete" + + "ction.proto\022\035google.cloud.vision.v1p3bet" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p3beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p3beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p3" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p3beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p3beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p3beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p3beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p3beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p3beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p3beta1;visio" + + "n\370\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor, + new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor = + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor, + new java.lang.String[] { "EntityId", "Score", "Description", }); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor = + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor, + new java.lang.String[] { "Url", "Score", }); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor = + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor, + new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor = + internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor, + new java.lang.String[] { "Label", "LanguageCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java new file mode 100644 index 000000000000..51f927e0f9ca --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java @@ -0,0 +1,1617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +/** + *
+ * A word representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Word} + */ +public final class Word extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Word) + WordOrBuilder { +private static final long serialVersionUID = 0L; + // Use Word.newBuilder() to construct. + private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Word() { + symbols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Word(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Word( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + symbols_.add( + input.readMessage(com.google.cloud.vision.v1p3beta1.Symbol.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Word.class, com.google.cloud.vision.v1p3beta1.Word.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int SYMBOLS_FIELD_NUMBER = 3; + private java.util.List symbols_; + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List getSymbolsList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List + getSymbolsOrBuilderList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Word)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p3beta1.Word other = (com.google.cloud.vision.v1p3beta1.Word) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList() + .equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Word parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Word parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p3beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Word prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A word representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p3beta1.Word} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Word) + com.google.cloud.vision.v1p3beta1.WordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p3beta1.Word.class, com.google.cloud.vision.v1p3beta1.Word.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p3beta1.Word.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSymbolsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + symbolsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Word getDefaultInstanceForType() { + return com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Word build() { + com.google.cloud.vision.v1p3beta1.Word result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Word buildPartial() { + com.google.cloud.vision.v1p3beta1.Word result = new com.google.cloud.vision.v1p3beta1.Word(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p3beta1.Word) { + return mergeFrom((com.google.cloud.vision.v1p3beta1.Word)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Word other) { + if (other == com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymbolsFieldBuilder() : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p3beta1.Word parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p3beta1.Word) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertice order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(symbols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder> symbolsBuilder_; + + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public java.util.List getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p3beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder addSymbols(com.google.cloud.vision.v1p3beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p3beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder addAllSymbols( + java.lang.Iterable values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p3beta1.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p3beta1.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p3beta1.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder>( + symbols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Word) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Word) + private static final com.google.cloud.vision.v1p3beta1.Word DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Word(); + } + + public static com.google.cloud.vision.v1p3beta1.Word getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Word parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Word(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p3beta1.Word getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java new file mode 100644 index 000000000000..70ccd560f6c4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p3beta1/text_annotation.proto + +package com.google.cloud.vision.v1p3beta1; + +public interface WordOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Word) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertice order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + int getSymbolsCount(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto new file mode 100644 index 000000000000..c2c524fb559a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto @@ -0,0 +1,68 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; +option objc_class_prefix = "GCVN"; + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// A bounding polygon for the detected image annotation. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; + + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 2; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto new file mode 100644 index 000000000000..ebab14a6b115 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto @@ -0,0 +1,833 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/cloud/vision/v1p3beta1/product_search.proto"; +import "google/cloud/vision/v1p3beta1/text_annotation.proto"; +import "google/cloud/vision/v1p3beta1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p3beta1/images:annotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + } + + // Run asynchronous image detection and annotation for a list of generic + // files, such as PDF files, which may contain multiple pages and multiple + // images per page. Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p3beta1/files:asyncBatchAnnotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; + } +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + string gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more + // info. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // Image content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + bytes content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + ImageSource source = 2; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale, as returned in `ImageParams`. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale, as returned in `ImageParams`. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Parameters for text detections. This is used to control TEXT_DETECTION and +// DOCUMENT_TEXT_DETECTION features. +message TextDetectionParams { + + // By default, Cloud Vision API only includes confidence score for + // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + // score for TEXT_DETECTION as well. + bool enable_text_detection_confidence_score = 9; + + // A list of advanced OCR options to fine-tune OCR behavior. + repeated string advanced_ocr_options = 11; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. In most cases, an empty value + // yields the best results since it enables automatic language detection. For + // languages based on the Latin alphabet, setting `language_hints` is not + // needed. In rare cases, when the language of the text in the image is known, + // setting a hint will help get better results (although it will be a + // significant hindrance if the hint is wrong). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](https://cloud.google.com/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for product search. + google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; + + // Parameters for text detection and document text detection. + TextDetectionParams text_detection_params = 12; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If present, product search has completed successfully. + google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = + 14; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + ImageAnnotationContext context = 21; +} + +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. + repeated AnnotateImageResponse responses = 2; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// Multiple async file annotation requests are batched into a single service +// call. +message AsyncBatchAnnotateFilesRequest { + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // The type of the file. Currently only "application/pdf" and "image/tiff" + // are supported. Wildcards are not supported. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file on + // Google Cloud Storage. + // The valid range is [1, 100]. If not specified, the default value is 20. + // + // For example, for one pdf file with 100 pages, 100 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a + // Google Cloud Storage object. Wildcards are not currently supported. + string uri = 1; +} + +// The Google Cloud Storage location where the output will be written to. +message GcsDestination { + // Google Cloud Storage URI where the results will be stored. Results will + // be in JSON format and preceded by its corresponding input URI. This field + // can either represent a single file, or a prefix for multiple outputs. + // Prefixes must end in a `/`. + // + // Examples: + // + // * File: gs://bucket-name/filename.json + // * Prefix: gs://bucket-name/prefix/here/ + // * File: gs://bucket-name/prefix/here + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely that the image belongs to the specified vertical. + VERY_UNLIKELY = 1; + + // It is unlikely that the image belongs to the specified vertical. + UNLIKELY = 2; + + // It is possible that the image belongs to the specified vertical. + POSSIBLE = 3; + + // It is likely that the image belongs to the specified vertical. + LIKELY = 4; + + // It is very likely that the image belongs to the specified vertical. + VERY_LIKELY = 5; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto new file mode 100644 index 000000000000..86ea1a064f83 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto @@ -0,0 +1,124 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + +import "google/api/resource.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/cloud/vision/v1p3beta1/product_search_service.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a product search request. +message ProductSearchParams { + // The bounding polygon around the area of interest in the image. + // If it is not specified, system discretion will be applied. + BoundingPoly bounding_poly = 9; + + // The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; + + // The list of product categories to search in. Currently, we only consider + // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + // "packagedgoods-v1", or "general-v1" should be specified. The legacy + // categories "homegoods", "apparel", and "toys" are still supported but will + // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + // or "toys-v2" for better product search accuracy. It is recommended to + // migrate existing products to these categories as well. + repeated string product_categories = 7; + + // The filtering expression. This can be used to restrict search results based + // on Product labels. We currently support an AND of OR of key-value + // expressions, where each expression within an OR must have the same key. An + // '=' should be used to connect the key and value. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // acceptable, but "(color = red OR brand = Google)" is not acceptable. + // "color: red" is not acceptable because it uses a ':' instead of an '='. + string filter = 8; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + + // Information about the products similar to a single product in a query + // image. + message GroupedResult { + // The bounding polygon around the product detected in the query image. + BoundingPoly bounding_poly = 1; + + // List of results, one for each product match. + repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; + } + + // Timestamp of the index which provided these results. Products added to the + // product set and products removed from the product set after this time are + // not reflected in the current results. + google.protobuf.Timestamp index_time = 2; + + // List of results, one for each product match. + repeated Result results = 5; + + // List of results grouped by products detected in the query image. Each entry + // corresponds to one bounding polygon in the query image, and contains the + // matching products specific to that region. There may be duplicate product + // matches in the union of all the per-product results. + repeated GroupedResult product_grouped_results = 6; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto new file mode 100644 index 000000000000..daf1d0ddc5ec --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto @@ -0,0 +1,971 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/vision/v1p3beta1/geometry.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Manages Products and ProductSets of reference images for use in product +// search. It uses the following resource model: +// +// - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named +// `projects/*/locations/*/productSets/*`, which acts as a way to put different +// products into groups to limit identification. +// +// In parallel, +// +// - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named +// `projects/*/locations/*/products/*` +// +// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named +// `projects/*/locations/*/products/*/referenceImages/*` +service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + option (google.api.method_signature) = "product_set,update_mask"; + } + + // Permanently deletes a ProductSet. All Products and ReferenceImages in the + // ProductSet will be deleted. + // + // The actual image files are not deleted from Google Cloud Storage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc DeleteProductSet(DeleteProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/products" + body: "product" + }; + option (google.api.method_signature) = "parent,product,product_id"; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*}/products" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a Product resource. + // Only display_name, description and labels can be updated right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + option (google.api.method_signature) = "product,update_mask"; + } + + // Permanently deletes a product and its reference images. + // + // Metadata of the product and all its images will be deleted right away, but + // search queries against ProductSets containing the product may still work + // until all related caches are refreshed. + // + // Possible errors: + // + // * Returns NOT_FOUND if the product does not exist. + rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + // compatible with the parent product's product_category is detected. + // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + rpc CreateReferenceImage(CreateReferenceImageRequest) + returns (ReferenceImage) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + option (google.api.method_signature) = "parent,reference_image,reference_image_id"; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // caches are refreshed. + // + // The actual image files are not deleted from Google Cloud Storage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the reference image does not exist. + rpc DeleteReferenceImage(DeleteReferenceImageRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists reference images. + // + // Possible errors: + // + // * Returns NOT_FOUND if the parent product does not exist. + // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + // than 1. + rpc ListReferenceImages(ListReferenceImagesRequest) + returns (ListReferenceImagesResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Removes a Product from the specified ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND If the Product is not found under the ProductSet. + rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) + returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" + }; + option (google.api.method_signature) = "name"; + } + + // Asynchronous API that imports a list of reference images to specified + // product sets based on a list of image information. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be + // used to keep track of the progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + // `Operation.response` contains `ImportProductSetsResponse`. (results) + // + // The input source of this method is a csv file on Google Cloud Storage. + // For the format of the csv file please see + // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + rpc ImportProductSets(ImportProductSetsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } +} + +// A Product contains ReferenceImages. +message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + + // A product label represented as a key-value pair. + message KeyValue { + // The key of the label attached to the product. Cannot be empty and cannot + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // characters long. + string description = 3; + + // Immutable. The category for the product identified by the reference image. This should + // be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories + // "homegoods", "apparel", and "toys" are still supported, but these should + // not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 100 product_labels. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this field is 0. + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If there was an error with indexing the product set, the field + // is populated. + // + // This field is ignored when creating a ProductSet. + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + + // The resource name of the reference image. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // Required. The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Bounding polygons around the areas of interest in the reference image. + // If this field is empty, the system will try to detect regions of + // interest. At most 10 bounding polygons will be used. + // + // The provided shape is converted into a non-rotated rectangle. Once + // converted, the small edge of the rectangle must be greater than or equal + // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + // is not). + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // Required. The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this Product. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // Required. The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProduct` method. +message GetProductRequest { + // Required. Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // Required. The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields + // to update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask paths include `product_labels`, `display_name`, and + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Required. Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // Required. The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this ProductSet. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // Required. The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_sets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Required. Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + // update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Required. Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // Required. Resource name of the product in which to create the reference image. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // Required. The reference image to create. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for the ReferenceImage to be added. If set, + // the server will attempt to use this value as the resource id. If it is + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Required. Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // Required. The resource name of the ReferenceImage to get. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // Required. The resource name of the reference image to delete. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be added to this ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be removed from this ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // Required. The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // The URI must start with `gs://`. + // + // The format of the input csv file should be one image per line. + // In each line, there are 6 columns. + // 1. image_uri + // 2, image_id + // 3. product_set_id + // 4. product_id + // 5, product_category + // 6, product_display_name + // 7, labels + // 8. bounding_poly + // + // Columns 1, 3, 4, and 5 are required, other columns are optional. A new + // ProductSet/Product with the same id will be created on the fly + // if the ProductSet/Product specified by product_set_id/product_id does not + // exist. + // + // The image_id field is optional but has to be unique if provided. If it is + // empty, we will automatically assign an unique id to the image. + // + // The product_display_name field is optional. If it is empty, a space (" ") + // is used as the place holder for the product display_name, which can + // be updated later through the realtime API. + // + // If the Product with product_id already exists, the fields + // product_display_name, product_category and labels are ignored. + // + // If a Product doesn't exist and needs to be created on the fly, the + // product_display_name field refers to + // [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name], + // the product_category field refers to + // [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category], + // and the labels field refers to [Product.labels][]. + // + // Labels (optional) should be a line containing a list of comma-separated + // key-value pairs, with the format + // "key_1=value_1,key_2=value_2,...,key_n=value_n". + // + // The bounding_poly (optional) field is used to identify one region of + // interest from the image in the same manner as CreateReferenceImage. If no + // bounding_poly is specified, the system will try to detect regions of + // interest automatically. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 20MP). + // + // Also note that at most one bounding_poly is allowed per line. If the image + // contains multiple regions of interest, the csv should contain one line per + // region of interest. + // + // The bounding_poly column should contain an even number of comma-separated + // numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative + // integers should be used for absolute bounding polygons, and float values + // in [0, 1] should be used for normalized bounding polygons. + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // Required. The project in which the ProductSets should be imported. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for the `ImportProductSets` method. +// +// This message is returned by the +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] +// method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + google.protobuf.Timestamp submit_time = 2; + + // The time when the batch request is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is + // set to true. + google.protobuf.Timestamp end_time = 3; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto new file mode 100644 index 000000000000..633e404ed097 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto @@ -0,0 +1,258 @@ +// Copyright 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + +import "google/cloud/vision/v1p3beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol +// Each structural component, starting from Page, may further have their own +// properties. Properties describe detected languages, breaks etc.. Please refer +// to the +// [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // Detected language for a structural component. + message DetectedLanguage { + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 1; + + // Confidence of detected language. Range [0, 1]. + float confidence = 2; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertice order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto new file mode 100644 index 000000000000..205dfe656d1f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto @@ -0,0 +1,103 @@ +// Copyright 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.vision.v1p3beta1; + + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p3beta1"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // Best guess text labels for the request image. + repeated WebLabel best_guess_labels = 8; +} diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..09cb3693af8c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFiles(); + } + + public static void asyncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java new file mode 100644 index 000000000000..6d588b9982e2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p3beta1.OperationMetadata; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFilesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFilesLRO(); + } + + public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..e2b0d8974492 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] +import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFiles(); + } + + public static void syncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java new file mode 100644 index 000000000000..77154aa7d802 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] +import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); + } + + public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..282718c23f81 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateImages(); + } + + public static void asyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); + // Do something. + BatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..e24118ffc722 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_sync] +import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java new file mode 100644 index 000000000000..e17a7845dde6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] +import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateImagesListannotateimagerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImagesListannotateimagerequest(); + } + + public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); + } + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..81d36792636e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p3beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..e61ffe63b65a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..5c81a10f70ca --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p3beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p3beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..e9e89467203a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_imageannotatorsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p3beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java new file mode 100644 index 000000000000..cefc670f91d5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + asyncAddProductToProductSet(); + } + + public static void asyncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.addProductToProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java new file mode 100644 index 000000000000..81188b7017b1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_sync] +import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSet(); + } + + public static void syncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.addProductToProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..3b650f90729e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameProductname(); + } + + public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java new file mode 100644 index 000000000000..e5315729bef2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameString(); + } + + public static void syncAddProductToProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java new file mode 100644 index 000000000000..e807d05b1d15 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringProductname(); + } + + public static void syncAddProductToProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java new file mode 100644 index 000000000000..141cdd0fc76e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringString(); + } + + public static void syncAddProductToProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a67860361f29 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; +import com.google.cloud.vision.v1p3beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..93e867cda918 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f69dafc186e0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; +import com.google.cloud.vision.v1p3beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p3beta1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java new file mode 100644 index 000000000000..08c25eb500a1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class AsyncCreateProduct { + + public static void main(String[] args) throws Exception { + asyncCreateProduct(); + } + + public static void asyncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + ApiFuture future = productSearchClient.createProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java new file mode 100644 index 000000000000..06f1144b6239 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproduct_sync] +import com.google.cloud.vision.v1p3beta1.CreateProductRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncCreateProduct { + + public static void main(String[] args) throws Exception { + syncCreateProduct(); + } + + public static void syncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + Product response = productSearchClient.createProduct(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java new file mode 100644 index 000000000000..30a8e2fbaecf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncCreateProductLocationnameProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductLocationnameProductString(); + } + + public static void syncCreateProductLocationnameProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java new file mode 100644 index 000000000000..d5da324cd1e8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproduct_stringproductstring_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncCreateProductStringProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductStringProductString(); + } + + public static void syncCreateProductStringProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java new file mode 100644 index 000000000000..7282006d3dc0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class AsyncCreateProductSet { + + public static void main(String[] args) throws Exception { + asyncCreateProductSet(); + } + + public static void asyncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ApiFuture future = + productSearchClient.createProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..e6a9cebd0d30 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproductset_sync] +import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ProductSet response = productSearchClient.createProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java new file mode 100644 index 000000000000..5b3719f16d89 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncCreateProductSetLocationnameProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetLocationnameProductsetString(); + } + + public static void syncCreateProductSetLocationnameProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java new file mode 100644 index 000000000000..3dafc768a4ef --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncCreateProductSetStringProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetStringProductsetString(); + } + + public static void syncCreateProductSetStringProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java new file mode 100644 index 000000000000..a1099b9c970e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class AsyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + asyncCreateReferenceImage(); + } + + public static void asyncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ApiFuture future = + productSearchClient.createReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java new file mode 100644 index 000000000000..8de6d52d7b31 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_sync] +import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImage(); + } + + public static void syncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ReferenceImage response = productSearchClient.createReferenceImage(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java new file mode 100644 index 000000000000..ab15f1cc3d59 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncCreateReferenceImageProductnameReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageProductnameReferenceimageString(); + } + + public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java new file mode 100644 index 000000000000..d96b857d1538 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncCreateReferenceImageStringReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageStringReferenceimageString(); + } + + public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java new file mode 100644 index 000000000000..e7bc0611ca0b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteProduct { + + public static void main(String[] args) throws Exception { + asyncDeleteProduct(); + } + + public static void asyncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java new file mode 100644 index 000000000000..58fc0f3064c4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_sync] +import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProduct { + + public static void main(String[] args) throws Exception { + syncDeleteProduct(); + } + + public static void syncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.deleteProduct(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java new file mode 100644 index 000000000000..00b977f57be4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_productname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductProductname { + + public static void main(String[] args) throws Exception { + syncDeleteProductProductname(); + } + + public static void syncDeleteProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java new file mode 100644 index 000000000000..f9e364931413 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductString { + + public static void main(String[] args) throws Exception { + syncDeleteProductString(); + } + + public static void syncDeleteProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java new file mode 100644 index 000000000000..a0b3481ed35c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + asyncDeleteProductSet(); + } + + public static void asyncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java new file mode 100644 index 000000000000..47f05b8ab936 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_sync] +import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + syncDeleteProductSet(); + } + + public static void syncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + productSearchClient.deleteProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java new file mode 100644 index 000000000000..c7a9a8219f9c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_productsetname_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetProductsetname(); + } + + public static void syncDeleteProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java new file mode 100644 index 000000000000..ab5f22cf9ae4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetString { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetString(); + } + + public static void syncDeleteProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java new file mode 100644 index 000000000000..107f9b0ea93c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class AsyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + asyncDeleteReferenceImage(); + } + + public static void asyncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.deleteReferenceImageCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java new file mode 100644 index 000000000000..7e13278940d2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_sync] +import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImage(); + } + + public static void syncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + productSearchClient.deleteReferenceImage(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..774bfcd8a883 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageReferenceimagename(); + } + + public static void syncDeleteReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java new file mode 100644 index 000000000000..6580c333b742 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageString { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageString(); + } + + public static void syncDeleteReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java new file mode 100644 index 000000000000..dec67e615f74 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class AsyncGetProduct { + + public static void main(String[] args) throws Exception { + asyncGetProduct(); + } + + public static void asyncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.getProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java new file mode 100644 index 000000000000..172b278b9773 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproduct_sync] +import com.google.cloud.vision.v1p3beta1.GetProductRequest; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncGetProduct { + + public static void main(String[] args) throws Exception { + syncGetProduct(); + } + + public static void syncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + Product response = productSearchClient.getProduct(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java new file mode 100644 index 000000000000..7e52c7e1a832 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproduct_productname_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncGetProductProductname { + + public static void main(String[] args) throws Exception { + syncGetProductProductname(); + } + + public static void syncGetProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java new file mode 100644 index 000000000000..77e33f15a908 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproduct_string_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncGetProductString { + + public static void main(String[] args) throws Exception { + syncGetProductString(); + } + + public static void syncGetProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java new file mode 100644 index 000000000000..084e9c991d63 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class AsyncGetProductSet { + + public static void main(String[] args) throws Exception { + asyncGetProductSet(); + } + + public static void asyncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = + productSearchClient.getProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java new file mode 100644 index 000000000000..94f59279ccc9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproductset_sync] +import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncGetProductSet { + + public static void main(String[] args) throws Exception { + syncGetProductSet(); + } + + public static void syncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ProductSet response = productSearchClient.getProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java new file mode 100644 index 000000000000..ac6317c45149 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproductset_productsetname_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncGetProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncGetProductSetProductsetname(); + } + + public static void syncGetProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java new file mode 100644 index 000000000000..9b547f4b67a9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getproductset_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncGetProductSetString { + + public static void main(String[] args) throws Exception { + syncGetProductSetString(); + } + + public static void syncGetProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java new file mode 100644 index 000000000000..e8d72c529e4f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; + +public class AsyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + asyncGetReferenceImage(); + } + + public static void asyncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.getReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java new file mode 100644 index 000000000000..39fd456a8b5e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_sync] +import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; + +public class SyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + syncGetReferenceImage(); + } + + public static void syncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ReferenceImage response = productSearchClient.getReferenceImage(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..2c258155c522 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; + +public class SyncGetReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageReferenceimagename(); + } + + public static void syncGetReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java new file mode 100644 index 000000000000..a677430297f7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.cloud.vision.v1p3beta1.ReferenceImageName; + +public class SyncGetReferenceImageString { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageString(); + } + + public static void syncGetReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java new file mode 100644 index 000000000000..940862b3d0bc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.longrunning.Operation; + +public class AsyncImportProductSets { + + public static void main(String[] args) throws Exception { + asyncImportProductSets(); + } + + public static void asyncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.importProductSetsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java new file mode 100644 index 000000000000..f52024c60ab9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class AsyncImportProductSetsLRO { + + public static void main(String[] args) throws Exception { + asyncImportProductSetsLRO(); + } + + public static void asyncImportProductSetsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + OperationFuture future = + productSearchClient.importProductSetsOperationCallable().futureCall(request); + // Do something. + ImportProductSetsResponse response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java new file mode 100644 index 000000000000..eb629deacef9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_sync] +import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncImportProductSets { + + public static void main(String[] args) throws Exception { + syncImportProductSets(); + } + + public static void syncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(request).get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java new file mode 100644 index 000000000000..b1c76f40a289 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsLocationnameImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java new file mode 100644 index 000000000000..0ddbf0325743 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncImportProductSetsStringImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsStringImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java new file mode 100644 index 000000000000..22e018b7db0a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class AsyncListProducts { + + public static void main(String[] args) throws Exception { + asyncListProducts(); + } + + public static void asyncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java new file mode 100644 index 000000000000..602d5aab443c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproducts_paged_async] +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.common.base.Strings; + +public class AsyncListProductsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsPaged(); + } + + public static void asyncListProductsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsResponse response = productSearchClient.listProductsCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java new file mode 100644 index 000000000000..26e13ed07293 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproducts_sync] +import com.google.cloud.vision.v1p3beta1.ListProductsRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncListProducts { + + public static void main(String[] args) throws Exception { + syncListProducts(); + } + + public static void syncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProducts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java new file mode 100644 index 000000000000..51be97599542 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproducts_locationname_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncListProductsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductsLocationname(); + } + + public static void syncListProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java new file mode 100644 index 000000000000..014807bf18fc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproducts_string_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; + +public class SyncListProductsString { + + public static void main(String[] args) throws Exception { + syncListProductsString(); + } + + public static void syncListProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java new file mode 100644 index 000000000000..731003110144 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class AsyncListProductSets { + + public static void main(String[] args) throws Exception { + asyncListProductSets(); + } + + public static void asyncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductSetsPagedCallable().futureCall(request); + // Do something. + for (ProductSet element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java new file mode 100644 index 000000000000..3f30b5d46786 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_paged_async] +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.common.base.Strings; + +public class AsyncListProductSetsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductSetsPaged(); + } + + public static void asyncListProductSetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductSetsResponse response = + productSearchClient.listProductSetsCallable().call(request); + for (ProductSet element : response.getProductSetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java new file mode 100644 index 000000000000..29035c5e5b34 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_sync] +import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncListProductSets { + + public static void main(String[] args) throws Exception { + syncListProductSets(); + } + + public static void syncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java new file mode 100644 index 000000000000..1a9e639500a3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_locationname_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncListProductSetsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductSetsLocationname(); + } + + public static void syncListProductSetsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java new file mode 100644 index 000000000000..46bd837a6bd6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_string_sync] +import com.google.cloud.vision.v1p3beta1.LocationName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; + +public class SyncListProductSetsString { + + public static void main(String[] args) throws Exception { + syncListProductSetsString(); + } + + public static void syncListProductSetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java new file mode 100644 index 000000000000..4068d1bc27e2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class AsyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSet(); + } + + public static void asyncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java new file mode 100644 index 000000000000..e9a497d98998 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_paged_async] +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.common.base.Strings; + +public class AsyncListProductsInProductSetPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSetPaged(); + } + + public static void asyncListProductsInProductSetPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsInProductSetResponse response = + productSearchClient.listProductsInProductSetCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java new file mode 100644 index 000000000000..9609d21d1ac3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_sync] +import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSet(); + } + + public static void syncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java new file mode 100644 index 000000000000..4afae165a370 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncListProductsInProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetProductsetname(); + } + + public static void syncListProductsInProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java new file mode 100644 index 000000000000..adcc4acc5e6d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_string_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; + +public class SyncListProductsInProductSetString { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetString(); + } + + public static void syncListProductsInProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java new file mode 100644 index 000000000000..f5aa8c6fff5c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class AsyncListReferenceImages { + + public static void main(String[] args) throws Exception { + asyncListReferenceImages(); + } + + public static void asyncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listReferenceImagesPagedCallable().futureCall(request); + // Do something. + for (ReferenceImage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java new file mode 100644 index 000000000000..44d598fc4010 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_paged_async] +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; +import com.google.common.base.Strings; + +public class AsyncListReferenceImagesPaged { + + public static void main(String[] args) throws Exception { + asyncListReferenceImagesPaged(); + } + + public static void asyncListReferenceImagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListReferenceImagesResponse response = + productSearchClient.listReferenceImagesCallable().call(request); + for (ReferenceImage element : response.getReferenceImagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java new file mode 100644 index 000000000000..a507902f8c58 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_sync] +import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncListReferenceImages { + + public static void main(String[] args) throws Exception { + syncListReferenceImages(); + } + + public static void syncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java new file mode 100644 index 000000000000..79e99528cb88 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_productname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncListReferenceImagesProductname { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesProductname(); + } + + public static void syncListReferenceImagesProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java new file mode 100644 index 000000000000..7105d84e326b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_string_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ReferenceImage; + +public class SyncListReferenceImagesString { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesString(); + } + + public static void syncListReferenceImagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..4156a31363c1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class AsyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + asyncRemoveProductFromProductSet(); + } + + public static void asyncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.removeProductFromProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..b8d204b00561 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSet(); + } + + public static void syncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.removeProductFromProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..a39b39523015 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameProductname(); + } + + public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java new file mode 100644 index 000000000000..045c962e40cd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameString(); + } + + public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java new file mode 100644 index 000000000000..510dea6b38e1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringProductname(); + } + + public static void syncRemoveProductFromProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java new file mode 100644 index 000000000000..f21bf3b9adc2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] +import com.google.cloud.vision.v1p3beta1.ProductName; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringString(); + } + + public static void syncRemoveProductFromProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java new file mode 100644 index 000000000000..4f39f4e62285 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProduct { + + public static void main(String[] args) throws Exception { + asyncUpdateProduct(); + } + + public static void asyncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java new file mode 100644 index 000000000000..5d8577e13df6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProduct { + + public static void main(String[] args) throws Exception { + syncUpdateProduct(); + } + + public static void syncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Product response = productSearchClient.updateProduct(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java new file mode 100644 index 000000000000..aab6300ab184 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] +import com.google.cloud.vision.v1p3beta1.Product; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductProductFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductProductFieldmask(); + } + + public static void syncUpdateProductProductFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Product response = productSearchClient.updateProduct(product, updateMask); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java new file mode 100644 index 000000000000..b74fd146cdea --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + asyncUpdateProductSet(); + } + + public static void asyncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.updateProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java new file mode 100644 index 000000000000..9cdc578b07de --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + syncUpdateProductSet(); + } + + public static void syncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ProductSet response = productSearchClient.updateProductSet(request); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java new file mode 100644 index 000000000000..b0abad28e48e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchClient; +import com.google.cloud.vision.v1p3beta1.ProductSet; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSetProductsetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductSetProductsetFieldmask(); + } + + public static void syncUpdateProductSetProductsetFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); + } + } +} +// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..f4f7d368ff02 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.samples; + +// [START vision_v1p3beta1_generated_productsearchsettings_createproductset_sync] +import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1p3beta1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..b00bf50eb263 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub.samples; + +// [START vision_v1p3beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorStubSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p3beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..2854e5a26fe6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p3beta1.stub.samples; + +// [START vision_v1p3beta1_generated_productsearchstubsettings_createproductset_sync] +import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchStubSettings.Builder productSearchSettingsBuilder = + ProductSearchStubSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1p3beta1_generated_productsearchstubsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java new file mode 100644 index 000000000000..6d53017e3be1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java @@ -0,0 +1,706 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStub; +import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings imageAnnotatorSettings =
+ *     ImageAnnotatorSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorClient implements BackgroundResource { + private final ImageAnnotatorSettings settings; + private final ImageAnnotatorStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ImageAnnotatorClient with default settings. */ + public static final ImageAnnotatorClient create() throws IOException { + return create(ImageAnnotatorSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) + throws IOException { + return new ImageAnnotatorClient(settings); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ImageAnnotatorSettings). + */ + public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { + return new ImageAnnotatorClient(stub); + } + + /** + * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ImageAnnotatorClient(ImageAnnotatorStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ImageAnnotatorSettings getSettings() { + return settings; + } + + public ImageAnnotatorStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages( + List requests) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { + return batchAnnotateImagesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run image detection and annotation for a batch of images. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateImagesRequest request =
+   *       BatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateImagesCallable() { + return stub.batchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
+   * }
+   * }
+ * + * @param requests Required. The list of file annotation requests. Right now we support only one + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateFilesResponse batchAnnotateFiles(List requests) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return batchAnnotateFiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateFilesRequest request =
+   *       BatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesRequest request) { + return batchAnnotateFilesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Service that performs image detection and annotation for a batch of files. Now only + * "application/pdf", "image/tiff" and "image/gif" are supported. + * + *

This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and + * perform detection and annotation for each image extracted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   BatchAnnotateFilesRequest request =
+   *       BatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchAnnotateFilesCallable() { + return stub.batchAnnotateFilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   AsyncBatchAnnotateImagesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get();
+   * }
+   * }
+ * + * @param requests Required. Individual image annotation requests for this batch. + * @param outputConfig Required. The desired output location and metadata (e.g. format). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateImagesAsync( + List requests, OutputConfig outputConfig) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(requests) + .setOutputConfig(outputConfig) + .build(); + return asyncBatchAnnotateImagesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .build();
+   *   AsyncBatchAnnotateImagesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest request) { + return asyncBatchAnnotateImagesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateImagesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return stub.asyncBatchAnnotateImagesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of images. + * + *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains + * `AsyncBatchAnnotateImagesResponse` (results). + * + *

This service will write image annotation outputs to json files in customer GCS bucket, each + * json file containing BatchAnnotateImagesResponse proto. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateImagesRequest request =
+   *       AsyncBatchAnnotateImagesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateImagesCallable() { + return stub.asyncBatchAnnotateImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   List requests = new ArrayList<>();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
+   * }
+   * }
+ * + * @param requests Required. Individual async file annotation requests for this batch. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(List requests) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); + return asyncBatchAnnotateFilesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   AsyncBatchAnnotateFilesResponse response =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { + return asyncBatchAnnotateFilesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AsyncBatchAnnotateFilesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return stub.asyncBatchAnnotateFilesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, + * which may contain multiple pages and multiple images per page. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains + * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` + * (results). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+   *   AsyncBatchAnnotateFilesRequest request =
+   *       AsyncBatchAnnotateFilesRequest.newBuilder()
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + asyncBatchAnnotateFilesCallable() { + return stub.asyncBatchAnnotateFilesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java new file mode 100644 index 000000000000..3672bf778846 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java @@ -0,0 +1,277 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings + batchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings + asyncBatchAnnotateImagesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateImagesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateImagesOperationSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return ((ImageAnnotatorStubSettings) getStubSettings()) + .asyncBatchAnnotateFilesOperationSettings(); + } + + public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) + throws IOException { + return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageAnnotatorStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageAnnotatorStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageAnnotatorSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageAnnotatorStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageAnnotatorSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageAnnotatorStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); + } + + public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { + return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return getStubSettingsBuilder().batchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings.Builder + batchAnnotateFilesSettings() { + return getStubSettingsBuilder().batchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateImagesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateImagesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); + } + + @Override + public ImageAnnotatorSettings build() throws IOException { + return new ImageAnnotatorSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java new file mode 100644 index 000000000000..9cca0b4648b3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java @@ -0,0 +1,3874 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStub; +import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] + * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put + * different products into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, + * named `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of ProductSearchSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings productSearchSettings =
+ *     ProductSearchSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchClient implements BackgroundResource { + private final ProductSearchSettings settings; + private final ProductSearchStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ProductSearchClient with default settings. */ + public static final ProductSearchClient create() throws IOException { + return create(ProductSearchSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ProductSearchClient create(ProductSearchSettings settings) + throws IOException { + return new ProductSearchClient(settings); + } + + /** + * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ProductSearchSettings). + */ + public static final ProductSearchClient create(ProductSearchStub stub) { + return new ProductSearchClient(stub); + } + + /** + * Constructs an instance of ProductSearchClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected ProductSearchClient(ProductSearchSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ProductSearchClient(ProductSearchStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ProductSearchSettings getSettings() { + return settings; + } + + public ProductSearchStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + LocationName parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   String productSetId = "productSetId1003042158";
+   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSet should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param productSet Required. The ProductSet to create. + * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an error is returned + * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the + * character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet( + String parent, ProductSet productSet, String productSetId) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(parent) + .setProductSet(productSet) + .setProductSetId(productSetId) + .build(); + return createProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ProductSet response = productSearchClient.createProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet createProductSet(CreateProductSetRequest request) { + return createProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ProductSet resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductSetRequest request =
+   *       CreateProductSetRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setProductSetId("productSetId1003042158")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductSetCallable() { + return stub.createProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(LocationName parent) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project from which ProductSets should be listed. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(String parent) { + ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); + return listProductSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { + return listProductSetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ProductSet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsPagedCallable() { + return stub.listProductSetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSets in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductSetsRequest request =
+   *       ListProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductSetsResponse response =
+   *         productSearchClient.listProductSetsCallable().call(request);
+   *     for (ProductSet element : response.getProductSetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSetsCallable() { + return stub.listProductSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(ProductSetName name) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductSet response = productSearchClient.getProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(String name) { + GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); + return getProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ProductSet response = productSearchClient.getProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet getProductSet(GetProductSetRequest request) { + return getProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ProductSet. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductSetRequest request =
+   *       GetProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductSetCallable() { + return stub.getProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSet productSet = ProductSet.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
+   * }
+   * }
+ * + * @param productSet Required. The ProductSet resource which replaces the one on the server. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * path is `display_name`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(productSet) + .setUpdateMask(updateMask) + .build(); + return updateProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ProductSet response = productSearchClient.updateProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSet updateProductSet(UpdateProductSetRequest request) { + return updateProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a ProductSet resource. Only display_name can be updated currently. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the ProductSet does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the + * request or longer than 4096 characters. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductSetRequest request =
+   *       UpdateProductSetRequest.newBuilder()
+   *           .setProductSet(ProductSet.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.updateProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   ProductSet response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductSetCallable() { + return stub.updateProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(ProductSetName name) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   productSearchClient.deleteProductSet(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the ProductSet to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(String name) { + DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); + deleteProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   productSearchClient.deleteProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProductSet(DeleteProductSetRequest request) { + deleteProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not + * deleted. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductSetRequest request =
+   *       DeleteProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductSetCallable() { + return stub.deleteProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(LocationName parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Product product = Product.newBuilder().build();
+   *   String productId = "productId-1051830678";
+   *   Product response = productSearchClient.createProduct(parent, product, productId);
+   * }
+   * }
+ * + * @param parent Required. The project in which the Product should be created. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param product Required. The product to create. + * @param productId A user-supplied resource id for this Product. If set, the server will attempt + * to use this value as the resource id. If it is already in use, an error is returned with + * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character + * `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(String parent, Product product, String productId) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(parent) + .setProduct(product) + .setProductId(productId) + .build(); + return createProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   Product response = productSearchClient.createProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product createProduct(CreateProductRequest request) { + return createProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new product resource. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateProductRequest request =
+   *       CreateProductRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProduct(Product.newBuilder().build())
+   *           .setProductId("productId-1051830678")
+   *           .build();
+   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProductCallable() { + return stub.createProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(LocationName parent) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project OR ProductSet from which Products should be listed. + *

Format: `projects/PROJECT_ID/locations/LOC_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(String parent) { + ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(ListProductsRequest request) { + return listProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsPagedCallable() { + return stub.listProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists products in an unspecified order. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProductsCallable() { + return stub.listProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(ProductName name) { + GetProductRequest request = + GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   Product response = productSearchClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the Product to get. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(String name) { + GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   Product response = productSearchClient.getProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(GetProductRequest request) { + return getProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a Product. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductCallable() { + return stub.getProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   Product product = Product.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Product response = productSearchClient.updateProduct(product, updateMask);
+   * }
+   * }
+ * + * @param product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask + * paths include `product_labels`, `display_name`, and `description`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(Product product, FieldMask updateMask) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); + return updateProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Product response = productSearchClient.updateProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product updateProduct(UpdateProductRequest request) { + return updateProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` + * fields can be updated right now. + * + *

If labels are updated, the change will not be reflected in queries until the next index + * time. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product does not exist. + *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from + * the request or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 + * characters. + *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   UpdateProductRequest request =
+   *       UpdateProductRequest.newBuilder()
+   *           .setProduct(Product.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProductCallable() { + return stub.updateProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(ProductName name) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.deleteProduct(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of product to delete. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(String name) { + DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); + deleteProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.deleteProduct(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteProduct(DeleteProductRequest request) { + deleteProductCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a product and its reference images. + * + *

Metadata of the product and all its images will be deleted right away, but search queries + * against ProductSets containing the product may still work until all related caches are + * refreshed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteProductRequest request =
+   *       DeleteProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProductCallable() { + return stub.deleteProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + ProductName parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
+   *   String referenceImageId = "referenceImageId1224107531";
+   *   ReferenceImage response =
+   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product in which to create the reference image. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param referenceImage Required. The reference image to create. If an image ID is specified, it + * is ignored. + * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot + * contain the character `/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage( + String parent, ReferenceImage referenceImage, String referenceImageId) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(parent) + .setReferenceImage(referenceImage) + .setReferenceImageId(referenceImageId) + .build(); + return createReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { + return createReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and returns a new ReferenceImage resource. + * + *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will + * try to detect regions of interest in the image that are compatible with the product_category on + * the parent product. If it is specified, detection is ALWAYS skipped. The system converts + * polygons into non-rotated rectangles. + * + *

Note that the pipeline will resize the image if the image resolution is too large to process + * (above 50MP). + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. + *
  • Returns INVALID_ARGUMENT if the product does not exist. + *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with + * the parent product's product_category is detected. + *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   CreateReferenceImageRequest request =
+   *       CreateReferenceImageRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setReferenceImage(ReferenceImage.newBuilder().build())
+   *           .setReferenceImageId("referenceImageId1224107531")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.createReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createReferenceImageCallable() { + return stub.createReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(ReferenceImageName name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   productSearchClient.deleteReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the reference image to delete. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(String name) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder().setName(name).build(); + deleteReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   productSearchClient.deleteReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteReferenceImage(DeleteReferenceImageRequest request) { + deleteReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Permanently deletes a reference image. + * + *

The image metadata will be deleted right away, but search queries against ProductSets + * containing the image may still work until all related caches are refreshed. + * + *

The actual image files are not deleted from Google Cloud Storage. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   DeleteReferenceImageRequest request =
+   *       DeleteReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteReferenceImageCallable() { + return stub.deleteReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the product containing the reference images. + *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder().setParent(parent).build(); + return listReferenceImages(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListReferenceImagesPagedResponse listReferenceImages( + ListReferenceImagesRequest request) { + return listReferenceImagesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReferenceImage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesPagedCallable() { + return stub.listReferenceImagesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists reference images. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the parent product does not exist. + *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListReferenceImagesRequest request =
+   *       ListReferenceImagesRequest.newBuilder()
+   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListReferenceImagesResponse response =
+   *         productSearchClient.listReferenceImagesCallable().call(request);
+   *     for (ReferenceImage element : response.getReferenceImagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listReferenceImagesCallable() { + return stub.listReferenceImagesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ReferenceImageName name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(ReferenceImageName name) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name =
+   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *           .toString();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the ReferenceImage to get. + *

Format is: + *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(String name) { + GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); + return getReferenceImage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { + return getReferenceImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information associated with a ReferenceImage. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the specified image does not exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   GetReferenceImageRequest request =
+   *       GetReferenceImageRequest.newBuilder()
+   *           .setName(
+   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.getReferenceImageCallable().futureCall(request);
+   *   // Do something.
+   *   ReferenceImage response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getReferenceImageCallable() { + return stub.getReferenceImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(ProductSetName name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, ProductName product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.addProductToProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be added to this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(String name, String product) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + addProductToProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.addProductToProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void addProductToProductSet(AddProductToProductSetRequest request) { + addProductToProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds a Product to the specified ProductSet. If the Product is already present, no change is + * made. + * + *

One Product can be added to at most 100 ProductSets. + * + *

Possible errors: + * + *

    + *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   AddProductToProductSetRequest request =
+   *       AddProductToProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addProductToProductSetCallable() { + return stub.addProductToProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(ProductSetName name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setProduct(product) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, ProductName product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(name) + .setProduct(product == null ? null : product.toString()) + .build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   productSearchClient.removeProductFromProductSet(name, product);
+   * }
+   * }
+ * + * @param name Required. The resource name for the ProductSet to modify. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param product Required. The resource name for the Product to be removed from this ProductSet. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(String name, String product) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); + removeProductFromProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   productSearchClient.removeProductFromProductSet(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { + removeProductFromProductSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes a Product from the specified ProductSet. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   RemoveProductFromProductSetRequest request =
+   *       RemoveProductFromProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeProductFromProductSetCallable() { + return stub.removeProductFromProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
+   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The ProductSet resource for which to retrieve Products. + *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder().setName(name).build(); + return listProductsInProductSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsInProductSetPagedResponse listProductsInProductSet( + ListProductsInProductSetRequest request) { + return listProductsInProductSetPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetPagedCallable() { + return stub.listProductsInProductSetPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, + * the products field of the response will be empty. + * + *

Possible errors: + * + *

    + *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *
+ * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ListProductsInProductSetRequest request =
+   *       ListProductsInProductSetRequest.newBuilder()
+   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductsInProductSetResponse response =
+   *         productSearchClient.listProductsInProductSetCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsInProductSetCallable() { + return stub.listProductsInProductSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInputConfig(inputConfig) + .build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
+   * }
+   * }
+ * + * @param parent Required. The project in which the ProductSets should be imported. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param inputConfig Required. The input content for the list of requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); + return importProductSetsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ImportProductSetsResponse response =
+   *       productSearchClient.importProductSetsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + importProductSetsAsync(ImportProductSetsRequest request) { + return importProductSetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportProductSetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return stub.importProductSetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API that imports a list of reference images to specified product sets based on a + * list of image information. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. + * (results) + * + *

The input source of this method is a csv file on Google Cloud Storage. For the format of the + * csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   ImportProductSetsRequest request =
+   *       ImportProductSetsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       productSearchClient.importProductSetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importProductSetsCallable() { + return stub.importProductSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   productSearchClient.purgeProductsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location in which the Products should be deleted. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync( + LocationName parent) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return purgeProductsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   productSearchClient.purgeProductsAsync(parent).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location in which the Products should be deleted. + *

Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync(String parent) { + PurgeProductsRequest request = PurgeProductsRequest.newBuilder().setParent(parent).build(); + return purgeProductsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   productSearchClient.purgeProductsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture purgeProductsAsync( + PurgeProductsRequest request) { + return purgeProductsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       productSearchClient.purgeProductsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + purgeProductsOperationCallable() { + return stub.purgeProductsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Asynchronous API to delete all Products in a ProductSet or all Products that are in no + * ProductSet. + * + *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the + * Product will still be deleted. + * + *

It is recommended to not delete the specified ProductSet until after this operation has + * completed. It is also recommended to not add any of the Products involved in the batch delete + * to a new ProductSet while this operation is running because those Products may still end up + * deleted. + * + *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep + * the csv files used in ImportProductSets (if that was how you originally built the Product Set) + * before starting PurgeProducts, in case you need to re-import the data after deletion. + * + *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty + * ProductSet to re-import new Products into the empty ProductSet, you must wait until the + * PurgeProducts operation has finished for that ProductSet. + * + *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep + * track of the progress and results of the request. `Operation.metadata` contains + * `BatchOperationMetadata`. (progress) + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+   *   PurgeProductsRequest request =
+   *       PurgeProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable purgeProductsCallable() { + return stub.purgeProductsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListProductSetsPagedResponse + extends AbstractPagedListResponse< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductSetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductSetsPagedResponse(ListProductSetsPage page) { + super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductSetsPage + extends AbstractPage< + ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { + + private ListProductSetsPage( + PageContext context, + ListProductSetsResponse response) { + super(context, response); + } + + private static ListProductSetsPage createEmptyPage() { + return new ListProductSetsPage(null, null); + } + + @Override + protected ListProductSetsPage createPage( + PageContext context, + ListProductSetsResponse response) { + return new ListProductSetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductSetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductSetsRequest, + ListProductSetsResponse, + ProductSet, + ListProductSetsPage, + ListProductSetsFixedSizeCollection> { + + private ListProductSetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductSetsFixedSizeCollection createEmptyCollection() { + return new ListProductSetsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductSetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductSetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsPagedResponse + extends AbstractPagedListResponse< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsPagedResponse(ListProductsPage page) { + super(page, ListProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsPage + extends AbstractPage { + + private ListProductsPage( + PageContext context, + ListProductsResponse response) { + super(context, response); + } + + private static ListProductsPage createEmptyPage() { + return new ListProductsPage(null, null); + } + + @Override + protected ListProductsPage createPage( + PageContext context, + ListProductsResponse response) { + return new ListProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + private ListProductsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsFixedSizeCollection createEmptyCollection() { + return new ListProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListReferenceImagesPagedResponse + extends AbstractPagedListResponse< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListReferenceImagesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { + super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListReferenceImagesPage + extends AbstractPage< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage> { + + private ListReferenceImagesPage( + PageContext + context, + ListReferenceImagesResponse response) { + super(context, response); + } + + private static ListReferenceImagesPage createEmptyPage() { + return new ListReferenceImagesPage(null, null); + } + + @Override + protected ListReferenceImagesPage createPage( + PageContext + context, + ListReferenceImagesResponse response) { + return new ListReferenceImagesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListReferenceImagesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ReferenceImage, + ListReferenceImagesPage, + ListReferenceImagesFixedSizeCollection> { + + private ListReferenceImagesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { + return new ListReferenceImagesFixedSizeCollection(null, 0); + } + + @Override + protected ListReferenceImagesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsInProductSetPagedResponse + extends AbstractPagedListResponse< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsInProductSetPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { + super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsInProductSetPage + extends AbstractPage< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage> { + + private ListProductsInProductSetPage( + PageContext + context, + ListProductsInProductSetResponse response) { + super(context, response); + } + + private static ListProductsInProductSetPage createEmptyPage() { + return new ListProductsInProductSetPage(null, null); + } + + @Override + protected ListProductsInProductSetPage createPage( + PageContext + context, + ListProductsInProductSetResponse response) { + return new ListProductsInProductSetPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsInProductSetFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + Product, + ListProductsInProductSetPage, + ListProductsInProductSetFixedSizeCollection> { + + private ListProductsInProductSetFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { + return new ListProductsInProductSetFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsInProductSetFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java new file mode 100644 index 000000000000..64de31052202 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java @@ -0,0 +1,449 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return ((ProductSearchStubSettings) getStubSettings()).purgeProductsSettings(); + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return ((ProductSearchStubSettings) getStubSettings()).purgeProductsOperationSettings(); + } + + public static final ProductSearchSettings create(ProductSearchStubSettings stub) + throws IOException { + return new ProductSearchSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProductSearchStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProductSearchStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProductSearchStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProductSearchStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProductSearchSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ProductSearchStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProductSearchSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProductSearchStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProductSearchStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); + } + + public ProductSearchStubSettings.Builder getStubSettingsBuilder() { + return ((ProductSearchStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return getStubSettingsBuilder().createProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return getStubSettingsBuilder().listProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getStubSettingsBuilder().getProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return getStubSettingsBuilder().updateProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return getStubSettingsBuilder().deleteProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return getStubSettingsBuilder().createProductSettings(); + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return getStubSettingsBuilder().listProductsSettings(); + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getStubSettingsBuilder().getProductSettings(); + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return getStubSettingsBuilder().updateProductSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return getStubSettingsBuilder().deleteProductSettings(); + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return getStubSettingsBuilder().createReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return getStubSettingsBuilder().deleteReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return getStubSettingsBuilder().listReferenceImagesSettings(); + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getStubSettingsBuilder().getReferenceImageSettings(); + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return getStubSettingsBuilder().addProductToProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return getStubSettingsBuilder().removeProductFromProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return getStubSettingsBuilder().listProductsInProductSetSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return getStubSettingsBuilder().importProductSetsSettings(); + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return getStubSettingsBuilder().importProductSetsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return getStubSettingsBuilder().purgeProductsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public OperationCallSettings.Builder + purgeProductsOperationSettings() { + return getStubSettingsBuilder().purgeProductsOperationSettings(); + } + + @Override + public ProductSearchSettings build() throws IOException { + return new ProductSearchSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json new file mode 100644 index 000000000000..8ad119c5b486 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json @@ -0,0 +1,96 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.vision.v1p4beta1", + "libraryPackage": "com.google.cloud.vision.v1p4beta1", + "services": { + "ImageAnnotator": { + "clients": { + "grpc": { + "libraryClient": "ImageAnnotatorClient", + "rpcs": { + "AsyncBatchAnnotateFiles": { + "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] + }, + "AsyncBatchAnnotateImages": { + "methods": ["asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesOperationCallable", "asyncBatchAnnotateImagesCallable"] + }, + "BatchAnnotateFiles": { + "methods": ["batchAnnotateFiles", "batchAnnotateFiles", "batchAnnotateFilesCallable"] + }, + "BatchAnnotateImages": { + "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] + } + } + } + } + }, + "ProductSearch": { + "clients": { + "grpc": { + "libraryClient": "ProductSearchClient", + "rpcs": { + "AddProductToProductSet": { + "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] + }, + "CreateProduct": { + "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] + }, + "CreateProductSet": { + "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] + }, + "CreateReferenceImage": { + "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] + }, + "DeleteProduct": { + "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] + }, + "DeleteProductSet": { + "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] + }, + "DeleteReferenceImage": { + "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] + }, + "GetProduct": { + "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] + }, + "GetProductSet": { + "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] + }, + "GetReferenceImage": { + "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] + }, + "ImportProductSets": { + "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] + }, + "ListProductSets": { + "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] + }, + "ListProducts": { + "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] + }, + "ListProductsInProductSet": { + "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] + }, + "ListReferenceImages": { + "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] + }, + "PurgeProducts": { + "methods": ["purgeProductsAsync", "purgeProductsAsync", "purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] + }, + "RemoveProductFromProductSet": { + "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] + }, + "UpdateProduct": { + "methods": ["updateProduct", "updateProduct", "updateProductCallable"] + }, + "UpdateProductSet": { + "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java new file mode 100644 index 000000000000..9f00d3089dce --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java @@ -0,0 +1,77 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ImageAnnotatorClient ======================= + * + *

Service Description: Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service + * returns detected entities from the images. + * + *

Sample for ImageAnnotatorClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
+ *   List requests = new ArrayList<>();
+ *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
+ * }
+ * }
+ * + *

======================= ProductSearchClient ======================= + * + *

Service Description: Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * + *

- The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] + * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put + * different products into groups to limit identification. + * + *

In parallel, + * + *

- The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, + * named `projects/*/locations/*/products/*` + * + *

- Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of + * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + * + *

Sample for ProductSearchClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   ProductSet productSet = ProductSet.newBuilder().build();
+ *   String productSetId = "productSetId1003042158";
+ *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.vision.v1p4beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..26ba519adf13 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java new file mode 100644 index 000000000000..9d45f0e21bdd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java @@ -0,0 +1,291 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { + private static final MethodDescriptor + batchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchAnnotateFilesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateImages") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setRequestMarshaller( + ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + batchAnnotateFilesCallable; + private final UnaryCallable + asyncBatchAnnotateImagesCallable; + private final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageAnnotatorStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + batchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .build(); + GrpcCallSettings + batchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) + .build(); + GrpcCallSettings + asyncBatchAnnotateImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) + .build(); + GrpcCallSettings + asyncBatchAnnotateFilesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.batchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + batchAnnotateFilesTransportSettings, + settings.batchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateImagesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesOperationSettings(), + clientContext, + operationsStub); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + batchAnnotateFilesCallable() { + return batchAnnotateFilesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + return asyncBatchAnnotateImagesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return asyncBatchAnnotateImagesOperationCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java new file mode 100644 index 000000000000..5e932b470f6d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java new file mode 100644 index 000000000000..e4e6d523a3f9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java @@ -0,0 +1,831 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsResponse; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcProductSearchStub extends ProductSearchStub { + private static final MethodDescriptor + createProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProducts") + .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProduct") + .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProduct") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listReferenceImagesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListReferenceImages") + .setRequestMarshaller( + ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getReferenceImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetReferenceImage") + .setRequestMarshaller( + ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addProductToProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/AddProductToProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeProductFromProductSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/RemoveProductFromProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/ListProductsInProductSet") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importProductSetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ImportProductSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + purgeProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable + purgeProductsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new GrpcProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { + return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProductSearchStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProductSearchStub( + ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcProductSearchCallableFactory()); + } + + /** + * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product_set.name", String.valueOf(request.getProductSet().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("product.name", String.valueOf(request.getProduct().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listReferenceImagesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getReferenceImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings addProductToProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeProductFromProductSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listProductsInProductSetTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings importProductSetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings purgeProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + operationsStub); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java new file mode 100644 index 000000000000..6cecdfaec4db --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java new file mode 100644 index 000000000000..a6e83d2f1e20 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java @@ -0,0 +1,428 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(OperationMetadata.getDescriptor()) + .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) + .add(AsyncBatchAnnotateImagesResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/images:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/files:annotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchAnnotateFilesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateImages") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/images:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateImagesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + asyncBatchAnnotateFilesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateFiles") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/files:asyncBatchAnnotate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AsyncBatchAnnotateFilesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + batchAnnotateImagesCallable; + private final UnaryCallable + batchAnnotateFilesCallable; + private final UnaryCallable + asyncBatchAnnotateImagesCallable; + private final OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable; + private final UnaryCallable + asyncBatchAnnotateFilesCallable; + private final OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) + throws IOException { + return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonImageAnnotatorStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonImageAnnotatorStub( + ImageAnnotatorStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + batchAnnotateImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateImagesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + asyncBatchAnnotateFilesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.batchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + batchAnnotateImagesTransportSettings, + settings.batchAnnotateImagesSettings(), + clientContext); + this.batchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + batchAnnotateFilesTransportSettings, + settings.batchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateImagesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesSettings(), + clientContext); + this.asyncBatchAnnotateImagesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateImagesTransportSettings, + settings.asyncBatchAnnotateImagesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.asyncBatchAnnotateFilesCallable = + callableFactory.createUnaryCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesSettings(), + clientContext); + this.asyncBatchAnnotateFilesOperationCallable = + callableFactory.createOperationCallable( + asyncBatchAnnotateFilesTransportSettings, + settings.asyncBatchAnnotateFilesOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(batchAnnotateImagesMethodDescriptor); + methodDescriptors.add(batchAnnotateFilesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateImagesMethodDescriptor); + methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + batchAnnotateImagesCallable() { + return batchAnnotateImagesCallable; + } + + @Override + public UnaryCallable + batchAnnotateFilesCallable() { + return batchAnnotateFilesCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + return asyncBatchAnnotateImagesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + return asyncBatchAnnotateImagesOperationCallable; + } + + @Override + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + return asyncBatchAnnotateFilesCallable; + } + + @Override + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + return asyncBatchAnnotateFilesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java new file mode 100644 index 000000000000..9554d926c154 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ProductSearch service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProductSearchCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java new file mode 100644 index 000000000000..51dbbc77eb47 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java @@ -0,0 +1,1269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsResponse; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonProductSearchStub extends ProductSearchStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportProductSetsResponse.getDescriptor()) + .add(Empty.getDescriptor()) + .add(BatchOperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "productSetId", request.getProductSetId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProductSets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/productSets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProductSet") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{productSet.name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "productSet.name", request.getProductSet().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productSet", request.getProductSet(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductSet.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProductSet") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/productSets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProduct") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "productId", request.getProductId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProducts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProduct") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProduct") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{product.name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "product.name", request.getProduct().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProduct") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/products/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateReferenceImage") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "referenceImageId", request.getReferenceImageId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("referenceImage", request.getReferenceImage(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteReferenceImage") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listReferenceImagesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListReferenceImages") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getReferenceImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetReferenceImage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReferenceImage.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + addProductToProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/AddProductToProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + removeProductFromProductSetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/RemoveProductFromProductSet") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse> + listProductsInProductSetMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.vision.v1p4beta1.ProductSearch/ListProductsInProductSet") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importProductSetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ImportProductSets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportProductSetsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + purgeProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p4beta1/{parent=projects/*/locations/*}/products:purge", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (PurgeProductsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createProductSetCallable; + private final UnaryCallable + listProductSetsCallable; + private final UnaryCallable + listProductSetsPagedCallable; + private final UnaryCallable getProductSetCallable; + private final UnaryCallable updateProductSetCallable; + private final UnaryCallable deleteProductSetCallable; + private final UnaryCallable createProductCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable updateProductCallable; + private final UnaryCallable deleteProductCallable; + private final UnaryCallable + createReferenceImageCallable; + private final UnaryCallable deleteReferenceImageCallable; + private final UnaryCallable + listReferenceImagesCallable; + private final UnaryCallable + listReferenceImagesPagedCallable; + private final UnaryCallable getReferenceImageCallable; + private final UnaryCallable addProductToProductSetCallable; + private final UnaryCallable + removeProductFromProductSetCallable; + private final UnaryCallable + listProductsInProductSetCallable; + private final UnaryCallable< + ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> + listProductsInProductSetPagedCallable; + private final UnaryCallable importProductSetsCallable; + private final OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable; + private final UnaryCallable purgeProductsCallable; + private final OperationCallable + purgeProductsOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) + throws IOException { + return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProductSearchStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProductSearchStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProductSearchStub( + ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonProductSearchStub( + ProductSearchStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listReferenceImagesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listReferenceImagesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getReferenceImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getReferenceImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + addProductToProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addProductToProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + removeProductFromProductSetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listProductsInProductSetTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listProductsInProductSetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings importProductSetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importProductSetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings purgeProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createProductSetCallable = + callableFactory.createUnaryCallable( + createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); + this.listProductSetsCallable = + callableFactory.createUnaryCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.listProductSetsPagedCallable = + callableFactory.createPagedCallable( + listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); + this.getProductSetCallable = + callableFactory.createUnaryCallable( + getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); + this.updateProductSetCallable = + callableFactory.createUnaryCallable( + updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); + this.deleteProductSetCallable = + callableFactory.createUnaryCallable( + deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); + this.createProductCallable = + callableFactory.createUnaryCallable( + createProductTransportSettings, settings.createProductSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.updateProductCallable = + callableFactory.createUnaryCallable( + updateProductTransportSettings, settings.updateProductSettings(), clientContext); + this.deleteProductCallable = + callableFactory.createUnaryCallable( + deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); + this.createReferenceImageCallable = + callableFactory.createUnaryCallable( + createReferenceImageTransportSettings, + settings.createReferenceImageSettings(), + clientContext); + this.deleteReferenceImageCallable = + callableFactory.createUnaryCallable( + deleteReferenceImageTransportSettings, + settings.deleteReferenceImageSettings(), + clientContext); + this.listReferenceImagesCallable = + callableFactory.createUnaryCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.listReferenceImagesPagedCallable = + callableFactory.createPagedCallable( + listReferenceImagesTransportSettings, + settings.listReferenceImagesSettings(), + clientContext); + this.getReferenceImageCallable = + callableFactory.createUnaryCallable( + getReferenceImageTransportSettings, + settings.getReferenceImageSettings(), + clientContext); + this.addProductToProductSetCallable = + callableFactory.createUnaryCallable( + addProductToProductSetTransportSettings, + settings.addProductToProductSetSettings(), + clientContext); + this.removeProductFromProductSetCallable = + callableFactory.createUnaryCallable( + removeProductFromProductSetTransportSettings, + settings.removeProductFromProductSetSettings(), + clientContext); + this.listProductsInProductSetCallable = + callableFactory.createUnaryCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.listProductsInProductSetPagedCallable = + callableFactory.createPagedCallable( + listProductsInProductSetTransportSettings, + settings.listProductsInProductSetSettings(), + clientContext); + this.importProductSetsCallable = + callableFactory.createUnaryCallable( + importProductSetsTransportSettings, + settings.importProductSetsSettings(), + clientContext); + this.importProductSetsOperationCallable = + callableFactory.createOperationCallable( + importProductSetsTransportSettings, + settings.importProductSetsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.purgeProductsCallable = + callableFactory.createUnaryCallable( + purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); + this.purgeProductsOperationCallable = + callableFactory.createOperationCallable( + purgeProductsTransportSettings, + settings.purgeProductsOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createProductSetMethodDescriptor); + methodDescriptors.add(listProductSetsMethodDescriptor); + methodDescriptors.add(getProductSetMethodDescriptor); + methodDescriptors.add(updateProductSetMethodDescriptor); + methodDescriptors.add(deleteProductSetMethodDescriptor); + methodDescriptors.add(createProductMethodDescriptor); + methodDescriptors.add(listProductsMethodDescriptor); + methodDescriptors.add(getProductMethodDescriptor); + methodDescriptors.add(updateProductMethodDescriptor); + methodDescriptors.add(deleteProductMethodDescriptor); + methodDescriptors.add(createReferenceImageMethodDescriptor); + methodDescriptors.add(deleteReferenceImageMethodDescriptor); + methodDescriptors.add(listReferenceImagesMethodDescriptor); + methodDescriptors.add(getReferenceImageMethodDescriptor); + methodDescriptors.add(addProductToProductSetMethodDescriptor); + methodDescriptors.add(removeProductFromProductSetMethodDescriptor); + methodDescriptors.add(listProductsInProductSetMethodDescriptor); + methodDescriptors.add(importProductSetsMethodDescriptor); + methodDescriptors.add(purgeProductsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createProductSetCallable() { + return createProductSetCallable; + } + + @Override + public UnaryCallable listProductSetsCallable() { + return listProductSetsCallable; + } + + @Override + public UnaryCallable + listProductSetsPagedCallable() { + return listProductSetsPagedCallable; + } + + @Override + public UnaryCallable getProductSetCallable() { + return getProductSetCallable; + } + + @Override + public UnaryCallable updateProductSetCallable() { + return updateProductSetCallable; + } + + @Override + public UnaryCallable deleteProductSetCallable() { + return deleteProductSetCallable; + } + + @Override + public UnaryCallable createProductCallable() { + return createProductCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable updateProductCallable() { + return updateProductCallable; + } + + @Override + public UnaryCallable deleteProductCallable() { + return deleteProductCallable; + } + + @Override + public UnaryCallable createReferenceImageCallable() { + return createReferenceImageCallable; + } + + @Override + public UnaryCallable deleteReferenceImageCallable() { + return deleteReferenceImageCallable; + } + + @Override + public UnaryCallable + listReferenceImagesCallable() { + return listReferenceImagesCallable; + } + + @Override + public UnaryCallable + listReferenceImagesPagedCallable() { + return listReferenceImagesPagedCallable; + } + + @Override + public UnaryCallable getReferenceImageCallable() { + return getReferenceImageCallable; + } + + @Override + public UnaryCallable addProductToProductSetCallable() { + return addProductToProductSetCallable; + } + + @Override + public UnaryCallable + removeProductFromProductSetCallable() { + return removeProductFromProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetCallable() { + return listProductsInProductSetCallable; + } + + @Override + public UnaryCallable + listProductsInProductSetPagedCallable() { + return listProductsInProductSetPagedCallable; + } + + @Override + public UnaryCallable importProductSetsCallable() { + return importProductSetsCallable; + } + + @Override + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + return importProductSetsOperationCallable; + } + + @Override + public UnaryCallable purgeProductsCallable() { + return purgeProductsCallable; + } + + @Override + public OperationCallable + purgeProductsOperationCallable() { + return purgeProductsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java new file mode 100644 index 000000000000..8097b695f4cf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java @@ -0,0 +1,90 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageAnnotator service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ImageAnnotatorStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + batchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); + } + + public UnaryCallable + batchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: batchAnnotateFilesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateImagesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateImagesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateImagesCallable()"); + } + + public OperationCallable< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); + } + + public UnaryCallable + asyncBatchAnnotateFilesCallable() { + throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java new file mode 100644 index 000000000000..c8094c685383 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java @@ -0,0 +1,528 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageAnnotatorStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
+ *     ImageAnnotatorStubSettings.newBuilder();
+ * imageAnnotatorSettingsBuilder
+ *     .batchAnnotateImagesSettings()
+ *     .setRetrySettings(
+ *         imageAnnotatorSettingsBuilder
+ *             .batchAnnotateImagesSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageAnnotatorStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings + batchAnnotateImagesSettings; + private final UnaryCallSettings + batchAnnotateFilesSettings; + private final UnaryCallSettings + asyncBatchAnnotateImagesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings; + private final UnaryCallSettings + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + + /** Returns the object with the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings + batchAnnotateFilesSettings() { + return batchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings + asyncBatchAnnotateImagesSettings() { + return asyncBatchAnnotateImagesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ + public OperationCallSettings< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return asyncBatchAnnotateImagesOperationSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ + public OperationCallSettings< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + public ImageAnnotatorStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageAnnotatorStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonImageAnnotatorStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); + batchAnnotateFilesSettings = settingsBuilder.batchAnnotateFilesSettings().build(); + asyncBatchAnnotateImagesSettings = settingsBuilder.asyncBatchAnnotateImagesSettings().build(); + asyncBatchAnnotateImagesOperationSettings = + settingsBuilder.asyncBatchAnnotateImagesOperationSettings().build(); + asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); + asyncBatchAnnotateFilesOperationSettings = + settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); + } + + /** Builder for ImageAnnotatorStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + batchAnnotateImagesSettings; + private final UnaryCallSettings.Builder + batchAnnotateFilesSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings; + private final UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings; + private final OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateImagesOperationSettings = OperationCallSettings.newBuilder(); + asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, + batchAnnotateFilesSettings, + asyncBatchAnnotateImagesSettings, + asyncBatchAnnotateFilesSettings); + initDefaults(this); + } + + protected Builder(ImageAnnotatorStubSettings settings) { + super(settings); + + batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); + batchAnnotateFilesSettings = settings.batchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateImagesSettings = settings.asyncBatchAnnotateImagesSettings.toBuilder(); + asyncBatchAnnotateImagesOperationSettings = + settings.asyncBatchAnnotateImagesOperationSettings.toBuilder(); + asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); + asyncBatchAnnotateFilesOperationSettings = + settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + batchAnnotateImagesSettings, + batchAnnotateFilesSettings, + asyncBatchAnnotateImagesSettings, + asyncBatchAnnotateFilesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .batchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateFilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .asyncBatchAnnotateImagesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateImagesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .asyncBatchAnnotateFilesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AsyncBatchAnnotateFilesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to batchAnnotateImages. */ + public UnaryCallSettings.Builder + batchAnnotateImagesSettings() { + return batchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ + public UnaryCallSettings.Builder + batchAnnotateFilesSettings() { + return batchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateImagesSettings() { + return asyncBatchAnnotateImagesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> + asyncBatchAnnotateImagesOperationSettings() { + return asyncBatchAnnotateImagesOperationSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + public UnaryCallSettings.Builder + asyncBatchAnnotateFilesSettings() { + return asyncBatchAnnotateFilesSettings; + } + + /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> + asyncBatchAnnotateFilesOperationSettings() { + return asyncBatchAnnotateFilesOperationSettings; + } + + @Override + public ImageAnnotatorStubSettings build() throws IOException { + return new ImageAnnotatorStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java new file mode 100644 index 000000000000..fa7cfd2a354e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java @@ -0,0 +1,193 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsResponse; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ProductSearch service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ProductSearchStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); + } + + public UnaryCallable + listProductSetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); + } + + public UnaryCallable listProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); + } + + public UnaryCallable getProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); + } + + public UnaryCallable updateProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); + } + + public UnaryCallable deleteProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); + } + + public UnaryCallable createProductCallable() { + throw new UnsupportedOperationException("Not implemented: createProductCallable()"); + } + + public UnaryCallable listProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); + } + + public UnaryCallable listProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); + } + + public UnaryCallable getProductCallable() { + throw new UnsupportedOperationException("Not implemented: getProductCallable()"); + } + + public UnaryCallable updateProductCallable() { + throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); + } + + public UnaryCallable deleteProductCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); + } + + public UnaryCallable createReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); + } + + public UnaryCallable deleteReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); + } + + public UnaryCallable + listReferenceImagesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); + } + + public UnaryCallable + listReferenceImagesCallable() { + throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); + } + + public UnaryCallable getReferenceImageCallable() { + throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); + } + + public UnaryCallable addProductToProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); + } + + public UnaryCallable + removeProductFromProductSetCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeProductFromProductSetCallable()"); + } + + public UnaryCallable + listProductsInProductSetPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listProductsInProductSetPagedCallable()"); + } + + public UnaryCallable + listProductsInProductSetCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); + } + + public OperationCallable< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importProductSetsOperationCallable()"); + } + + public UnaryCallable importProductSetsCallable() { + throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); + } + + public OperationCallable + purgeProductsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); + } + + public UnaryCallable purgeProductsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java new file mode 100644 index 000000000000..b890b18e0009 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java @@ -0,0 +1,1191 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsResponse; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductSearchStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (vision.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createProductSet to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
+ *     ProductSearchStubSettings.newBuilder();
+ * productSearchSettingsBuilder
+ *     .createProductSetSettings()
+ *     .setRetrySettings(
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ProductSearchStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-vision") + .build(); + + private final UnaryCallSettings createProductSetSettings; + private final PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings getProductSetSettings; + private final UnaryCallSettings updateProductSetSettings; + private final UnaryCallSettings deleteProductSetSettings; + private final UnaryCallSettings createProductSettings; + private final PagedCallSettings< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings getProductSettings; + private final UnaryCallSettings updateProductSettings; + private final UnaryCallSettings deleteProductSettings; + private final UnaryCallSettings + createReferenceImageSettings; + private final UnaryCallSettings deleteReferenceImageSettings; + private final PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings + getReferenceImageSettings; + private final UnaryCallSettings + addProductToProductSetSettings; + private final UnaryCallSettings + removeProductFromProductSetSettings; + private final PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings importProductSetsSettings; + private final OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + private final UnaryCallSettings purgeProductsSettings; + private final OperationCallSettings + purgeProductsOperationSettings; + + private static final PagedListDescriptor< + ListProductSetsRequest, ListProductSetsResponse, ProductSet> + LIST_PRODUCT_SETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductSetsRequest injectToken( + ListProductSetsRequest payload, String token) { + return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductSetsRequest injectPageSize( + ListProductSetsRequest payload, int pageSize) { + return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductSetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductSetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductSetsResponse payload) { + return payload.getProductSetsList() == null + ? ImmutableList.of() + : payload.getProductSetsList(); + } + }; + + private static final PagedListDescriptor + LIST_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsRequest injectToken(ListProductsRequest payload, String token) { + return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { + return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> + LIST_REFERENCE_IMAGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListReferenceImagesRequest injectToken( + ListReferenceImagesRequest payload, String token) { + return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListReferenceImagesRequest injectPageSize( + ListReferenceImagesRequest payload, int pageSize) { + return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListReferenceImagesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListReferenceImagesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListReferenceImagesResponse payload) { + return payload.getReferenceImagesList() == null + ? ImmutableList.of() + : payload.getReferenceImagesList(); + } + }; + + private static final PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = + new PagedListDescriptor< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsInProductSetRequest injectToken( + ListProductsInProductSetRequest payload, String token) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListProductsInProductSetRequest injectPageSize( + ListProductsInProductSetRequest payload, int pageSize) { + return ListProductsInProductSetRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListProductsInProductSetRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsInProductSetResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsInProductSetResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + LIST_PRODUCT_SETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductSetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); + return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + LIST_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); + return ListProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + LIST_REFERENCE_IMAGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListReferenceImagesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); + return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListProductsInProductSetRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> + pageContext = + PageContext.create( + callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); + return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createProductSet. */ + public UnaryCallSettings createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductSets. */ + public PagedCallSettings< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the object with the settings used for calls to getProductSet. */ + public UnaryCallSettings getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the object with the settings used for calls to updateProductSet. */ + public UnaryCallSettings updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the object with the settings used for calls to deleteProductSet. */ + public UnaryCallSettings deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the object with the settings used for calls to createProduct. */ + public UnaryCallSettings createProductSettings() { + return createProductSettings; + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return getProductSettings; + } + + /** Returns the object with the settings used for calls to updateProduct. */ + public UnaryCallSettings updateProductSettings() { + return updateProductSettings; + } + + /** Returns the object with the settings used for calls to deleteProduct. */ + public UnaryCallSettings deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the object with the settings used for calls to createReferenceImage. */ + public UnaryCallSettings + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to listReferenceImages. */ + public PagedCallSettings< + ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the object with the settings used for calls to getReferenceImage. */ + public UnaryCallSettings getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the object with the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the object with the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the object with the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public UnaryCallSettings importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the object with the settings used for calls to importProductSets. */ + public OperationCallSettings< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public UnaryCallSettings purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the object with the settings used for calls to purgeProducts. */ + public OperationCallSettings + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + + public ProductSearchStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProductSearchStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProductSearchStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "vision.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "vision.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createProductSetSettings = settingsBuilder.createProductSetSettings().build(); + listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); + getProductSetSettings = settingsBuilder.getProductSetSettings().build(); + updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); + deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); + createProductSettings = settingsBuilder.createProductSettings().build(); + listProductsSettings = settingsBuilder.listProductsSettings().build(); + getProductSettings = settingsBuilder.getProductSettings().build(); + updateProductSettings = settingsBuilder.updateProductSettings().build(); + deleteProductSettings = settingsBuilder.deleteProductSettings().build(); + createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); + deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); + listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); + getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); + addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); + removeProductFromProductSetSettings = + settingsBuilder.removeProductFromProductSetSettings().build(); + listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); + importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); + importProductSetsOperationSettings = + settingsBuilder.importProductSetsOperationSettings().build(); + purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); + purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); + } + + /** Builder for ProductSearchStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createProductSetSettings; + private final PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings; + private final UnaryCallSettings.Builder getProductSetSettings; + private final UnaryCallSettings.Builder + updateProductSetSettings; + private final UnaryCallSettings.Builder + deleteProductSetSettings; + private final UnaryCallSettings.Builder createProductSettings; + private final PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings.Builder getProductSettings; + private final UnaryCallSettings.Builder updateProductSettings; + private final UnaryCallSettings.Builder deleteProductSettings; + private final UnaryCallSettings.Builder + createReferenceImageSettings; + private final UnaryCallSettings.Builder + deleteReferenceImageSettings; + private final PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings; + private final UnaryCallSettings.Builder + getReferenceImageSettings; + private final UnaryCallSettings.Builder + addProductToProductSetSettings; + private final UnaryCallSettings.Builder + removeProductFromProductSetSettings; + private final PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings; + private final UnaryCallSettings.Builder + importProductSetsSettings; + private final OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings; + private final UnaryCallSettings.Builder purgeProductsSettings; + private final OperationCallSettings.Builder + purgeProductsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); + getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); + getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listReferenceImagesSettings = + PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); + getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsInProductSetSettings = + PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); + importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importProductSetsOperationSettings = OperationCallSettings.newBuilder(); + purgeProductsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeProductsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings, + purgeProductsSettings); + initDefaults(this); + } + + protected Builder(ProductSearchStubSettings settings) { + super(settings); + + createProductSetSettings = settings.createProductSetSettings.toBuilder(); + listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); + getProductSetSettings = settings.getProductSetSettings.toBuilder(); + updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); + deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); + createProductSettings = settings.createProductSettings.toBuilder(); + listProductsSettings = settings.listProductsSettings.toBuilder(); + getProductSettings = settings.getProductSettings.toBuilder(); + updateProductSettings = settings.updateProductSettings.toBuilder(); + deleteProductSettings = settings.deleteProductSettings.toBuilder(); + createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); + deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); + listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); + getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); + addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); + removeProductFromProductSetSettings = + settings.removeProductFromProductSetSettings.toBuilder(); + listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); + importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); + importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); + purgeProductsSettings = settings.purgeProductsSettings.toBuilder(); + purgeProductsOperationSettings = settings.purgeProductsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createProductSetSettings, + listProductSetsSettings, + getProductSetSettings, + updateProductSetSettings, + deleteProductSetSettings, + createProductSettings, + listProductsSettings, + getProductSettings, + updateProductSettings, + deleteProductSettings, + createReferenceImageSettings, + deleteReferenceImageSettings, + listReferenceImagesSettings, + getReferenceImageSettings, + addProductToProductSetSettings, + removeProductFromProductSetSettings, + listProductsInProductSetSettings, + importProductSetsSettings, + purgeProductsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .updateProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .createReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .deleteReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .listReferenceImagesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .getReferenceImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .addProductToProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .removeProductFromProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listProductsInProductSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .importProductSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .purgeProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .importProductSetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportProductSetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(20000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(86400000L)) + .build())); + + builder + .purgeProductsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createProductSet. */ + public UnaryCallSettings.Builder + createProductSetSettings() { + return createProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductSets. */ + public PagedCallSettings.Builder< + ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> + listProductSetsSettings() { + return listProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to getProductSet. */ + public UnaryCallSettings.Builder getProductSetSettings() { + return getProductSetSettings; + } + + /** Returns the builder for the settings used for calls to updateProductSet. */ + public UnaryCallSettings.Builder + updateProductSetSettings() { + return updateProductSetSettings; + } + + /** Returns the builder for the settings used for calls to deleteProductSet. */ + public UnaryCallSettings.Builder deleteProductSetSettings() { + return deleteProductSetSettings; + } + + /** Returns the builder for the settings used for calls to createProduct. */ + public UnaryCallSettings.Builder createProductSettings() { + return createProductSettings; + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getProductSettings; + } + + /** Returns the builder for the settings used for calls to updateProduct. */ + public UnaryCallSettings.Builder updateProductSettings() { + return updateProductSettings; + } + + /** Returns the builder for the settings used for calls to deleteProduct. */ + public UnaryCallSettings.Builder deleteProductSettings() { + return deleteProductSettings; + } + + /** Returns the builder for the settings used for calls to createReferenceImage. */ + public UnaryCallSettings.Builder + createReferenceImageSettings() { + return createReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to deleteReferenceImage. */ + public UnaryCallSettings.Builder + deleteReferenceImageSettings() { + return deleteReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to listReferenceImages. */ + public PagedCallSettings.Builder< + ListReferenceImagesRequest, + ListReferenceImagesResponse, + ListReferenceImagesPagedResponse> + listReferenceImagesSettings() { + return listReferenceImagesSettings; + } + + /** Returns the builder for the settings used for calls to getReferenceImage. */ + public UnaryCallSettings.Builder + getReferenceImageSettings() { + return getReferenceImageSettings; + } + + /** Returns the builder for the settings used for calls to addProductToProductSet. */ + public UnaryCallSettings.Builder + addProductToProductSetSettings() { + return addProductToProductSetSettings; + } + + /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ + public UnaryCallSettings.Builder + removeProductFromProductSetSettings() { + return removeProductFromProductSetSettings; + } + + /** Returns the builder for the settings used for calls to listProductsInProductSet. */ + public PagedCallSettings.Builder< + ListProductsInProductSetRequest, + ListProductsInProductSetResponse, + ListProductsInProductSetPagedResponse> + listProductsInProductSetSettings() { + return listProductsInProductSetSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + public UnaryCallSettings.Builder + importProductSetsSettings() { + return importProductSetsSettings; + } + + /** Returns the builder for the settings used for calls to importProductSets. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> + importProductSetsOperationSettings() { + return importProductSetsOperationSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + public UnaryCallSettings.Builder purgeProductsSettings() { + return purgeProductsSettings; + } + + /** Returns the builder for the settings used for calls to purgeProducts. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + purgeProductsOperationSettings() { + return purgeProductsOperationSettings; + } + + @Override + public ProductSearchStubSettings build() throws IOException { + return new ProductSearchStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java new file mode 100644 index 000000000000..f6c37238b4f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java @@ -0,0 +1,267 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p4beta1.stub.HttpJsonImageAnnotatorStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientHttpJsonTest { + private static MockHttpService mockService; + private static ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonImageAnnotatorStub.getMethodDescriptors(), + ImageAnnotatorSettings.getDefaultEndpoint()); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchAnnotateFilesTest() throws Exception { + BatchAnnotateFilesResponse expectedResponse = + BatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateFiles(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateImagesTest() throws Exception { + AsyncBatchAnnotateImagesResponse expectedResponse = + AsyncBatchAnnotateImagesResponse.newBuilder() + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateImagesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + AsyncBatchAnnotateImagesResponse actualResponse = + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java new file mode 100644 index 000000000000..16f2ea5fe2f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageAnnotatorClientTest { + private static MockImageAnnotator mockImageAnnotator; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageAnnotatorClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageAnnotator = new MockImageAnnotator(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageAnnotatorSettings settings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageAnnotatorClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void batchAnnotateImagesTest() throws Exception { + BatchAnnotateImagesResponse expectedResponse = + BatchAnnotateImagesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateImages(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchAnnotateFilesTest() throws Exception { + BatchAnnotateFilesResponse expectedResponse = + BatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + mockImageAnnotator.addResponse(expectedResponse); + + List requests = new ArrayList<>(); + + BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchAnnotateFilesRequest actualRequest = ((BatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.batchAnnotateFiles(requests); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void asyncBatchAnnotateImagesTest() throws Exception { + AsyncBatchAnnotateImagesResponse expectedResponse = + AsyncBatchAnnotateImagesResponse.newBuilder() + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateImagesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + AsyncBatchAnnotateImagesResponse actualResponse = + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateImagesRequest actualRequest = + ((AsyncBatchAnnotateImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void asyncBatchAnnotateFilesTest() throws Exception { + AsyncBatchAnnotateFilesResponse expectedResponse = + AsyncBatchAnnotateFilesResponse.newBuilder() + .addAllResponses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("asyncBatchAnnotateFilesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockImageAnnotator.addResponse(resultOperation); + + List requests = new ArrayList<>(); + + AsyncBatchAnnotateFilesResponse actualResponse = + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockImageAnnotator.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AsyncBatchAnnotateFilesRequest actualRequest = + ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); + + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void asyncBatchAnnotateFilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageAnnotator.addException(exception); + + try { + List requests = new ArrayList<>(); + client.asyncBatchAnnotateFilesAsync(requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java new file mode 100644 index 000000000000..248837fa20ed --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotator implements MockGrpcService { + private final MockImageAnnotatorImpl serviceImpl; + + public MockImageAnnotator() { + serviceImpl = new MockImageAnnotatorImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java new file mode 100644 index 000000000000..269328329384 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java @@ -0,0 +1,147 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { + private List requests; + private Queue responses; + + public MockImageAnnotatorImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void batchAnnotateImages( + BatchAnnotateImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateImagesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchAnnotateFiles( + BatchAnnotateFilesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchAnnotateFilesResponse) { + requests.add(request); + responseObserver.onNext(((BatchAnnotateFilesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchAnnotateFilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateImages( + AsyncBatchAnnotateImagesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void asyncBatchAnnotateFiles( + AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java new file mode 100644 index 000000000000..413b7f2e3a79 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearch implements MockGrpcService { + private final MockProductSearchImpl serviceImpl; + + public MockProductSearch() { + serviceImpl = new MockProductSearchImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java new file mode 100644 index 000000000000..0321f0f58b03 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java @@ -0,0 +1,461 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.vision.v1p4beta1.ProductSearchGrpc.ProductSearchImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductSearchImpl extends ProductSearchImplBase { + private List requests; + private Queue responses; + + public MockProductSearchImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createProductSet( + CreateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductSets( + ListProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductSetsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductSetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductSetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProductSet( + GetProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProductSet( + UpdateProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSet) { + requests.add(request); + responseObserver.onNext(((ProductSet) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSet.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProductSet( + DeleteProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProduct( + CreateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProducts( + ListProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProduct(GetProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProduct( + UpdateProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createReferenceImage( + CreateReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteReferenceImage( + DeleteReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listReferenceImages( + ListReferenceImagesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListReferenceImagesResponse) { + requests.add(request); + responseObserver.onNext(((ListReferenceImagesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListReferenceImagesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getReferenceImage( + GetReferenceImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReferenceImage) { + requests.add(request); + responseObserver.onNext(((ReferenceImage) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReferenceImage.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addProductToProductSet( + AddProductToProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeProductFromProductSet( + RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductsInProductSet( + ListProductsInProductSetRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsInProductSetResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsInProductSetResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsInProductSetResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importProductSets( + ImportProductSetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportProductSets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void purgeProducts( + PurgeProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PurgeProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java new file mode 100644 index 000000000000..f4805121c5eb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java @@ -0,0 +1,1991 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.vision.v1p4beta1.stub.HttpJsonProductSearchStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientHttpJsonTest { + private static MockHttpService mockService; + private static ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProductSearchStub.getMethodDescriptors(), + ProductSearchSettings.getDefaultEndpoint()); + ProductSearchSettings settings = + ProductSearchSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSet productSet = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + client.deleteProductSet(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Product product = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + client.deleteProduct(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + client.deleteReferenceImage(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7253/locations/location-7253/products/product-7253"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeProductsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeProductsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java new file mode 100644 index 000000000000..19e7c7c38e18 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java @@ -0,0 +1,1775 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; +import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductSearchClientTest { + private static MockProductSearch mockProductSearch; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProductSearchClient client; + + @BeforeClass + public static void startStaticServer() { + mockProductSearch = new MockProductSearch(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProductSearchSettings settings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductSearchClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + + ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(productSetId, actualRequest.getProductSetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + client.createProductSet(parent, productSet, productSetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSetsTest2() throws Exception { + ProductSet responsesElement = ProductSet.newBuilder().build(); + ListProductSetsResponse expectedResponse = + ListProductSetsResponse.newBuilder() + .setNextPageToken("") + .addAllProductSets(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProductSets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSetTest2() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ProductSet actualResponse = client.getProductSet(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductSetTest() throws Exception { + ProductSet expectedResponse = + ProductSet.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setDisplayName("displayName1714148973") + .setIndexTime(Timestamp.newBuilder().build()) + .setIndexError(Status.newBuilder().build()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + ProductSet actualResponse = client.updateProductSet(productSet, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(productSet, actualRequest.getProductSet()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProductSet(productSet, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProductSet(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + + Product actualResponse = client.createProduct(parent, product, productId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(productId, actualRequest.getProductId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + client.createProduct(parent, product, productId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setProductCategory("productCategory197299981") + .addAllProductLabels(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Product actualResponse = client.updateProduct(product, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); + + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProduct(product, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProduct(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + + ReferenceImage actualResponse = + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateReferenceImageRequest actualRequest = + ((CreateReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); + Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + client.createReferenceImage(parent, referenceImage, referenceImageId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteReferenceImageTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteReferenceImage(name); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteReferenceImageRequest actualRequest = + ((DeleteReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.deleteReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listReferenceImagesTest2() throws Exception { + ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); + ListReferenceImagesResponse expectedResponse = + ListReferenceImagesResponse.newBuilder() + .setNextPageToken("") + .addAllReferenceImages(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listReferenceImagesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.listReferenceImages(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getReferenceImageTest2() throws Exception { + ReferenceImage expectedResponse = + ReferenceImage.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .setUri("uri116076") + .addAllBoundingPolys(new ArrayList()) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ReferenceImage actualResponse = client.getReferenceImage(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getReferenceImageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.getReferenceImage(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addProductToProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.addProductToProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddProductToProductSetRequest actualRequest = + ((AddProductToProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addProductToProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.addProductToProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product.toString(), actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeProductFromProductSetTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + String product = "product-309474065"; + + client.removeProductFromProductSet(name, product); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveProductFromProductSetRequest actualRequest = + ((RemoveProductFromProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(product, actualRequest.getProduct()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeProductFromProductSetExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + String product = "product-309474065"; + client.removeProductFromProductSet(name, product); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsInProductSetTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsInProductSetResponse expectedResponse = + ListProductsInProductSetResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockProductSearch.addResponse(expectedResponse); + + String name = "name3373707"; + + ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsInProductSetRequest actualRequest = + ((ListProductsInProductSetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsInProductSetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String name = "name3373707"; + client.listProductsInProductSet(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importProductSetsTest() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importProductSetsTest2() throws Exception { + ImportProductSetsResponse expectedResponse = + ImportProductSetsResponse.newBuilder() + .addAllReferenceImages(new ArrayList()) + .addAllStatuses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importProductSetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + + ImportProductSetsResponse actualResponse = + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importProductSetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + client.importProductSetsAsync(parent, inputConfig).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeProductsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeProductsTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeProductsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockProductSearch.addResponse(resultOperation); + + String parent = "parent-995424086"; + + client.purgeProductsAsync(parent).get(); + + List actualRequests = mockProductSearch.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductSearch.addException(exception); + + try { + String parent = "parent-995424086"; + client.purgeProductsAsync(parent).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java new file mode 100644 index 000000000000..af9e90f11bcc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java @@ -0,0 +1,635 @@ +package com.google.cloud.vision.v1p4beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Service that performs Google Cloud Vision API detection tasks over client
+ * images, such as face, landmark, logo, label, and text detection. The
+ * ImageAnnotator service returns detected entities from the images.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p4beta1/image_annotator.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", + requestType = com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) + .build(); + } + } + } + return getBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateFiles", + requestType = com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; + if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getBatchAnnotateFilesMethod = getBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateFiles")) + .build(); + } + } + } + return getBatchAnnotateFilesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateImages", + requestType = com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; + if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod = getAsyncBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateImages")) + .build(); + } + } + } + return getAsyncBatchAnnotateImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", + requestType = com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { + io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { + ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) + .build(); + } + } + } + return getAsyncBatchAnnotateFilesMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + }; + return ImageAnnotatorStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageAnnotatorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + }; + return ImageAnnotatorBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ImageAnnotatorFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + }; + return ImageAnnotatorFutureStub.newStub(factory, channel); + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public void batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateFilesMethod(), responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public void asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateImagesMethod(), responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse>( + this, METHODID_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse>( + this, METHODID_BATCH_ANNOTATE_FILES))) + .addMethod( + getAsyncBatchAnnotateImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_IMAGES))) + .addMethod( + getAsyncBatchAnnotateFilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest, + com.google.longrunning.Operation>( + this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) + .build(); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { + private ImageAnnotatorStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public void batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public void batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public void asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ImageAnnotatorBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorBlockingStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchAnnotateFilesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Service that performs Google Cloud Vision API detection tasks over client
+   * images, such as face, landmark, logo, label, and text detection. The
+   * ImageAnnotator service returns detected entities from the images.
+   * 
+ */ + public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { + private ImageAnnotatorFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageAnnotatorFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageAnnotatorFutureStub(channel, callOptions); + } + + /** + *
+     * Run image detection and annotation for a batch of images.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Service that performs image detection and annotation for a batch of files.
+     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
+     * This service will extract at most 5 (customers can specify which 5 in
+     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
+     * file provided and perform detection and annotation for each image
+     * extracted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of images.
+     * Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
+     * This service will write image annotation outputs to json files in customer
+     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateImages( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Run asynchronous image detection and annotation for a list of generic
+     * files, such as PDF files, which may contain multiple pages and multiple
+     * images per page. Progress and results can be retrieved through the
+     * `google.longrunning.Operations` interface.
+     * `Operation.metadata` contains `OperationMetadata` (metadata).
+     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; + private static final int METHODID_BATCH_ANNOTATE_FILES = 1; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_IMAGES = 2; + private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ImageAnnotatorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_BATCH_ANNOTATE_IMAGES: + serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_ANNOTATE_FILES: + serviceImpl.batchAnnotateFiles((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_IMAGES: + serviceImpl.asyncBatchAnnotateImages((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ASYNC_BATCH_ANNOTATE_FILES: + serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageAnnotatorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageAnnotator"); + } + } + + private static final class ImageAnnotatorFileDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier { + ImageAnnotatorFileDescriptorSupplier() {} + } + + private static final class ImageAnnotatorMethodDescriptorSupplier + extends ImageAnnotatorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageAnnotatorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ImageAnnotatorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) + .addMethod(getBatchAnnotateImagesMethod()) + .addMethod(getBatchAnnotateFilesMethod()) + .addMethod(getAsyncBatchAnnotateImagesMethod()) + .addMethod(getAsyncBatchAnnotateFilesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java new file mode 100644 index 000000000000..066efff1eb09 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java @@ -0,0 +1,2300 @@ +package com.google.cloud.vision.v1p4beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Manages Products and ProductSets of reference images for use in product
+ * search. It uses the following resource model:
+ * - The API has a collection of
+ * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+ * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+ * products into groups to limit identification.
+ * In parallel,
+ * - The API has a collection of
+ * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+ *   `projects/*/locations/*/products/*`
+ * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+ * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+ * named
+ *   `projects/*/locations/*/products/*/referenceImages/*`
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/vision/v1p4beta1/product_search_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ProductSearchGrpc { + + private ProductSearchGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ProductSearch"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", + requestType = com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductSetMethod() { + io.grpc.MethodDescriptor getCreateProductSetMethod; + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) + .build(); + } + } + } + return getCreateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductSets", + requestType = com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductSetsMethod() { + io.grpc.MethodDescriptor getListProductSetsMethod; + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { + ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) + .build(); + } + } + } + return getListProductSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProductSet", + requestType = com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductSetMethod() { + io.grpc.MethodDescriptor getGetProductSetMethod; + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { + ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) + .build(); + } + } + } + return getGetProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", + requestType = com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { + io.grpc.MethodDescriptor getUpdateProductSetMethod; + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { + ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) + .build(); + } + } + } + return getUpdateProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", + requestType = com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { + io.grpc.MethodDescriptor getDeleteProductSetMethod; + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { + ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) + .build(); + } + } + } + return getDeleteProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProduct", + requestType = com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateProductMethod() { + io.grpc.MethodDescriptor getCreateProductMethod; + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { + ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) + .build(); + } + } + } + return getCreateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProducts", + requestType = com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsMethod() { + io.grpc.MethodDescriptor getListProductsMethod; + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { + ProductSearchGrpc.getListProductsMethod = getListProductsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) + .build(); + } + } + } + return getListProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProduct", + requestType = com.google.cloud.vision.v1p4beta1.GetProductRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetProductMethod() { + io.grpc.MethodDescriptor getGetProductMethod; + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { + ProductSearchGrpc.getGetProductMethod = getGetProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) + .build(); + } + } + } + return getGetProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", + requestType = com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateProductMethod() { + io.grpc.MethodDescriptor getUpdateProductMethod; + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { + ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) + .build(); + } + } + } + return getUpdateProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", + requestType = com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteProductMethod() { + io.grpc.MethodDescriptor getDeleteProductMethod; + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { + ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) + .build(); + } + } + } + return getDeleteProductMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", + requestType = com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { + io.grpc.MethodDescriptor getCreateReferenceImageMethod; + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { + ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) + .build(); + } + } + } + return getCreateReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", + requestType = com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { + io.grpc.MethodDescriptor getDeleteReferenceImageMethod; + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { + ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) + .build(); + } + } + } + return getDeleteReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", + requestType = com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { + io.grpc.MethodDescriptor getListReferenceImagesMethod; + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { + ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) + .build(); + } + } + } + return getListReferenceImagesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", + requestType = com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ReferenceImage.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { + io.grpc.MethodDescriptor getGetReferenceImageMethod; + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { + ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) + .build(); + } + } + } + return getGetReferenceImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", + requestType = com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { + io.grpc.MethodDescriptor getAddProductToProductSetMethod; + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { + ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) + .build(); + } + } + } + return getAddProductToProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", + requestType = com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { + io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { + ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) + .build(); + } + } + } + return getRemoveProductFromProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", + requestType = com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, + responseType = com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { + io.grpc.MethodDescriptor getListProductsInProductSetMethod; + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { + ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) + .build(); + } + } + } + return getListProductsInProductSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", + requestType = com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getImportProductSetsMethod() { + io.grpc.MethodDescriptor getImportProductSetsMethod; + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { + ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) + .build(); + } + } + } + return getImportProductSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getPurgeProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", + requestType = com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPurgeProductsMethod() { + io.grpc.MethodDescriptor getPurgeProductsMethod; + if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { + ProductSearchGrpc.getPurgeProductsMethod = getPurgeProductsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("PurgeProducts")) + .build(); + } + } + } + return getPurgeProductsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ProductSearchStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + }; + return ProductSearchStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProductSearchBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + }; + return ProductSearchBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ProductSearchFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + }; + return ProductSearchFutureStub.newStub(factory, channel); + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of
+   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+   * named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static abstract class ProductSearchImplBase implements io.grpc.BindableService { + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public void purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPurgeProductsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet>( + this, METHODID_CREATE_PRODUCT_SET))) + .addMethod( + getListProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest, + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse>( + this, METHODID_LIST_PRODUCT_SETS))) + .addMethod( + getGetProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.GetProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet>( + this, METHODID_GET_PRODUCT_SET))) + .addMethod( + getUpdateProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet>( + this, METHODID_UPDATE_PRODUCT_SET))) + .addMethod( + getDeleteProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT_SET))) + .addMethod( + getCreateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.CreateProductRequest, + com.google.cloud.vision.v1p4beta1.Product>( + this, METHODID_CREATE_PRODUCT))) + .addMethod( + getListProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.ListProductsRequest, + com.google.cloud.vision.v1p4beta1.ListProductsResponse>( + this, METHODID_LIST_PRODUCTS))) + .addMethod( + getGetProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.GetProductRequest, + com.google.cloud.vision.v1p4beta1.Product>( + this, METHODID_GET_PRODUCT))) + .addMethod( + getUpdateProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.UpdateProductRequest, + com.google.cloud.vision.v1p4beta1.Product>( + this, METHODID_UPDATE_PRODUCT))) + .addMethod( + getDeleteProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.DeleteProductRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_PRODUCT))) + .addMethod( + getCreateReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest, + com.google.cloud.vision.v1p4beta1.ReferenceImage>( + this, METHODID_CREATE_REFERENCE_IMAGE))) + .addMethod( + getDeleteReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_REFERENCE_IMAGE))) + .addMethod( + getListReferenceImagesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest, + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse>( + this, METHODID_LIST_REFERENCE_IMAGES))) + .addMethod( + getGetReferenceImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest, + com.google.cloud.vision.v1p4beta1.ReferenceImage>( + this, METHODID_GET_REFERENCE_IMAGE))) + .addMethod( + getAddProductToProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) + .addMethod( + getRemoveProductFromProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest, + com.google.protobuf.Empty>( + this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) + .addMethod( + getListProductsInProductSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest, + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse>( + this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) + .addMethod( + getImportProductSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest, + com.google.longrunning.Operation>( + this, METHODID_IMPORT_PRODUCT_SETS))) + .addMethod( + getPurgeProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest, + com.google.longrunning.Operation>( + this, METHODID_PURGE_PRODUCTS))) + .build(); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of
+   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+   * named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { + private ProductSearchStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public void createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public void getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public void updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public void createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public void getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public void updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public void deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public void createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public void deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public void listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public void getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public void listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public void importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public void purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of
+   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+   * named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ProductSearchBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchBlockingStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.Product createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ListProductsResponse listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.Product getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.Product updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportProductSetsMethod(), getCallOptions(), request); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeProductsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Manages Products and ProductSets of reference images for use in product
+   * search. It uses the following resource model:
+   * - The API has a collection of
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
+   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
+   * products into groups to limit identification.
+   * In parallel,
+   * - The API has a collection of
+   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
+   *   `projects/*/locations/*/products/*`
+   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
+   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
+   * named
+   *   `projects/*/locations/*/products/*/referenceImages/*`
+   * 
+ */ + public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { + private ProductSearchFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductSearchFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductSearchFutureStub(channel, callOptions); + } + + /** + *
+     * Creates and returns a new ProductSet resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
+     *   4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProductSet( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists ProductSets in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductSets( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ProductSet.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProductSet( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a ProductSet resource.
+     * Only display_name can be updated currently.
+     * Possible errors:
+     * * Returns NOT_FOUND if the ProductSet does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
+     *   missing from the request or longer than 4096 characters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProductSet( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a ProductSet. Products and ReferenceImages in the
+     * ProductSet are not deleted.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProductSet( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new product resource.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createProduct( + com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists products in an unspecified order.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProducts( + com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a Product.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getProduct( + com.google.cloud.vision.v1p4beta1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Makes changes to a Product resource.
+     * Only the `display_name`, `description`, and `labels` fields can be updated
+     * right now.
+     * If labels are updated, the change will not be reflected in queries until
+     * the next index time.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product does not exist.
+     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
+     *   missing from the request or longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
+     *   longer than 4096 characters.
+     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateProduct( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a product and its reference images.
+     * Metadata of the product and all its images will be deleted right away, but
+     * search queries against ProductSets containing the product may still work
+     * until all related caches are refreshed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteProduct( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates and returns a new ReferenceImage resource.
+     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
+     * the system will try to detect regions of interest in the image that are
+     * compatible with the product_category on the parent product. If it is
+     * specified, detection is ALWAYS skipped. The system converts polygons into
+     * non-rotated rectangles.
+     * Note that the pipeline will resize the image if the image resolution is too
+     * large to process (above 50MP).
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
+     *   characters.
+     * * Returns INVALID_ARGUMENT if the product does not exist.
+     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
+     *   compatible with the parent product's product_category is detected.
+     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createReferenceImage( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Permanently deletes a reference image.
+     * The image metadata will be deleted right away, but search queries
+     * against ProductSets containing the image may still work until all related
+     * caches are refreshed.
+     * The actual image files are not deleted from Google Cloud Storage.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists reference images.
+     * Possible errors:
+     * * Returns NOT_FOUND if the parent product does not exist.
+     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
+     *   than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listReferenceImages( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets information associated with a ReferenceImage.
+     * Possible errors:
+     * * Returns NOT_FOUND if the specified image does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getReferenceImage( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); + } + + /** + *
+     * Adds a Product to the specified ProductSet. If the Product is already
+     * present, no change is made.
+     * One Product can be added to at most 100 ProductSets.
+     * Possible errors:
+     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Removes a Product from the specified ProductSet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists the Products in a ProductSet, in an unspecified order. If the
+     * ProductSet does not exist, the products field of the response will be
+     * empty.
+     * Possible errors:
+     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); + } + + /** + *
+     * Asynchronous API that imports a list of reference images to specified
+     * product sets based on a list of image information.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * `Operation.response` contains `ImportProductSetsResponse`. (results)
+     * The input source of this method is a csv file on Google Cloud Storage.
+     * For the format of the csv file please see
+     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture importProductSets( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Asynchronous API to delete all Products in a ProductSet or all Products
+     * that are in no ProductSet.
+     * If a Product is a member of the specified ProductSet in addition to other
+     * ProductSets, the Product will still be deleted.
+     * It is recommended to not delete the specified ProductSet until after this
+     * operation has completed. It is also recommended to not add any of the
+     * Products involved in the batch delete to a new ProductSet while this
+     * operation is running because those Products may still end up deleted.
+     * It's not possible to undo the PurgeProducts operation. Therefore, it is
+     * recommended to keep the csv files used in ImportProductSets (if that was
+     * how you originally built the Product Set) before starting PurgeProducts, in
+     * case you need to re-import the data after deletion.
+     * If the plan is to purge all of the Products from a ProductSet and then
+     * re-use the empty ProductSet to re-import new Products into the empty
+     * ProductSet, you must wait until the PurgeProducts operation has finished
+     * for that ProductSet.
+     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
+     * used to keep track of the progress and results of the request.
+     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture purgeProducts( + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PRODUCT_SET = 0; + private static final int METHODID_LIST_PRODUCT_SETS = 1; + private static final int METHODID_GET_PRODUCT_SET = 2; + private static final int METHODID_UPDATE_PRODUCT_SET = 3; + private static final int METHODID_DELETE_PRODUCT_SET = 4; + private static final int METHODID_CREATE_PRODUCT = 5; + private static final int METHODID_LIST_PRODUCTS = 6; + private static final int METHODID_GET_PRODUCT = 7; + private static final int METHODID_UPDATE_PRODUCT = 8; + private static final int METHODID_DELETE_PRODUCT = 9; + private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; + private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; + private static final int METHODID_LIST_REFERENCE_IMAGES = 12; + private static final int METHODID_GET_REFERENCE_IMAGE = 13; + private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; + private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; + private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; + private static final int METHODID_IMPORT_PRODUCT_SETS = 17; + private static final int METHODID_PURGE_PRODUCTS = 18; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ProductSearchImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PRODUCT_SET: + serviceImpl.createProductSet((com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCT_SETS: + serviceImpl.listProductSets((com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT_SET: + serviceImpl.getProductSet((com.google.cloud.vision.v1p4beta1.GetProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT_SET: + serviceImpl.updateProductSet((com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT_SET: + serviceImpl.deleteProductSet((com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_PRODUCT: + serviceImpl.createProduct((com.google.cloud.vision.v1p4beta1.CreateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS: + serviceImpl.listProducts((com.google.cloud.vision.v1p4beta1.ListProductsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PRODUCT: + serviceImpl.getProduct((com.google.cloud.vision.v1p4beta1.GetProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PRODUCT: + serviceImpl.updateProduct((com.google.cloud.vision.v1p4beta1.UpdateProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PRODUCT: + serviceImpl.deleteProduct((com.google.cloud.vision.v1p4beta1.DeleteProductRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_REFERENCE_IMAGE: + serviceImpl.createReferenceImage((com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REFERENCE_IMAGE: + serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REFERENCE_IMAGES: + serviceImpl.listReferenceImages((com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REFERENCE_IMAGE: + serviceImpl.getReferenceImage((com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: + serviceImpl.addProductToProductSet((com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: + serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: + serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_PRODUCT_SETS: + serviceImpl.importProductSets((com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_PRODUCTS: + serviceImpl.purgeProducts((com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProductSearchBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ProductSearch"); + } + } + + private static final class ProductSearchFileDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier { + ProductSearchFileDescriptorSupplier() {} + } + + private static final class ProductSearchMethodDescriptorSupplier + extends ProductSearchBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ProductSearchMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ProductSearchGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) + .addMethod(getCreateProductSetMethod()) + .addMethod(getListProductSetsMethod()) + .addMethod(getGetProductSetMethod()) + .addMethod(getUpdateProductSetMethod()) + .addMethod(getDeleteProductSetMethod()) + .addMethod(getCreateProductMethod()) + .addMethod(getListProductsMethod()) + .addMethod(getGetProductMethod()) + .addMethod(getUpdateProductMethod()) + .addMethod(getDeleteProductMethod()) + .addMethod(getCreateReferenceImageMethod()) + .addMethod(getDeleteReferenceImageMethod()) + .addMethod(getListReferenceImagesMethod()) + .addMethod(getGetReferenceImageMethod()) + .addMethod(getAddProductToProductSetMethod()) + .addMethod(getRemoveProductFromProductSetMethod()) + .addMethod(getListProductsInProductSetMethod()) + .addMethod(getImportProductSetsMethod()) + .addMethod(getPurgeProductsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java new file mode 100644 index 000000000000..053f1a5043a3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `AddProductToProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} + */ +public final class AddProductToProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + AddProductToProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AddProductToProductSetRequest.newBuilder() to construct. + private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddProductToProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddProductToProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AddProductToProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `AddProductToProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be added to this ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddProductToProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AddProductToProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..595a24af90d1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AddProductToProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be added to this ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java new file mode 100644 index 000000000000..97a09cf93788 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java @@ -0,0 +1,1651 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} + */ +public final class AnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + AnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileRequest.newBuilder() to construct. + private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + pages_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + pages_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + pages_.addInt(input.readInt32()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + pages_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + pages_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + pages_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int PAGES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList pages_; + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + @java.lang.Override + public java.util.List + getPagesList() { + return pages_; + } + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + public int getPages(int index) { + return pages_.getInt(index); + } + private int pagesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (getPagesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(pagesMemoizedSerializedSize); + } + for (int i = 0; i < pages_.size(); i++) { + output.writeInt32NoTag(pages_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + { + int dataSize = 0; + for (int i = 0; i < pages_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(pages_.getInt(i)); + } + size += dataSize; + if (!getPagesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + pagesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + pages_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest build() { + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest result = new com.google.cloud.vision.v1p4beta1.AnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + pages_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pages_ = pages_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.protobuf.Internal.IntList pages_ = emptyIntList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pages_ = mutableCopy(pages_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + public java.util.List + getPagesList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(pages_) : pages_; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + public int getPagesCount() { + return pages_.size(); + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + public int getPages(int index) { + return pages_.getInt(index); + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param index The index to set the value at. + * @param value The pages to set. + * @return This builder for chaining. + */ + public Builder setPages( + int index, int value) { + ensurePagesIsMutable(); + pages_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param value The pages to add. + * @return This builder for chaining. + */ + public Builder addPages(int value) { + ensurePagesIsMutable(); + pages_.addInt(value); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @param values The pages to add. + * @return This builder for chaining. + */ + public Builder addAllPages( + java.lang.Iterable values) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + return this; + } + /** + *
+     * Pages of the file to perform image annotation.
+     * Pages starts from 1, we assume the first page of the file is page 1.
+     * At most 5 pages are supported per request. Pages can be negative.
+     * Page 1 means the first page.
+     * Page 2 means the second page.
+     * Page -1 means the last page.
+     * Page -2 means the second to the last page.
+     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+     * If this field is empty, by default the service performs image annotation
+     * for the first 5 pages of the file.
+     * 
+ * + * repeated int32 pages = 4; + * @return This builder for chaining. + */ + public Builder clearPages() { + pages_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + private static final com.google.cloud.vision.v1p4beta1.AnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..8afb5a7a9beb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return A list containing the pages. + */ + java.util.List getPagesList(); + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @return The count of pages. + */ + int getPagesCount(); + /** + *
+   * Pages of the file to perform image annotation.
+   * Pages starts from 1, we assume the first page of the file is page 1.
+   * At most 5 pages are supported per request. Pages can be negative.
+   * Page 1 means the first page.
+   * Page 2 means the second page.
+   * Page -1 means the last page.
+   * Page -2 means the second to the last page.
+   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
+   * If this field is empty, by default the service performs image annotation
+   * for the first 5 pages of the file.
+   * 
+ * + * repeated int32 pages = 4; + * @param index The index of the element to return. + * @return The pages at the given index. + */ + int getPages(int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java new file mode 100644 index 000000000000..e2559320414c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java @@ -0,0 +1,1461 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response to a single file annotation request. A file may contain one or more
+ * images, which individually have their own responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} + */ +public final class AnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + AnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateFileResponse.newBuilder() to construct. + private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateFileResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + case 24: { + + totalPages_ = input.readInt32(); + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int RESPONSES_FIELD_NUMBER = 2; + private java.util.List responses_; + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + public static final int TOTAL_PAGES_FIELD_NUMBER = 3; + private int totalPages_; + /** + *
+   * This field gives the total number of pages in the file.
+   * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + @java.lang.Override + public int getTotalPages() { + return totalPages_; + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(2, responses_.get(i)); + } + if (totalPages_ != 0) { + output.writeInt32(3, totalPages_); + } + if (error_ != null) { + output.writeMessage(4, getError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, responses_.get(i)); + } + if (totalPages_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, totalPages_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (getTotalPages() + != other.getTotalPages()) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER; + hash = (53 * hash) + getTotalPages(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a single file annotation request. A file may contain one or more
+   * images, which individually have their own responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + totalPages_ = 0; + + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse build() { + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p4beta1.AnnotateFileResponse(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + result.totalPages_ = totalPages_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + if (other.getTotalPages() != 0) { + setTotalPages(other.getTotalPages()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Information about the file for which this response is generated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to images found within the file. This field will be
+     * empty if the `error` field is set.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + + private int totalPages_ ; + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + @java.lang.Override + public int getTotalPages() { + return totalPages_; + } + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @param value The totalPages to set. + * @return This builder for chaining. + */ + public Builder setTotalPages(int value) { + + totalPages_ = value; + onChanged(); + return this; + } + /** + *
+     * This field gives the total number of pages in the file.
+     * 
+ * + * int32 total_pages = 3; + * @return This builder for chaining. + */ + public Builder clearTotalPages() { + + totalPages_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the failed request. The
+     * `responses` field will not be set in this case.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + private static final com.google.cloud.vision.v1p4beta1.AnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..8cf89b180117 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); + /** + *
+   * Information about the file for which this response is generated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to images found within the file. This field will be
+   * empty if the `error` field is set.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); + + /** + *
+   * This field gives the total number of pages in the file.
+   * 
+ * + * int32 total_pages = 3; + * @return The totalPages. + */ + int getTotalPages(); + + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the failed request. The
+   * `responses` field will not be set in this case.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java new file mode 100644 index 000000000000..c739b512f673 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request for performing Google Cloud Vision API tasks over a user-provided
+ * image, with user-requested features, and with context information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.Image image_; + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return The image. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Image getImage() { + return image_ == null ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; + } + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() { + return getImage(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for performing Google Cloud Vision API tasks over a user-provided
+   * image, with user-requested features, and with context information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageBuilder_ == null) { + image_ = null; + } else { + image_ = null; + imageBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest build() { + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p4beta1.AnnotateImageRequest(this); + int from_bitField0_ = bitField0_; + if (imageBuilder_ == null) { + result.image_ = image_; + } else { + result.image_ = imageBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder> imageBuilder_; + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return Whether the image field is set. + */ + public boolean hasImage() { + return imageBuilder_ != null || image_ != null; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return The image. + */ + public com.google.cloud.vision.v1p4beta1.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public Builder setImage(com.google.cloud.vision.v1p4beta1.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + onChanged(); + } else { + imageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public Builder setImage( + com.google.cloud.vision.v1p4beta1.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + onChanged(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public Builder mergeImage(com.google.cloud.vision.v1p4beta1.Image value) { + if (imageBuilder_ == null) { + if (image_ != null) { + image_ = + com.google.cloud.vision.v1p4beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); + } else { + image_ = value; + } + onChanged(); + } else { + imageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public Builder clearImage() { + if (imageBuilder_ == null) { + image_ = null; + onChanged(); + } else { + image_ = null; + imageBuilder_ = null; + } + + return this; + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p4beta1.Image.Builder getImageBuilder() { + + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; + } + } + /** + *
+     * The image to be processed.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + private static final com.google.cloud.vision.v1p4beta1.AnnotateImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java new file mode 100644 index 000000000000..a0c31ffdef20 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AnnotateImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + * @return The image. + */ + com.google.cloud.vision.v1p4beta1.Image getImage(); + /** + *
+   * The image to be processed.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Image image = 1; + */ + com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder(); + + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java new file mode 100644 index 000000000000..3e06218abd5f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java @@ -0,0 +1,5055 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response to an image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnnotateImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + faceAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.FaceAnnotation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + landmarkAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + logoAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + labelAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + textAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder subBuilder = null; + if (safeSearchAnnotation_ != null) { + subBuilder = safeSearchAnnotation_.toBuilder(); + } + safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(safeSearchAnnotation_); + safeSearchAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.cloud.vision.v1p4beta1.ImageProperties.Builder subBuilder = null; + if (imagePropertiesAnnotation_ != null) { + subBuilder = imagePropertiesAnnotation_.toBuilder(); + } + imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageProperties.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imagePropertiesAnnotation_); + imagePropertiesAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.rpc.Status.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder subBuilder = null; + if (cropHintsAnnotation_ != null) { + subBuilder = cropHintsAnnotation_.toBuilder(); + } + cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsAnnotation_); + cropHintsAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder subBuilder = null; + if (fullTextAnnotation_ != null) { + subBuilder = fullTextAnnotation_.toBuilder(); + } + fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fullTextAnnotation_); + fullTextAnnotation_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.vision.v1p4beta1.WebDetection.Builder subBuilder = null; + if (webDetection_ != null) { + subBuilder = webDetection_.toBuilder(); + } + webDetection_ = input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetection_); + webDetection_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder subBuilder = null; + if (productSearchResults_ != null) { + subBuilder = productSearchResults_.toBuilder(); + } + productSearchResults_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchResults_); + productSearchResults_ = subBuilder.buildPartial(); + } + + break; + } + case 170: { + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 178: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + localizedObjectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder.class); + } + + public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; + private java.util.List faceAnnotations_; + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List getFaceAnnotationsList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public java.util.List + getFaceAnnotationsOrBuilderList() { + return faceAnnotations_; + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public int getFaceAnnotationsCount() { + return faceAnnotations_.size(); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) { + return faceAnnotations_.get(index); + } + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + return faceAnnotations_.get(index); + } + + public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; + private java.util.List landmarkAnnotations_; + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List getLandmarkAnnotationsList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + return landmarkAnnotations_; + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public int getLandmarkAnnotationsCount() { + return landmarkAnnotations_.size(); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) { + return landmarkAnnotations_.get(index); + } + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + return landmarkAnnotations_.get(index); + } + + public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List logoAnnotations_; + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List getLogoAnnotationsList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public java.util.List + getLogoAnnotationsOrBuilderList() { + return logoAnnotations_; + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public int getLogoAnnotationsCount() { + return logoAnnotations_.size(); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) { + return logoAnnotations_.get(index); + } + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + return logoAnnotations_.get(index); + } + + public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; + private java.util.List labelAnnotations_; + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List getLabelAnnotationsList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public java.util.List + getLabelAnnotationsOrBuilderList() { + return labelAnnotations_; + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public int getLabelAnnotationsCount() { + return labelAnnotations_.size(); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) { + return labelAnnotations_.get(index); + } + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + return labelAnnotations_.get(index); + } + + public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; + private java.util.List localizedObjectAnnotations_; + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List getLocalizedObjectAnnotationsList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + return localizedObjectAnnotations_; + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public int getLocalizedObjectAnnotationsCount() { + return localizedObjectAnnotations_.size(); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + return localizedObjectAnnotations_.get(index); + } + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + return localizedObjectAnnotations_.get(index); + } + + public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List textAnnotations_; + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List getTextAnnotationsList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public java.util.List + getTextAnnotationsOrBuilderList() { + return textAnnotations_; + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public int getTextAnnotationsCount() { + return textAnnotations_.size(); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) { + return textAnnotations_.get(index); + } + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + return textAnnotations_.get(index); + } + + public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_; + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + @java.lang.Override + public boolean hasFullTextAnnotation() { + return fullTextAnnotation_ != null; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + return getFullTextAnnotation(); + } + + public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_; + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + @java.lang.Override + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotation_ != null; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + return getSafeSearchAnnotation(); + } + + public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; + private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_; + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + @java.lang.Override + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ != null; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + return getImagePropertiesAnnotation(); + } + + public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; + private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_; + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + @java.lang.Override + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotation_ != null; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + return getCropHintsAnnotation(); + } + + public static final int WEB_DETECTION_FIELD_NUMBER = 13; + private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_; + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + @java.lang.Override + public boolean hasWebDetection() { + return webDetection_ != null; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() { + return webDetection_ == null ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; + } + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + return getWebDetection(); + } + + public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; + private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_; + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + @java.lang.Override + public boolean hasProductSearchResults() { + return productSearchResults_ != null; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() { + return productSearchResults_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + return getProductSearchResults(); + } + + public static final int ERROR_FIELD_NUMBER = 9; + private com.google.rpc.Status error_; + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return getError(); + } + + public static final int CONTEXT_FIELD_NUMBER = 21; + private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_; + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() { + return context_ == null ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + return getContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < faceAnnotations_.size(); i++) { + output.writeMessage(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + output.writeMessage(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + output.writeMessage(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + output.writeMessage(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + output.writeMessage(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + output.writeMessage(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + output.writeMessage(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + output.writeMessage(9, getError()); + } + if (cropHintsAnnotation_ != null) { + output.writeMessage(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + output.writeMessage(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + output.writeMessage(13, getWebDetection()); + } + if (productSearchResults_ != null) { + output.writeMessage(14, getProductSearchResults()); + } + if (context_ != null) { + output.writeMessage(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + output.writeMessage(22, localizedObjectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < faceAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, faceAnnotations_.get(i)); + } + for (int i = 0; i < landmarkAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, landmarkAnnotations_.get(i)); + } + for (int i = 0; i < logoAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, logoAnnotations_.get(i)); + } + for (int i = 0; i < labelAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, labelAnnotations_.get(i)); + } + for (int i = 0; i < textAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, textAnnotations_.get(i)); + } + if (safeSearchAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getSafeSearchAnnotation()); + } + if (imagePropertiesAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImagePropertiesAnnotation()); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getError()); + } + if (cropHintsAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCropHintsAnnotation()); + } + if (fullTextAnnotation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getFullTextAnnotation()); + } + if (webDetection_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getWebDetection()); + } + if (productSearchResults_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getProductSearchResults()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getContext()); + } + for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, localizedObjectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) obj; + + if (!getFaceAnnotationsList() + .equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList() + .equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList() + .equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList() + .equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList() + .equals(other.getLocalizedObjectAnnotationsList())) return false; + if (!getTextAnnotationsList() + .equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; + if (hasFullTextAnnotation()) { + if (!getFullTextAnnotation() + .equals(other.getFullTextAnnotation())) return false; + } + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; + if (hasSafeSearchAnnotation()) { + if (!getSafeSearchAnnotation() + .equals(other.getSafeSearchAnnotation())) return false; + } + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; + if (hasImagePropertiesAnnotation()) { + if (!getImagePropertiesAnnotation() + .equals(other.getImagePropertiesAnnotation())) return false; + } + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; + if (hasCropHintsAnnotation()) { + if (!getCropHintsAnnotation() + .equals(other.getCropHintsAnnotation())) return false; + } + if (hasWebDetection() != other.hasWebDetection()) return false; + if (hasWebDetection()) { + if (!getWebDetection() + .equals(other.getWebDetection())) return false; + } + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; + if (hasProductSearchResults()) { + if (!getProductSearchResults() + .equals(other.getProductSearchResults())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFaceAnnotationsCount() > 0) { + hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFaceAnnotationsList().hashCode(); + } + if (getLandmarkAnnotationsCount() > 0) { + hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); + } + if (getLogoAnnotationsCount() > 0) { + hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLogoAnnotationsList().hashCode(); + } + if (getLabelAnnotationsCount() > 0) { + hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLabelAnnotationsList().hashCode(); + } + if (getLocalizedObjectAnnotationsCount() > 0) { + hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); + } + if (getTextAnnotationsCount() > 0) { + hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTextAnnotationsList().hashCode(); + } + if (hasFullTextAnnotation()) { + hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getFullTextAnnotation().hashCode(); + } + if (hasSafeSearchAnnotation()) { + hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); + } + if (hasImagePropertiesAnnotation()) { + hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); + } + if (hasCropHintsAnnotation()) { + hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsAnnotation().hashCode(); + } + if (hasWebDetection()) { + hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + getWebDetection().hashCode(); + } + if (hasProductSearchResults()) { + hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchResults().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFaceAnnotationsFieldBuilder(); + getLandmarkAnnotationsFieldBuilder(); + getLogoAnnotationsFieldBuilder(); + getLabelAnnotationsFieldBuilder(); + getLocalizedObjectAnnotationsFieldBuilder(); + getTextAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + faceAnnotationsBuilder_.clear(); + } + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + landmarkAnnotationsBuilder_.clear(); + } + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + logoAnnotationsBuilder_.clear(); + } + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + labelAnnotationsBuilder_.clear(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + textAnnotationsBuilder_.clear(); + } + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + if (webDetectionBuilder_ == null) { + webDetection_ = null; + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse build() { + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p4beta1.AnnotateImageResponse(this); + int from_bitField0_ = bitField0_; + if (faceAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.faceAnnotations_ = faceAnnotations_; + } else { + result.faceAnnotations_ = faceAnnotationsBuilder_.build(); + } + if (landmarkAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.landmarkAnnotations_ = landmarkAnnotations_; + } else { + result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); + } + if (logoAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.logoAnnotations_ = logoAnnotations_; + } else { + result.logoAnnotations_ = logoAnnotationsBuilder_.build(); + } + if (labelAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.labelAnnotations_ = labelAnnotations_; + } else { + result.labelAnnotations_ = labelAnnotationsBuilder_.build(); + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.localizedObjectAnnotations_ = localizedObjectAnnotations_; + } else { + result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); + } + if (textAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.textAnnotations_ = textAnnotations_; + } else { + result.textAnnotations_ = textAnnotationsBuilder_.build(); + } + if (fullTextAnnotationBuilder_ == null) { + result.fullTextAnnotation_ = fullTextAnnotation_; + } else { + result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); + } + if (safeSearchAnnotationBuilder_ == null) { + result.safeSearchAnnotation_ = safeSearchAnnotation_; + } else { + result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); + } + if (imagePropertiesAnnotationBuilder_ == null) { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; + } else { + result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); + } + if (cropHintsAnnotationBuilder_ == null) { + result.cropHintsAnnotation_ = cropHintsAnnotation_; + } else { + result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); + } + if (webDetectionBuilder_ == null) { + result.webDetection_ = webDetection_; + } else { + result.webDetection_ = webDetectionBuilder_.build(); + } + if (productSearchResultsBuilder_ == null) { + result.productSearchResults_ = productSearchResults_; + } else { + result.productSearchResults_ = productSearchResultsBuilder_.build(); + } + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()) return this; + if (faceAnnotationsBuilder_ == null) { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotations_.isEmpty()) { + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.addAll(other.faceAnnotations_); + } + onChanged(); + } + } else { + if (!other.faceAnnotations_.isEmpty()) { + if (faceAnnotationsBuilder_.isEmpty()) { + faceAnnotationsBuilder_.dispose(); + faceAnnotationsBuilder_ = null; + faceAnnotations_ = other.faceAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + faceAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFaceAnnotationsFieldBuilder() : null; + } else { + faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); + } + } + } + if (landmarkAnnotationsBuilder_ == null) { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotations_.isEmpty()) { + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.addAll(other.landmarkAnnotations_); + } + onChanged(); + } + } else { + if (!other.landmarkAnnotations_.isEmpty()) { + if (landmarkAnnotationsBuilder_.isEmpty()) { + landmarkAnnotationsBuilder_.dispose(); + landmarkAnnotationsBuilder_ = null; + landmarkAnnotations_ = other.landmarkAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + landmarkAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarkAnnotationsFieldBuilder() : null; + } else { + landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); + } + } + } + if (logoAnnotationsBuilder_ == null) { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotations_.isEmpty()) { + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.addAll(other.logoAnnotations_); + } + onChanged(); + } + } else { + if (!other.logoAnnotations_.isEmpty()) { + if (logoAnnotationsBuilder_.isEmpty()) { + logoAnnotationsBuilder_.dispose(); + logoAnnotationsBuilder_ = null; + logoAnnotations_ = other.logoAnnotations_; + bitField0_ = (bitField0_ & ~0x00000004); + logoAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogoAnnotationsFieldBuilder() : null; + } else { + logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); + } + } + } + if (labelAnnotationsBuilder_ == null) { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotations_.isEmpty()) { + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.addAll(other.labelAnnotations_); + } + onChanged(); + } + } else { + if (!other.labelAnnotations_.isEmpty()) { + if (labelAnnotationsBuilder_.isEmpty()) { + labelAnnotationsBuilder_.dispose(); + labelAnnotationsBuilder_ = null; + labelAnnotations_ = other.labelAnnotations_; + bitField0_ = (bitField0_ & ~0x00000008); + labelAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLabelAnnotationsFieldBuilder() : null; + } else { + labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); + } + } + } + if (localizedObjectAnnotationsBuilder_ == null) { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotations_.isEmpty()) { + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); + } + onChanged(); + } + } else { + if (!other.localizedObjectAnnotations_.isEmpty()) { + if (localizedObjectAnnotationsBuilder_.isEmpty()) { + localizedObjectAnnotationsBuilder_.dispose(); + localizedObjectAnnotationsBuilder_ = null; + localizedObjectAnnotations_ = other.localizedObjectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000010); + localizedObjectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocalizedObjectAnnotationsFieldBuilder() : null; + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); + } + } + } + if (textAnnotationsBuilder_ == null) { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotations_.isEmpty()) { + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTextAnnotationsIsMutable(); + textAnnotations_.addAll(other.textAnnotations_); + } + onChanged(); + } + } else { + if (!other.textAnnotations_.isEmpty()) { + if (textAnnotationsBuilder_.isEmpty()) { + textAnnotationsBuilder_.dispose(); + textAnnotationsBuilder_ = null; + textAnnotations_ = other.textAnnotations_; + bitField0_ = (bitField0_ & ~0x00000020); + textAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextAnnotationsFieldBuilder() : null; + } else { + textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); + } + } + } + if (other.hasFullTextAnnotation()) { + mergeFullTextAnnotation(other.getFullTextAnnotation()); + } + if (other.hasSafeSearchAnnotation()) { + mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); + } + if (other.hasImagePropertiesAnnotation()) { + mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); + } + if (other.hasCropHintsAnnotation()) { + mergeCropHintsAnnotation(other.getCropHintsAnnotation()); + } + if (other.hasWebDetection()) { + mergeWebDetection(other.getWebDetection()); + } + if (other.hasProductSearchResults()) { + mergeProductSearchResults(other.getProductSearchResults()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List faceAnnotations_ = + java.util.Collections.emptyList(); + private void ensureFaceAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; + + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List getFaceAnnotationsList() { + if (faceAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } else { + return faceAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public int getFaceAnnotationsCount() { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.size(); + } else { + return faceAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); + } else { + return faceAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder setFaceAnnotations( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations(com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { + if (faceAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, value); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addFaceAnnotations( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder addAllFaceAnnotations( + java.lang.Iterable values) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, faceAnnotations_); + onChanged(); + } else { + faceAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder clearFaceAnnotations() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + faceAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public Builder removeFaceAnnotations(int index) { + if (faceAnnotationsBuilder_ == null) { + ensureFaceAnnotationsIsMutable(); + faceAnnotations_.remove(index); + onChanged(); + } else { + faceAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index) { + if (faceAnnotationsBuilder_ == null) { + return faceAnnotations_.get(index); } else { + return faceAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsOrBuilderList() { + if (faceAnnotationsBuilder_ != null) { + return faceAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(faceAnnotations_); + } + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { + return getFaceAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( + int index) { + return getFaceAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, face detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + public java.util.List + getFaceAnnotationsBuilderList() { + return getFaceAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder> + getFaceAnnotationsFieldBuilder() { + if (faceAnnotationsBuilder_ == null) { + faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>( + faceAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + faceAnnotations_ = null; + } + return faceAnnotationsBuilder_; + } + + private java.util.List landmarkAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLandmarkAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; + + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List getLandmarkAnnotationsList() { + if (landmarkAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } else { + return landmarkAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public int getLandmarkAnnotationsCount() { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.size(); + } else { + return landmarkAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); + } else { + return landmarkAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder setLandmarkAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (landmarkAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, value); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addLandmarkAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder addAllLandmarkAnnotations( + java.lang.Iterable values) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarkAnnotations_); + onChanged(); + } else { + landmarkAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder clearLandmarkAnnotations() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + landmarkAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public Builder removeLandmarkAnnotations(int index) { + if (landmarkAnnotationsBuilder_ == null) { + ensureLandmarkAnnotationsIsMutable(); + landmarkAnnotations_.remove(index); + onChanged(); + } else { + landmarkAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index) { + if (landmarkAnnotationsBuilder_ == null) { + return landmarkAnnotations_.get(index); } else { + return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsOrBuilderList() { + if (landmarkAnnotationsBuilder_ != null) { + return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarkAnnotations_); + } + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( + int index) { + return getLandmarkAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, landmark detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + public java.util.List + getLandmarkAnnotationsBuilderList() { + return getLandmarkAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> + getLandmarkAnnotationsFieldBuilder() { + if (landmarkAnnotationsBuilder_ == null) { + landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( + landmarkAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + landmarkAnnotations_ = null; + } + return landmarkAnnotationsBuilder_; + } + + private java.util.List logoAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLogoAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; + + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List getLogoAnnotationsList() { + if (logoAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } else { + return logoAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public int getLogoAnnotationsCount() { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.size(); + } else { + return logoAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); + } else { + return logoAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder setLogoAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (logoAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, value); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addLogoAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder addAllLogoAnnotations( + java.lang.Iterable values) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logoAnnotations_); + onChanged(); + } else { + logoAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder clearLogoAnnotations() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + logoAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public Builder removeLogoAnnotations(int index) { + if (logoAnnotationsBuilder_ == null) { + ensureLogoAnnotationsIsMutable(); + logoAnnotations_.remove(index); + onChanged(); + } else { + logoAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index) { + if (logoAnnotationsBuilder_ == null) { + return logoAnnotations_.get(index); } else { + return logoAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsOrBuilderList() { + if (logoAnnotationsBuilder_ != null) { + return logoAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logoAnnotations_); + } + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { + return getLogoAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( + int index) { + return getLogoAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, logo detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + public java.util.List + getLogoAnnotationsBuilderList() { + return getLogoAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> + getLogoAnnotationsFieldBuilder() { + if (logoAnnotationsBuilder_ == null) { + logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( + logoAnnotations_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + logoAnnotations_ = null; + } + return logoAnnotationsBuilder_; + } + + private java.util.List labelAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLabelAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; + + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List getLabelAnnotationsList() { + if (labelAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } else { + return labelAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public int getLabelAnnotationsCount() { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.size(); + } else { + return labelAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); + } else { + return labelAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder setLabelAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (labelAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, value); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addLabelAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder addAllLabelAnnotations( + java.lang.Iterable values) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, labelAnnotations_); + onChanged(); + } else { + labelAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder clearLabelAnnotations() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + labelAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public Builder removeLabelAnnotations(int index) { + if (labelAnnotationsBuilder_ == null) { + ensureLabelAnnotationsIsMutable(); + labelAnnotations_.remove(index); + onChanged(); + } else { + labelAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index) { + if (labelAnnotationsBuilder_ == null) { + return labelAnnotations_.get(index); } else { + return labelAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsOrBuilderList() { + if (labelAnnotationsBuilder_ != null) { + return labelAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labelAnnotations_); + } + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { + return getLabelAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( + int index) { + return getLabelAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, label detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + public java.util.List + getLabelAnnotationsBuilderList() { + return getLabelAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> + getLabelAnnotationsFieldBuilder() { + if (labelAnnotationsBuilder_ == null) { + labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( + labelAnnotations_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + labelAnnotations_ = null; + } + return labelAnnotationsBuilder_; + } + + private java.util.List localizedObjectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureLocalizedObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; + + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List getLocalizedObjectAnnotationsList() { + if (localizedObjectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } else { + return localizedObjectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public int getLocalizedObjectAnnotationsCount() { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.size(); + } else { + return localizedObjectAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); + } else { + return localizedObjectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder setLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { + if (localizedObjectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, value); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addLocalizedObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder addAllLocalizedObjectAnnotations( + java.lang.Iterable values) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, localizedObjectAnnotations_); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder clearLocalizedObjectAnnotations() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public Builder removeLocalizedObjectAnnotations(int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + ensureLocalizedObjectAnnotationsIsMutable(); + localizedObjectAnnotations_.remove(index); + onChanged(); + } else { + localizedObjectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index) { + if (localizedObjectAnnotationsBuilder_ == null) { + return localizedObjectAnnotations_.get(index); } else { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsOrBuilderList() { + if (localizedObjectAnnotationsBuilder_ != null) { + return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); + } + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( + int index) { + return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, localized object detection has completed successfully.
+     * This will be sorted descending by confidence score.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + public java.util.List + getLocalizedObjectAnnotationsBuilderList() { + return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder> + getLocalizedObjectAnnotationsFieldBuilder() { + if (localizedObjectAnnotationsBuilder_ == null) { + localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>( + localizedObjectAnnotations_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + localizedObjectAnnotations_ = null; + } + return localizedObjectAnnotationsBuilder_; + } + + private java.util.List textAnnotations_ = + java.util.Collections.emptyList(); + private void ensureTextAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + textAnnotations_ = new java.util.ArrayList(textAnnotations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; + + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List getTextAnnotationsList() { + if (textAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(textAnnotations_); + } else { + return textAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public int getTextAnnotationsCount() { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.size(); + } else { + return textAnnotationsBuilder_.getCount(); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); + } else { + return textAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder setTextAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { + if (textAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, value); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addTextAnnotations( + int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + textAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder addAllTextAnnotations( + java.lang.Iterable values) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textAnnotations_); + onChanged(); + } else { + textAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder clearTextAnnotations() { + if (textAnnotationsBuilder_ == null) { + textAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + textAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public Builder removeTextAnnotations(int index) { + if (textAnnotationsBuilder_ == null) { + ensureTextAnnotationsIsMutable(); + textAnnotations_.remove(index); + onChanged(); + } else { + textAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index) { + if (textAnnotationsBuilder_ == null) { + return textAnnotations_.get(index); } else { + return textAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsOrBuilderList() { + if (textAnnotationsBuilder_ != null) { + return textAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textAnnotations_); + } + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { + return getTextAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( + int index) { + return getTextAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); + } + /** + *
+     * If present, text (OCR) detection has completed successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + public java.util.List + getTextAnnotationsBuilderList() { + return getTextAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> + getTextAnnotationsFieldBuilder() { + if (textAnnotationsBuilder_ == null) { + textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( + textAnnotations_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + textAnnotations_ = null; + } + return textAnnotationsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + public boolean hasFullTextAnnotation() { + return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } else { + return fullTextAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullTextAnnotation_ = value; + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder setFullTextAnnotation( + com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder builderForValue) { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = builderForValue.build(); + onChanged(); + } else { + fullTextAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) { + if (fullTextAnnotationBuilder_ == null) { + if (fullTextAnnotation_ != null) { + fullTextAnnotation_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); + } else { + fullTextAnnotation_ = value; + } + onChanged(); + } else { + fullTextAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public Builder clearFullTextAnnotation() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotation_ = null; + onChanged(); + } else { + fullTextAnnotation_ = null; + fullTextAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { + + onChanged(); + return getFullTextAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { + if (fullTextAnnotationBuilder_ != null) { + return fullTextAnnotationBuilder_.getMessageOrBuilder(); + } else { + return fullTextAnnotation_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; + } + } + /** + *
+     * If present, text (OCR) detection or document (OCR) text detection has
+     * completed successfully.
+     * This annotation provides the structural hierarchy for the OCR detected
+     * text.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder> + getFullTextAnnotationFieldBuilder() { + if (fullTextAnnotationBuilder_ == null) { + fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder>( + getFullTextAnnotation(), + getParentForChildren(), + isClean()); + fullTextAnnotation_ = null; + } + return fullTextAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + public boolean hasSafeSearchAnnotation() { + return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } else { + return safeSearchAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safeSearchAnnotation_ = value; + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder setSafeSearchAnnotation( + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder builderForValue) { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = builderForValue.build(); + onChanged(); + } else { + safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) { + if (safeSearchAnnotationBuilder_ == null) { + if (safeSearchAnnotation_ != null) { + safeSearchAnnotation_ = + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); + } else { + safeSearchAnnotation_ = value; + } + onChanged(); + } else { + safeSearchAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public Builder clearSafeSearchAnnotation() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotation_ = null; + onChanged(); + } else { + safeSearchAnnotation_ = null; + safeSearchAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { + + onChanged(); + return getSafeSearchAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { + if (safeSearchAnnotationBuilder_ != null) { + return safeSearchAnnotationBuilder_.getMessageOrBuilder(); + } else { + return safeSearchAnnotation_ == null ? + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; + } + } + /** + *
+     * If present, safe-search annotation has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder> + getSafeSearchAnnotationFieldBuilder() { + if (safeSearchAnnotationBuilder_ == null) { + safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder>( + getSafeSearchAnnotation(), + getParentForChildren(), + isClean()); + safeSearchAnnotation_ = null; + } + return safeSearchAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + public boolean hasImagePropertiesAnnotation() { + return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } else { + return imagePropertiesAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p4beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imagePropertiesAnnotation_ = value; + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder setImagePropertiesAnnotation( + com.google.cloud.vision.v1p4beta1.ImageProperties.Builder builderForValue) { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = builderForValue.build(); + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p4beta1.ImageProperties value) { + if (imagePropertiesAnnotationBuilder_ == null) { + if (imagePropertiesAnnotation_ != null) { + imagePropertiesAnnotation_ = + com.google.cloud.vision.v1p4beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); + } else { + imagePropertiesAnnotation_ = value; + } + onChanged(); + } else { + imagePropertiesAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public Builder clearImagePropertiesAnnotation() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotation_ = null; + onChanged(); + } else { + imagePropertiesAnnotation_ = null; + imagePropertiesAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p4beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { + + onChanged(); + return getImagePropertiesAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { + if (imagePropertiesAnnotationBuilder_ != null) { + return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); + } else { + return imagePropertiesAnnotation_ == null ? + com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; + } + } + /** + *
+     * If present, image properties were extracted successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder> + getImagePropertiesAnnotationFieldBuilder() { + if (imagePropertiesAnnotationBuilder_ == null) { + imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder>( + getImagePropertiesAnnotation(), + getParentForChildren(), + isClean()); + imagePropertiesAnnotation_ = null; + } + return imagePropertiesAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + public boolean hasCropHintsAnnotation() { + return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } else { + return cropHintsAnnotationBuilder_.getMessage(); + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsAnnotation_ = value; + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder setCropHintsAnnotation( + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder builderForValue) { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = builderForValue.build(); + onChanged(); + } else { + cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) { + if (cropHintsAnnotationBuilder_ == null) { + if (cropHintsAnnotation_ != null) { + cropHintsAnnotation_ = + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); + } else { + cropHintsAnnotation_ = value; + } + onChanged(); + } else { + cropHintsAnnotationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public Builder clearCropHintsAnnotation() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotation_ = null; + onChanged(); + } else { + cropHintsAnnotation_ = null; + cropHintsAnnotationBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { + + onChanged(); + return getCropHintsAnnotationFieldBuilder().getBuilder(); + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { + if (cropHintsAnnotationBuilder_ != null) { + return cropHintsAnnotationBuilder_.getMessageOrBuilder(); + } else { + return cropHintsAnnotation_ == null ? + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; + } + } + /** + *
+     * If present, crop hints have completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder> + getCropHintsAnnotationFieldBuilder() { + if (cropHintsAnnotationBuilder_ == null) { + cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder>( + getCropHintsAnnotation(), + getParentForChildren(), + isClean()); + cropHintsAnnotation_ = null; + } + return cropHintsAnnotationBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder> webDetectionBuilder_; + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + public boolean hasWebDetection() { + return webDetectionBuilder_ != null || webDetection_ != null; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() { + if (webDetectionBuilder_ == null) { + return webDetection_ == null ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; + } else { + return webDetectionBuilder_.getMessage(); + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetection_ = value; + onChanged(); + } else { + webDetectionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public Builder setWebDetection( + com.google.cloud.vision.v1p4beta1.WebDetection.Builder builderForValue) { + if (webDetectionBuilder_ == null) { + webDetection_ = builderForValue.build(); + onChanged(); + } else { + webDetectionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public Builder mergeWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) { + if (webDetectionBuilder_ == null) { + if (webDetection_ != null) { + webDetection_ = + com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); + } else { + webDetection_ = value; + } + onChanged(); + } else { + webDetectionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public Builder clearWebDetection() { + if (webDetectionBuilder_ == null) { + webDetection_ = null; + onChanged(); + } else { + webDetection_ = null; + webDetectionBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.Builder getWebDetectionBuilder() { + + onChanged(); + return getWebDetectionFieldBuilder().getBuilder(); + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { + if (webDetectionBuilder_ != null) { + return webDetectionBuilder_.getMessageOrBuilder(); + } else { + return webDetection_ == null ? + com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; + } + } + /** + *
+     * If present, web detection has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder> + getWebDetectionFieldBuilder() { + if (webDetectionBuilder_ == null) { + webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder>( + getWebDetection(), + getParentForChildren(), + isClean()); + webDetection_ = null; + } + return webDetectionBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + public boolean hasProductSearchResults() { + return productSearchResultsBuilder_ != null || productSearchResults_ != null; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + return productSearchResults_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } else { + return productSearchResultsBuilder_.getMessage(); + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchResults_ = value; + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public Builder setProductSearchResults( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder builderForValue) { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = builderForValue.build(); + onChanged(); + } else { + productSearchResultsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public Builder mergeProductSearchResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults value) { + if (productSearchResultsBuilder_ == null) { + if (productSearchResults_ != null) { + productSearchResults_ = + com.google.cloud.vision.v1p4beta1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); + } else { + productSearchResults_ = value; + } + onChanged(); + } else { + productSearchResultsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public Builder clearProductSearchResults() { + if (productSearchResultsBuilder_ == null) { + productSearchResults_ = null; + onChanged(); + } else { + productSearchResults_ = null; + productSearchResultsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder getProductSearchResultsBuilder() { + + onChanged(); + return getProductSearchResultsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { + if (productSearchResultsBuilder_ != null) { + return productSearchResultsBuilder_.getMessageOrBuilder(); + } else { + return productSearchResults_ == null ? + com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; + } + } + /** + *
+     * If present, product search has completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder> + getProductSearchResultsFieldBuilder() { + if (productSearchResultsBuilder_ == null) { + productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder>( + getProductSearchResults(), + getParentForChildren(), + isClean()); + productSearchResults_ = null; + } + return productSearchResultsBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + *
+     * If set, represents the error message for the operation.
+     * Note that filled-in image annotations are guaranteed to be
+     * correct, even when `error` is set.
+     * 
+ * + * .google.rpc.Status error = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder> contextBuilder_; + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public Builder setContext( + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public Builder mergeContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; + } + } + /** + *
+     * If present, contextual information is needed to understand where this image
+     * comes from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + private static final com.google.cloud.vision.v1p4beta1.AnnotateImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotateImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotateImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java new file mode 100644 index 000000000000..1111293c4c8d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java @@ -0,0 +1,512 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AnnotateImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + int getFaceAnnotationsCount(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + java.util.List + getFaceAnnotationsOrBuilderList(); + /** + *
+   * If present, face detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; + */ + com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + int getLandmarkAnnotationsCount(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + java.util.List + getLandmarkAnnotationsOrBuilderList(); + /** + *
+   * If present, landmark detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + int getLogoAnnotationsCount(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + java.util.List + getLogoAnnotationsOrBuilderList(); + /** + *
+   * If present, logo detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + int getLabelAnnotationsCount(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + java.util.List + getLabelAnnotationsOrBuilderList(); + /** + *
+   * If present, label detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + int getLocalizedObjectAnnotationsCount(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + java.util.List + getLocalizedObjectAnnotationsOrBuilderList(); + /** + *
+   * If present, localized object detection has completed successfully.
+   * This will be sorted descending by confidence score.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + int getTextAnnotationsCount(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + java.util.List + getTextAnnotationsOrBuilderList(); + /** + *
+   * If present, text (OCR) detection has completed successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; + */ + com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( + int index); + + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return Whether the fullTextAnnotation field is set. + */ + boolean hasFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + * @return The fullTextAnnotation. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation(); + /** + *
+   * If present, text (OCR) detection or document (OCR) text detection has
+   * completed successfully.
+   * This annotation provides the structural hierarchy for the OCR detected
+   * text.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); + + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return Whether the safeSearchAnnotation field is set. + */ + boolean hasSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + * @return The safeSearchAnnotation. + */ + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation(); + /** + *
+   * If present, safe-search annotation has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; + */ + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); + + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return Whether the imagePropertiesAnnotation field is set. + */ + boolean hasImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + * @return The imagePropertiesAnnotation. + */ + com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation(); + /** + *
+   * If present, image properties were extracted successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; + */ + com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); + + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return Whether the cropHintsAnnotation field is set. + */ + boolean hasCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + * @return The cropHintsAnnotation. + */ + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation(); + /** + *
+   * If present, crop hints have completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; + */ + com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); + + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return Whether the webDetection field is set. + */ + boolean hasWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + * @return The webDetection. + */ + com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection(); + /** + *
+   * If present, web detection has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; + */ + com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); + + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return Whether the productSearchResults field is set. + */ + boolean hasProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + * @return The productSearchResults. + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults(); + /** + *
+   * If present, product search has completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); + + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * If set, represents the error message for the operation.
+   * Note that filled-in image annotations are guaranteed to be
+   * correct, even when `error` is set.
+   * 
+ * + * .google.rpc.Status error = 9; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + * @return The context. + */ + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext(); + /** + *
+   * If present, contextual information is needed to understand where this image
+   * comes from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; + */ + com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java new file mode 100644 index 000000000000..5b23b25b4f2d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java @@ -0,0 +1,1580 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * An offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} + */ +public final class AsyncAnnotateFileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + AsyncAnnotateFileRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileRequest.newBuilder() to construct. + private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; + if (imageContext_ != null) { + subBuilder = imageContext_.toBuilder(); + } + imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(imageContext_); + imageContext_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder.class); + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private java.util.List features_; + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + @java.lang.Override + public boolean hasImageContext() { + return imageContext_ != null; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + return getImageContext(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inputConfig_ != null) { + output.writeMessage(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(2, features_.get(i)); + } + if (imageContext_ != null) { + output.writeMessage(3, getImageContext()); + } + if (outputConfig_ != null) { + output.writeMessage(4, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInputConfig()); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, features_.get(i)); + } + if (imageContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getImageContext()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) obj; + + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; + if (hasImageContext()) { + if (!getImageContext() + .equals(other.getImageContext())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (hasImageContext()) { + hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getImageContext().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (imageContextBuilder_ == null) { + imageContext_ = null; + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest build() { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest(this); + int from_bitField0_ = bitField0_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (imageContextBuilder_ == null) { + result.imageContext_ = imageContext_; + } else { + result.imageContext_ = imageContextBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (other.hasImageContext()) { + mergeImageContext(other.getImageContext()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. Information about the input file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; + + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder setFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addFeatures( + int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); + } + /** + *
+     * Required. Requested features.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + public boolean hasImageContext() { + return imageContextBuilder_ != null || imageContext_ != null; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { + if (imageContextBuilder_ == null) { + return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } else { + return imageContextBuilder_.getMessage(); + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageContext_ = value; + onChanged(); + } else { + imageContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder setImageContext( + com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { + if (imageContextBuilder_ == null) { + imageContext_ = builderForValue.build(); + onChanged(); + } else { + imageContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { + if (imageContextBuilder_ == null) { + if (imageContext_ != null) { + imageContext_ = + com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); + } else { + imageContext_ = value; + } + onChanged(); + } else { + imageContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public Builder clearImageContext() { + if (imageContextBuilder_ == null) { + imageContext_ = null; + onChanged(); + } else { + imageContext_ = null; + imageContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { + + onChanged(); + return getImageContextFieldBuilder().getBuilder(); + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { + if (imageContextBuilder_ != null) { + return imageContextBuilder_.getMessageOrBuilder(); + } else { + return imageContext_ == null ? + com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; + } + } + /** + *
+     * Additional context that may accompany the image(s) in the file.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> + getImageContextFieldBuilder() { + if (imageContextBuilder_ == null) { + imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( + getImageContext(), + getParentForChildren(), + isClean()); + imageContext_ = null; + } + return imageContextBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java new file mode 100644 index 000000000000..d2e427e25602 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncAnnotateFileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); + /** + *
+   * Required. Information about the input file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; + */ + com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); + + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + int getFeaturesCount(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+   * Required. Requested features.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; + */ + com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return Whether the imageContext field is set. + */ + boolean hasImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + * @return The imageContext. + */ + com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); + /** + *
+   * Additional context that may accompany the image(s) in the file.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; + */ + com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; + */ + com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java new file mode 100644 index 000000000000..1dd7a1d72e22 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The response for a single offline file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} + */ +public final class AsyncAnnotateFileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + AsyncAnnotateFileResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileResponse.newBuilder() to construct. + private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncAnnotateFileResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncAnnotateFileResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncAnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response for a single offline file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse build() { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncAnnotateFileRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncAnnotateFileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncAnnotateFileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java new file mode 100644 index 000000000000..d8ff569ddbe9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncAnnotateFileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncAnnotateFileRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..7af88b49bc1f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Multiple async file annotation requests are batched into a single service
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} + */ +public final class AsyncBatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + AsyncBatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. + private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple async file annotation requests are batched into a single service
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual async file annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..f2d3b993addd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncBatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual async file annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..1ee4eba65acc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response to an async batch file annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} + */ +public final class AsyncBatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + AsyncBatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. + private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch file annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, one for each request in
+     * AsyncBatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..8fe1eb059580 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncBatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, one for each request in
+   * AsyncBatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..1f1a1e7f43af --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java @@ -0,0 +1,1108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request for async image annotation for a list of images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} + */ +public final class AsyncBatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) + AsyncBatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateImagesRequest.newBuilder() to construct. + private AsyncBatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for async image annotation for a list of images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. The desired output location and metadata (e.g. format).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..45006d846a52 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncBatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); + + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); + /** + *
+   * Required. The desired output location and metadata (e.g. format).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..e937d1cc98ea --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response to an async batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} + */ +public final class AsyncBatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) + AsyncBatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateImagesResponse.newBuilder() to construct. + private AsyncBatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AsyncBatchAnnotateImagesResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AsyncBatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AsyncBatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to an async batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsyncBatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AsyncBatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..9bb3274f91b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface AsyncBatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + * @return The outputConfig. + */ + com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); + /** + *
+   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; + */ + com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java new file mode 100644 index 000000000000..a1da2dffc3a5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A list of requests to annotate files using the BatchAnnotateFiles API.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} + */ +public final class BatchAnnotateFilesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) + BatchAnnotateFilesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateFilesRequest.newBuilder() to construct. + private BatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateFilesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of requests to annotate files using the BatchAnnotateFiles API.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest build() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()); + } + /** + *
+     * Required. The list of file annotation requests. Right now we support only
+     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) + private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateFilesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateFilesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java new file mode 100644 index 000000000000..fa918040232d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BatchAnnotateFilesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index); + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. The list of file annotation requests. Right now we support only
+   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java new file mode 100644 index 000000000000..da076569e75d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A list of file annotation responses.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} + */ +public final class BatchAnnotateFilesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) + BatchAnnotateFilesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateFilesResponse.newBuilder() to construct. + private BatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateFilesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A list of file annotation responses.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse build() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder> responsesBuilder_; + + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()); + } + /** + *
+     * The list of file annotation responses, each response corresponding to each
+     * AnnotateFileRequest in BatchAnnotateFilesRequest.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) + private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateFilesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateFilesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java new file mode 100644 index 000000000000..91cba2e22caa --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BatchAnnotateFilesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * The list of file annotation responses, each response corresponding to each
+   * AnnotateFileRequest in BatchAnnotateFilesRequest.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java new file mode 100644 index 000000000000..d398103bde04 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Multiple image annotation requests are batched into a single service call.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} + */ +public final class BatchAnnotateImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) + BatchAnnotateImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesRequest.newBuilder() to construct. + private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List requests_; + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { + return requests_.get(index); + } + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(1, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) obj; + + if (!getRequestsList() + .equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Multiple image annotation requests are batched into a single service call.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest build() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest(this); + int from_bitField0_ = bitField0_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRequestsFieldBuilder() : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List requests_ = + java.util.Collections.emptyList(); + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; + + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addRequests( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); + } + /** + *
+     * Required. Individual image annotation requests for this batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( + requests_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + requests_ = null; + } + return requestsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) + private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java new file mode 100644 index 000000000000..a5d680e088f8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BatchAnnotateImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getRequestsCount(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getRequestsOrBuilderList(); + /** + *
+   * Required. Individual image annotation requests for this batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java new file mode 100644 index 000000000000..c36f1e0db8a8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response to a batch image annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} + */ +public final class BatchAnnotateImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) + BatchAnnotateImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchAnnotateImagesResponse.newBuilder() to construct. + private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchAnnotateImagesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchAnnotateImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchAnnotateImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List getResponsesList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public int getResponsesCount() { + return responses_.size(); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { + return responses_.get(index); + } + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + return responses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, responses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) obj; + + if (!getResponsesList() + .equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to a batch image annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse build() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse(this); + int from_bitField0_ = bitField0_; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResponsesFieldBuilder() : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; + + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder setResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder addResponses( + int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder getResponsesBuilder( + int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder( + int index) { + return getResponsesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); + } + /** + *
+     * Individual responses to image annotation requests within the batch.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( + responses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + responses_ = null; + } + return responsesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) + private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchAnnotateImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchAnnotateImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java new file mode 100644 index 000000000000..a85f5923ddd5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BatchAnnotateImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + int getResponsesCount(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + java.util.List + getResponsesOrBuilderList(); + /** + *
+   * Individual responses to image annotation requests within the batch.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; + */ + com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java new file mode 100644 index 000000000000..609ca27f04be --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java @@ -0,0 +1,1238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Metadata for the batch operations such as the current state.
+ * This is included in the `metadata` field of the `Operation` returned by the
+ * `GetOperation` call of the `google::longrunning::Operations` service.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata} + */ +public final class BatchOperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchOperationMetadata) + BatchOperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchOperationMetadata.newBuilder() to construct. + private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchOperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.Builder.class); + } + + /** + *
+   * Enumerates the possible states that the batch request can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + PROCESSING(1), + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + SUCCESSFUL(2), + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * PROCESSING = 1; + */ + public static final int PROCESSING_VALUE = 1; + /** + *
+     * The request is done and at least one item has been successfully
+     * processed.
+     * 
+ * + * SUCCESSFUL = 2; + */ + public static final int SUCCESSFUL_VALUE = 2; + /** + *
+     * The request is done and no item has been successfully processed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+     * The request is done after the longrunning.Operations.CancelOperation has
+     * been called by the user.  Any records that were processed before the
+     * cancel command are output as specified in the request.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return PROCESSING; + case 2: return SUCCESSFUL; + case 3: return FAILED; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int SUBMIT_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp submitTime_; + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + @java.lang.Override + public boolean hasSubmitTime() { + return submitTime_ != null; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSubmitTime() { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + return getSubmitTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (submitTime_ != null) { + output.writeMessage(2, getSubmitTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (submitTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSubmitTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; + if (hasSubmitTime()) { + if (!getSubmitTime() + .equals(other.getSubmitTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasSubmitTime()) { + hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSubmitTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata for the batch operations such as the current state.
+   * This is included in the `metadata` field of the `Operation` returned by the
+   * `GetOperation` call of the `google::longrunning::Operations` service.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchOperationMetadata) + com.google.cloud.vision.v1p4beta1.BatchOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (submitTimeBuilder_ == null) { + submitTime_ = null; + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata build() { + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata buildPartial() { + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata result = new com.google.cloud.vision.v1p4beta1.BatchOperationMetadata(this); + result.state_ = state_; + if (submitTimeBuilder_ == null) { + result.submitTime_ = submitTime_; + } else { + result.submitTime_ = submitTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchOperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata other) { + if (other == com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasSubmitTime()) { + mergeSubmitTime(other.getSubmitTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp submitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + public boolean hasSubmitTime() { + return submitTimeBuilder_ != null || submitTime_ != null; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + public com.google.protobuf.Timestamp getSubmitTime() { + if (submitTimeBuilder_ == null) { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } else { + return submitTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + submitTime_ = value; + onChanged(); + } else { + submitTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder setSubmitTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (submitTimeBuilder_ == null) { + submitTime_ = builderForValue.build(); + onChanged(); + } else { + submitTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (submitTime_ != null) { + submitTime_ = + com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); + } else { + submitTime_ = value; + } + onChanged(); + } else { + submitTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public Builder clearSubmitTime() { + if (submitTimeBuilder_ == null) { + submitTime_ = null; + onChanged(); + } else { + submitTime_ = null; + submitTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { + + onChanged(); + return getSubmitTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + if (submitTimeBuilder_ != null) { + return submitTimeBuilder_.getMessageOrBuilder(); + } else { + return submitTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + } + /** + *
+     * The time when the batch request was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getSubmitTimeFieldBuilder() { + if (submitTimeBuilder_ == null) { + submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getSubmitTime(), + getParentForChildren(), + isClean()); + submitTime_ = null; + } + return submitTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * The time when the batch request is finished and
+     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+     * set to true.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata) + private static final com.google.cloud.vision.v1p4beta1.BatchOperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchOperationMetadata(); + } + + public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..dc1d431a393d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BatchOperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * The current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return Whether the submitTime field is set. + */ + boolean hasSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + * @return The submitTime. + */ + com.google.protobuf.Timestamp getSubmitTime(); + /** + *
+   * The time when the batch request was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); + + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * The time when the batch request is finished and
+   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
+   * set to true.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java new file mode 100644 index 000000000000..3fba75ae6bce --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java @@ -0,0 +1,1914 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Logical element on the page.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Block} + */ +public final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Block) + BlockOrBuilder { +private static final long serialVersionUID = 0L; + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + paragraphs_ = java.util.Collections.emptyList(); + blockType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Block(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + paragraphs_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Paragraph.parser(), extensionRegistry)); + break; + } + case 32: { + int rawValue = input.readEnum(); + + blockType_ = rawValue; + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Block.class, com.google.cloud.vision.v1p4beta1.Block.Builder.class); + } + + /** + *
+   * Type of a block (text, image etc) as identified by OCR.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.Block.BlockType} + */ + public enum BlockType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + TEXT(1), + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + TABLE(2), + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + PICTURE(3), + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + RULER(4), + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + BARCODE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown block type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Regular text block.
+     * 
+ * + * TEXT = 1; + */ + public static final int TEXT_VALUE = 1; + /** + *
+     * Table block.
+     * 
+ * + * TABLE = 2; + */ + public static final int TABLE_VALUE = 2; + /** + *
+     * Image block.
+     * 
+ * + * PICTURE = 3; + */ + public static final int PICTURE_VALUE = 3; + /** + *
+     * Horizontal/vertical line box.
+     * 
+ * + * RULER = 4; + */ + public static final int RULER_VALUE = 4; + /** + *
+     * Barcode block.
+     * 
+ * + * BARCODE = 5; + */ + public static final int BARCODE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TEXT; + case 2: return TABLE; + case 3: return PICTURE; + case 4: return RULER; + case 5: return BARCODE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockType findValueByNumber(int number) { + return BlockType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.Block.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockType[] VALUES = values(); + + public static BlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Block.BlockType) + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int PARAGRAPHS_FIELD_NUMBER = 3; + private java.util.List paragraphs_; + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List getParagraphsList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public java.util.List + getParagraphsOrBuilderList() { + return paragraphs_; + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public int getParagraphsCount() { + return paragraphs_.size(); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index) { + return paragraphs_.get(index); + } + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + return paragraphs_.get(index); + } + + public static final int BLOCK_TYPE_FIELD_NUMBER = 4; + private int blockType_; + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Block.BlockType result = com.google.cloud.vision.v1p4beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p4beta1.Block.BlockType.UNRECOGNIZED : result; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + output.writeMessage(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p4beta1.Block.BlockType.UNKNOWN.getNumber()) { + output.writeEnum(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < paragraphs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, paragraphs_.get(i)); + } + if (blockType_ != com.google.cloud.vision.v1p4beta1.Block.BlockType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, blockType_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Block)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Block other = (com.google.cloud.vision.v1p4beta1.Block) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList() + .equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getParagraphsCount() > 0) { + hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; + hash = (53 * hash) + getParagraphsList().hashCode(); + } + hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + blockType_; + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Logical element on the page.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Block) + com.google.cloud.vision.v1p4beta1.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Block.class, com.google.cloud.vision.v1p4beta1.Block.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getParagraphsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + paragraphsBuilder_.clear(); + } + blockType_ = 0; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block build() { + com.google.cloud.vision.v1p4beta1.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block buildPartial() { + com.google.cloud.vision.v1p4beta1.Block result = new com.google.cloud.vision.v1p4beta1.Block(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (paragraphsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.paragraphs_ = paragraphs_; + } else { + result.paragraphs_ = paragraphsBuilder_.build(); + } + result.blockType_ = blockType_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Block) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Block other) { + if (other == com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (paragraphsBuilder_ == null) { + if (!other.paragraphs_.isEmpty()) { + if (paragraphs_.isEmpty()) { + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParagraphsIsMutable(); + paragraphs_.addAll(other.paragraphs_); + } + onChanged(); + } + } else { + if (!other.paragraphs_.isEmpty()) { + if (paragraphsBuilder_.isEmpty()) { + paragraphsBuilder_.dispose(); + paragraphsBuilder_ = null; + paragraphs_ = other.paragraphs_; + bitField0_ = (bitField0_ & ~0x00000001); + paragraphsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getParagraphsFieldBuilder() : null; + } else { + paragraphsBuilder_.addAllMessages(other.paragraphs_); + } + } + } + if (other.blockType_ != 0) { + setBlockTypeValue(other.getBlockTypeValue()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the block.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     * * when the text is horizontal it might look like:
+     *         0----1
+     *         |    |
+     *         3----2
+     * * when it's rotated 180 degrees around the top-left corner it becomes:
+     *         2----3
+     *         |    |
+     *         1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List paragraphs_ = + java.util.Collections.emptyList(); + private void ensureParagraphsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + paragraphs_ = new java.util.ArrayList(paragraphs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder> paragraphsBuilder_; + + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public java.util.List getParagraphsList() { + if (paragraphsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paragraphs_); + } else { + return paragraphsBuilder_.getMessageList(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public int getParagraphsCount() { + if (paragraphsBuilder_ == null) { + return paragraphs_.size(); + } else { + return paragraphsBuilder_.getCount(); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); + } else { + return paragraphsBuilder_.getMessage(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p4beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.set(index, value); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder setParagraphs( + int index, com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.set(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs(com.google.cloud.vision.v1p4beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p4beta1.Paragraph value) { + if (paragraphsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParagraphsIsMutable(); + paragraphs_.add(index, value); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder addParagraphs( + int index, com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.add(index, builderForValue.build()); + onChanged(); + } else { + paragraphsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder addAllParagraphs( + java.lang.Iterable values) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paragraphs_); + onChanged(); + } else { + paragraphsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder clearParagraphs() { + if (paragraphsBuilder_ == null) { + paragraphs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paragraphsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public Builder removeParagraphs(int index) { + if (paragraphsBuilder_ == null) { + ensureParagraphsIsMutable(); + paragraphs_.remove(index); + onChanged(); + } else { + paragraphsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p4beta1.Paragraph.Builder getParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index) { + if (paragraphsBuilder_ == null) { + return paragraphs_.get(index); } else { + return paragraphsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsOrBuilderList() { + if (paragraphsBuilder_ != null) { + return paragraphsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paragraphs_); + } + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p4beta1.Paragraph.Builder addParagraphsBuilder() { + return getParagraphsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public com.google.cloud.vision.v1p4beta1.Paragraph.Builder addParagraphsBuilder( + int index) { + return getParagraphsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()); + } + /** + *
+     * List of paragraphs in this block (if this blocks is of type text).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + public java.util.List + getParagraphsBuilderList() { + return getParagraphsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder> + getParagraphsFieldBuilder() { + if (paragraphsBuilder_ == null) { + paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder>( + paragraphs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + paragraphs_ = null; + } + return paragraphsBuilder_; + } + + private int blockType_ = 0; + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + @java.lang.Override public int getBlockTypeValue() { + return blockType_; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @param value The enum numeric value on the wire for blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockTypeValue(int value) { + + blockType_ = value; + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Block.BlockType result = com.google.cloud.vision.v1p4beta1.Block.BlockType.valueOf(blockType_); + return result == null ? com.google.cloud.vision.v1p4beta1.Block.BlockType.UNRECOGNIZED : result; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @param value The blockType to set. + * @return This builder for chaining. + */ + public Builder setBlockType(com.google.cloud.vision.v1p4beta1.Block.BlockType value) { + if (value == null) { + throw new NullPointerException(); + } + + blockType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Detected block type (text, image etc) for this block.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return This builder for chaining. + */ + public Builder clearBlockType() { + + blockType_ = 0; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the block. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Block) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Block) + private static final com.google.cloud.vision.v1p4beta1.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Block(); + } + + public static com.google.cloud.vision.v1p4beta1.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java new file mode 100644 index 000000000000..e8b0d95ffa09 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java @@ -0,0 +1,178 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the block.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   * * when the text is horizontal it might look like:
+   *         0----1
+   *         |    |
+   *         3----2
+   * * when it's rotated 180 degrees around the top-left corner it becomes:
+   *         2----3
+   *         |    |
+   *         1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + int getParagraphsCount(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + java.util.List + getParagraphsOrBuilderList(); + /** + *
+   * List of paragraphs in this block (if this blocks is of type text).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; + */ + com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( + int index); + + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The enum numeric value on the wire for blockType. + */ + int getBlockTypeValue(); + /** + *
+   * Detected block type (text, image etc) for this block.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; + * @return The blockType. + */ + com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType(); + + /** + *
+   * Confidence of the OCR results on the block. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java new file mode 100644 index 000000000000..36961f2284c3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java @@ -0,0 +1,1312 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A bounding polygon for the detected image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BoundingPoly} + */ +public final class BoundingPoly extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BoundingPoly) + BoundingPolyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingPoly(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Vertex.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + normalizedVertices_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.NormalizedVertex.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BoundingPoly.class, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List getVerticesList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + @java.lang.Override + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + @java.lang.Override + public int getVerticesCount() { + return vertices_.size(); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + return vertices_.get(index); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; + private java.util.List normalizedVertices_; + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(2, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, vertices_.get(i)); + } + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.BoundingPoly other = (com.google.cloud.vision.v1p4beta1.BoundingPoly) obj; + + if (!getVerticesList() + .equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList() + .equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A bounding polygon for the detected image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.BoundingPoly} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BoundingPoly) + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.BoundingPoly.class, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + getNormalizedVerticesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly build() { + com.google.cloud.vision.v1p4beta1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly buildPartial() { + com.google.cloud.vision.v1p4beta1.BoundingPoly result = new com.google.cloud.vision.v1p4beta1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.BoundingPoly) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.BoundingPoly)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BoundingPoly other) { + if (other == com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVerticesFieldBuilder() : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000002); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNormalizedVerticesFieldBuilder() : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder> verticesBuilder_; + + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p4beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.vision.v1p4beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p4beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p4beta1.Vertex.Builder getVerticesBuilder( + int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( + int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder( + int index) { + return getVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder>( + vertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; + + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices(com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()); + } + /** + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BoundingPoly) + private static final com.google.cloud.vision.v1p4beta1.BoundingPoly DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BoundingPoly(); + } + + public static com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..72e8b27695eb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface BoundingPolyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; + */ + com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( + int index); + + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + int getNormalizedVerticesCount(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; + */ + com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java new file mode 100644 index 000000000000..a4881d9388f1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java @@ -0,0 +1,934 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A Celebrity is a group of Faces with an identity.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Celebrity} + */ +public final class Celebrity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Celebrity) + CelebrityOrBuilder { +private static final long serialVersionUID = 0L; + // Use Celebrity.newBuilder() to construct. + private Celebrity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Celebrity() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Celebrity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Celebrity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Celebrity.class, com.google.cloud.vision.v1p4beta1.Celebrity.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the preloaded Celebrity. Has the format
+   * `builtin/{mid}`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the preloaded Celebrity. Has the format
+   * `builtin/{mid}`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The Celebrity's display name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The Celebrity's display name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * The Celebrity's description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The Celebrity's description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Celebrity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Celebrity other = (com.google.cloud.vision.v1p4beta1.Celebrity) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Celebrity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Celebrity is a group of Faces with an identity.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Celebrity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Celebrity) + com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Celebrity.class, com.google.cloud.vision.v1p4beta1.Celebrity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Celebrity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Celebrity build() { + com.google.cloud.vision.v1p4beta1.Celebrity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Celebrity buildPartial() { + com.google.cloud.vision.v1p4beta1.Celebrity result = new com.google.cloud.vision.v1p4beta1.Celebrity(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Celebrity) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Celebrity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Celebrity other) { + if (other == com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Celebrity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Celebrity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the preloaded Celebrity. Has the format
+     * `builtin/{mid}`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the preloaded Celebrity. Has the format
+     * `builtin/{mid}`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the preloaded Celebrity. Has the format
+     * `builtin/{mid}`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the preloaded Celebrity. Has the format
+     * `builtin/{mid}`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the preloaded Celebrity. Has the format
+     * `builtin/{mid}`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The Celebrity's display name.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Celebrity's display name.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Celebrity's display name.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The Celebrity's display name.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The Celebrity's display name.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The Celebrity's description.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Celebrity's description.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Celebrity's description.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * The Celebrity's description.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * The Celebrity's description.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Celebrity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Celebrity) + private static final com.google.cloud.vision.v1p4beta1.Celebrity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Celebrity(); + } + + public static com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Celebrity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Celebrity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java new file mode 100644 index 000000000000..cbac3c1853f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CelebrityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Celebrity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the preloaded Celebrity. Has the format
+   * `builtin/{mid}`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the preloaded Celebrity. Has the format
+   * `builtin/{mid}`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The Celebrity's display name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The Celebrity's display name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * The Celebrity's description.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The Celebrity's description.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java new file mode 100644 index 000000000000..cb44a776079b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class CelebrityProto { + private CelebrityProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/vision/v1p4beta1/face.pro" + + "to\022\035google.cloud.vision.v1p4beta1\032,googl" + + "e/cloud/vision/v1p4beta1/geometry.proto\"" + + ".\n\025FaceRecognitionParams\022\025\n\rcelebrity_se" + + "t\030\001 \003(\t\"D\n\tCelebrity\022\014\n\004name\030\001 \001(\t\022\024\n\014di" + + "splay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\"h\n" + + "\025FaceRecognitionResult\022;\n\tcelebrity\030\001 \001(" + + "\0132(.google.cloud.vision.v1p4beta1.Celebr" + + "ity\022\022\n\nconfidence\030\002 \001(\002B\204\001\n!com.google.c" + + "loud.vision.v1p4beta1B\016CelebrityProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor, + new java.lang.String[] { "CelebritySet", }); + internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", }); + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor, + new java.lang.String[] { "Celebrity", "Confidence", }); + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java new file mode 100644 index 000000000000..8998d3391d3c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java @@ -0,0 +1,835 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Color information consists of RGB channels, score, and the fraction of
+ * the image that the color occupies in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ColorInfo} + */ +public final class ColorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ColorInfo) + ColorInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use ColorInfo.newBuilder() to construct. + private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Color.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 29: { + + pixelFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ColorInfo.class, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + private com.google.type.Color color_; + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + @java.lang.Override + public boolean hasColor() { + return color_ != null; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + @java.lang.Override + public com.google.type.Color getColor() { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + @java.lang.Override + public com.google.type.ColorOrBuilder getColorOrBuilder() { + return getColor(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; + private float pixelFraction_; + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (color_ != null) { + output.writeMessage(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + output.writeFloat(3, pixelFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getColor()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, pixelFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ColorInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ColorInfo other = (com.google.cloud.vision.v1p4beta1.ColorInfo) obj; + + if (hasColor() != other.hasColor()) return false; + if (hasColor()) { + if (!getColor() + .equals(other.getColor())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits( + other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPixelFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ColorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Color information consists of RGB channels, score, and the fraction of
+   * the image that the color occupies in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ColorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ColorInfo) + com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ColorInfo.class, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ColorInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + score_ = 0F; + + pixelFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfo build() { + com.google.cloud.vision.v1p4beta1.ColorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfo buildPartial() { + com.google.cloud.vision.v1p4beta1.ColorInfo result = new com.google.cloud.vision.v1p4beta1.ColorInfo(this); + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + result.score_ = score_; + result.pixelFraction_ = pixelFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ColorInfo) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ColorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ColorInfo other) { + if (other == com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()) return this; + if (other.hasColor()) { + mergeColor(other.getColor()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getPixelFraction() != 0F) { + setPixelFraction(other.getPixelFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ColorInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ColorInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Color color_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + public com.google.type.Color getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder setColor( + com.google.type.Color.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder mergeColor(com.google.type.Color value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.Color.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + public com.google.type.ColorOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.google.type.Color.getDefaultInstance() : color_; + } + } + /** + *
+     * RGB components of the color.
+     * 
+ * + * .google.type.Color color = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + + private float score_ ; + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Image-specific score for this color. Value in range [0, 1].
+     * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float pixelFraction_ ; + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + @java.lang.Override + public float getPixelFraction() { + return pixelFraction_; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @param value The pixelFraction to set. + * @return This builder for chaining. + */ + public Builder setPixelFraction(float value) { + + pixelFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * The fraction of pixels the color occupies in the image.
+     * Value in range [0, 1].
+     * 
+ * + * float pixel_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearPixelFraction() { + + pixelFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ColorInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ColorInfo) + private static final com.google.cloud.vision.v1p4beta1.ColorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ColorInfo(); + } + + public static com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java new file mode 100644 index 000000000000..362574b0fd13 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ColorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ColorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return Whether the color field is set. + */ + boolean hasColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + * @return The color. + */ + com.google.type.Color getColor(); + /** + *
+   * RGB components of the color.
+   * 
+ * + * .google.type.Color color = 1; + */ + com.google.type.ColorOrBuilder getColorOrBuilder(); + + /** + *
+   * Image-specific score for this color. Value in range [0, 1].
+   * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+   * The fraction of pixels the color occupies in the image.
+   * Value in range [0, 1].
+   * 
+ * + * float pixel_fraction = 3; + * @return The pixelFraction. + */ + float getPixelFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java new file mode 100644 index 000000000000..1fc8e2b85b66 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java @@ -0,0 +1,1032 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `CreateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductRequest} + */ +public final class CreateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateProductRequest) + CreateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductRequest.newBuilder() to construct. + private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductRequest() { + parent_ = ""; + productId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.Product product_; + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productId_; + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (product_ != null) { + output.writeMessage(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProduct()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CreateProductRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (!getProductId() + .equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateProductRequest) + com.google.cloud.vision.v1p4beta1.CreateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CreateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + productId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductRequest build() { + com.google.cloud.vision.v1p4beta1.CreateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.CreateProductRequest result = new com.google.cloud.vision.v1p4beta1.CreateProductRequest(this); + result.parent_ = parent_; + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.productId_ = productId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CreateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateProductRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CreateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the Product should be created.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The product to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private java.lang.Object productId_ = ""; + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString + getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductId() { + + productId_ = getDefaultInstance().getProductId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this Product. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_id = 3; + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductRequest) + private static final com.google.cloud.vision.v1p4beta1.CreateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateProductRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java new file mode 100644 index 000000000000..ce7922518e7e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CreateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the Product should be created.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1p4beta1.Product getProduct(); + /** + *
+   * Required. The product to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The productId. + */ + java.lang.String getProductId(); + /** + *
+   * A user-supplied resource id for this Product. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_id = 3; + * @return The bytes for productId. + */ + com.google.protobuf.ByteString + getProductIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java new file mode 100644 index 000000000000..10e5cb30d382 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java @@ -0,0 +1,1025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `CreateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductSetRequest} + */ +public final class CreateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateProductSetRequest) + CreateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateProductSetRequest.newBuilder() to construct. + private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateProductSetRequest() { + parent_ = ""; + productSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + productSetId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object productSetId_; + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + @java.lang.Override + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (productSet_ != null) { + output.writeMessage(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProductSet()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (!getProductSetId() + .equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductSetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateProductSetRequest) + com.google.cloud.vision.v1p4beta1.CreateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + productSetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest result = new com.google.cloud.vision.v1p4beta1.CreateProductSetRequest(this); + result.parent_ = parent_; + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + result.productSetId_ = productSetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (!other.getProductSetId().isEmpty()) { + productSetId_ = other.productSetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSet should be created.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet to create.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private java.lang.Object productSetId_ = ""; + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSetId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @return This builder for chaining. + */ + public Builder clearProductSetId() { + + productSetId_ = getDefaultInstance().getProductSetId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for this ProductSet. If set, the server will
+     * attempt to use this value as the resource id. If it is already in use, an
+     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+     * long. It cannot contain the character `/`.
+     * 
+ * + * string product_set_id = 3; + * @param value The bytes for productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSetId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.CreateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..68f3f7c8265c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CreateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSet should be created.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet to create.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The productSetId. + */ + java.lang.String getProductSetId(); + /** + *
+   * A user-supplied resource id for this ProductSet. If set, the server will
+   * attempt to use this value as the resource id. If it is already in use, an
+   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
+   * long. It cannot contain the character `/`.
+   * 
+ * + * string product_set_id = 3; + * @return The bytes for productSetId. + */ + com.google.protobuf.ByteString + getProductSetIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java new file mode 100644 index 000000000000..9bb7b84b69f3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java @@ -0,0 +1,1051 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `CreateReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} + */ +public final class CreateReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) + CreateReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateReferenceImageRequest.newBuilder() to construct. + private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateReferenceImageRequest() { + parent_ = ""; + referenceImageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder subBuilder = null; + if (referenceImage_ != null) { + subBuilder = referenceImage_.toBuilder(); + } + referenceImage_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(referenceImage_); + referenceImage_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + referenceImageId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product in which to create the reference
+   * image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product in which to create the reference
+   * image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_; + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + @java.lang.Override + public boolean hasReferenceImage() { + return referenceImage_ != null; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage() { + return referenceImage_ == null ? com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + return getReferenceImage(); + } + + public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object referenceImageId_; + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + @java.lang.Override + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } + } + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (referenceImage_ != null) { + output.writeMessage(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (referenceImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReferenceImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; + if (hasReferenceImage()) { + if (!getReferenceImage() + .equals(other.getReferenceImage())) return false; + } + if (!getReferenceImageId() + .equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReferenceImage()) { + hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImage().hashCode(); + } + hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImageId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `CreateReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + referenceImageId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest build() { + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest(this); + result.parent_ = parent_; + if (referenceImageBuilder_ == null) { + result.referenceImage_ = referenceImage_; + } else { + result.referenceImage_ = referenceImageBuilder_.build(); + } + result.referenceImageId_ = referenceImageId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReferenceImage()) { + mergeReferenceImage(other.getReferenceImage()); + } + if (!other.getReferenceImageId().isEmpty()) { + referenceImageId_ = other.referenceImageId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product in which to create the reference
+     * image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference
+     * image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product in which to create the reference
+     * image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference
+     * image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product in which to create the reference
+     * image.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImageBuilder_; + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + public boolean hasReferenceImage() { + return referenceImageBuilder_ != null || referenceImage_ != null; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage() { + if (referenceImageBuilder_ == null) { + return referenceImage_ == null ? com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } else { + return referenceImageBuilder_.getMessage(); + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + referenceImage_ = value; + onChanged(); + } else { + referenceImageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReferenceImage( + com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImageBuilder_ == null) { + referenceImage_ = builderForValue.build(); + onChanged(); + } else { + referenceImageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeReferenceImage(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImageBuilder_ == null) { + if (referenceImage_ != null) { + referenceImage_ = + com.google.cloud.vision.v1p4beta1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); + } else { + referenceImage_ = value; + } + onChanged(); + } else { + referenceImageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearReferenceImage() { + if (referenceImageBuilder_ == null) { + referenceImage_ = null; + onChanged(); + } else { + referenceImage_ = null; + referenceImageBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImageBuilder() { + + onChanged(); + return getReferenceImageFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { + if (referenceImageBuilder_ != null) { + return referenceImageBuilder_.getMessageOrBuilder(); + } else { + return referenceImage_ == null ? + com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; + } + } + /** + *
+     * Required. The reference image to create.
+     * If an image ID is specified, it is ignored.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> + getReferenceImageFieldBuilder() { + if (referenceImageBuilder_ == null) { + referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( + getReferenceImage(), + getParentForChildren(), + isClean()); + referenceImage_ = null; + } + return referenceImageBuilder_; + } + + private java.lang.Object referenceImageId_ = ""; + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + public java.lang.String getReferenceImageId() { + java.lang.Object ref = referenceImageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceImageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + public com.google.protobuf.ByteString + getReferenceImageIdBytes() { + java.lang.Object ref = referenceImageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referenceImageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + referenceImageId_ = value; + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @return This builder for chaining. + */ + public Builder clearReferenceImageId() { + + referenceImageId_ = getDefaultInstance().getReferenceImageId(); + onChanged(); + return this; + } + /** + *
+     * A user-supplied resource id for the ReferenceImage to be added. If set,
+     * the server will attempt to use this value as the resource id. If it is
+     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+     * most 128 characters long. It cannot contain the character `/`.
+     * 
+ * + * string reference_image_id = 3; + * @param value The bytes for referenceImageId to set. + * @return This builder for chaining. + */ + public Builder setReferenceImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + referenceImageId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) + private static final com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..3c48cbcb43f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CreateReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product in which to create the reference
+   * image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product in which to create the reference
+   * image.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the referenceImage field is set. + */ + boolean hasReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The referenceImage. + */ + com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage(); + /** + *
+   * Required. The reference image to create.
+   * If an image ID is specified, it is ignored.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); + + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The referenceImageId. + */ + java.lang.String getReferenceImageId(); + /** + *
+   * A user-supplied resource id for the ReferenceImage to be added. If set,
+   * the server will attempt to use this value as the resource id. If it is
+   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
+   * most 128 characters long. It cannot contain the character `/`.
+   * 
+ * + * string reference_image_id = 3; + * @return The bytes for referenceImageId. + */ + com.google.protobuf.ByteString + getReferenceImageIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java new file mode 100644 index 000000000000..2594a271dc98 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java @@ -0,0 +1,845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Single crop hint that is used to generate a new crop when serving an image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHint} + */ +public final class CropHint extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHint) + CropHintOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHint.newBuilder() to construct. + private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHint() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + case 29: { + + importanceFraction_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHint.class, com.google.cloud.vision.v1p4beta1.CropHint.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; + private float importanceFraction_; + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + output.writeFloat(3, importanceFraction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, importanceFraction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHint)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CropHint other = (com.google.cloud.vision.v1p4beta1.CropHint) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits( + other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getImportanceFraction()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Single crop hint that is used to generate a new crop when serving an image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHint) + com.google.cloud.vision.v1p4beta1.CropHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHint.class, com.google.cloud.vision.v1p4beta1.CropHint.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CropHint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + confidence_ = 0F; + + importanceFraction_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHint build() { + com.google.cloud.vision.v1p4beta1.CropHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHint buildPartial() { + com.google.cloud.vision.v1p4beta1.CropHint result = new com.google.cloud.vision.v1p4beta1.CropHint(this); + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.confidence_ = confidence_; + result.importanceFraction_ = importanceFraction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CropHint) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHint other) { + if (other == com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getImportanceFraction() != 0F) { + setImportanceFraction(other.getImportanceFraction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CropHint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon for the crop region. The coordinates of the bounding
+     * box are in the original image's scale.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of this being a salient region.  Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float importanceFraction_ ; + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + @java.lang.Override + public float getImportanceFraction() { + return importanceFraction_; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @param value The importanceFraction to set. + * @return This builder for chaining. + */ + public Builder setImportanceFraction(float value) { + + importanceFraction_ = value; + onChanged(); + return this; + } + /** + *
+     * Fraction of importance of this salient region with respect to the original
+     * image.
+     * 
+ * + * float importance_fraction = 3; + * @return This builder for chaining. + */ + public Builder clearImportanceFraction() { + + importanceFraction_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHint) + private static final com.google.cloud.vision.v1p4beta1.CropHint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHint(); + } + + public static com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHint(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java new file mode 100644 index 000000000000..b6b460e2315b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CropHintOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHint) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon for the crop region. The coordinates of the bounding
+   * box are in the original image's scale.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * Confidence of this being a salient region.  Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + + /** + *
+   * Fraction of importance of this salient region with respect to the original
+   * image.
+   * 
+ * + * float importance_fraction = 3; + * @return The importanceFraction. + */ + float getImportanceFraction(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java new file mode 100644 index 000000000000..80d54ed43cc4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Set of crop hints that are used to generate new crops when serving images.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsAnnotation} + */ +public final class CropHintsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHintsAnnotation) + CropHintsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsAnnotation.newBuilder() to construct. + private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsAnnotation() { + cropHints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cropHints_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.CropHint.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder.class); + } + + public static final int CROP_HINTS_FIELD_NUMBER = 1; + private java.util.List cropHints_; + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List getCropHintsList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public java.util.List + getCropHintsOrBuilderList() { + return cropHints_; + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public int getCropHintsCount() { + return cropHints_.size(); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index) { + return cropHints_.get(index); + } + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + return cropHints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < cropHints_.size(); i++) { + output.writeMessage(1, cropHints_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cropHints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, cropHints_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHintsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) obj; + + if (!getCropHintsList() + .equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCropHintsCount() > 0) { + hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of crop hints that are used to generate new crops when serving images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHintsAnnotation) + com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCropHintsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation build() { + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p4beta1.CropHintsAnnotation(this); + int from_bitField0_ = bitField0_; + if (cropHintsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cropHints_ = java.util.Collections.unmodifiableList(cropHints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cropHints_ = cropHints_; + } else { + result.cropHints_ = cropHintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHintsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance()) return this; + if (cropHintsBuilder_ == null) { + if (!other.cropHints_.isEmpty()) { + if (cropHints_.isEmpty()) { + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCropHintsIsMutable(); + cropHints_.addAll(other.cropHints_); + } + onChanged(); + } + } else { + if (!other.cropHints_.isEmpty()) { + if (cropHintsBuilder_.isEmpty()) { + cropHintsBuilder_.dispose(); + cropHintsBuilder_ = null; + cropHints_ = other.cropHints_; + bitField0_ = (bitField0_ & ~0x00000001); + cropHintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCropHintsFieldBuilder() : null; + } else { + cropHintsBuilder_.addAllMessages(other.cropHints_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List cropHints_ = + java.util.Collections.emptyList(); + private void ensureCropHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cropHints_ = new java.util.ArrayList(cropHints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder> cropHintsBuilder_; + + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public java.util.List getCropHintsList() { + if (cropHintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cropHints_); + } else { + return cropHintsBuilder_.getMessageList(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public int getCropHintsCount() { + if (cropHintsBuilder_ == null) { + return cropHints_.size(); + } else { + return cropHintsBuilder_.getCount(); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); + } else { + return cropHintsBuilder_.getMessage(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p4beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.set(index, value); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder setCropHints( + int index, com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.set(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints(com.google.cloud.vision.v1p4beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p4beta1.CropHint value) { + if (cropHintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCropHintsIsMutable(); + cropHints_.add(index, value); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder addCropHints( + int index, com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.add(index, builderForValue.build()); + onChanged(); + } else { + cropHintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder addAllCropHints( + java.lang.Iterable values) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, cropHints_); + onChanged(); + } else { + cropHintsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder clearCropHints() { + if (cropHintsBuilder_ == null) { + cropHints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cropHintsBuilder_.clear(); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public Builder removeCropHints(int index) { + if (cropHintsBuilder_ == null) { + ensureCropHintsIsMutable(); + cropHints_.remove(index); + onChanged(); + } else { + cropHintsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p4beta1.CropHint.Builder getCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().getBuilder(index); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index) { + if (cropHintsBuilder_ == null) { + return cropHints_.get(index); } else { + return cropHintsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsOrBuilderList() { + if (cropHintsBuilder_ != null) { + return cropHintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cropHints_); + } + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder() { + return getCropHintsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder( + int index) { + return getCropHintsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()); + } + /** + *
+     * Crop hint results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + public java.util.List + getCropHintsBuilderList() { + return getCropHintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder> + getCropHintsFieldBuilder() { + if (cropHintsBuilder_ == null) { + cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder>( + cropHints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cropHints_ = null; + } + return cropHintsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHintsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsAnnotation) + private static final com.google.cloud.vision.v1p4beta1.CropHintsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHintsAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java new file mode 100644 index 000000000000..37cbfcbe2899 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CropHintsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHintsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + int getCropHintsCount(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + java.util.List + getCropHintsOrBuilderList(); + /** + *
+   * Crop hint results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; + */ + com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java new file mode 100644 index 000000000000..03f3deb04e74 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java @@ -0,0 +1,696 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Parameters for crop hints annotation request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsParams} + */ +public final class CropHintsParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHintsParams) + CropHintsParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CropHintsParams.newBuilder() to construct. + private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CropHintsParams() { + aspectRatios_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CropHintsParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CropHintsParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + aspectRatios_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + aspectRatios_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHintsParams.class, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder.class); + } + + public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList aspectRatios_; + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + @java.lang.Override + public java.util.List + getAspectRatiosList() { + return aspectRatios_; + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + private int aspectRatiosMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getAspectRatiosList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); + } + for (int i = 0; i < aspectRatios_.size(); i++) { + output.writeFloatNoTag(aspectRatios_.getFloat(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 4 * getAspectRatiosList().size(); + size += dataSize; + if (!getAspectRatiosList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + aspectRatiosMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHintsParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.CropHintsParams other = (com.google.cloud.vision.v1p4beta1.CropHintsParams) obj; + + if (!getAspectRatiosList() + .equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAspectRatiosCount() > 0) { + hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; + hash = (53 * hash) + getAspectRatiosList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHintsParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHintsParams) + com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.CropHintsParams.class, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.CropHintsParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParams build() { + com.google.cloud.vision.v1p4beta1.CropHintsParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParams buildPartial() { + com.google.cloud.vision.v1p4beta1.CropHintsParams result = new com.google.cloud.vision.v1p4beta1.CropHintsParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aspectRatios_ = aspectRatios_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.CropHintsParams) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHintsParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHintsParams other) { + if (other == com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance()) return this; + if (!other.aspectRatios_.isEmpty()) { + if (aspectRatios_.isEmpty()) { + aspectRatios_ = other.aspectRatios_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAspectRatiosIsMutable(); + aspectRatios_.addAll(other.aspectRatios_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.CropHintsParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHintsParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); + private void ensureAspectRatiosIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + public java.util.List + getAspectRatiosList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + public int getAspectRatiosCount() { + return aspectRatios_.size(); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + public float getAspectRatios(int index) { + return aspectRatios_.getFloat(index); + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index to set the value at. + * @param value The aspectRatios to set. + * @return This builder for chaining. + */ + public Builder setAspectRatios( + int index, float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.setFloat(index, value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param value The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAspectRatios(float value) { + ensureAspectRatiosIsMutable(); + aspectRatios_.addFloat(value); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @param values The aspectRatios to add. + * @return This builder for chaining. + */ + public Builder addAllAspectRatios( + java.lang.Iterable values) { + ensureAspectRatiosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aspectRatios_); + onChanged(); + return this; + } + /** + *
+     * Aspect ratios in floats, representing the ratio of the width to the height
+     * of the image. For example, if the desired aspect ratio is 4/3, the
+     * corresponding float value should be 1.33333.  If not specified, the
+     * best possible crop is returned. The number of provided aspect ratios is
+     * limited to a maximum of 16; any aspect ratios provided after the 16th are
+     * ignored.
+     * 
+ * + * repeated float aspect_ratios = 1; + * @return This builder for chaining. + */ + public Builder clearAspectRatios() { + aspectRatios_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHintsParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsParams) + private static final com.google.cloud.vision.v1p4beta1.CropHintsParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHintsParams(); + } + + public static com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CropHintsParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CropHintsParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java new file mode 100644 index 000000000000..e599bbad2557 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface CropHintsParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHintsParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return A list containing the aspectRatios. + */ + java.util.List getAspectRatiosList(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @return The count of aspectRatios. + */ + int getAspectRatiosCount(); + /** + *
+   * Aspect ratios in floats, representing the ratio of the width to the height
+   * of the image. For example, if the desired aspect ratio is 4/3, the
+   * corresponding float value should be 1.33333.  If not specified, the
+   * best possible crop is returned. The number of provided aspect ratios is
+   * limited to a maximum of 16; any aspect ratios provided after the 16th are
+   * ignored.
+   * 
+ * + * repeated float aspect_ratios = 1; + * @param index The index of the element to return. + * @return The aspectRatios at the given index. + */ + float getAspectRatios(int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java new file mode 100644 index 000000000000..3d1f84fc24f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `DeleteProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductRequest} + */ +public final class DeleteProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteProductRequest) + DeleteProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductRequest.newBuilder() to construct. + private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteProductRequest) + com.google.cloud.vision.v1p4beta1.DeleteProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.DeleteProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductRequest build() { + com.google.cloud.vision.v1p4beta1.DeleteProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.DeleteProductRequest result = new com.google.cloud.vision.v1p4beta1.DeleteProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteProductRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.DeleteProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of product to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductRequest) + private static final com.google.cloud.vision.v1p4beta1.DeleteProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteProductRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java new file mode 100644 index 000000000000..e279feab23b0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface DeleteProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of product to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java new file mode 100644 index 000000000000..b9948566e302 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `DeleteProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductSetRequest} + */ +public final class DeleteProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) + DeleteProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteProductSetRequest.newBuilder() to construct. + private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest result = new com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..521a1ae8a3cc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface DeleteProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java new file mode 100644 index 000000000000..aecc9d0eef57 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `DeleteReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} + */ +public final class DeleteReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) + DeleteReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteReferenceImageRequest.newBuilder() to construct. + private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `DeleteReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest build() { + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the reference image to delete.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) + private static final com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..a14db61508f8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface DeleteReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the reference image to delete.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java new file mode 100644 index 000000000000..ab8b30593178 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Set of dominant colors and their corresponding scores.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DominantColorsAnnotation} + */ +public final class DominantColorsAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) + DominantColorsAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DominantColorsAnnotation.newBuilder() to construct. + private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DominantColorsAnnotation() { + colors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DominantColorsAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DominantColorsAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + colors_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ColorInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder.class); + } + + public static final int COLORS_FIELD_NUMBER = 1; + private java.util.List colors_; + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List getColorsList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public java.util.List + getColorsOrBuilderList() { + return colors_; + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public int getColorsCount() { + return colors_.size(); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index) { + return colors_.get(index); + } + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + return colors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < colors_.size(); i++) { + output.writeMessage(1, colors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < colors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, colors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) obj; + + if (!getColorsList() + .equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getColorsCount() > 0) { + hash = (37 * hash) + COLORS_FIELD_NUMBER; + hash = (53 * hash) + getColorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of dominant colors and their corresponding scores.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.DominantColorsAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + colorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation build() { + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation(this); + int from_bitField0_ = bitField0_; + if (colorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + colors_ = java.util.Collections.unmodifiableList(colors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.colors_ = colors_; + } else { + result.colors_ = colorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance()) return this; + if (colorsBuilder_ == null) { + if (!other.colors_.isEmpty()) { + if (colors_.isEmpty()) { + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureColorsIsMutable(); + colors_.addAll(other.colors_); + } + onChanged(); + } + } else { + if (!other.colors_.isEmpty()) { + if (colorsBuilder_.isEmpty()) { + colorsBuilder_.dispose(); + colorsBuilder_ = null; + colors_ = other.colors_; + bitField0_ = (bitField0_ & ~0x00000001); + colorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getColorsFieldBuilder() : null; + } else { + colorsBuilder_.addAllMessages(other.colors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List colors_ = + java.util.Collections.emptyList(); + private void ensureColorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + colors_ = new java.util.ArrayList(colors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder> colorsBuilder_; + + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public java.util.List getColorsList() { + if (colorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(colors_); + } else { + return colorsBuilder_.getMessageList(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public int getColorsCount() { + if (colorsBuilder_ == null) { + return colors_.size(); + } else { + return colorsBuilder_.getCount(); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); + } else { + return colorsBuilder_.getMessage(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p4beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.set(index, value); + onChanged(); + } else { + colorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder setColors( + int index, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.set(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder addColors(com.google.cloud.vision.v1p4beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(value); + onChanged(); + } else { + colorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p4beta1.ColorInfo value) { + if (colorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColorsIsMutable(); + colors_.add(index, value); + onChanged(); + } else { + colorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder addColors( + com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder addColors( + int index, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.add(index, builderForValue.build()); + onChanged(); + } else { + colorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder addAllColors( + java.lang.Iterable values) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, colors_); + onChanged(); + } else { + colorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder clearColors() { + if (colorsBuilder_ == null) { + colors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + colorsBuilder_.clear(); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public Builder removeColors(int index) { + if (colorsBuilder_ == null) { + ensureColorsIsMutable(); + colors_.remove(index); + onChanged(); + } else { + colorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder getColorsBuilder( + int index) { + return getColorsFieldBuilder().getBuilder(index); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index) { + if (colorsBuilder_ == null) { + return colors_.get(index); } else { + return colorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsOrBuilderList() { + if (colorsBuilder_ != null) { + return colorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(colors_); + } + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder() { + return getColorsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder( + int index) { + return getColorsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()); + } + /** + *
+     * RGB color values with their score and pixel fraction.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + public java.util.List + getColorsBuilderList() { + return getColorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder> + getColorsFieldBuilder() { + if (colorsBuilder_ == null) { + colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder>( + colors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + colors_ = null; + } + return colorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) + private static final com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DominantColorsAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DominantColorsAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java new file mode 100644 index 000000000000..a8d649e11d0b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface DominantColorsAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + int getColorsCount(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + java.util.List + getColorsOrBuilderList(); + /** + *
+   * RGB color values with their score and pixel fraction.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; + */ + com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java new file mode 100644 index 000000000000..8940d16c1947 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java @@ -0,0 +1,2480 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Set of detected entity features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.EntityAnnotation} + */ +public final class EntityAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.EntityAnnotation) + EntityAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityAnnotation.newBuilder() to construct. + private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityAnnotation() { + mid_ = ""; + locale_ = ""; + description_ = ""; + locations_ = java.util.Collections.emptyList(); + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + locale_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + case 53: { + + topicality_ = input.readFloat(); + break; + } + case 58: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.LocationInfo.parser(), extensionRegistry)); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + properties_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Property.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.class, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCALE_FIELD_NUMBER = 2; + private volatile java.lang.Object locale_; + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + @java.lang.Override + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } + } + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 + * @return The confidence. + */ + @java.lang.Override + @java.lang.Deprecated public float getConfidence() { + return confidence_; + } + + public static final int TOPICALITY_FIELD_NUMBER = 6; + private float topicality_; + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 7; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int LOCATIONS_FIELD_NUMBER = 8; + private java.util.List locations_; + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index) { + return locations_.get(index); + } + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + return locations_.get(index); + } + + public static final int PROPERTIES_FIELD_NUMBER = 9; + private java.util.List properties_; + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + @java.lang.Override + public java.util.List + getPropertiesOrBuilderList() { + return properties_; + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Property getProperties(int index) { + return properties_.get(index); + } + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + output.writeFloat(6, topicality_); + } + if (boundingPoly_ != null) { + output.writeMessage(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(9, properties_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, topicality_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBoundingPoly()); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, locations_.get(i)); + } + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, properties_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.EntityAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.EntityAnnotation other = (com.google.cloud.vision.v1p4beta1.EntityAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLocale() + .equals(other.getLocale())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits( + other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getLocationsList() + .equals(other.getLocationsList())) return false; + if (!getPropertiesList() + .equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLocale().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTopicality()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected entity features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.EntityAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.EntityAnnotation) + com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.EntityAnnotation.class, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.EntityAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + getPropertiesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + locale_ = ""; + + description_ = ""; + + score_ = 0F; + + confidence_ = 0F; + + topicality_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + propertiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation build() { + com.google.cloud.vision.v1p4beta1.EntityAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.EntityAnnotation result = new com.google.cloud.vision.v1p4beta1.EntityAnnotation(this); + int from_bitField0_ = bitField0_; + result.mid_ = mid_; + result.locale_ = locale_; + result.description_ = description_; + result.score_ = score_; + result.confidence_ = confidence_; + result.topicality_ = topicality_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.EntityAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.EntityAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.EntityAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLocale().isEmpty()) { + locale_ = other.locale_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + if (other.getTopicality() != 0F) { + setTopicality(other.getTopicality()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000002); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPropertiesFieldBuilder() : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.EntityAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.EntityAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object mid_ = ""; + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Opaque entity ID. Some IDs may be available in
+     * [Google Knowledge Graph Search
+     * API](https://developers.google.com/knowledge-graph/).
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object locale_ = ""; + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The locale. + */ + public java.lang.String getLocale() { + java.lang.Object ref = locale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + public com.google.protobuf.ByteString + getLocaleBytes() { + java.lang.Object ref = locale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The locale to set. + * @return This builder for chaining. + */ + public Builder setLocale( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locale_ = value; + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @return This builder for chaining. + */ + public Builder clearLocale() { + + locale_ = getDefaultInstance().getLocale(); + onChanged(); + return this; + } + /** + *
+     * The language code for the locale in which the entity textual
+     * `description` is expressed.
+     * 
+ * + * string locale = 2; + * @param value The bytes for locale to set. + * @return This builder for chaining. + */ + public Builder setLocaleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locale_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Entity textual description, expressed in its `locale` language.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Overall score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 + * @return The confidence. + */ + @java.lang.Override + @java.lang.Deprecated public float getConfidence() { + return confidence_; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 + * @param value The confidence to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * **Deprecated. Use `score` instead.**
+     * The accuracy of the entity detection in an image.
+     * For example, for an image in which the "Eiffel Tower" entity is detected,
+     * this field represents the confidence that there is a tower in the query
+     * image. Range [0, 1].
+     * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + + private float topicality_ ; + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return The topicality. + */ + @java.lang.Override + public float getTopicality() { + return topicality_; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @param value The topicality to set. + * @return This builder for chaining. + */ + public Builder setTopicality(float value) { + + topicality_ = value; + onChanged(); + return this; + } + /** + *
+     * The relevancy of the ICA (Image Content Annotation) label to the
+     * image. For example, the relevancy of "tower" is likely higher to an image
+     * containing the detected "Eiffel Tower" than to an image containing a
+     * detected distant towering building, even though the confidence that
+     * there is a tower in each image may be the same. Range [0, 1].
+     * 
+ * + * float topicality = 6; + * @return This builder for chaining. + */ + public Builder clearTopicality() { + + topicality_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this entity belongs. Not produced
+     * for `LABEL_DETECTION` features.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder> locationsBuilder_; + + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p4beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder setLocations( + int index, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder addLocations(com.google.cloud.vision.v1p4beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p4beta1.LocationInfo value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder addLocations( + int index, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder getLocationsBuilder( + int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilder( + int index) { + return getLocationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()); + } + /** + *
+     * The location information for the detected entity. Multiple
+     * `LocationInfo` elements can be present because one location may
+     * indicate the location of the scene in the image, and another location
+     * may indicate the location of the place where the image was taken.
+     * Location information is usually present for landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder>( + locations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.util.List properties_ = + java.util.Collections.emptyList(); + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder> propertiesBuilder_; + + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p4beta1.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p4beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder setProperties( + int index, com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder addProperties(com.google.cloud.vision.v1p4beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p4beta1.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder addProperties( + com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder addProperties( + int index, com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder addAllProperties( + java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p4beta1.Property.Builder getPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public java.util.List + getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder( + int index) { + return getPropertiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()); + } + /** + *
+     * Some entities may have optional user-supplied `Property` (name/value)
+     * fields, such a score or string that qualifies the entity.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + public java.util.List + getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder>( + properties_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.EntityAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.EntityAnnotation) + private static final com.google.cloud.vision.v1p4beta1.EntityAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.EntityAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java new file mode 100644 index 000000000000..31f9fb2bd65b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java @@ -0,0 +1,258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface EntityAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.EntityAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Opaque entity ID. Some IDs may be available in
+   * [Google Knowledge Graph Search
+   * API](https://developers.google.com/knowledge-graph/).
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The locale. + */ + java.lang.String getLocale(); + /** + *
+   * The language code for the locale in which the entity textual
+   * `description` is expressed.
+   * 
+ * + * string locale = 2; + * @return The bytes for locale. + */ + com.google.protobuf.ByteString + getLocaleBytes(); + + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Entity textual description, expressed in its `locale` language.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Overall score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * **Deprecated. Use `score` instead.**
+   * The accuracy of the entity detection in an image.
+   * For example, for an image in which the "Eiffel Tower" entity is detected,
+   * this field represents the confidence that there is a tower in the query
+   * image. Range [0, 1].
+   * 
+ * + * float confidence = 5 [deprecated = true]; + * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. + * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 + * @return The confidence. + */ + @java.lang.Deprecated float getConfidence(); + + /** + *
+   * The relevancy of the ICA (Image Content Annotation) label to the
+   * image. For example, the relevancy of "tower" is likely higher to an image
+   * containing the detected "Eiffel Tower" than to an image containing a
+   * detected distant towering building, even though the confidence that
+   * there is a tower in each image may be the same. Range [0, 1].
+   * 
+ * + * float topicality = 6; + * @return The topicality. + */ + float getTopicality(); + + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this entity belongs. Not produced
+   * for `LABEL_DETECTION` features.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + int getLocationsCount(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + java.util.List + getLocationsOrBuilderList(); + /** + *
+   * The location information for the detected entity. Multiple
+   * `LocationInfo` elements can be present because one location may
+   * indicate the location of the scene in the image, and another location
+   * may indicate the location of the place where the image was taken.
+   * Location information is usually present for landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; + */ + com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( + int index); + + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + java.util.List + getPropertiesList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p4beta1.Property getProperties(int index); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + int getPropertiesCount(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + java.util.List + getPropertiesOrBuilderList(); + /** + *
+   * Some entities may have optional user-supplied `Property` (name/value)
+   * fields, such a score or string that qualifies the entity.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; + */ + com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java new file mode 100644 index 000000000000..ce737b5d6f9d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java @@ -0,0 +1,4832 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A face annotation object contains the results of face detection.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation} + */ +public final class FaceAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceAnnotation) + FaceAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceAnnotation.newBuilder() to construct. + private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceAnnotation() { + landmarks_ = java.util.Collections.emptyList(); + joyLikelihood_ = 0; + sorrowLikelihood_ = 0; + angerLikelihood_ = 0; + surpriseLikelihood_ = 0; + underExposedLikelihood_ = 0; + blurredLikelihood_ = 0; + headwearLikelihood_ = 0; + recognitionResult_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (fdBoundingPoly_ != null) { + subBuilder = fdBoundingPoly_.toBuilder(); + } + fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fdBoundingPoly_); + fdBoundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + landmarks_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); + break; + } + case 37: { + + rollAngle_ = input.readFloat(); + break; + } + case 45: { + + panAngle_ = input.readFloat(); + break; + } + case 53: { + + tiltAngle_ = input.readFloat(); + break; + } + case 61: { + + detectionConfidence_ = input.readFloat(); + break; + } + case 69: { + + landmarkingConfidence_ = input.readFloat(); + break; + } + case 72: { + int rawValue = input.readEnum(); + + joyLikelihood_ = rawValue; + break; + } + case 80: { + int rawValue = input.readEnum(); + + sorrowLikelihood_ = rawValue; + break; + } + case 88: { + int rawValue = input.readEnum(); + + angerLikelihood_ = rawValue; + break; + } + case 96: { + int rawValue = input.readEnum(); + + surpriseLikelihood_ = rawValue; + break; + } + case 104: { + int rawValue = input.readEnum(); + + underExposedLikelihood_ = rawValue; + break; + } + case 112: { + int rawValue = input.readEnum(); + + blurredLikelihood_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + headwearLikelihood_ = rawValue; + break; + } + case 130: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + recognitionResult_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + recognitionResult_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + recognitionResult_ = java.util.Collections.unmodifiableList(recognitionResult_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder.class); + } + + public interface LandmarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType(); + + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return The position. + */ + com.google.cloud.vision.v1p4beta1.Position getPosition(); + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder(); + } + /** + *
+   * A face-specific landmark (for example, a face feature).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} + */ + public static final class Landmark extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) + LandmarkOrBuilder { + private static final long serialVersionUID = 0L; + // Use Landmark.newBuilder() to construct. + private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Landmark() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Landmark(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Landmark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 34: { + com.google.cloud.vision.v1p4beta1.Position.Builder subBuilder = null; + if (position_ != null) { + subBuilder = position_.toBuilder(); + } + position_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Position.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(position_); + position_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder.class); + } + + /** + *
+     * Face landmark (feature) type.
+     * Left and right are defined from the vantage of the viewer of the image
+     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
+     * typically, is the person's right eye.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + UNKNOWN_LANDMARK(0), + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + LEFT_EYE(1), + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + RIGHT_EYE(2), + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + LEFT_OF_LEFT_EYEBROW(3), + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + RIGHT_OF_LEFT_EYEBROW(4), + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + LEFT_OF_RIGHT_EYEBROW(5), + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + RIGHT_OF_RIGHT_EYEBROW(6), + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + MIDPOINT_BETWEEN_EYES(7), + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + NOSE_TIP(8), + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + UPPER_LIP(9), + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + LOWER_LIP(10), + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + MOUTH_LEFT(11), + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + MOUTH_RIGHT(12), + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + MOUTH_CENTER(13), + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + NOSE_BOTTOM_RIGHT(14), + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + NOSE_BOTTOM_LEFT(15), + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + NOSE_BOTTOM_CENTER(16), + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + LEFT_EYE_TOP_BOUNDARY(17), + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + LEFT_EYE_RIGHT_CORNER(18), + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + LEFT_EYE_BOTTOM_BOUNDARY(19), + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + LEFT_EYE_LEFT_CORNER(20), + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + RIGHT_EYE_TOP_BOUNDARY(21), + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + RIGHT_EYE_RIGHT_CORNER(22), + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + RIGHT_EYE_BOTTOM_BOUNDARY(23), + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + RIGHT_EYE_LEFT_CORNER(24), + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + LEFT_EYEBROW_UPPER_MIDPOINT(25), + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + RIGHT_EYEBROW_UPPER_MIDPOINT(26), + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + LEFT_EAR_TRAGION(27), + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + RIGHT_EAR_TRAGION(28), + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + LEFT_EYE_PUPIL(29), + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + RIGHT_EYE_PUPIL(30), + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + FOREHEAD_GLABELLA(31), + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + CHIN_GNATHION(32), + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + CHIN_LEFT_GONION(33), + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + CHIN_RIGHT_GONION(34), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown face landmark detected. Should not be filled.
+       * 
+ * + * UNKNOWN_LANDMARK = 0; + */ + public static final int UNKNOWN_LANDMARK_VALUE = 0; + /** + *
+       * Left eye.
+       * 
+ * + * LEFT_EYE = 1; + */ + public static final int LEFT_EYE_VALUE = 1; + /** + *
+       * Right eye.
+       * 
+ * + * RIGHT_EYE = 2; + */ + public static final int RIGHT_EYE_VALUE = 2; + /** + *
+       * Left of left eyebrow.
+       * 
+ * + * LEFT_OF_LEFT_EYEBROW = 3; + */ + public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; + /** + *
+       * Right of left eyebrow.
+       * 
+ * + * RIGHT_OF_LEFT_EYEBROW = 4; + */ + public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; + /** + *
+       * Left of right eyebrow.
+       * 
+ * + * LEFT_OF_RIGHT_EYEBROW = 5; + */ + public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; + /** + *
+       * Right of right eyebrow.
+       * 
+ * + * RIGHT_OF_RIGHT_EYEBROW = 6; + */ + public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; + /** + *
+       * Midpoint between eyes.
+       * 
+ * + * MIDPOINT_BETWEEN_EYES = 7; + */ + public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; + /** + *
+       * Nose tip.
+       * 
+ * + * NOSE_TIP = 8; + */ + public static final int NOSE_TIP_VALUE = 8; + /** + *
+       * Upper lip.
+       * 
+ * + * UPPER_LIP = 9; + */ + public static final int UPPER_LIP_VALUE = 9; + /** + *
+       * Lower lip.
+       * 
+ * + * LOWER_LIP = 10; + */ + public static final int LOWER_LIP_VALUE = 10; + /** + *
+       * Mouth left.
+       * 
+ * + * MOUTH_LEFT = 11; + */ + public static final int MOUTH_LEFT_VALUE = 11; + /** + *
+       * Mouth right.
+       * 
+ * + * MOUTH_RIGHT = 12; + */ + public static final int MOUTH_RIGHT_VALUE = 12; + /** + *
+       * Mouth center.
+       * 
+ * + * MOUTH_CENTER = 13; + */ + public static final int MOUTH_CENTER_VALUE = 13; + /** + *
+       * Nose, bottom right.
+       * 
+ * + * NOSE_BOTTOM_RIGHT = 14; + */ + public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; + /** + *
+       * Nose, bottom left.
+       * 
+ * + * NOSE_BOTTOM_LEFT = 15; + */ + public static final int NOSE_BOTTOM_LEFT_VALUE = 15; + /** + *
+       * Nose, bottom center.
+       * 
+ * + * NOSE_BOTTOM_CENTER = 16; + */ + public static final int NOSE_BOTTOM_CENTER_VALUE = 16; + /** + *
+       * Left eye, top boundary.
+       * 
+ * + * LEFT_EYE_TOP_BOUNDARY = 17; + */ + public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; + /** + *
+       * Left eye, right corner.
+       * 
+ * + * LEFT_EYE_RIGHT_CORNER = 18; + */ + public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; + /** + *
+       * Left eye, bottom boundary.
+       * 
+ * + * LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; + /** + *
+       * Left eye, left corner.
+       * 
+ * + * LEFT_EYE_LEFT_CORNER = 20; + */ + public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; + /** + *
+       * Right eye, top boundary.
+       * 
+ * + * RIGHT_EYE_TOP_BOUNDARY = 21; + */ + public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; + /** + *
+       * Right eye, right corner.
+       * 
+ * + * RIGHT_EYE_RIGHT_CORNER = 22; + */ + public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; + /** + *
+       * Right eye, bottom boundary.
+       * 
+ * + * RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; + /** + *
+       * Right eye, left corner.
+       * 
+ * + * RIGHT_EYE_LEFT_CORNER = 24; + */ + public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; + /** + *
+       * Left eyebrow, upper midpoint.
+       * 
+ * + * LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; + /** + *
+       * Right eyebrow, upper midpoint.
+       * 
+ * + * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; + /** + *
+       * Left ear tragion.
+       * 
+ * + * LEFT_EAR_TRAGION = 27; + */ + public static final int LEFT_EAR_TRAGION_VALUE = 27; + /** + *
+       * Right ear tragion.
+       * 
+ * + * RIGHT_EAR_TRAGION = 28; + */ + public static final int RIGHT_EAR_TRAGION_VALUE = 28; + /** + *
+       * Left eye pupil.
+       * 
+ * + * LEFT_EYE_PUPIL = 29; + */ + public static final int LEFT_EYE_PUPIL_VALUE = 29; + /** + *
+       * Right eye pupil.
+       * 
+ * + * RIGHT_EYE_PUPIL = 30; + */ + public static final int RIGHT_EYE_PUPIL_VALUE = 30; + /** + *
+       * Forehead glabella.
+       * 
+ * + * FOREHEAD_GLABELLA = 31; + */ + public static final int FOREHEAD_GLABELLA_VALUE = 31; + /** + *
+       * Chin gnathion.
+       * 
+ * + * CHIN_GNATHION = 32; + */ + public static final int CHIN_GNATHION_VALUE = 32; + /** + *
+       * Chin left gonion.
+       * 
+ * + * CHIN_LEFT_GONION = 33; + */ + public static final int CHIN_LEFT_GONION_VALUE = 33; + /** + *
+       * Chin right gonion.
+       * 
+ * + * CHIN_RIGHT_GONION = 34; + */ + public static final int CHIN_RIGHT_GONION_VALUE = 34; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_LANDMARK; + case 1: return LEFT_EYE; + case 2: return RIGHT_EYE; + case 3: return LEFT_OF_LEFT_EYEBROW; + case 4: return RIGHT_OF_LEFT_EYEBROW; + case 5: return LEFT_OF_RIGHT_EYEBROW; + case 6: return RIGHT_OF_RIGHT_EYEBROW; + case 7: return MIDPOINT_BETWEEN_EYES; + case 8: return NOSE_TIP; + case 9: return UPPER_LIP; + case 10: return LOWER_LIP; + case 11: return MOUTH_LEFT; + case 12: return MOUTH_RIGHT; + case 13: return MOUTH_CENTER; + case 14: return NOSE_BOTTOM_RIGHT; + case 15: return NOSE_BOTTOM_LEFT; + case 16: return NOSE_BOTTOM_CENTER; + case 17: return LEFT_EYE_TOP_BOUNDARY; + case 18: return LEFT_EYE_RIGHT_CORNER; + case 19: return LEFT_EYE_BOTTOM_BOUNDARY; + case 20: return LEFT_EYE_LEFT_CORNER; + case 21: return RIGHT_EYE_TOP_BOUNDARY; + case 22: return RIGHT_EYE_RIGHT_CORNER; + case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; + case 24: return RIGHT_EYE_LEFT_CORNER; + case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; + case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; + case 27: return LEFT_EAR_TRAGION; + case 28: return RIGHT_EAR_TRAGION; + case 29: return LEFT_EYE_PUPIL; + case 30: return RIGHT_EYE_PUPIL; + case 31: return FOREHEAD_GLABELLA; + case 32: return CHIN_GNATHION; + case 33: return CHIN_LEFT_GONION; + case 34: return CHIN_RIGHT_GONION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type) + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Face landmark type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p4beta1.Position position_; + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return position_ != null; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return The position. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Position getPosition() { + return position_ == null ? com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; + } + /** + *
+     * Face landmark position.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder() { + return getPosition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + output.writeEnum(3, type_); + } + if (position_ != null) { + output.writeMessage(4, getPosition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_); + } + if (position_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) obj; + + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A face-specific landmark (for example, a face feature).
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) + com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + if (positionBuilder_ == null) { + position_ = null; + } else { + position_ = null; + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark build() { + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark buildPartial() { + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark(this); + result.type_ = type_; + if (positionBuilder_ == null) { + result.position_ = position_; + } else { + result.position_ = positionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark other) { + if (other == com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Face landmark type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.Position position_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder> positionBuilder_; + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return positionBuilder_ != null || position_ != null; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + * @return The position. + */ + public com.google.cloud.vision.v1p4beta1.Position getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public Builder setPosition(com.google.cloud.vision.v1p4beta1.Position value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + onChanged(); + } else { + positionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public Builder setPosition( + com.google.cloud.vision.v1p4beta1.Position.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + onChanged(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public Builder mergePosition(com.google.cloud.vision.v1p4beta1.Position value) { + if (positionBuilder_ == null) { + if (position_ != null) { + position_ = + com.google.cloud.vision.v1p4beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); + } else { + position_ = value; + } + onChanged(); + } else { + positionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public Builder clearPosition() { + if (positionBuilder_ == null) { + position_ = null; + onChanged(); + } else { + position_ = null; + positionBuilder_ = null; + } + + return this; + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p4beta1.Position.Builder getPositionBuilder() { + + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + public com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; + } + } + /** + *
+       * Face landmark position.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Position position = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) + private static final com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark(); + } + + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Landmark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Landmark(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_; + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + @java.lang.Override + public boolean hasFdBoundingPoly() { + return fdBoundingPoly_ != null; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly() { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + return getFdBoundingPoly(); + } + + public static final int LANDMARKS_FIELD_NUMBER = 3; + private java.util.List landmarks_; + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List getLandmarksList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public java.util.List + getLandmarksOrBuilderList() { + return landmarks_; + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public int getLandmarksCount() { + return landmarks_.size(); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index) { + return landmarks_.get(index); + } + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + return landmarks_.get(index); + } + + public static final int ROLL_ANGLE_FIELD_NUMBER = 4; + private float rollAngle_; + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + + public static final int PAN_ANGLE_FIELD_NUMBER = 5; + private float panAngle_; + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + + public static final int TILT_ANGLE_FIELD_NUMBER = 6; + private float tiltAngle_; + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + + public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; + private float detectionConfidence_; + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + + public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; + private float landmarkingConfidence_; + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + + public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; + private int joyLikelihood_; + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; + private int sorrowLikelihood_; + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; + private int angerLikelihood_; + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; + private int surpriseLikelihood_; + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; + private int underExposedLikelihood_; + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; + private int blurredLikelihood_; + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; + private int headwearLikelihood_; + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RECOGNITION_RESULT_FIELD_NUMBER = 16; + private java.util.List recognitionResult_; + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + @java.lang.Override + public java.util.List getRecognitionResultList() { + return recognitionResult_; + } + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + @java.lang.Override + public java.util.List + getRecognitionResultOrBuilderList() { + return recognitionResult_; + } + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + @java.lang.Override + public int getRecognitionResultCount() { + return recognitionResult_.size(); + } + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index) { + return recognitionResult_.get(index); + } + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( + int index) { + return recognitionResult_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + output.writeMessage(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + output.writeMessage(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + output.writeFloat(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + output.writeFloat(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + output.writeFloat(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + output.writeFloat(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + output.writeFloat(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(15, headwearLikelihood_); + } + for (int i = 0; i < recognitionResult_.size(); i++) { + output.writeMessage(16, recognitionResult_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + if (fdBoundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFdBoundingPoly()); + } + for (int i = 0; i < landmarks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, landmarks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, rollAngle_); + } + if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, panAngle_); + } + if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(6, tiltAngle_); + } + if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, detectionConfidence_); + } + if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, landmarkingConfidence_); + } + if (joyLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, joyLikelihood_); + } + if (sorrowLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, sorrowLikelihood_); + } + if (angerLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, angerLikelihood_); + } + if (surpriseLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(12, surpriseLikelihood_); + } + if (underExposedLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(13, underExposedLikelihood_); + } + if (blurredLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, blurredLikelihood_); + } + if (headwearLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, headwearLikelihood_); + } + for (int i = 0; i < recognitionResult_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, recognitionResult_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.FaceAnnotation other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; + if (hasFdBoundingPoly()) { + if (!getFdBoundingPoly() + .equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList() + .equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits( + other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits( + other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits( + other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits( + other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits( + other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!getRecognitionResultList() + .equals(other.getRecognitionResultList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (hasFdBoundingPoly()) { + hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getFdBoundingPoly().hashCode(); + } + if (getLandmarksCount() > 0) { + hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; + hash = (53 * hash) + getLandmarksList().hashCode(); + } + hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRollAngle()); + hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPanAngle()); + hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTiltAngle()); + hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDetectionConfidence()); + hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLandmarkingConfidence()); + hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + joyLikelihood_; + hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + sorrowLikelihood_; + hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + angerLikelihood_; + hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + surpriseLikelihood_; + hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + underExposedLikelihood_; + hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + blurredLikelihood_; + hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + headwearLikelihood_; + if (getRecognitionResultCount() > 0) { + hash = (37 * hash) + RECOGNITION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getRecognitionResultList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A face annotation object contains the results of face detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceAnnotation) + com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.FaceAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLandmarksFieldBuilder(); + getRecognitionResultFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + landmarksBuilder_.clear(); + } + rollAngle_ = 0F; + + panAngle_ = 0F; + + tiltAngle_ = 0F; + + detectionConfidence_ = 0F; + + landmarkingConfidence_ = 0F; + + joyLikelihood_ = 0; + + sorrowLikelihood_ = 0; + + angerLikelihood_ = 0; + + surpriseLikelihood_ = 0; + + underExposedLikelihood_ = 0; + + blurredLikelihood_ = 0; + + headwearLikelihood_ = 0; + + if (recognitionResultBuilder_ == null) { + recognitionResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + recognitionResultBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation build() { + com.google.cloud.vision.v1p4beta1.FaceAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.FaceAnnotation result = new com.google.cloud.vision.v1p4beta1.FaceAnnotation(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (fdBoundingPolyBuilder_ == null) { + result.fdBoundingPoly_ = fdBoundingPoly_; + } else { + result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); + } + if (landmarksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + landmarks_ = java.util.Collections.unmodifiableList(landmarks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.landmarks_ = landmarks_; + } else { + result.landmarks_ = landmarksBuilder_.build(); + } + result.rollAngle_ = rollAngle_; + result.panAngle_ = panAngle_; + result.tiltAngle_ = tiltAngle_; + result.detectionConfidence_ = detectionConfidence_; + result.landmarkingConfidence_ = landmarkingConfidence_; + result.joyLikelihood_ = joyLikelihood_; + result.sorrowLikelihood_ = sorrowLikelihood_; + result.angerLikelihood_ = angerLikelihood_; + result.surpriseLikelihood_ = surpriseLikelihood_; + result.underExposedLikelihood_ = underExposedLikelihood_; + result.blurredLikelihood_ = blurredLikelihood_; + result.headwearLikelihood_ = headwearLikelihood_; + if (recognitionResultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + recognitionResult_ = java.util.Collections.unmodifiableList(recognitionResult_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.recognitionResult_ = recognitionResult_; + } else { + result.recognitionResult_ = recognitionResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (other.hasFdBoundingPoly()) { + mergeFdBoundingPoly(other.getFdBoundingPoly()); + } + if (landmarksBuilder_ == null) { + if (!other.landmarks_.isEmpty()) { + if (landmarks_.isEmpty()) { + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLandmarksIsMutable(); + landmarks_.addAll(other.landmarks_); + } + onChanged(); + } + } else { + if (!other.landmarks_.isEmpty()) { + if (landmarksBuilder_.isEmpty()) { + landmarksBuilder_.dispose(); + landmarksBuilder_ = null; + landmarks_ = other.landmarks_; + bitField0_ = (bitField0_ & ~0x00000001); + landmarksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLandmarksFieldBuilder() : null; + } else { + landmarksBuilder_.addAllMessages(other.landmarks_); + } + } + } + if (other.getRollAngle() != 0F) { + setRollAngle(other.getRollAngle()); + } + if (other.getPanAngle() != 0F) { + setPanAngle(other.getPanAngle()); + } + if (other.getTiltAngle() != 0F) { + setTiltAngle(other.getTiltAngle()); + } + if (other.getDetectionConfidence() != 0F) { + setDetectionConfidence(other.getDetectionConfidence()); + } + if (other.getLandmarkingConfidence() != 0F) { + setLandmarkingConfidence(other.getLandmarkingConfidence()); + } + if (other.joyLikelihood_ != 0) { + setJoyLikelihoodValue(other.getJoyLikelihoodValue()); + } + if (other.sorrowLikelihood_ != 0) { + setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); + } + if (other.angerLikelihood_ != 0) { + setAngerLikelihoodValue(other.getAngerLikelihoodValue()); + } + if (other.surpriseLikelihood_ != 0) { + setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); + } + if (other.underExposedLikelihood_ != 0) { + setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); + } + if (other.blurredLikelihood_ != 0) { + setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); + } + if (other.headwearLikelihood_ != 0) { + setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); + } + if (recognitionResultBuilder_ == null) { + if (!other.recognitionResult_.isEmpty()) { + if (recognitionResult_.isEmpty()) { + recognitionResult_ = other.recognitionResult_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRecognitionResultIsMutable(); + recognitionResult_.addAll(other.recognitionResult_); + } + onChanged(); + } + } else { + if (!other.recognitionResult_.isEmpty()) { + if (recognitionResultBuilder_.isEmpty()) { + recognitionResultBuilder_.dispose(); + recognitionResultBuilder_ = null; + recognitionResult_ = other.recognitionResult_; + bitField0_ = (bitField0_ & ~0x00000002); + recognitionResultBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRecognitionResultFieldBuilder() : null; + } else { + recognitionResultBuilder_.addAllMessages(other.recognitionResult_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.FaceAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the face. The coordinates of the bounding box
+     * are in the original image's scale.
+     * The bounding box is computed to "frame" the face in accordance with human
+     * expectations. It is based on the landmarker results.
+     * Note that one or more x and/or y coordinates may not be generated in the
+     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+     * appears in the image to be annotated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + public boolean hasFdBoundingPoly() { + return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } else { + return fdBoundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fdBoundingPoly_ = value; + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder setFdBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = builderForValue.build(); + onChanged(); + } else { + fdBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (fdBoundingPolyBuilder_ == null) { + if (fdBoundingPoly_ != null) { + fdBoundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); + } else { + fdBoundingPoly_ = value; + } + onChanged(); + } else { + fdBoundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public Builder clearFdBoundingPoly() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPoly_ = null; + onChanged(); + } else { + fdBoundingPoly_ = null; + fdBoundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { + + onChanged(); + return getFdBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { + if (fdBoundingPolyBuilder_ != null) { + return fdBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + return fdBoundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; + } + } + /** + *
+     * The `fd_bounding_poly` bounding polygon is tighter than the
+     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+     * is used to eliminate the face from any image analysis that detects the
+     * "amount of skin" visible in an image. It is not based on the
+     * landmarker results, only on the initial face detection, hence
+     * the <code>fd</code> (face detection) prefix.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getFdBoundingPolyFieldBuilder() { + if (fdBoundingPolyBuilder_ == null) { + fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getFdBoundingPoly(), + getParentForChildren(), + isClean()); + fdBoundingPoly_ = null; + } + return fdBoundingPolyBuilder_; + } + + private java.util.List landmarks_ = + java.util.Collections.emptyList(); + private void ensureLandmarksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + landmarks_ = new java.util.ArrayList(landmarks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; + + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List getLandmarksList() { + if (landmarksBuilder_ == null) { + return java.util.Collections.unmodifiableList(landmarks_); + } else { + return landmarksBuilder_.getMessageList(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public int getLandmarksCount() { + if (landmarksBuilder_ == null) { + return landmarks_.size(); + } else { + return landmarksBuilder_.getCount(); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); + } else { + return landmarksBuilder_.getMessage(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.set(index, value); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder setLandmarks( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.set(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(value); + onChanged(); + } else { + landmarksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { + if (landmarksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLandmarksIsMutable(); + landmarks_.add(index, value); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addLandmarks( + int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.add(index, builderForValue.build()); + onChanged(); + } else { + landmarksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder addAllLandmarks( + java.lang.Iterable values) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, landmarks_); + onChanged(); + } else { + landmarksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder clearLandmarks() { + if (landmarksBuilder_ == null) { + landmarks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + landmarksBuilder_.clear(); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public Builder removeLandmarks(int index) { + if (landmarksBuilder_ == null) { + ensureLandmarksIsMutable(); + landmarks_.remove(index); + onChanged(); + } else { + landmarksBuilder_.remove(index); + } + return this; + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().getBuilder(index); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index) { + if (landmarksBuilder_ == null) { + return landmarks_.get(index); } else { + return landmarksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksOrBuilderList() { + if (landmarksBuilder_ != null) { + return landmarksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(landmarks_); + } + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { + return getLandmarksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( + int index) { + return getLandmarksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()); + } + /** + *
+     * Detected face landmarks.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + public java.util.List + getLandmarksBuilderList() { + return getLandmarksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder> + getLandmarksFieldBuilder() { + if (landmarksBuilder_ == null) { + landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder>( + landmarks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + landmarks_ = null; + } + return landmarksBuilder_; + } + + private float rollAngle_ ; + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + @java.lang.Override + public float getRollAngle() { + return rollAngle_; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @param value The rollAngle to set. + * @return This builder for chaining. + */ + public Builder setRollAngle(float value) { + + rollAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+     * of the face relative to the image vertical about the axis perpendicular to
+     * the face. Range [-180,180].
+     * 
+ * + * float roll_angle = 4; + * @return This builder for chaining. + */ + public Builder clearRollAngle() { + + rollAngle_ = 0F; + onChanged(); + return this; + } + + private float panAngle_ ; + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + @java.lang.Override + public float getPanAngle() { + return panAngle_; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @param value The panAngle to set. + * @return This builder for chaining. + */ + public Builder setPanAngle(float value) { + + panAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Yaw angle, which indicates the leftward/rightward angle that the face is
+     * pointing relative to the vertical plane perpendicular to the image. Range
+     * [-180,180].
+     * 
+ * + * float pan_angle = 5; + * @return This builder for chaining. + */ + public Builder clearPanAngle() { + + panAngle_ = 0F; + onChanged(); + return this; + } + + private float tiltAngle_ ; + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + @java.lang.Override + public float getTiltAngle() { + return tiltAngle_; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @param value The tiltAngle to set. + * @return This builder for chaining. + */ + public Builder setTiltAngle(float value) { + + tiltAngle_ = value; + onChanged(); + return this; + } + /** + *
+     * Pitch angle, which indicates the upwards/downwards angle that the face is
+     * pointing relative to the image's horizontal plane. Range [-180,180].
+     * 
+ * + * float tilt_angle = 6; + * @return This builder for chaining. + */ + public Builder clearTiltAngle() { + + tiltAngle_ = 0F; + onChanged(); + return this; + } + + private float detectionConfidence_ ; + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + @java.lang.Override + public float getDetectionConfidence() { + return detectionConfidence_; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @param value The detectionConfidence to set. + * @return This builder for chaining. + */ + public Builder setDetectionConfidence(float value) { + + detectionConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Detection confidence. Range [0, 1].
+     * 
+ * + * float detection_confidence = 7; + * @return This builder for chaining. + */ + public Builder clearDetectionConfidence() { + + detectionConfidence_ = 0F; + onChanged(); + return this; + } + + private float landmarkingConfidence_ ; + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + @java.lang.Override + public float getLandmarkingConfidence() { + return landmarkingConfidence_; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @param value The landmarkingConfidence to set. + * @return This builder for chaining. + */ + public Builder setLandmarkingConfidence(float value) { + + landmarkingConfidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Face landmarking confidence. Range [0, 1].
+     * 
+ * + * float landmarking_confidence = 8; + * @return This builder for chaining. + */ + public Builder clearLandmarkingConfidence() { + + landmarkingConfidence_ = 0F; + onChanged(); + return this; + } + + private int joyLikelihood_ = 0; + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + @java.lang.Override public int getJoyLikelihoodValue() { + return joyLikelihood_; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @param value The enum numeric value on the wire for joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihoodValue(int value) { + + joyLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(joyLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @param value The joyLikelihood to set. + * @return This builder for chaining. + */ + public Builder setJoyLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + joyLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Joy likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return This builder for chaining. + */ + public Builder clearJoyLikelihood() { + + joyLikelihood_ = 0; + onChanged(); + return this; + } + + private int sorrowLikelihood_ = 0; + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + @java.lang.Override public int getSorrowLikelihoodValue() { + return sorrowLikelihood_; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @param value The enum numeric value on the wire for sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihoodValue(int value) { + + sorrowLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(sorrowLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @param value The sorrowLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSorrowLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + sorrowLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Sorrow likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return This builder for chaining. + */ + public Builder clearSorrowLikelihood() { + + sorrowLikelihood_ = 0; + onChanged(); + return this; + } + + private int angerLikelihood_ = 0; + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + @java.lang.Override public int getAngerLikelihoodValue() { + return angerLikelihood_; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @param value The enum numeric value on the wire for angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihoodValue(int value) { + + angerLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(angerLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @param value The angerLikelihood to set. + * @return This builder for chaining. + */ + public Builder setAngerLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + angerLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Anger likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return This builder for chaining. + */ + public Builder clearAngerLikelihood() { + + angerLikelihood_ = 0; + onChanged(); + return this; + } + + private int surpriseLikelihood_ = 0; + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + @java.lang.Override public int getSurpriseLikelihoodValue() { + return surpriseLikelihood_; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @param value The enum numeric value on the wire for surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihoodValue(int value) { + + surpriseLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(surpriseLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @param value The surpriseLikelihood to set. + * @return This builder for chaining. + */ + public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + surpriseLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Surprise likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return This builder for chaining. + */ + public Builder clearSurpriseLikelihood() { + + surpriseLikelihood_ = 0; + onChanged(); + return this; + } + + private int underExposedLikelihood_ = 0; + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + @java.lang.Override public int getUnderExposedLikelihoodValue() { + return underExposedLikelihood_; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @param value The enum numeric value on the wire for underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihoodValue(int value) { + + underExposedLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(underExposedLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @param value The underExposedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + underExposedLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Under-exposed likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return This builder for chaining. + */ + public Builder clearUnderExposedLikelihood() { + + underExposedLikelihood_ = 0; + onChanged(); + return this; + } + + private int blurredLikelihood_ = 0; + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + @java.lang.Override public int getBlurredLikelihoodValue() { + return blurredLikelihood_; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @param value The enum numeric value on the wire for blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihoodValue(int value) { + + blurredLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(blurredLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @param value The blurredLikelihood to set. + * @return This builder for chaining. + */ + public Builder setBlurredLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + blurredLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Blurred likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return This builder for chaining. + */ + public Builder clearBlurredLikelihood() { + + blurredLikelihood_ = 0; + onChanged(); + return this; + } + + private int headwearLikelihood_ = 0; + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + @java.lang.Override public int getHeadwearLikelihoodValue() { + return headwearLikelihood_; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @param value The enum numeric value on the wire for headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihoodValue(int value) { + + headwearLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(headwearLikelihood_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @param value The headwearLikelihood to set. + * @return This builder for chaining. + */ + public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + headwearLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Headwear likelihood.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return This builder for chaining. + */ + public Builder clearHeadwearLikelihood() { + + headwearLikelihood_ = 0; + onChanged(); + return this; + } + + private java.util.List recognitionResult_ = + java.util.Collections.emptyList(); + private void ensureRecognitionResultIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + recognitionResult_ = new java.util.ArrayList(recognitionResult_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder> recognitionResultBuilder_; + + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public java.util.List getRecognitionResultList() { + if (recognitionResultBuilder_ == null) { + return java.util.Collections.unmodifiableList(recognitionResult_); + } else { + return recognitionResultBuilder_.getMessageList(); + } + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public int getRecognitionResultCount() { + if (recognitionResultBuilder_ == null) { + return recognitionResult_.size(); + } else { + return recognitionResultBuilder_.getCount(); + } + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index) { + if (recognitionResultBuilder_ == null) { + return recognitionResult_.get(index); + } else { + return recognitionResultBuilder_.getMessage(index); + } + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder setRecognitionResult( + int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { + if (recognitionResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecognitionResultIsMutable(); + recognitionResult_.set(index, value); + onChanged(); + } else { + recognitionResultBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder setRecognitionResult( + int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { + if (recognitionResultBuilder_ == null) { + ensureRecognitionResultIsMutable(); + recognitionResult_.set(index, builderForValue.build()); + onChanged(); + } else { + recognitionResultBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder addRecognitionResult(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { + if (recognitionResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecognitionResultIsMutable(); + recognitionResult_.add(value); + onChanged(); + } else { + recognitionResultBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder addRecognitionResult( + int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { + if (recognitionResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecognitionResultIsMutable(); + recognitionResult_.add(index, value); + onChanged(); + } else { + recognitionResultBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder addRecognitionResult( + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { + if (recognitionResultBuilder_ == null) { + ensureRecognitionResultIsMutable(); + recognitionResult_.add(builderForValue.build()); + onChanged(); + } else { + recognitionResultBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder addRecognitionResult( + int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { + if (recognitionResultBuilder_ == null) { + ensureRecognitionResultIsMutable(); + recognitionResult_.add(index, builderForValue.build()); + onChanged(); + } else { + recognitionResultBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder addAllRecognitionResult( + java.lang.Iterable values) { + if (recognitionResultBuilder_ == null) { + ensureRecognitionResultIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, recognitionResult_); + onChanged(); + } else { + recognitionResultBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder clearRecognitionResult() { + if (recognitionResultBuilder_ == null) { + recognitionResult_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + recognitionResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public Builder removeRecognitionResult(int index) { + if (recognitionResultBuilder_ == null) { + ensureRecognitionResultIsMutable(); + recognitionResult_.remove(index); + onChanged(); + } else { + recognitionResultBuilder_.remove(index); + } + return this; + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder getRecognitionResultBuilder( + int index) { + return getRecognitionResultFieldBuilder().getBuilder(index); + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( + int index) { + if (recognitionResultBuilder_ == null) { + return recognitionResult_.get(index); } else { + return recognitionResultBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public java.util.List + getRecognitionResultOrBuilderList() { + if (recognitionResultBuilder_ != null) { + return recognitionResultBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recognitionResult_); + } + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder addRecognitionResultBuilder() { + return getRecognitionResultFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()); + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder addRecognitionResultBuilder( + int index) { + return getRecognitionResultFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()); + } + /** + *
+     * Additional recognition information. Only computed if
+     * image_context.face_recognition_params is provided, **and** a match is found
+     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+     * sorted in order of decreasing confidence values.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + public java.util.List + getRecognitionResultBuilderList() { + return getRecognitionResultFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder> + getRecognitionResultFieldBuilder() { + if (recognitionResultBuilder_ == null) { + recognitionResultBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder>( + recognitionResult_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + recognitionResult_ = null; + } + return recognitionResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation) + private static final com.google.cloud.vision.v1p4beta1.FaceAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java new file mode 100644 index 000000000000..99d90c21870c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java @@ -0,0 +1,392 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface FaceAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the face. The coordinates of the bounding box
+   * are in the original image's scale.
+   * The bounding box is computed to "frame" the face in accordance with human
+   * expectations. It is based on the landmarker results.
+   * Note that one or more x and/or y coordinates may not be generated in the
+   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
+   * appears in the image to be annotated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return Whether the fdBoundingPoly field is set. + */ + boolean hasFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + * @return The fdBoundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly(); + /** + *
+   * The `fd_bounding_poly` bounding polygon is tighter than the
+   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
+   * is used to eliminate the face from any image analysis that detects the
+   * "amount of skin" visible in an image. It is not based on the
+   * landmarker results, only on the initial face detection, hence
+   * the <code>fd</code> (face detection) prefix.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); + + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + int getLandmarksCount(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + java.util.List + getLandmarksOrBuilderList(); + /** + *
+   * Detected face landmarks.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; + */ + com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( + int index); + + /** + *
+   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
+   * of the face relative to the image vertical about the axis perpendicular to
+   * the face. Range [-180,180].
+   * 
+ * + * float roll_angle = 4; + * @return The rollAngle. + */ + float getRollAngle(); + + /** + *
+   * Yaw angle, which indicates the leftward/rightward angle that the face is
+   * pointing relative to the vertical plane perpendicular to the image. Range
+   * [-180,180].
+   * 
+ * + * float pan_angle = 5; + * @return The panAngle. + */ + float getPanAngle(); + + /** + *
+   * Pitch angle, which indicates the upwards/downwards angle that the face is
+   * pointing relative to the image's horizontal plane. Range [-180,180].
+   * 
+ * + * float tilt_angle = 6; + * @return The tiltAngle. + */ + float getTiltAngle(); + + /** + *
+   * Detection confidence. Range [0, 1].
+   * 
+ * + * float detection_confidence = 7; + * @return The detectionConfidence. + */ + float getDetectionConfidence(); + + /** + *
+   * Face landmarking confidence. Range [0, 1].
+   * 
+ * + * float landmarking_confidence = 8; + * @return The landmarkingConfidence. + */ + float getLandmarkingConfidence(); + + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The enum numeric value on the wire for joyLikelihood. + */ + int getJoyLikelihoodValue(); + /** + *
+   * Joy likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; + * @return The joyLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood(); + + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The enum numeric value on the wire for sorrowLikelihood. + */ + int getSorrowLikelihoodValue(); + /** + *
+   * Sorrow likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; + * @return The sorrowLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood(); + + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The enum numeric value on the wire for angerLikelihood. + */ + int getAngerLikelihoodValue(); + /** + *
+   * Anger likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; + * @return The angerLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood(); + + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The enum numeric value on the wire for surpriseLikelihood. + */ + int getSurpriseLikelihoodValue(); + /** + *
+   * Surprise likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; + * @return The surpriseLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood(); + + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The enum numeric value on the wire for underExposedLikelihood. + */ + int getUnderExposedLikelihoodValue(); + /** + *
+   * Under-exposed likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; + * @return The underExposedLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood(); + + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The enum numeric value on the wire for blurredLikelihood. + */ + int getBlurredLikelihoodValue(); + /** + *
+   * Blurred likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; + * @return The blurredLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood(); + + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The enum numeric value on the wire for headwearLikelihood. + */ + int getHeadwearLikelihoodValue(); + /** + *
+   * Headwear likelihood.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; + * @return The headwearLikelihood. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood(); + + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + java.util.List + getRecognitionResultList(); + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index); + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + int getRecognitionResultCount(); + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + java.util.List + getRecognitionResultOrBuilderList(); + /** + *
+   * Additional recognition information. Only computed if
+   * image_context.face_recognition_params is provided, **and** a match is found
+   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
+   * sorted in order of decreasing confidence values.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; + */ + com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java new file mode 100644 index 000000000000..ba867daccf93 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java @@ -0,0 +1,728 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Parameters for a celebrity recognition request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionParams} + */ +public final class FaceRecognitionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + FaceRecognitionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceRecognitionParams.newBuilder() to construct. + private FaceRecognitionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceRecognitionParams() { + celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceRecognitionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceRecognitionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + celebritySet_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + celebritySet_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + celebritySet_ = celebritySet_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder.class); + } + + public static final int CELEBRITY_SET_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList celebritySet_; + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @return A list containing the celebritySet. + */ + public com.google.protobuf.ProtocolStringList + getCelebritySetList() { + return celebritySet_; + } + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @return The count of celebritySet. + */ + public int getCelebritySetCount() { + return celebritySet_.size(); + } + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the element to return. + * @return The celebritySet at the given index. + */ + public java.lang.String getCelebritySet(int index) { + return celebritySet_.get(index); + } + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the value to return. + * @return The bytes of the celebritySet at the given index. + */ + public com.google.protobuf.ByteString + getCelebritySetBytes(int index) { + return celebritySet_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < celebritySet_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, celebritySet_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < celebritySet_.size(); i++) { + dataSize += computeStringSizeNoTag(celebritySet_.getRaw(i)); + } + size += dataSize; + size += 1 * getCelebritySetList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams other = (com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) obj; + + if (!getCelebritySetList() + .equals(other.getCelebritySetList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCelebritySetCount() > 0) { + hash = (37 * hash) + CELEBRITY_SET_FIELD_NUMBER; + hash = (53 * hash) + getCelebritySetList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for a celebrity recognition request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams build() { + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams buildPartial() { + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams result = new com.google.cloud.vision.v1p4beta1.FaceRecognitionParams(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + celebritySet_ = celebritySet_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.celebritySet_ = celebritySet_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceRecognitionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams other) { + if (other == com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance()) return this; + if (!other.celebritySet_.isEmpty()) { + if (celebritySet_.isEmpty()) { + celebritySet_ = other.celebritySet_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCelebritySetIsMutable(); + celebritySet_.addAll(other.celebritySet_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureCelebritySetIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + celebritySet_ = new com.google.protobuf.LazyStringArrayList(celebritySet_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @return A list containing the celebritySet. + */ + public com.google.protobuf.ProtocolStringList + getCelebritySetList() { + return celebritySet_.getUnmodifiableView(); + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @return The count of celebritySet. + */ + public int getCelebritySetCount() { + return celebritySet_.size(); + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the element to return. + * @return The celebritySet at the given index. + */ + public java.lang.String getCelebritySet(int index) { + return celebritySet_.get(index); + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the value to return. + * @return The bytes of the celebritySet at the given index. + */ + public com.google.protobuf.ByteString + getCelebritySetBytes(int index) { + return celebritySet_.getByteString(index); + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param index The index to set the value at. + * @param value The celebritySet to set. + * @return This builder for chaining. + */ + public Builder setCelebritySet( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCelebritySetIsMutable(); + celebritySet_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param value The celebritySet to add. + * @return This builder for chaining. + */ + public Builder addCelebritySet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCelebritySetIsMutable(); + celebritySet_.add(value); + onChanged(); + return this; + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param values The celebritySet to add. + * @return This builder for chaining. + */ + public Builder addAllCelebritySet( + java.lang.Iterable values) { + ensureCelebritySetIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, celebritySet_); + onChanged(); + return this; + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @return This builder for chaining. + */ + public Builder clearCelebritySet() { + celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The resource names for one or more
+     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+     * set is preloaded and can be specified as "builtin/default". If this is
+     * specified, the algorithm will try to match the faces detected in the input
+     * image to the Celebrities in the CelebritySets.
+     * 
+ * + * repeated string celebrity_set = 1; + * @param value The bytes of the celebritySet to add. + * @return This builder for chaining. + */ + public Builder addCelebritySetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCelebritySetIsMutable(); + celebritySet_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + private static final com.google.cloud.vision.v1p4beta1.FaceRecognitionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceRecognitionParams(); + } + + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceRecognitionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceRecognitionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java new file mode 100644 index 000000000000..8844c1c8e1ad --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface FaceRecognitionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @return A list containing the celebritySet. + */ + java.util.List + getCelebritySetList(); + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @return The count of celebritySet. + */ + int getCelebritySetCount(); + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the element to return. + * @return The celebritySet at the given index. + */ + java.lang.String getCelebritySet(int index); + /** + *
+   * The resource names for one or more
+   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
+   * set is preloaded and can be specified as "builtin/default". If this is
+   * specified, the algorithm will try to match the faces detected in the input
+   * image to the Celebrities in the CelebritySets.
+   * 
+ * + * repeated string celebrity_set = 1; + * @param index The index of the value to return. + * @return The bytes of the celebritySet at the given index. + */ + com.google.protobuf.ByteString + getCelebritySetBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java new file mode 100644 index 000000000000..ce40c856b46f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java @@ -0,0 +1,759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Information about a face's identity.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionResult} + */ +public final class FaceRecognitionResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + FaceRecognitionResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use FaceRecognitionResult.newBuilder() to construct. + private FaceRecognitionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FaceRecognitionResult() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FaceRecognitionResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FaceRecognitionResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.Celebrity.Builder subBuilder = null; + if (celebrity_ != null) { + subBuilder = celebrity_.toBuilder(); + } + celebrity_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Celebrity.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(celebrity_); + celebrity_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder.class); + } + + public static final int CELEBRITY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.Celebrity celebrity_; + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return Whether the celebrity field is set. + */ + @java.lang.Override + public boolean hasCelebrity() { + return celebrity_ != null; + } + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return The celebrity. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity() { + return celebrity_ == null ? com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; + } + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder() { + return getCelebrity(); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+   * Recognition confidence. Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (celebrity_ != null) { + output.writeMessage(1, getCelebrity()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (celebrity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCelebrity()); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionResult)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult other = (com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) obj; + + if (hasCelebrity() != other.hasCelebrity()) return false; + if (hasCelebrity()) { + if (!getCelebrity() + .equals(other.getCelebrity())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCelebrity()) { + hash = (37 * hash) + CELEBRITY_FIELD_NUMBER; + hash = (53 * hash) + getCelebrity().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Information about a face's identity.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (celebrityBuilder_ == null) { + celebrity_ = null; + } else { + celebrity_ = null; + celebrityBuilder_ = null; + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult build() { + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult buildPartial() { + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult result = new com.google.cloud.vision.v1p4beta1.FaceRecognitionResult(this); + if (celebrityBuilder_ == null) { + result.celebrity_ = celebrity_; + } else { + result.celebrity_ = celebrityBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceRecognitionResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult other) { + if (other == com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()) return this; + if (other.hasCelebrity()) { + mergeCelebrity(other.getCelebrity()); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.Celebrity celebrity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder> celebrityBuilder_; + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return Whether the celebrity field is set. + */ + public boolean hasCelebrity() { + return celebrityBuilder_ != null || celebrity_ != null; + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return The celebrity. + */ + public com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity() { + if (celebrityBuilder_ == null) { + return celebrity_ == null ? com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; + } else { + return celebrityBuilder_.getMessage(); + } + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public Builder setCelebrity(com.google.cloud.vision.v1p4beta1.Celebrity value) { + if (celebrityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + celebrity_ = value; + onChanged(); + } else { + celebrityBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public Builder setCelebrity( + com.google.cloud.vision.v1p4beta1.Celebrity.Builder builderForValue) { + if (celebrityBuilder_ == null) { + celebrity_ = builderForValue.build(); + onChanged(); + } else { + celebrityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public Builder mergeCelebrity(com.google.cloud.vision.v1p4beta1.Celebrity value) { + if (celebrityBuilder_ == null) { + if (celebrity_ != null) { + celebrity_ = + com.google.cloud.vision.v1p4beta1.Celebrity.newBuilder(celebrity_).mergeFrom(value).buildPartial(); + } else { + celebrity_ = value; + } + onChanged(); + } else { + celebrityBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public Builder clearCelebrity() { + if (celebrityBuilder_ == null) { + celebrity_ = null; + onChanged(); + } else { + celebrity_ = null; + celebrityBuilder_ = null; + } + + return this; + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public com.google.cloud.vision.v1p4beta1.Celebrity.Builder getCelebrityBuilder() { + + onChanged(); + return getCelebrityFieldBuilder().getBuilder(); + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + public com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder() { + if (celebrityBuilder_ != null) { + return celebrityBuilder_.getMessageOrBuilder(); + } else { + return celebrity_ == null ? + com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; + } + } + /** + *
+     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+     * matched to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder> + getCelebrityFieldBuilder() { + if (celebrityBuilder_ == null) { + celebrityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder>( + getCelebrity(), + getParentForChildren(), + isClean()); + celebrity_ = null; + } + return celebrityBuilder_; + } + + private float confidence_ ; + /** + *
+     * Recognition confidence. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Recognition confidence. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Recognition confidence. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + private static final com.google.cloud.vision.v1p4beta1.FaceRecognitionResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceRecognitionResult(); + } + + public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FaceRecognitionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FaceRecognitionResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java new file mode 100644 index 000000000000..aca1c9f898f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/face.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface FaceRecognitionResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return Whether the celebrity field is set. + */ + boolean hasCelebrity(); + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + * @return The celebrity. + */ + com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity(); + /** + *
+   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
+   * matched to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; + */ + com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder(); + + /** + *
+   * Recognition confidence. Range [0, 1].
+   * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java new file mode 100644 index 000000000000..0d85d7972745 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java @@ -0,0 +1,1153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The type of Google Cloud Vision API detection to perform, and the maximum
+ * number of results to return for that type. Multiple `Feature` objects can
+ * be specified in the `features` list.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Feature} + */ +public final class Feature extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Feature) + FeatureOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feature() { + type_ = 0; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + maxResults_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Feature.class, com.google.cloud.vision.v1p4beta1.Feature.Builder.class); + } + + /** + *
+   * Type of Google Cloud Vision API feature to be extracted.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.Feature.Type} + */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + FACE_DETECTION(1), + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + LANDMARK_DETECTION(2), + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + LOGO_DETECTION(3), + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + LABEL_DETECTION(4), + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + TEXT_DETECTION(5), + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + DOCUMENT_TEXT_DETECTION(11), + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + SAFE_SEARCH_DETECTION(6), + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + IMAGE_PROPERTIES(7), + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + CROP_HINTS(9), + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + WEB_DETECTION(10), + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + PRODUCT_SEARCH(12), + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + OBJECT_LOCALIZATION(19), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified feature type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Run face detection.
+     * 
+ * + * FACE_DETECTION = 1; + */ + public static final int FACE_DETECTION_VALUE = 1; + /** + *
+     * Run landmark detection.
+     * 
+ * + * LANDMARK_DETECTION = 2; + */ + public static final int LANDMARK_DETECTION_VALUE = 2; + /** + *
+     * Run logo detection.
+     * 
+ * + * LOGO_DETECTION = 3; + */ + public static final int LOGO_DETECTION_VALUE = 3; + /** + *
+     * Run label detection.
+     * 
+ * + * LABEL_DETECTION = 4; + */ + public static final int LABEL_DETECTION_VALUE = 4; + /** + *
+     * Run text detection / optical character recognition (OCR). Text detection
+     * is optimized for areas of text within a larger image; if the image is
+     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
+     * 
+ * + * TEXT_DETECTION = 5; + */ + public static final int TEXT_DETECTION_VALUE = 5; + /** + *
+     * Run dense text document OCR. Takes precedence when both
+     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
+     * 
+ * + * DOCUMENT_TEXT_DETECTION = 11; + */ + public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; + /** + *
+     * Run Safe Search to detect potentially unsafe
+     * or undesirable content.
+     * 
+ * + * SAFE_SEARCH_DETECTION = 6; + */ + public static final int SAFE_SEARCH_DETECTION_VALUE = 6; + /** + *
+     * Compute a set of image properties, such as the
+     * image's dominant colors.
+     * 
+ * + * IMAGE_PROPERTIES = 7; + */ + public static final int IMAGE_PROPERTIES_VALUE = 7; + /** + *
+     * Run crop hints.
+     * 
+ * + * CROP_HINTS = 9; + */ + public static final int CROP_HINTS_VALUE = 9; + /** + *
+     * Run web detection.
+     * 
+ * + * WEB_DETECTION = 10; + */ + public static final int WEB_DETECTION_VALUE = 10; + /** + *
+     * Run Product Search.
+     * 
+ * + * PRODUCT_SEARCH = 12; + */ + public static final int PRODUCT_SEARCH_VALUE = 12; + /** + *
+     * Run localizer for object detection.
+     * 
+ * + * OBJECT_LOCALIZATION = 19; + */ + public static final int OBJECT_LOCALIZATION_VALUE = 19; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return FACE_DETECTION; + case 2: return LANDMARK_DETECTION; + case 3: return LOGO_DETECTION; + case 4: return LABEL_DETECTION; + case 5: return TEXT_DETECTION; + case 11: return DOCUMENT_TEXT_DETECTION; + case 6: return SAFE_SEARCH_DETECTION; + case 7: return IMAGE_PROPERTIES; + case 9: return CROP_HINTS; + case 10: return WEB_DETECTION; + case 12: return PRODUCT_SEARCH; + case 19: return OBJECT_LOCALIZATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.Feature.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Feature.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Feature.Type result = com.google.cloud.vision.v1p4beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.Feature.Type.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 2; + private int maxResults_; + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + + public static final int MODEL_FIELD_NUMBER = 3; + private volatile java.lang.Object model_; + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p4beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (maxResults_ != 0) { + output.writeInt32(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p4beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxResults_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Feature)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Feature other = (com.google.cloud.vision.v1p4beta1.Feature) obj; + + if (type_ != other.type_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; + if (!getModel() + .equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Feature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The type of Google Cloud Vision API detection to perform, and the maximum
+   * number of results to return for that type. Multiple `Feature` objects can
+   * be specified in the `features` list.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Feature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Feature) + com.google.cloud.vision.v1p4beta1.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Feature.class, com.google.cloud.vision.v1p4beta1.Feature.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + maxResults_ = 0; + + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature build() { + com.google.cloud.vision.v1p4beta1.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature buildPartial() { + com.google.cloud.vision.v1p4beta1.Feature result = new com.google.cloud.vision.v1p4beta1.Feature(this); + result.type_ = type_; + result.maxResults_ = maxResults_; + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Feature) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Feature other) { + if (other == com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } + if (!other.getModel().isEmpty()) { + model_ = other.model_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Feature) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Feature.Type result = com.google.cloud.vision.v1p4beta1.Feature.Type.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.Feature.Type.UNRECOGNIZED : result; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p4beta1.Feature.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The feature type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Maximum number of results of this type. Does not apply to
+     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+     * 
+ * + * int32 max_results = 2; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + + maxResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object model_ = ""; + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return The bytes for model. + */ + public com.google.protobuf.ByteString + getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + model_ = value; + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + *
+     * Model to use for the feature.
+     * Supported values: "builtin/stable" (the default if unset) and
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
+     * 
+ * + * string model = 3; + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + model_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Feature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Feature) + private static final com.google.cloud.vision.v1p4beta1.Feature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Feature(); + } + + public static com.google.cloud.vision.v1p4beta1.Feature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Feature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java new file mode 100644 index 000000000000..077657a3b86d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The feature type.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p4beta1.Feature.Type getType(); + + /** + *
+   * Maximum number of results of this type. Does not apply to
+   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
+   * 
+ * + * int32 max_results = 2; + * @return The maxResults. + */ + int getMaxResults(); + + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The model. + */ + java.lang.String getModel(); + /** + *
+   * Model to use for the feature.
+   * Supported values: "builtin/stable" (the default if unset) and
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
+   * 
+ * + * string model = 3; + * @return The bytes for model. + */ + com.google.protobuf.ByteString + getModelBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java new file mode 100644 index 000000000000..db7192858625 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java @@ -0,0 +1,714 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The Google Cloud Storage location where the output will be written to.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GcsDestination.class, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.GcsDestination other = (com.google.cloud.vision.v1p4beta1.GcsDestination) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the output will be written to.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GcsDestination) + com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GcsDestination.class, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestination build() { + com.google.cloud.vision.v1p4beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestination buildPartial() { + com.google.cloud.vision.v1p4beta1.GcsDestination result = new com.google.cloud.vision.v1p4beta1.GcsDestination(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.GcsDestination) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GcsDestination other) { + if (other == com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI prefix where the results will be stored. Results
+     * will be in JSON format and preceded by its corresponding input URI prefix.
+     * This field can either represent a gcs file prefix or gcs directory. In
+     * either case, the uri should be unique because in order to get all of the
+     * output files, you will need to do a wildcard gcs search on the uri prefix
+     * you provide.
+     * Examples:
+     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+     * will be created in gs://bucket-name/here/ and the names of the
+     * output files will begin with "filenameprefix".
+     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+     * will be created in gs://bucket-name/some/location/ and the names of the
+     * output files could be anything because there was no filename prefix
+     * specified.
+     * If multiple outputs, each response is still AnnotateFileResponse, each of
+     * which contains some subset of the full list of AnnotateImageResponse.
+     * Multiple outputs can happen if, for example, the output JSON is too large
+     * and overflows into multiple sharded files.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsDestination) + private static final com.google.cloud.vision.v1p4beta1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GcsDestination(); + } + + public static com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..a03073206d73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI prefix where the results will be stored. Results
+   * will be in JSON format and preceded by its corresponding input URI prefix.
+   * This field can either represent a gcs file prefix or gcs directory. In
+   * either case, the uri should be unique because in order to get all of the
+   * output files, you will need to do a wildcard gcs search on the uri prefix
+   * you provide.
+   * Examples:
+   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
+   * will be created in gs://bucket-name/here/ and the names of the
+   * output files will begin with "filenameprefix".
+   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
+   * will be created in gs://bucket-name/some/location/ and the names of the
+   * output files could be anything because there was no filename prefix
+   * specified.
+   * If multiple outputs, each response is still AnnotateFileResponse, each of
+   * which contains some subset of the full list of AnnotateImageResponse.
+   * Multiple outputs can happen if, for example, the output JSON is too large
+   * and overflows into multiple sharded files.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java new file mode 100644 index 000000000000..482c4df2870d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The Google Cloud Storage location where the input will be read from.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsSource} + */ +public final class GcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GcsSource) + GcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsSource() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GcsSource.class, com.google.cloud.vision.v1p4beta1.GcsSource.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.GcsSource other = (com.google.cloud.vision.v1p4beta1.GcsSource) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location where the input will be read from.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GcsSource) + com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GcsSource.class, com.google.cloud.vision.v1p4beta1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSource build() { + com.google.cloud.vision.v1p4beta1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSource buildPartial() { + com.google.cloud.vision.v1p4beta1.GcsSource result = new com.google.cloud.vision.v1p4beta1.GcsSource(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.GcsSource) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.GcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GcsSource other) { + if (other == com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Google Cloud Storage URI for the input file. This must only be a
+     * Google Cloud Storage object. Wildcards are not currently supported.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsSource) + private static final com.google.cloud.vision.v1p4beta1.GcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GcsSource(); + } + + public static com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..aee02ac59c02 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface GcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Google Cloud Storage URI for the input file. This must only be a
+   * Google Cloud Storage object. Wildcards are not currently supported.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java new file mode 100644 index 000000000000..6119c9958f98 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class GeometryProto { + private GeometryProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/vision/v1p4beta1/geometry" + + ".proto\022\035google.cloud.vision.v1p4beta1\"\036\n" + + "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + + "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + + "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + + "d.vision.v1p4beta1.Vertex\022L\n\023normalized_" + + "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + + "4beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.goo" + + "gle.cloud.vision.v1p4beta1B\rGeometryProt" + + "oP\001ZCgoogle.golang.org/genproto/googleap" + + "is/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GC" + + "VNb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor, + new java.lang.String[] { "X", "Y", }); + internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor, + new java.lang.String[] { "Vertices", "NormalizedVertices", }); + internal_static_google_cloud_vision_v1p4beta1_Position_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Position_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java new file mode 100644 index 000000000000..80cfd627cea4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `GetProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductRequest} + */ +public final class GetProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetProductRequest) + GetProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductRequest.newBuilder() to construct. + private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetProductRequest.class, com.google.cloud.vision.v1p4beta1.GetProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.GetProductRequest other = (com.google.cloud.vision.v1p4beta1.GetProductRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetProductRequest) + com.google.cloud.vision.v1p4beta1.GetProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetProductRequest.class, com.google.cloud.vision.v1p4beta1.GetProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.GetProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductRequest build() { + com.google.cloud.vision.v1p4beta1.GetProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.GetProductRequest result = new com.google.cloud.vision.v1p4beta1.GetProductRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.GetProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.GetProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetProductRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.GetProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.GetProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the Product to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductRequest) + private static final com.google.cloud.vision.v1p4beta1.GetProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetProductRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java new file mode 100644 index 000000000000..5e52735fd71f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface GetProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the Product to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java new file mode 100644 index 000000000000..dede5ee3995b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `GetProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductSetRequest} + */ +public final class GetProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetProductSetRequest) + GetProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetProductSetRequest.newBuilder() to construct. + private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetProductSetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p4beta1.GetProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p4beta1.GetProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetProductSetRequest) + com.google.cloud.vision.v1p4beta1.GetProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p4beta1.GetProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.GetProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.GetProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.GetProductSetRequest result = new com.google.cloud.vision.v1p4beta1.GetProductSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.GetProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.GetProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.GetProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.GetProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the ProductSet to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.GetProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..3582244f4bc1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface GetProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the ProductSet to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java new file mode 100644 index 000000000000..4ed37a907db0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `GetReferenceImage` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetReferenceImageRequest} + */ +public final class GetReferenceImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) + GetReferenceImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetReferenceImageRequest.newBuilder() to construct. + private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetReferenceImageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetReferenceImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetReferenceImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `GetReferenceImage` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.GetReferenceImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest build() { + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the ReferenceImage to get.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) + private static final com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetReferenceImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetReferenceImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java new file mode 100644 index 000000000000..3b372ed67019 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface GetReferenceImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name of the ReferenceImage to get.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java new file mode 100644 index 000000000000..acf102b5e4b9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java @@ -0,0 +1,781 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Client image to perform Google Cloud Vision API tasks over.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Image} + */ +public final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Image) + ImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Image() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Image( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + content_ = input.readBytes(); + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.ImageSource.Builder subBuilder = null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Image.class, com.google.cloud.vision.v1p4beta1.Image.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString content_; + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.ImageSource source_; + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return The source. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSource getSource() { + return source_ == null ? com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; + } + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder() { + return getSource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!content_.isEmpty()) { + output.writeBytes(1, content_); + } + if (source_ != null) { + output.writeMessage(2, getSource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Image)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Image other = (com.google.cloud.vision.v1p4beta1.Image) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource() + .equals(other.getSource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Client image to perform Google Cloud Vision API tasks over.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Image) + com.google.cloud.vision.v1p4beta1.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Image.class, com.google.cloud.vision.v1p4beta1.Image.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Image.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + content_ = com.google.protobuf.ByteString.EMPTY; + + if (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Image getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Image build() { + com.google.cloud.vision.v1p4beta1.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Image buildPartial() { + com.google.cloud.vision.v1p4beta1.Image result = new com.google.cloud.vision.v1p4beta1.Image(this); + result.content_ = content_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Image) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Image other) { + if (other == com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance()) return this; + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Image parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Image) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * Image content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * 
+ * + * bytes content = 1; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.ImageSource source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder> sourceBuilder_; + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return The source. + */ + public com.google.cloud.vision.v1p4beta1.ImageSource getSource() { + if (sourceBuilder_ == null) { + return source_ == null ? com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public Builder setSource(com.google.cloud.vision.v1p4beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public Builder setSource( + com.google.cloud.vision.v1p4beta1.ImageSource.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public Builder mergeSource(com.google.cloud.vision.v1p4beta1.ImageSource value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.vision.v1p4beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p4beta1.ImageSource.Builder getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + public com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null ? + com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; + } + } + /** + *
+     * Google Cloud Storage image location, or publicly-accessible image
+     * URL. If both `content` and `source` are provided for an image, `content`
+     * takes precedence and is used to perform the image annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder>( + getSource(), + getParentForChildren(), + isClean()); + source_ = null; + } + return sourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Image) + private static final com.google.cloud.vision.v1p4beta1.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Image(); + } + + public static com.google.cloud.vision.v1p4beta1.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Image(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java new file mode 100644 index 000000000000..ae08dff582fb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java @@ -0,0 +1,681 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * If an image was produced from a file (e.g. a PDF), this message gives
+ * information about the source of that image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageAnnotationContext} + */ +public final class ImageAnnotationContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageAnnotationContext) + ImageAnnotationContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageAnnotationContext.newBuilder() to construct. + private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageAnnotationContext() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageAnnotationContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageAnnotationContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 16: { + + pageNumber_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (pageNumber_ != 0) { + output.writeInt32(2, pageNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (pageNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageNumber_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageAnnotationContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (getPageNumber() + != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPageNumber(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * If an image was produced from a file (e.g. a PDF), this message gives
+   * information about the source of that image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageAnnotationContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageAnnotationContext) + com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + pageNumber_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext build() { + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext buildPartial() { + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p4beta1.ImageAnnotationContext(this); + result.uri_ = uri_; + result.pageNumber_ = pageNumber_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageAnnotationContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext other) { + if (other == com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (other.getPageNumber() != 0) { + setPageNumber(other.getPageNumber()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the file used to produce the image.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private int pageNumber_ ; + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + + pageNumber_ = value; + onChanged(); + return this; + } + /** + *
+     * If the file was a PDF or TIFF, this field gives the page number within
+     * the file used to produce the image.
+     * 
+ * + * int32 page_number = 2; + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + + pageNumber_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageAnnotationContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageAnnotationContext) + private static final com.google.cloud.vision.v1p4beta1.ImageAnnotationContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageAnnotationContext(); + } + + public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageAnnotationContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageAnnotationContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java new file mode 100644 index 000000000000..73a22344aec1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImageAnnotationContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageAnnotationContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The URI of the file used to produce the image.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * If the file was a PDF or TIFF, this field gives the page number within
+   * the file used to produce the image.
+   * 
+ * + * int32 page_number = 2; + * @return The pageNumber. + */ + int getPageNumber(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java new file mode 100644 index 000000000000..c7dd05354649 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java @@ -0,0 +1,765 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class ImageAnnotatorProto { + private ImageAnnotatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p4beta1/image_an" + + "notator.proto\022\035google.cloud.vision.v1p4b" + + "eta1\032\034google/api/annotations.proto\032\027goog" + + "le/api/client.proto\032\037google/api/field_be" + + "havior.proto\032(google/cloud/vision/v1p4be" + + "ta1/face.proto\032,google/cloud/vision/v1p4" + + "beta1/geometry.proto\0322google/cloud/visio" + + "n/v1p4beta1/product_search.proto\0323google" + + "/cloud/vision/v1p4beta1/text_annotation." + + "proto\0321google/cloud/vision/v1p4beta1/web" + + "_detection.proto\032#google/longrunning/ope" + + "rations.proto\032\037google/protobuf/timestamp" + + ".proto\032\027google/rpc/status.proto\032\027google/" + + "type/color.proto\032\030google/type/latlng.pro" + + "to\"\216\003\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.cl" + + "oud.vision.v1p4beta1.Feature.Type\022\023\n\013max" + + "_results\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001" + + "\022\026\n\022LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTI" + + "ON\020\003\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECT" + + "ION\020\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SA" + + "FE_SEARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIE" + + "S\020\007\022\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022" + + "\n\016PRODUCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATIO" + + "N\020\023\"7\n\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(" + + "\t\022\021\n\timage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content" + + "\030\001 \001(\014\022:\n\006source\030\002 \001(\0132*.google.cloud.vi" + + "sion.v1p4beta1.ImageSource\"\355\016\n\016FaceAnnot" + + "ation\022B\n\rbounding_poly\030\001 \001(\0132+.google.cl" + + "oud.vision.v1p4beta1.BoundingPoly\022E\n\020fd_" + + "bounding_poly\030\002 \001(\0132+.google.cloud.visio" + + "n.v1p4beta1.BoundingPoly\022I\n\tlandmarks\030\003 " + + "\003(\01326.google.cloud.vision.v1p4beta1.Face" + + "Annotation.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022" + + "\021\n\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034" + + "\n\024detection_confidence\030\007 \001(\002\022\036\n\026landmark" + + "ing_confidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t" + + " \001(\0162).google.cloud.vision.v1p4beta1.Lik" + + "elihood\022D\n\021sorrow_likelihood\030\n \001(\0162).goo" + + "gle.cloud.vision.v1p4beta1.Likelihood\022C\n" + + "\020anger_likelihood\030\013 \001(\0162).google.cloud.v" + + "ision.v1p4beta1.Likelihood\022F\n\023surprise_l" + + "ikelihood\030\014 \001(\0162).google.cloud.vision.v1" + + "p4beta1.Likelihood\022K\n\030under_exposed_like" + + "lihood\030\r \001(\0162).google.cloud.vision.v1p4b" + + "eta1.Likelihood\022E\n\022blurred_likelihood\030\016 " + + "\001(\0162).google.cloud.vision.v1p4beta1.Like" + + "lihood\022F\n\023headwear_likelihood\030\017 \001(\0162).go" + + "ogle.cloud.vision.v1p4beta1.Likelihood\022P" + + "\n\022recognition_result\030\020 \003(\01324.google.clou" + + "d.vision.v1p4beta1.FaceRecognitionResult" + + "\032\307\007\n\010Landmark\022I\n\004type\030\003 \001(\0162;.google.clo" + + "ud.vision.v1p4beta1.FaceAnnotation.Landm" + + "ark.Type\0229\n\010position\030\004 \001(\0132\'.google.clou" + + "d.vision.v1p4beta1.Position\"\264\006\n\004Type\022\024\n\020" + + "UNKNOWN_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGH" + + "T_EYE\020\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIG" + + "HT_OF_LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EY" + + "EBROW\020\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025M" + + "IDPOINT_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\t" + + "UPPER_LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT" + + "\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n" + + "\021NOSE_BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT" + + "\020\017\022\026\n\022NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_T" + + "OP_BOUNDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022" + + "\022\034\n\030LEFT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_E" + + "YE_LEFT_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDA" + + "RY\020\025\022\032\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGH" + + "T_EYE_BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEF" + + "T_CORNER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOIN" + + "T\020\031\022 \n\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n" + + "\020LEFT_EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION" + + "\020\034\022\022\n\016LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPI" + + "L\020\036\022\025\n\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATH" + + "ION\020 \022\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGH" + + "T_GONION\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 " + + "\001(\0132\023.google.type.LatLng\"=\n\010Property\022\014\n\004" + + "name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_valu" + + "e\030\003 \001(\004\"\300\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(" + + "\t\022\016\n\006locale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r" + + "\n\005score\030\004 \001(\002\022\026\n\nconfidence\030\005 \001(\002B\002\030\001\022\022\n" + + "\ntopicality\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\013" + + "2+.google.cloud.vision.v1p4beta1.Boundin" + + "gPoly\022>\n\tlocations\030\010 \003(\0132+.google.cloud." + + "vision.v1p4beta1.LocationInfo\022;\n\npropert" + + "ies\030\t \003(\0132\'.google.cloud.vision.v1p4beta" + + "1.Property\"\240\001\n\031LocalizedObjectAnnotation" + + "\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004" + + "name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_po" + + "ly\030\005 \001(\0132+.google.cloud.vision.v1p4beta1" + + ".BoundingPoly\"\274\002\n\024SafeSearchAnnotation\0228" + + "\n\005adult\030\001 \001(\0162).google.cloud.vision.v1p4" + + "beta1.Likelihood\0228\n\005spoof\030\002 \001(\0162).google" + + ".cloud.vision.v1p4beta1.Likelihood\022:\n\007me" + + "dical\030\003 \001(\0162).google.cloud.vision.v1p4be" + + "ta1.Likelihood\022;\n\010violence\030\004 \001(\0162).googl" + + "e.cloud.vision.v1p4beta1.Likelihood\0227\n\004r" + + "acy\030\t \001(\0162).google.cloud.vision.v1p4beta" + + "1.Likelihood\"a\n\013LatLongRect\022(\n\013min_lat_l" + + "ng\030\001 \001(\0132\023.google.type.LatLng\022(\n\013max_lat" + + "_lng\030\002 \001(\0132\023.google.type.LatLng\"U\n\tColor" + + "Info\022!\n\005color\030\001 \001(\0132\022.google.type.Color\022" + + "\r\n\005score\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T" + + "\n\030DominantColorsAnnotation\0228\n\006colors\030\001 \003" + + "(\0132(.google.cloud.vision.v1p4beta1.Color" + + "Info\"c\n\017ImageProperties\022P\n\017dominant_colo" + + "rs\030\001 \001(\01327.google.cloud.vision.v1p4beta1" + + ".DominantColorsAnnotation\"\177\n\010CropHint\022B\n" + + "\rbounding_poly\030\001 \001(\0132+.google.cloud.visi" + + "on.v1p4beta1.BoundingPoly\022\022\n\nconfidence\030" + + "\002 \001(\002\022\033\n\023importance_fraction\030\003 \001(\002\"R\n\023Cr" + + "opHintsAnnotation\022;\n\ncrop_hints\030\001 \003(\0132\'." + + "google.cloud.vision.v1p4beta1.CropHint\"(" + + "\n\017CropHintsParams\022\025\n\raspect_ratios\030\001 \003(\002" + + "\"1\n\022WebDetectionParams\022\033\n\023include_geo_re" + + "sults\030\002 \001(\010\"c\n\023TextDetectionParams\022.\n&en" + + "able_text_detection_confidence_score\030\t \001" + + "(\010\022\034\n\024advanced_ocr_options\030\013 \003(\t\"\202\004\n\014Ima" + + "geContext\022A\n\rlat_long_rect\030\001 \001(\0132*.googl" + + "e.cloud.vision.v1p4beta1.LatLongRect\022\026\n\016" + + "language_hints\030\002 \003(\t\022I\n\021crop_hints_param" + + "s\030\004 \001(\0132..google.cloud.vision.v1p4beta1." + + "CropHintsParams\022U\n\027face_recognition_para" + + "ms\030\n \001(\01324.google.cloud.vision.v1p4beta1" + + ".FaceRecognitionParams\022Q\n\025product_search" + + "_params\030\005 \001(\01322.google.cloud.vision.v1p4" + + "beta1.ProductSearchParams\022O\n\024web_detecti" + + "on_params\030\006 \001(\01321.google.cloud.vision.v1" + + "p4beta1.WebDetectionParams\022Q\n\025text_detec" + + "tion_params\030\014 \001(\01322.google.cloud.vision." + + "v1p4beta1.TextDetectionParams\"\311\001\n\024Annota" + + "teImageRequest\0223\n\005image\030\001 \001(\0132$.google.c" + + "loud.vision.v1p4beta1.Image\0228\n\010features\030" + + "\002 \003(\0132&.google.cloud.vision.v1p4beta1.Fe" + + "ature\022B\n\rimage_context\030\003 \001(\0132+.google.cl" + + "oud.vision.v1p4beta1.ImageContext\":\n\026Ima" + + "geAnnotationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page" + + "_number\030\002 \001(\005\"\277\010\n\025AnnotateImageResponse\022" + + "G\n\020face_annotations\030\001 \003(\0132-.google.cloud" + + ".vision.v1p4beta1.FaceAnnotation\022M\n\024land" + + "mark_annotations\030\002 \003(\0132/.google.cloud.vi" + + "sion.v1p4beta1.EntityAnnotation\022I\n\020logo_" + + "annotations\030\003 \003(\0132/.google.cloud.vision." + + "v1p4beta1.EntityAnnotation\022J\n\021label_anno" + + "tations\030\004 \003(\0132/.google.cloud.vision.v1p4" + + "beta1.EntityAnnotation\022^\n\034localized_obje" + + "ct_annotations\030\026 \003(\01328.google.cloud.visi" + + "on.v1p4beta1.LocalizedObjectAnnotation\022I" + + "\n\020text_annotations\030\005 \003(\0132/.google.cloud." + + "vision.v1p4beta1.EntityAnnotation\022K\n\024ful" + + "l_text_annotation\030\014 \001(\0132-.google.cloud.v" + + "ision.v1p4beta1.TextAnnotation\022S\n\026safe_s" + + "earch_annotation\030\006 \001(\01323.google.cloud.vi" + + "sion.v1p4beta1.SafeSearchAnnotation\022S\n\033i" + + "mage_properties_annotation\030\010 \001(\0132..googl" + + "e.cloud.vision.v1p4beta1.ImageProperties" + + "\022Q\n\025crop_hints_annotation\030\013 \001(\01322.google" + + ".cloud.vision.v1p4beta1.CropHintsAnnotat" + + "ion\022B\n\rweb_detection\030\r \001(\0132+.google.clou" + + "d.vision.v1p4beta1.WebDetection\022S\n\026produ" + + "ct_search_results\030\016 \001(\01323.google.cloud.v" + + "ision.v1p4beta1.ProductSearchResults\022!\n\005" + + "error\030\t \001(\0132\022.google.rpc.Status\022F\n\007conte" + + "xt\030\025 \001(\01325.google.cloud.vision.v1p4beta1" + + ".ImageAnnotationContext\"h\n\032BatchAnnotate" + + "ImagesRequest\022J\n\010requests\030\001 \003(\01323.google" + + ".cloud.vision.v1p4beta1.AnnotateImageReq" + + "uestB\003\340A\002\"f\n\033BatchAnnotateImagesResponse" + + "\022G\n\tresponses\030\001 \003(\01324.google.cloud.visio" + + "n.v1p4beta1.AnnotateImageResponse\"\344\001\n\023An" + + "notateFileRequest\022@\n\014input_config\030\001 \001(\0132" + + "*.google.cloud.vision.v1p4beta1.InputCon" + + "fig\0228\n\010features\030\002 \003(\0132&.google.cloud.vis" + + "ion.v1p4beta1.Feature\022B\n\rimage_context\030\003" + + " \001(\0132+.google.cloud.vision.v1p4beta1.Ima" + + "geContext\022\r\n\005pages\030\004 \003(\005\"\331\001\n\024AnnotateFil" + + "eResponse\022@\n\014input_config\030\001 \001(\0132*.google" + + ".cloud.vision.v1p4beta1.InputConfig\022G\n\tr" + + "esponses\030\002 \003(\01324.google.cloud.vision.v1p" + + "4beta1.AnnotateImageResponse\022\023\n\013total_pa" + + "ges\030\003 \001(\005\022!\n\005error\030\004 \001(\0132\022.google.rpc.St" + + "atus\"f\n\031BatchAnnotateFilesRequest\022I\n\010req" + + "uests\030\001 \003(\01322.google.cloud.vision.v1p4be" + + "ta1.AnnotateFileRequestB\003\340A\002\"d\n\032BatchAnn" + + "otateFilesResponse\022F\n\tresponses\030\001 \003(\01323." + + "google.cloud.vision.v1p4beta1.AnnotateFi" + + "leResponse\"\236\002\n\030AsyncAnnotateFileRequest\022" + + "@\n\014input_config\030\001 \001(\0132*.google.cloud.vis" + + "ion.v1p4beta1.InputConfig\0228\n\010features\030\002 " + + "\003(\0132&.google.cloud.vision.v1p4beta1.Feat" + + "ure\022B\n\rimage_context\030\003 \001(\0132+.google.clou" + + "d.vision.v1p4beta1.ImageContext\022B\n\routpu" + + "t_config\030\004 \001(\0132+.google.cloud.vision.v1p" + + "4beta1.OutputConfig\"_\n\031AsyncAnnotateFile" + + "Response\022B\n\routput_config\030\001 \001(\0132+.google" + + ".cloud.vision.v1p4beta1.OutputConfig\"\266\001\n" + + "\037AsyncBatchAnnotateImagesRequest\022J\n\010requ" + + "ests\030\001 \003(\01323.google.cloud.vision.v1p4bet" + + "a1.AnnotateImageRequestB\003\340A\002\022G\n\routput_c" + + "onfig\030\002 \001(\0132+.google.cloud.vision.v1p4be" + + "ta1.OutputConfigB\003\340A\002\"f\n AsyncBatchAnnot" + + "ateImagesResponse\022B\n\routput_config\030\001 \001(\013" + + "2+.google.cloud.vision.v1p4beta1.OutputC" + + "onfig\"p\n\036AsyncBatchAnnotateFilesRequest\022" + + "N\n\010requests\030\001 \003(\01327.google.cloud.vision." + + "v1p4beta1.AsyncAnnotateFileRequestB\003\340A\002\"" + + "n\n\037AsyncBatchAnnotateFilesResponse\022K\n\tre" + + "sponses\030\001 \003(\01328.google.cloud.vision.v1p4" + + "beta1.AsyncAnnotateFileResponse\"o\n\013Input" + + "Config\022<\n\ngcs_source\030\001 \001(\0132(.google.clou" + + "d.vision.v1p4beta1.GcsSource\022\017\n\007content\030" + + "\003 \001(\014\022\021\n\tmime_type\030\002 \001(\t\"j\n\014OutputConfig" + + "\022F\n\017gcs_destination\030\001 \001(\0132-.google.cloud" + + ".vision.v1p4beta1.GcsDestination\022\022\n\nbatc" + + "h_size\030\002 \001(\005\"\030\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035" + + "\n\016GcsDestination\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021Operat" + + "ionMetadata\022E\n\005state\030\001 \001(\01626.google.clou" + + "d.vision.v1p4beta1.OperationMetadata.Sta" + + "te\022/\n\013create_time\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp\022/\n\013update_time\030\006 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"Q\n\005State\022\025\n\021STATE_U" + + "NSPECIFIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010" + + "\n\004DONE\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikelihood\022\013\n" + + "\007UNKNOWN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKEL" + + "Y\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LI" + + "KELY\020\0052\361\007\n\016ImageAnnotator\022\276\001\n\023BatchAnnot" + + "ateImages\0229.google.cloud.vision.v1p4beta" + + "1.BatchAnnotateImagesRequest\032:.google.cl" + + "oud.vision.v1p4beta1.BatchAnnotateImages" + + "Response\"0\202\323\344\223\002\037\"\032/v1p4beta1/images:anno" + + "tate:\001*\332A\010requests\022\272\001\n\022BatchAnnotateFile" + + "s\0228.google.cloud.vision.v1p4beta1.BatchA" + + "nnotateFilesRequest\0329.google.cloud.visio" + + "n.v1p4beta1.BatchAnnotateFilesResponse\"/" + + "\202\323\344\223\002\036\"\031/v1p4beta1/files:annotate:\001*\332A\010r" + + "equests\022\374\001\n\030AsyncBatchAnnotateImages\022>.g" + + "oogle.cloud.vision.v1p4beta1.AsyncBatchA" + + "nnotateImagesRequest\032\035.google.longrunnin" + + "g.Operation\"\200\001\202\323\344\223\002)\"$/v1p4beta1/images:" + + "asyncBatchAnnotate:\001*\332A\026requests,output_" + + "config\312A5\n AsyncBatchAnnotateImagesRespo" + + "nse\022\021OperationMetadata\022\351\001\n\027AsyncBatchAnn" + + "otateFiles\022=.google.cloud.vision.v1p4bet" + + "a1.AsyncBatchAnnotateFilesRequest\032\035.goog" + + "le.longrunning.Operation\"p\202\323\344\223\002(\"#/v1p4b" + + "eta1/files:asyncBatchAnnotate:\001*\332A\010reque" + + "sts\312A4\n\037AsyncBatchAnnotateFilesResponse\022" + + "\021OperationMetadata\032v\312A\025vision.googleapis" + + ".com\322A[https://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/cloud-visionB\211\001\n!com.google.cloud." + + "vision.v1p4beta1B\023ImageAnnotatorProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.CelebrityProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.ProductSearchProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.ColorProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor, + new java.lang.String[] { "Type", "MaxResults", "Model", }); + internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor, + new java.lang.String[] { "GcsImageUri", "ImageUri", }); + internal_static_google_cloud_vision_v1p4beta1_Image_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Image_descriptor, + new java.lang.String[] { "Content", "Source", }); + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor, + new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", "RecognitionResult", }); + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor = + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor, + new java.lang.String[] { "Type", "Position", }); + internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor, + new java.lang.String[] { "LatLng", }); + internal_static_google_cloud_vision_v1p4beta1_Property_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Property_descriptor, + new java.lang.String[] { "Name", "Value", "Uint64Value", }); + internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor, + new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); + internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor, + new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", "BoundingPoly", }); + internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor, + new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); + internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor, + new java.lang.String[] { "MinLatLng", "MaxLatLng", }); + internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor, + new java.lang.String[] { "Color", "Score", "PixelFraction", }); + internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor, + new java.lang.String[] { "Colors", }); + internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor, + new java.lang.String[] { "DominantColors", }); + internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor, + new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); + internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor, + new java.lang.String[] { "CropHints", }); + internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor, + new java.lang.String[] { "AspectRatios", }); + internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor, + new java.lang.String[] { "IncludeGeoResults", }); + internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor, + new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); + internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor, + new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "FaceRecognitionParams", "ProductSearchParams", "WebDetectionParams", "TextDetectionParams", }); + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor, + new java.lang.String[] { "Image", "Features", "ImageContext", }); + internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor, + new java.lang.String[] { "Uri", "PageNumber", }); + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor, + new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "LocalizedObjectAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "ProductSearchResults", "Error", "Context", }); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor, + new java.lang.String[] { "InputConfig", "Features", "ImageContext", "Pages", }); + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor, + new java.lang.String[] { "InputConfig", "Responses", "TotalPages", "Error", }); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor, + new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor, + new java.lang.String[] { "OutputConfig", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor, + new java.lang.String[] { "Requests", "OutputConfig", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor, + new java.lang.String[] { "OutputConfig", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor, + new java.lang.String[] { "Requests", }); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor, + new java.lang.String[] { "Responses", }); + internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor, + new java.lang.String[] { "GcsSource", "Content", "MimeType", }); + internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BatchSize", }); + internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor, + new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.CelebrityProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.ProductSearchProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.ColorProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java new file mode 100644 index 000000000000..5f620da30f8d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java @@ -0,0 +1,2183 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Image context and/or feature-specific parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageContext} + */ +public final class ImageContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageContext) + ImageContextOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageContext.newBuilder() to construct. + private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageContext() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.LatLongRect.Builder subBuilder = null; + if (latLongRect_ != null) { + subBuilder = latLongRect_.toBuilder(); + } + latLongRect_ = input.readMessage(com.google.cloud.vision.v1p4beta1.LatLongRect.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLongRect_); + latLongRect_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + languageHints_.add(s); + break; + } + case 34: { + com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder subBuilder = null; + if (cropHintsParams_ != null) { + subBuilder = cropHintsParams_.toBuilder(); + } + cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.CropHintsParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cropHintsParams_); + cropHintsParams_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder subBuilder = null; + if (productSearchParams_ != null) { + subBuilder = productSearchParams_.toBuilder(); + } + productSearchParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSearchParams_); + productSearchParams_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder subBuilder = null; + if (webDetectionParams_ != null) { + subBuilder = webDetectionParams_.toBuilder(); + } + webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webDetectionParams_); + webDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder subBuilder = null; + if (faceRecognitionParams_ != null) { + subBuilder = faceRecognitionParams_.toBuilder(); + } + faceRecognitionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(faceRecognitionParams_); + faceRecognitionParams_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder subBuilder = null; + if (textDetectionParams_ != null) { + subBuilder = textDetectionParams_.toBuilder(); + } + textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextDetectionParams.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(textDetectionParams_); + textDetectionParams_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageContext.class, com.google.cloud.vision.v1p4beta1.ImageContext.Builder.class); + } + + public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_; + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + @java.lang.Override + public boolean hasLatLongRect() { + return latLongRect_ != null; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect() { + return latLongRect_ == null ? com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + return getLatLongRect(); + } + + public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList languageHints_; + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_; + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + + public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_; + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + @java.lang.Override + public boolean hasCropHintsParams() { + return cropHintsParams_ != null; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams() { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + return getCropHintsParams(); + } + + public static final int FACE_RECOGNITION_PARAMS_FIELD_NUMBER = 10; + private com.google.cloud.vision.v1p4beta1.FaceRecognitionParams faceRecognitionParams_; + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return Whether the faceRecognitionParams field is set. + */ + @java.lang.Override + public boolean hasFaceRecognitionParams() { + return faceRecognitionParams_ != null; + } + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return The faceRecognitionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams() { + return faceRecognitionParams_ == null ? com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; + } + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder() { + return getFaceRecognitionParams(); + } + + public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_; + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + @java.lang.Override + public boolean hasProductSearchParams() { + return productSearchParams_ != null; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams() { + return productSearchParams_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + return getProductSearchParams(); + } + + public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_; + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + @java.lang.Override + public boolean hasWebDetectionParams() { + return webDetectionParams_ != null; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams() { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + return getWebDetectionParams(); + } + + public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; + private com.google.cloud.vision.v1p4beta1.TextDetectionParams textDetectionParams_; + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + @java.lang.Override + public boolean hasTextDetectionParams() { + return textDetectionParams_ != null; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams() { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + return getTextDetectionParams(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLongRect_ != null) { + output.writeMessage(1, getLatLongRect()); + } + for (int i = 0; i < languageHints_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); + } + if (cropHintsParams_ != null) { + output.writeMessage(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + output.writeMessage(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + output.writeMessage(6, getWebDetectionParams()); + } + if (faceRecognitionParams_ != null) { + output.writeMessage(10, getFaceRecognitionParams()); + } + if (textDetectionParams_ != null) { + output.writeMessage(12, getTextDetectionParams()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLongRect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLongRect()); + } + { + int dataSize = 0; + for (int i = 0; i < languageHints_.size(); i++) { + dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); + } + size += dataSize; + size += 1 * getLanguageHintsList().size(); + } + if (cropHintsParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCropHintsParams()); + } + if (productSearchParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getProductSearchParams()); + } + if (webDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getWebDetectionParams()); + } + if (faceRecognitionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getFaceRecognitionParams()); + } + if (textDetectionParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getTextDetectionParams()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageContext)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImageContext other = (com.google.cloud.vision.v1p4beta1.ImageContext) obj; + + if (hasLatLongRect() != other.hasLatLongRect()) return false; + if (hasLatLongRect()) { + if (!getLatLongRect() + .equals(other.getLatLongRect())) return false; + } + if (!getLanguageHintsList() + .equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; + if (hasCropHintsParams()) { + if (!getCropHintsParams() + .equals(other.getCropHintsParams())) return false; + } + if (hasFaceRecognitionParams() != other.hasFaceRecognitionParams()) return false; + if (hasFaceRecognitionParams()) { + if (!getFaceRecognitionParams() + .equals(other.getFaceRecognitionParams())) return false; + } + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; + if (hasProductSearchParams()) { + if (!getProductSearchParams() + .equals(other.getProductSearchParams())) return false; + } + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; + if (hasWebDetectionParams()) { + if (!getWebDetectionParams() + .equals(other.getWebDetectionParams())) return false; + } + if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; + if (hasTextDetectionParams()) { + if (!getTextDetectionParams() + .equals(other.getTextDetectionParams())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLongRect()) { + hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; + hash = (53 * hash) + getLatLongRect().hashCode(); + } + if (getLanguageHintsCount() > 0) { + hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; + hash = (53 * hash) + getLanguageHintsList().hashCode(); + } + if (hasCropHintsParams()) { + hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCropHintsParams().hashCode(); + } + if (hasFaceRecognitionParams()) { + hash = (37 * hash) + FACE_RECOGNITION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getFaceRecognitionParams().hashCode(); + } + if (hasProductSearchParams()) { + hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getProductSearchParams().hashCode(); + } + if (hasWebDetectionParams()) { + hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getWebDetectionParams().hashCode(); + } + if (hasTextDetectionParams()) { + hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getTextDetectionParams().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Image context and/or feature-specific parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageContext) + com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageContext.class, com.google.cloud.vision.v1p4beta1.ImageContext.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + if (faceRecognitionParamsBuilder_ == null) { + faceRecognitionParams_ = null; + } else { + faceRecognitionParams_ = null; + faceRecognitionParamsBuilder_ = null; + } + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext build() { + com.google.cloud.vision.v1p4beta1.ImageContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext buildPartial() { + com.google.cloud.vision.v1p4beta1.ImageContext result = new com.google.cloud.vision.v1p4beta1.ImageContext(this); + int from_bitField0_ = bitField0_; + if (latLongRectBuilder_ == null) { + result.latLongRect_ = latLongRect_; + } else { + result.latLongRect_ = latLongRectBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + languageHints_ = languageHints_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.languageHints_ = languageHints_; + if (cropHintsParamsBuilder_ == null) { + result.cropHintsParams_ = cropHintsParams_; + } else { + result.cropHintsParams_ = cropHintsParamsBuilder_.build(); + } + if (faceRecognitionParamsBuilder_ == null) { + result.faceRecognitionParams_ = faceRecognitionParams_; + } else { + result.faceRecognitionParams_ = faceRecognitionParamsBuilder_.build(); + } + if (productSearchParamsBuilder_ == null) { + result.productSearchParams_ = productSearchParams_; + } else { + result.productSearchParams_ = productSearchParamsBuilder_.build(); + } + if (webDetectionParamsBuilder_ == null) { + result.webDetectionParams_ = webDetectionParams_; + } else { + result.webDetectionParams_ = webDetectionParamsBuilder_.build(); + } + if (textDetectionParamsBuilder_ == null) { + result.textDetectionParams_ = textDetectionParams_; + } else { + result.textDetectionParams_ = textDetectionParamsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImageContext) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageContext other) { + if (other == com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()) return this; + if (other.hasLatLongRect()) { + mergeLatLongRect(other.getLatLongRect()); + } + if (!other.languageHints_.isEmpty()) { + if (languageHints_.isEmpty()) { + languageHints_ = other.languageHints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLanguageHintsIsMutable(); + languageHints_.addAll(other.languageHints_); + } + onChanged(); + } + if (other.hasCropHintsParams()) { + mergeCropHintsParams(other.getCropHintsParams()); + } + if (other.hasFaceRecognitionParams()) { + mergeFaceRecognitionParams(other.getFaceRecognitionParams()); + } + if (other.hasProductSearchParams()) { + mergeProductSearchParams(other.getProductSearchParams()); + } + if (other.hasWebDetectionParams()) { + mergeWebDetectionParams(other.getWebDetectionParams()); + } + if (other.hasTextDetectionParams()) { + mergeTextDetectionParams(other.getTextDetectionParams()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImageContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder> latLongRectBuilder_; + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + public boolean hasLatLongRect() { + return latLongRectBuilder_ != null || latLongRect_ != null; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + public com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect() { + if (latLongRectBuilder_ == null) { + return latLongRect_ == null ? com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } else { + return latLongRectBuilder_.getMessage(); + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect(com.google.cloud.vision.v1p4beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLongRect_ = value; + onChanged(); + } else { + latLongRectBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public Builder setLatLongRect( + com.google.cloud.vision.v1p4beta1.LatLongRect.Builder builderForValue) { + if (latLongRectBuilder_ == null) { + latLongRect_ = builderForValue.build(); + onChanged(); + } else { + latLongRectBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public Builder mergeLatLongRect(com.google.cloud.vision.v1p4beta1.LatLongRect value) { + if (latLongRectBuilder_ == null) { + if (latLongRect_ != null) { + latLongRect_ = + com.google.cloud.vision.v1p4beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); + } else { + latLongRect_ = value; + } + onChanged(); + } else { + latLongRectBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public Builder clearLatLongRect() { + if (latLongRectBuilder_ == null) { + latLongRect_ = null; + onChanged(); + } else { + latLongRect_ = null; + latLongRectBuilder_ = null; + } + + return this; + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p4beta1.LatLongRect.Builder getLatLongRectBuilder() { + + onChanged(); + return getLatLongRectFieldBuilder().getBuilder(); + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + public com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { + if (latLongRectBuilder_ != null) { + return latLongRectBuilder_.getMessageOrBuilder(); + } else { + return latLongRect_ == null ? + com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; + } + } + /** + *
+     * Not used.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder> + getLatLongRectFieldBuilder() { + if (latLongRectBuilder_ == null) { + latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder>( + getLatLongRect(), + getParentForChildren(), + isClean()); + latLongRect_ = null; + } + return latLongRectBuilder_; + } + + private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLanguageHintsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + public com.google.protobuf.ProtocolStringList + getLanguageHintsList() { + return languageHints_.getUnmodifiableView(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + public int getLanguageHintsCount() { + return languageHints_.size(); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + public java.lang.String getLanguageHints(int index) { + return languageHints_.get(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + public com.google.protobuf.ByteString + getLanguageHintsBytes(int index) { + return languageHints_.getByteString(index); + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param index The index to set the value at. + * @param value The languageHints to set. + * @return This builder for chaining. + */ + public Builder setLanguageHints( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHints( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param values The languageHints to add. + * @return This builder for chaining. + */ + public Builder addAllLanguageHints( + java.lang.Iterable values) { + ensureLanguageHintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languageHints_); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageHints() { + languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+     * yields the best results since it enables automatic language detection. For
+     * languages based on the Latin alphabet, setting `language_hints` is not
+     * needed. In rare cases, when the language of the text in the image is known,
+     * setting a hint will help get better results (although it will be a
+     * significant hindrance if the hint is wrong). Text detection returns an
+     * error if one or more of the specified languages is not one of the
+     * [supported languages](https://cloud.google.com/vision/docs/languages).
+     * 
+ * + * repeated string language_hints = 2; + * @param value The bytes of the languageHints to add. + * @return This builder for chaining. + */ + public Builder addLanguageHintsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLanguageHintsIsMutable(); + languageHints_.add(value); + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + public boolean hasCropHintsParams() { + return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + public com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + return cropHintsParams_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } else { + return cropHintsParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams(com.google.cloud.vision.v1p4beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cropHintsParams_ = value; + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder setCropHintsParams( + com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder builderForValue) { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = builderForValue.build(); + onChanged(); + } else { + cropHintsParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder mergeCropHintsParams(com.google.cloud.vision.v1p4beta1.CropHintsParams value) { + if (cropHintsParamsBuilder_ == null) { + if (cropHintsParams_ != null) { + cropHintsParams_ = + com.google.cloud.vision.v1p4beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); + } else { + cropHintsParams_ = value; + } + onChanged(); + } else { + cropHintsParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public Builder clearCropHintsParams() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParams_ = null; + onChanged(); + } else { + cropHintsParams_ = null; + cropHintsParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { + + onChanged(); + return getCropHintsParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + public com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { + if (cropHintsParamsBuilder_ != null) { + return cropHintsParamsBuilder_.getMessageOrBuilder(); + } else { + return cropHintsParams_ == null ? + com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; + } + } + /** + *
+     * Parameters for crop hints annotation request.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder> + getCropHintsParamsFieldBuilder() { + if (cropHintsParamsBuilder_ == null) { + cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder>( + getCropHintsParams(), + getParentForChildren(), + isClean()); + cropHintsParams_ = null; + } + return cropHintsParamsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.FaceRecognitionParams faceRecognitionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder> faceRecognitionParamsBuilder_; + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return Whether the faceRecognitionParams field is set. + */ + public boolean hasFaceRecognitionParams() { + return faceRecognitionParamsBuilder_ != null || faceRecognitionParams_ != null; + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return The faceRecognitionParams. + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams() { + if (faceRecognitionParamsBuilder_ == null) { + return faceRecognitionParams_ == null ? com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; + } else { + return faceRecognitionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public Builder setFaceRecognitionParams(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams value) { + if (faceRecognitionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + faceRecognitionParams_ = value; + onChanged(); + } else { + faceRecognitionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public Builder setFaceRecognitionParams( + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder builderForValue) { + if (faceRecognitionParamsBuilder_ == null) { + faceRecognitionParams_ = builderForValue.build(); + onChanged(); + } else { + faceRecognitionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public Builder mergeFaceRecognitionParams(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams value) { + if (faceRecognitionParamsBuilder_ == null) { + if (faceRecognitionParams_ != null) { + faceRecognitionParams_ = + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.newBuilder(faceRecognitionParams_).mergeFrom(value).buildPartial(); + } else { + faceRecognitionParams_ = value; + } + onChanged(); + } else { + faceRecognitionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public Builder clearFaceRecognitionParams() { + if (faceRecognitionParamsBuilder_ == null) { + faceRecognitionParams_ = null; + onChanged(); + } else { + faceRecognitionParams_ = null; + faceRecognitionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder getFaceRecognitionParamsBuilder() { + + onChanged(); + return getFaceRecognitionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + public com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder() { + if (faceRecognitionParamsBuilder_ != null) { + return faceRecognitionParamsBuilder_.getMessageOrBuilder(); + } else { + return faceRecognitionParams_ == null ? + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; + } + } + /** + *
+     * Parameters for face recognition.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder> + getFaceRecognitionParamsFieldBuilder() { + if (faceRecognitionParamsBuilder_ == null) { + faceRecognitionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder>( + getFaceRecognitionParams(), + getParentForChildren(), + isClean()); + faceRecognitionParams_ = null; + } + return faceRecognitionParamsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + public boolean hasProductSearchParams() { + return productSearchParamsBuilder_ != null || productSearchParams_ != null; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + return productSearchParams_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } else { + return productSearchParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams(com.google.cloud.vision.v1p4beta1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSearchParams_ = value; + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public Builder setProductSearchParams( + com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder builderForValue) { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = builderForValue.build(); + onChanged(); + } else { + productSearchParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public Builder mergeProductSearchParams(com.google.cloud.vision.v1p4beta1.ProductSearchParams value) { + if (productSearchParamsBuilder_ == null) { + if (productSearchParams_ != null) { + productSearchParams_ = + com.google.cloud.vision.v1p4beta1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); + } else { + productSearchParams_ = value; + } + onChanged(); + } else { + productSearchParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public Builder clearProductSearchParams() { + if (productSearchParamsBuilder_ == null) { + productSearchParams_ = null; + onChanged(); + } else { + productSearchParams_ = null; + productSearchParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder getProductSearchParamsBuilder() { + + onChanged(); + return getProductSearchParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { + if (productSearchParamsBuilder_ != null) { + return productSearchParamsBuilder_.getMessageOrBuilder(); + } else { + return productSearchParams_ == null ? + com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; + } + } + /** + *
+     * Parameters for product search.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder> + getProductSearchParamsFieldBuilder() { + if (productSearchParamsBuilder_ == null) { + productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder>( + getProductSearchParams(), + getParentForChildren(), + isClean()); + productSearchParams_ = null; + } + return productSearchParamsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + public boolean hasWebDetectionParams() { + return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + public com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + return webDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } else { + return webDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams(com.google.cloud.vision.v1p4beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webDetectionParams_ = value; + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder setWebDetectionParams( + com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder builderForValue) { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + webDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p4beta1.WebDetectionParams value) { + if (webDetectionParamsBuilder_ == null) { + if (webDetectionParams_ != null) { + webDetectionParams_ = + com.google.cloud.vision.v1p4beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); + } else { + webDetectionParams_ = value; + } + onChanged(); + } else { + webDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public Builder clearWebDetectionParams() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParams_ = null; + onChanged(); + } else { + webDetectionParams_ = null; + webDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { + + onChanged(); + return getWebDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { + if (webDetectionParamsBuilder_ != null) { + return webDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return webDetectionParams_ == null ? + com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; + } + } + /** + *
+     * Parameters for web detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder> + getWebDetectionParamsFieldBuilder() { + if (webDetectionParamsBuilder_ == null) { + webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder>( + getWebDetectionParams(), + getParentForChildren(), + isClean()); + webDetectionParams_ = null; + } + return webDetectionParamsBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.TextDetectionParams textDetectionParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + public boolean hasTextDetectionParams() { + return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + public com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + return textDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } else { + return textDetectionParamsBuilder_.getMessage(); + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams(com.google.cloud.vision.v1p4beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textDetectionParams_ = value; + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder setTextDetectionParams( + com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder builderForValue) { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = builderForValue.build(); + onChanged(); + } else { + textDetectionParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p4beta1.TextDetectionParams value) { + if (textDetectionParamsBuilder_ == null) { + if (textDetectionParams_ != null) { + textDetectionParams_ = + com.google.cloud.vision.v1p4beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); + } else { + textDetectionParams_ = value; + } + onChanged(); + } else { + textDetectionParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public Builder clearTextDetectionParams() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParams_ = null; + onChanged(); + } else { + textDetectionParams_ = null; + textDetectionParamsBuilder_ = null; + } + + return this; + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { + + onChanged(); + return getTextDetectionParamsFieldBuilder().getBuilder(); + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + public com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { + if (textDetectionParamsBuilder_ != null) { + return textDetectionParamsBuilder_.getMessageOrBuilder(); + } else { + return textDetectionParams_ == null ? + com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; + } + } + /** + *
+     * Parameters for text detection and document text detection.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder> + getTextDetectionParamsFieldBuilder() { + if (textDetectionParamsBuilder_ == null) { + textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder>( + getTextDetectionParams(), + getParentForChildren(), + isClean()); + textDetectionParams_ = null; + } + return textDetectionParamsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageContext) + private static final com.google.cloud.vision.v1p4beta1.ImageContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageContext(); + } + + public static com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java new file mode 100644 index 000000000000..7c65993e3537 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java @@ -0,0 +1,240 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImageContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return Whether the latLongRect field is set. + */ + boolean hasLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + * @return The latLongRect. + */ + com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect(); + /** + *
+   * Not used.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; + */ + com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); + + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return A list containing the languageHints. + */ + java.util.List + getLanguageHintsList(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @return The count of languageHints. + */ + int getLanguageHintsCount(); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the element to return. + * @return The languageHints at the given index. + */ + java.lang.String getLanguageHints(int index); + /** + *
+   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
+   * yields the best results since it enables automatic language detection. For
+   * languages based on the Latin alphabet, setting `language_hints` is not
+   * needed. In rare cases, when the language of the text in the image is known,
+   * setting a hint will help get better results (although it will be a
+   * significant hindrance if the hint is wrong). Text detection returns an
+   * error if one or more of the specified languages is not one of the
+   * [supported languages](https://cloud.google.com/vision/docs/languages).
+   * 
+ * + * repeated string language_hints = 2; + * @param index The index of the value to return. + * @return The bytes of the languageHints at the given index. + */ + com.google.protobuf.ByteString + getLanguageHintsBytes(int index); + + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return Whether the cropHintsParams field is set. + */ + boolean hasCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + * @return The cropHintsParams. + */ + com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams(); + /** + *
+   * Parameters for crop hints annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; + */ + com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); + + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return Whether the faceRecognitionParams field is set. + */ + boolean hasFaceRecognitionParams(); + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + * @return The faceRecognitionParams. + */ + com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams(); + /** + *
+   * Parameters for face recognition.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; + */ + com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder(); + + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return Whether the productSearchParams field is set. + */ + boolean hasProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + * @return The productSearchParams. + */ + com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams(); + /** + *
+   * Parameters for product search.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); + + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return Whether the webDetectionParams field is set. + */ + boolean hasWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + * @return The webDetectionParams. + */ + com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams(); + /** + *
+   * Parameters for web detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; + */ + com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); + + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return Whether the textDetectionParams field is set. + */ + boolean hasTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + * @return The textDetectionParams. + */ + com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams(); + /** + *
+   * Parameters for text detection and document text detection.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; + */ + com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java new file mode 100644 index 000000000000..710fcc3e1063 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Image) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Image content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * 
+ * + * bytes content = 1; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + * @return The source. + */ + com.google.cloud.vision.v1p4beta1.ImageSource getSource(); + /** + *
+   * Google Cloud Storage image location, or publicly-accessible image
+   * URL. If both `content` and `source` are provided for an image, `content`
+   * takes precedence and is used to perform the image annotation request.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImageSource source = 2; + */ + com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java new file mode 100644 index 000000000000..14f27e7c7024 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Stores image properties, such as dominant colors.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageProperties} + */ +public final class ImageProperties extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageProperties) + ImagePropertiesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageProperties.newBuilder() to construct. + private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageProperties() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder subBuilder = null; + if (dominantColors_ != null) { + subBuilder = dominantColors_.toBuilder(); + } + dominantColors_ = input.readMessage(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dominantColors_); + dominantColors_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageProperties.class, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder.class); + } + + public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_; + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + @java.lang.Override + public boolean hasDominantColors() { + return dominantColors_ != null; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors() { + return dominantColors_ == null ? com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + return getDominantColors(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dominantColors_ != null) { + output.writeMessage(1, getDominantColors()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dominantColors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDominantColors()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageProperties)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImageProperties other = (com.google.cloud.vision.v1p4beta1.ImageProperties) obj; + + if (hasDominantColors() != other.hasDominantColors()) return false; + if (hasDominantColors()) { + if (!getDominantColors() + .equals(other.getDominantColors())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDominantColors()) { + hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; + hash = (53 * hash) + getDominantColors().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageProperties prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Stores image properties, such as dominant colors.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageProperties} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageProperties) + com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageProperties.class, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImageProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageProperties build() { + com.google.cloud.vision.v1p4beta1.ImageProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageProperties buildPartial() { + com.google.cloud.vision.v1p4beta1.ImageProperties result = new com.google.cloud.vision.v1p4beta1.ImageProperties(this); + if (dominantColorsBuilder_ == null) { + result.dominantColors_ = dominantColors_; + } else { + result.dominantColors_ = dominantColorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImageProperties) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageProperties)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageProperties other) { + if (other == com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance()) return this; + if (other.hasDominantColors()) { + mergeDominantColors(other.getDominantColors()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImageProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageProperties) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + public boolean hasDominantColors() { + return dominantColorsBuilder_ != null || dominantColors_ != null; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors() { + if (dominantColorsBuilder_ == null) { + return dominantColors_ == null ? com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } else { + return dominantColorsBuilder_.getMessage(); + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dominantColors_ = value; + onChanged(); + } else { + dominantColorsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder setDominantColors( + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder builderForValue) { + if (dominantColorsBuilder_ == null) { + dominantColors_ = builderForValue.build(); + onChanged(); + } else { + dominantColorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder mergeDominantColors(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation value) { + if (dominantColorsBuilder_ == null) { + if (dominantColors_ != null) { + dominantColors_ = + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); + } else { + dominantColors_ = value; + } + onChanged(); + } else { + dominantColorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public Builder clearDominantColors() { + if (dominantColorsBuilder_ == null) { + dominantColors_ = null; + onChanged(); + } else { + dominantColors_ = null; + dominantColorsBuilder_ = null; + } + + return this; + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { + + onChanged(); + return getDominantColorsFieldBuilder().getBuilder(); + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { + if (dominantColorsBuilder_ != null) { + return dominantColorsBuilder_.getMessageOrBuilder(); + } else { + return dominantColors_ == null ? + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; + } + } + /** + *
+     * If present, dominant colors completed successfully.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder> + getDominantColorsFieldBuilder() { + if (dominantColorsBuilder_ == null) { + dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder>( + getDominantColors(), + getParentForChildren(), + isClean()); + dominantColors_ = null; + } + return dominantColorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageProperties) + private static final com.google.cloud.vision.v1p4beta1.ImageProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageProperties(); + } + + public static com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java new file mode 100644 index 000000000000..b0fffd0baa07 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImagePropertiesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageProperties) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return Whether the dominantColors field is set. + */ + boolean hasDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + * @return The dominantColors. + */ + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors(); + /** + *
+   * If present, dominant colors completed successfully.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; + */ + com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java new file mode 100644 index 000000000000..0bb4bbfa190e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java @@ -0,0 +1,880 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * External image source (Google Cloud Storage or web URL image location).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageSource} + */ +public final class ImageSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageSource) + ImageSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageSource.newBuilder() to construct. + private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageSource() { + gcsImageUri_ = ""; + imageUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + gcsImageUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageSource.class, com.google.cloud.vision.v1p4beta1.ImageSource.Builder.class); + } + + public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsImageUri_; + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + @java.lang.Override + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } + } + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object imageUri_; + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImageSource other = (com.google.cloud.vision.v1p4beta1.ImageSource) obj; + + if (!getGcsImageUri() + .equals(other.getGcsImageUri())) return false; + if (!getImageUri() + .equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsImageUri().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * External image source (Google Cloud Storage or web URL image location).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageSource) + com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImageSource.class, com.google.cloud.vision.v1p4beta1.ImageSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImageSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + gcsImageUri_ = ""; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSource build() { + com.google.cloud.vision.v1p4beta1.ImageSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSource buildPartial() { + com.google.cloud.vision.v1p4beta1.ImageSource result = new com.google.cloud.vision.v1p4beta1.ImageSource(this); + result.gcsImageUri_ = gcsImageUri_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImageSource) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageSource other) { + if (other == com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance()) return this; + if (!other.getGcsImageUri().isEmpty()) { + gcsImageUri_ = other.gcsImageUri_; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImageSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsImageUri_ = ""; + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + public java.lang.String getGcsImageUri() { + java.lang.Object ref = gcsImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + public com.google.protobuf.ByteString + getGcsImageUriBytes() { + java.lang.Object ref = gcsImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gcsImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsImageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @return This builder for chaining. + */ + public Builder clearGcsImageUri() { + + gcsImageUri_ = getDefaultInstance().getGcsImageUri(); + onChanged(); + return this; + } + /** + *
+     * **Use `image_uri` instead.**
+     * The Google Cloud Storage  URI of the form
+     * `gs://bucket_name/object_name`. Object versioning is not supported. See
+     * [Google Cloud Storage Request
+     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+     * 
+ * + * string gcs_image_uri = 1; + * @param value The bytes for gcsImageUri to set. + * @return This builder for chaining. + */ + public Builder setGcsImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString + getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @return This builder for chaining. + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + *
+     * The URI of the source image. Can be either:
+     * 1. A Google Cloud Storage URI of the form
+     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+     *    [Google Cloud Storage Request
+     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+     *    info.
+     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+     *    completed. Your request may fail if the specified host denies the
+     *    request (e.g. due to request throttling or DOS prevention), or if Google
+     *    throttles requests to the site for abuse prevention. You should not
+     *    depend on externally-hosted images for production applications.
+     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+     * precedence.
+     * 
+ * + * string image_uri = 2; + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageSource) + private static final com.google.cloud.vision.v1p4beta1.ImageSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageSource(); + } + + public static com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java new file mode 100644 index 000000000000..f0aaf41fdf8c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImageSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The gcsImageUri. + */ + java.lang.String getGcsImageUri(); + /** + *
+   * **Use `image_uri` instead.**
+   * The Google Cloud Storage  URI of the form
+   * `gs://bucket_name/object_name`. Object versioning is not supported. See
+   * [Google Cloud Storage Request
+   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
+   * 
+ * + * string gcs_image_uri = 1; + * @return The bytes for gcsImageUri. + */ + com.google.protobuf.ByteString + getGcsImageUriBytes(); + + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The imageUri. + */ + java.lang.String getImageUri(); + /** + *
+   * The URI of the source image. Can be either:
+   * 1. A Google Cloud Storage URI of the form
+   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
+   *    [Google Cloud Storage Request
+   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
+   *    info.
+   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
+   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
+   *    completed. Your request may fail if the specified host denies the
+   *    request (e.g. due to request throttling or DOS prevention), or if Google
+   *    throttles requests to the site for abuse prevention. You should not
+   *    depend on externally-hosted images for production applications.
+   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
+   * precedence.
+   * 
+ * + * string image_uri = 2; + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString + getImageUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java new file mode 100644 index 000000000000..fb590200bfe8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java @@ -0,0 +1,933 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The Google Cloud Storage location for a csv file which preserves a list of
+ * ImportProductSetRequests in each line.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} + */ +public final class ImportProductSetsGcsSource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) + ImportProductSetsGcsSourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsGcsSource.newBuilder() to construct. + private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsGcsSource() { + csvFileUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsGcsSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsGcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + csvFileUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder.class); + } + + public static final int CSV_FILE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object csvFileUri_; + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+   * and the `labels` column refers to
+   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+   * field for the product to a space (" "). You can update the `display_name`
+   * later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + @java.lang.Override + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } + } + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+   * and the `labels` column refers to
+   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+   * field for the product to a space (" "). You can update the `display_name`
+   * later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) obj; + + if (!getCsvFileUri() + .equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getCsvFileUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list of
+   * ImportProductSetRequests in each line.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + csvFileUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource build() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource buildPartial() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource(this); + result.csvFileUri_ = csvFileUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource other) { + if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance()) return this; + if (!other.getCsvFileUri().isEmpty()) { + csvFileUri_ = other.csvFileUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object csvFileUri_ = ""; + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+     * and the `labels` column refers to
+     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+     * field for the product to a space (" "). You can update the `display_name`
+     * later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + public java.lang.String getCsvFileUri() { + java.lang.Object ref = csvFileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csvFileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+     * and the `labels` column refers to
+     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+     * field for the product to a space (" "). You can update the `display_name`
+     * later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + public com.google.protobuf.ByteString + getCsvFileUriBytes() { + java.lang.Object ref = csvFileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + csvFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+     * and the `labels` column refers to
+     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+     * field for the product to a space (" "). You can update the `display_name`
+     * later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @param value The csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + csvFileUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+     * and the `labels` column refers to
+     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+     * field for the product to a space (" "). You can update the `display_name`
+     * later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @return This builder for chaining. + */ + public Builder clearCsvFileUri() { + + csvFileUri_ = getDefaultInstance().getCsvFileUri(); + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Storage URI of the input csv file.
+     * The URI must start with `gs://`.
+     * The format of the input csv file should be one image per line.
+     * In each line, there are 8 columns.
+     * 1.  image-uri
+     * 2.  image-id
+     * 3.  product-set-id
+     * 4.  product-id
+     * 5.  product-category
+     * 6.  product-display-name
+     * 7.  labels
+     * 8.  bounding-poly
+     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+     * columns are required. All other columns are optional.
+     * If the `ProductSet` or `Product` specified by the `product-set-id` and
+     * `product-id` values does not exist, then the system will create a new
+     * `ProductSet` or `Product` for the image. In this case, the
+     * `product-display-name` column refers to
+     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+     * `product-category` column refers to
+     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+     * and the `labels` column refers to
+     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+     * The `image-id` column is optional but must be unique if provided. If it is
+     * empty, the system will automatically assign a unique id to the image.
+     * The `product-display-name` column is optional. If it is empty, the system
+     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+     * field for the product to a space (" "). You can update the `display_name`
+     * later by using the API.
+     * If a `Product` with the specified `product-id` already exists, then the
+     * system ignores the `product-display-name`, `product-category`, and `labels`
+     * columns.
+     * The `labels` column (optional) is a line containing a list of
+     * comma-separated key-value pairs, in the following format:
+     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+     * The `bounding-poly` column (optional) identifies one region of
+     * interest from the image in the same manner as `CreateReferenceImage`. If
+     * you do not specify the `bounding-poly` column, then the system will try to
+     * detect regions of interest automatically.
+     * At most one `bounding-poly` column is allowed per line. If the image
+     * contains multiple regions of interest, add a line to the CSV file that
+     * includes the same product information, and the `bounding-poly` values for
+     * each region of interest.
+     * The `bounding-poly` column must contain an even number of comma-separated
+     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+     * non-negative integers for absolute bounding polygons, and float values
+     * in [0, 1] for normalized bounding polygons.
+     * The system will resize the image if the image resolution is too
+     * large to process (larger than 20MP).
+     * 
+ * + * string csv_file_uri = 1; + * @param value The bytes for csvFileUri to set. + * @return This builder for chaining. + */ + public Builder setCsvFileUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + csvFileUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) + private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource(); + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsGcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsGcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java new file mode 100644 index 000000000000..adea37a5b395 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java @@ -0,0 +1,125 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImportProductSetsGcsSourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+   * and the `labels` column refers to
+   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+   * field for the product to a space (" "). You can update the `display_name`
+   * later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The csvFileUri. + */ + java.lang.String getCsvFileUri(); + /** + *
+   * The Google Cloud Storage URI of the input csv file.
+   * The URI must start with `gs://`.
+   * The format of the input csv file should be one image per line.
+   * In each line, there are 8 columns.
+   * 1.  image-uri
+   * 2.  image-id
+   * 3.  product-set-id
+   * 4.  product-id
+   * 5.  product-category
+   * 6.  product-display-name
+   * 7.  labels
+   * 8.  bounding-poly
+   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
+   * columns are required. All other columns are optional.
+   * If the `ProductSet` or `Product` specified by the `product-set-id` and
+   * `product-id` values does not exist, then the system will create a new
+   * `ProductSet` or `Product` for the image. In this case, the
+   * `product-display-name` column refers to
+   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
+   * `product-category` column refers to
+   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
+   * and the `labels` column refers to
+   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
+   * The `image-id` column is optional but must be unique if provided. If it is
+   * empty, the system will automatically assign a unique id to the image.
+   * The `product-display-name` column is optional. If it is empty, the system
+   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
+   * field for the product to a space (" "). You can update the `display_name`
+   * later by using the API.
+   * If a `Product` with the specified `product-id` already exists, then the
+   * system ignores the `product-display-name`, `product-category`, and `labels`
+   * columns.
+   * The `labels` column (optional) is a line containing a list of
+   * comma-separated key-value pairs, in the following format:
+   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
+   * The `bounding-poly` column (optional) identifies one region of
+   * interest from the image in the same manner as `CreateReferenceImage`. If
+   * you do not specify the `bounding-poly` column, then the system will try to
+   * detect regions of interest automatically.
+   * At most one `bounding-poly` column is allowed per line. If the image
+   * contains multiple regions of interest, add a line to the CSV file that
+   * includes the same product information, and the `bounding-poly` values for
+   * each region of interest.
+   * The `bounding-poly` column must contain an even number of comma-separated
+   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
+   * non-negative integers for absolute bounding polygons, and float values
+   * in [0, 1] for normalized bounding polygons.
+   * The system will resize the image if the image resolution is too
+   * large to process (larger than 20MP).
+   * 
+ * + * string csv_file_uri = 1; + * @return The bytes for csvFileUri. + */ + com.google.protobuf.ByteString + getCsvFileUriBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java new file mode 100644 index 000000000000..c703bb523c0e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java @@ -0,0 +1,773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The input content for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} + */ +public final class ImportProductSetsInputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) + ImportProductSetsInputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsInputConfig.newBuilder() to construct. + private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsInputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: return GCS_SOURCE; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The input content for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig build() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig buildPartial() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig(this); + if (sourceCase_ == 1) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig other) { + if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case GCS_SOURCE: { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1 && + source_ != com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance()) { + source_ = com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + gcsSourceBuilder_.mergeFrom(value); + } else { + gcsSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; + } + return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + } + /** + *
+     * The Google Cloud Storage location for a csv file which preserves a list
+     * of ImportProductSetRequests in each line.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder>( + (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged();; + return gcsSourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) + private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig(); + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsInputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsInputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java new file mode 100644 index 000000000000..a76404b96397 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImportProductSetsInputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location for a csv file which preserves a list
+   * of ImportProductSetRequests in each line.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); + + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.SourceCase getSourceCase(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java new file mode 100644 index 000000000000..660a4779ac47 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `ImportProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsRequest} + */ +public final class ImportProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) + ImportProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsRequest.newBuilder() to construct. + private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_; + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + @java.lang.Override + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig() { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inputConfig_ != null) { + output.writeMessage(2, getInputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig() + .equals(other.getInputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ImportProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest build() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest(this); + result.parent_ = parent_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project in which the ProductSets should be imported.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInputConfig( + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null ? + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; + } + } + /** + *
+     * Required. The input content for the list of requests.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder>( + getInputConfig(), + getParentForChildren(), + isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) + private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..719684bff187 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImportProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project in which the ProductSets should be imported.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inputConfig field is set. + */ + boolean hasInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inputConfig. + */ + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig(); + /** + *
+   * Required. The input content for the list of requests.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java new file mode 100644 index 000000000000..46f251f6a0cb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java @@ -0,0 +1,1414 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response message for the `ImportProductSets` method.
+ * This message is returned by the
+ * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+ * method in the returned
+ * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsResponse} + */ +public final class ImportProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) + ImportProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImportProductSetsResponse.newBuilder() to construct. + private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImportProductSetsResponse() { + referenceImages_ = java.util.Collections.emptyList(); + statuses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImportProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImportProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + statuses_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int STATUSES_FIELD_NUMBER = 2; + private java.util.List statuses_; + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List getStatusesList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public java.util.List + getStatusesOrBuilderList() { + return statuses_; + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public int getStatusesCount() { + return statuses_.size(); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.Status getStatuses(int index) { + return statuses_.get(index); + } + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + return statuses_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + output.writeMessage(2, statuses_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + for (int i = 0; i < statuses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, statuses_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (!getStatusesList() + .equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + if (getStatusesCount() > 0) { + hash = (37 * hash) + STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getStatusesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ImportProductSets` method.
+   * This message is returned by the
+   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+   * method in the returned
+   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + getStatusesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + statusesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse build() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + if (statusesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.statuses_ = statuses_; + } else { + result.statuses_ = statusesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (statusesBuilder_ == null) { + if (!other.statuses_.isEmpty()) { + if (statuses_.isEmpty()) { + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatusesIsMutable(); + statuses_.addAll(other.statuses_); + } + onChanged(); + } + } else { + if (!other.statuses_.isEmpty()) { + if (statusesBuilder_.isEmpty()) { + statusesBuilder_.dispose(); + statusesBuilder_ = null; + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + statusesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStatusesFieldBuilder() : null; + } else { + statusesBuilder_.addAllMessages(other.statuses_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference_images that are imported successfully.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private java.util.List statuses_ = + java.util.Collections.emptyList(); + private void ensureStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(statuses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; + + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List getStatusesList() { + if (statusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(statuses_); + } else { + return statusesBuilder_.getMessageList(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public int getStatusesCount() { + if (statusesBuilder_ == null) { + return statuses_.size(); + } else { + return statusesBuilder_.getCount(); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status getStatuses(int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); + } else { + return statusesBuilder_.getMessage(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.set(index, value); + onChanged(); + } else { + statusesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder setStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.set(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses(com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(value); + onChanged(); + } else { + statusesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status value) { + if (statusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(index, value); + onChanged(); + } else { + statusesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addStatuses( + int index, com.google.rpc.Status.Builder builderForValue) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.add(index, builderForValue.build()); + onChanged(); + } else { + statusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder addAllStatuses( + java.lang.Iterable values) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, statuses_); + onChanged(); + } else { + statusesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder clearStatuses() { + if (statusesBuilder_ == null) { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + statusesBuilder_.clear(); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public Builder removeStatuses(int index) { + if (statusesBuilder_ == null) { + ensureStatusesIsMutable(); + statuses_.remove(index); + onChanged(); + } else { + statusesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder getStatusesBuilder( + int index) { + return getStatusesFieldBuilder().getBuilder(index); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index) { + if (statusesBuilder_ == null) { + return statuses_.get(index); } else { + return statusesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesOrBuilderList() { + if (statusesBuilder_ != null) { + return statusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(statuses_); + } + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder() { + return getStatusesFieldBuilder().addBuilder( + com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public com.google.rpc.Status.Builder addStatusesBuilder( + int index) { + return getStatusesFieldBuilder().addBuilder( + index, com.google.rpc.Status.getDefaultInstance()); + } + /** + *
+     * The rpc status for each ImportProductSet request, including both successes
+     * and errors.
+     * The number of statuses here matches the number of lines in the csv file,
+     * and statuses[i] stores the success or failure status of processing the i-th
+     * line of the csv, starting from line 0.
+     * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + public java.util.List + getStatusesBuilderList() { + return getStatusesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusesFieldBuilder() { + if (statusesBuilder_ == null) { + statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + statuses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + statuses_ = null; + } + return statusesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) + private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..01f166bcc1ee --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ImportProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference_images that are imported successfully.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.Status getStatuses(int index); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + int getStatusesCount(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + java.util.List + getStatusesOrBuilderList(); + /** + *
+   * The rpc status for each ImportProductSet request, including both successes
+   * and errors.
+   * The number of statuses here matches the number of lines in the csv file,
+   * and statuses[i] stores the success or failure status of processing the i-th
+   * line of the csv, starting from line 0.
+   * 
+ * + * repeated .google.rpc.Status statuses = 2; + */ + com.google.rpc.StatusOrBuilder getStatusesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java new file mode 100644 index 000000000000..3cb8c40cee18 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java @@ -0,0 +1,938 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The desired input location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.InputConfig} + */ +public final class InputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.InputConfig) + InputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputConfig() { + content_ = com.google.protobuf.ByteString.EMPTY; + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.GcsSource.Builder subBuilder = null; + if (gcsSource_ != null) { + subBuilder = gcsSource_.toBuilder(); + } + gcsSource_ = input.readMessage(com.google.cloud.vision.v1p4beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsSource_); + gcsSource_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: { + + content_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.InputConfig.class, com.google.cloud.vision.v1p4beta1.InputConfig.Builder.class); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_; + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return gcsSource_ != null; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource() { + return gcsSource_ == null ? com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + return getGcsSource(); + } + + public static final int CONTENT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString content_; + /** + *
+   * File content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateFiles requests. It does
+   * not work for AsyncBatchAnnotateFiles requests.
+   * 
+ * + * bytes content = 3; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsSource_ != null) { + output.writeMessage(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + if (!content_.isEmpty()) { + output.writeBytes(3, content_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsSource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsSource()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + if (!content_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, content_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.InputConfig other = (com.google.cloud.vision.v1p4beta1.InputConfig) obj; + + if (hasGcsSource() != other.hasGcsSource()) return false; + if (hasGcsSource()) { + if (!getGcsSource() + .equals(other.getGcsSource())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (!getMimeType() + .equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsSource()) { + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired input location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.InputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.InputConfig) + com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.InputConfig.class, com.google.cloud.vision.v1p4beta1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + content_ = com.google.protobuf.ByteString.EMPTY; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig build() { + com.google.cloud.vision.v1p4beta1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig buildPartial() { + com.google.cloud.vision.v1p4beta1.InputConfig result = new com.google.cloud.vision.v1p4beta1.InputConfig(this); + if (gcsSourceBuilder_ == null) { + result.gcsSource_ = gcsSource_; + } else { + result.gcsSource_ = gcsSourceBuilder_.build(); + } + result.content_ = content_; + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.InputConfig) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.InputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.InputConfig other) { + if (other == com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()) return this; + if (other.hasGcsSource()) { + mergeGcsSource(other.getGcsSource()); + } + if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { + setContent(other.getContent()); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder> gcsSourceBuilder_; + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + public boolean hasGcsSource() { + return gcsSourceBuilder_ != null || gcsSource_ != null; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + public com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + return gcsSource_ == null ? com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; + } else { + return gcsSourceBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource(com.google.cloud.vision.v1p4beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsSource_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public Builder setGcsSource( + com.google.cloud.vision.v1p4beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + gcsSource_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public Builder mergeGcsSource(com.google.cloud.vision.v1p4beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (gcsSource_ != null) { + gcsSource_ = + com.google.cloud.vision.v1p4beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); + } else { + gcsSource_ = value; + } + onChanged(); + } else { + gcsSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + gcsSource_ = null; + onChanged(); + } else { + gcsSource_ = null; + gcsSourceBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p4beta1.GcsSource.Builder getGcsSourceBuilder() { + + onChanged(); + return getGcsSourceFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + public com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (gcsSourceBuilder_ != null) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + return gcsSource_ == null ? + com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; + } + } + /** + *
+     * The Google Cloud Storage location to read the input from.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder>( + getGcsSource(), + getParentForChildren(), + isClean()); + gcsSource_ = null; + } + return gcsSourceBuilder_; + } + + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @return The content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + *
+     * File content, represented as a stream of bytes.
+     * Note: As with all `bytes` fields, protobuffers use a pure binary
+     * representation, whereas JSON representations use base64.
+     * Currently, this field only works for BatchAnnotateFiles requests. It does
+     * not work for AsyncBatchAnnotateFiles requests.
+     * 
+ * + * bytes content = 3; + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString + getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @return This builder for chaining. + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + *
+     * The type of the file. Currently only "application/pdf", "image/tiff" and
+     * "image/gif" are supported. Wildcards are not supported.
+     * 
+ * + * string mime_type = 2; + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.InputConfig) + private static final com.google.cloud.vision.v1p4beta1.InputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.InputConfig(); + } + + public static com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..9f58b2070c43 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface InputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + * @return The gcsSource. + */ + com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource(); + /** + *
+   * The Google Cloud Storage location to read the input from.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; + */ + com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + *
+   * File content, represented as a stream of bytes.
+   * Note: As with all `bytes` fields, protobuffers use a pure binary
+   * representation, whereas JSON representations use base64.
+   * Currently, this field only works for BatchAnnotateFiles requests. It does
+   * not work for AsyncBatchAnnotateFiles requests.
+   * 
+ * + * bytes content = 3; + * @return The content. + */ + com.google.protobuf.ByteString getContent(); + + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The mimeType. + */ + java.lang.String getMimeType(); + /** + *
+   * The type of the file. Currently only "application/pdf", "image/tiff" and
+   * "image/gif" are supported. Wildcards are not supported.
+   * 
+ * + * string mime_type = 2; + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString + getMimeTypeBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java new file mode 100644 index 000000000000..e0df3f18e7dc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Rectangle determined by min and max `LatLng` pairs.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LatLongRect} + */ +public final class LatLongRect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LatLongRect) + LatLongRectOrBuilder { +private static final long serialVersionUID = 0L; + // Use LatLongRect.newBuilder() to construct. + private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LatLongRect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LatLongRect(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LatLongRect( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (minLatLng_ != null) { + subBuilder = minLatLng_.toBuilder(); + } + minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minLatLng_); + minLatLng_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.type.LatLng.Builder subBuilder = null; + if (maxLatLng_ != null) { + subBuilder = maxLatLng_.toBuilder(); + } + maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxLatLng_); + maxLatLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LatLongRect.class, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder.class); + } + + public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng minLatLng_; + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + @java.lang.Override + public boolean hasMinLatLng() { + return minLatLng_ != null; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMinLatLng() { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + return getMinLatLng(); + } + + public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; + private com.google.type.LatLng maxLatLng_; + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + @java.lang.Override + public boolean hasMaxLatLng() { + return maxLatLng_ != null; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + @java.lang.Override + public com.google.type.LatLng getMaxLatLng() { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + return getMaxLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minLatLng_ != null) { + output.writeMessage(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + output.writeMessage(2, getMaxLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinLatLng()); + } + if (maxLatLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LatLongRect)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.LatLongRect other = (com.google.cloud.vision.v1p4beta1.LatLongRect) obj; + + if (hasMinLatLng() != other.hasMinLatLng()) return false; + if (hasMinLatLng()) { + if (!getMinLatLng() + .equals(other.getMinLatLng())) return false; + } + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; + if (hasMaxLatLng()) { + if (!getMaxLatLng() + .equals(other.getMaxLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinLatLng()) { + hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMinLatLng().hashCode(); + } + if (hasMaxLatLng()) { + hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getMaxLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LatLongRect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rectangle determined by min and max `LatLng` pairs.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LatLongRect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LatLongRect) + com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LatLongRect.class, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.LatLongRect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRect build() { + com.google.cloud.vision.v1p4beta1.LatLongRect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRect buildPartial() { + com.google.cloud.vision.v1p4beta1.LatLongRect result = new com.google.cloud.vision.v1p4beta1.LatLongRect(this); + if (minLatLngBuilder_ == null) { + result.minLatLng_ = minLatLng_; + } else { + result.minLatLng_ = minLatLngBuilder_.build(); + } + if (maxLatLngBuilder_ == null) { + result.maxLatLng_ = maxLatLng_; + } else { + result.maxLatLng_ = maxLatLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.LatLongRect) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.LatLongRect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LatLongRect other) { + if (other == com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance()) return this; + if (other.hasMinLatLng()) { + mergeMinLatLng(other.getMinLatLng()); + } + if (other.hasMaxLatLng()) { + mergeMaxLatLng(other.getMaxLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.LatLongRect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.LatLongRect) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng minLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + public boolean hasMinLatLng() { + return minLatLngBuilder_ != null || minLatLng_ != null; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + public com.google.type.LatLng getMinLatLng() { + if (minLatLngBuilder_ == null) { + return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } else { + return minLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minLatLng_ = value; + onChanged(); + } else { + minLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder setMinLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (minLatLngBuilder_ == null) { + minLatLng_ = builderForValue.build(); + onChanged(); + } else { + minLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder mergeMinLatLng(com.google.type.LatLng value) { + if (minLatLngBuilder_ == null) { + if (minLatLng_ != null) { + minLatLng_ = + com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); + } else { + minLatLng_ = value; + } + onChanged(); + } else { + minLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public Builder clearMinLatLng() { + if (minLatLngBuilder_ == null) { + minLatLng_ = null; + onChanged(); + } else { + minLatLng_ = null; + minLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLng.Builder getMinLatLngBuilder() { + + onChanged(); + return getMinLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { + if (minLatLngBuilder_ != null) { + return minLatLngBuilder_.getMessageOrBuilder(); + } else { + return minLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : minLatLng_; + } + } + /** + *
+     * Min lat/long pair.
+     * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMinLatLngFieldBuilder() { + if (minLatLngBuilder_ == null) { + minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMinLatLng(), + getParentForChildren(), + isClean()); + minLatLng_ = null; + } + return minLatLngBuilder_; + } + + private com.google.type.LatLng maxLatLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + public boolean hasMaxLatLng() { + return maxLatLngBuilder_ != null || maxLatLng_ != null; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + public com.google.type.LatLng getMaxLatLng() { + if (maxLatLngBuilder_ == null) { + return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } else { + return maxLatLngBuilder_.getMessage(); + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxLatLng_ = value; + onChanged(); + } else { + maxLatLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder setMaxLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = builderForValue.build(); + onChanged(); + } else { + maxLatLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder mergeMaxLatLng(com.google.type.LatLng value) { + if (maxLatLngBuilder_ == null) { + if (maxLatLng_ != null) { + maxLatLng_ = + com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); + } else { + maxLatLng_ = value; + } + onChanged(); + } else { + maxLatLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public Builder clearMaxLatLng() { + if (maxLatLngBuilder_ == null) { + maxLatLng_ = null; + onChanged(); + } else { + maxLatLng_ = null; + maxLatLngBuilder_ = null; + } + + return this; + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLng.Builder getMaxLatLngBuilder() { + + onChanged(); + return getMaxLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { + if (maxLatLngBuilder_ != null) { + return maxLatLngBuilder_.getMessageOrBuilder(); + } else { + return maxLatLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : maxLatLng_; + } + } + /** + *
+     * Max lat/long pair.
+     * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getMaxLatLngFieldBuilder() { + if (maxLatLngBuilder_ == null) { + maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getMaxLatLng(), + getParentForChildren(), + isClean()); + maxLatLng_ = null; + } + return maxLatLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LatLongRect) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LatLongRect) + private static final com.google.cloud.vision.v1p4beta1.LatLongRect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LatLongRect(); + } + + public static com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LatLongRect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LatLongRect(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java new file mode 100644 index 000000000000..cdbd20fc75c0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface LatLongRectOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LatLongRect) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return Whether the minLatLng field is set. + */ + boolean hasMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + * @return The minLatLng. + */ + com.google.type.LatLng getMinLatLng(); + /** + *
+   * Min lat/long pair.
+   * 
+ * + * .google.type.LatLng min_lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); + + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return Whether the maxLatLng field is set. + */ + boolean hasMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + * @return The maxLatLng. + */ + com.google.type.LatLng getMaxLatLng(); + /** + *
+   * Max lat/long pair.
+   * 
+ * + * .google.type.LatLng max_lat_lng = 2; + */ + com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java new file mode 100644 index 000000000000..c9e148cfe8f8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java @@ -0,0 +1,202 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A bucketized representation of likelihood, which is intended to give clients
+ * highly stable results across model upgrades.
+ * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+   * It is very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + *
+   * It is unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * It is possible.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + *
+   * It is likely.
+   * 
+ * + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * It is very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown likelihood.
+   * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+   * It is very unlikely.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + *
+   * It is unlikely.
+   * 
+ * + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * It is possible.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + *
+   * It is likely.
+   * 
+ * + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * It is very likely.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Likelihood) +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java new file mode 100644 index 000000000000..f06a7a0244ed --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java @@ -0,0 +1,848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsRequest} + */ +public final class ListProductSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductSetsRequest) + ListProductSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsRequest.newBuilder() to construct. + private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductSetsRequest) + com.google.cloud.vision.v1p4beta1.ListProductSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest build() { + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest result = new com.google.cloud.vision.v1p4beta1.ListProductSetsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project from which ProductSets should be listed.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsRequest) + private static final com.google.cloud.vision.v1p4beta1.ListProductSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductSetsRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java new file mode 100644 index 000000000000..123a9b78982c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project from which ProductSets should be listed.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java new file mode 100644 index 000000000000..1f6d9f941880 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response message for the `ListProductSets` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsResponse} + */ +public final class ListProductSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductSetsResponse) + ListProductSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductSetsResponse.newBuilder() to construct. + private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductSetsResponse() { + productSets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductSetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productSets_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.Builder.class); + } + + public static final int PRODUCT_SETS_FIELD_NUMBER = 1; + private java.util.List productSets_; + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List getProductSetsList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public java.util.List + getProductSetsOrBuilderList() { + return productSets_; + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public int getProductSetsCount() { + return productSets_.size(); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index) { + return productSets_.get(index); + } + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + return productSets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < productSets_.size(); i++) { + output.writeMessage(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < productSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, productSets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) obj; + + if (!getProductSetsList() + .equals(other.getProductSetsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductSetsCount() > 0) { + hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getProductSetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductSets` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductSetsResponse) + com.google.cloud.vision.v1p4beta1.ListProductSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductSetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productSetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse build() { + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse result = new com.google.cloud.vision.v1p4beta1.ListProductSetsResponse(this); + int from_bitField0_ = bitField0_; + if (productSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productSets_ = java.util.Collections.unmodifiableList(productSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productSets_ = productSets_; + } else { + result.productSets_ = productSetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductSetsResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance()) return this; + if (productSetsBuilder_ == null) { + if (!other.productSets_.isEmpty()) { + if (productSets_.isEmpty()) { + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductSetsIsMutable(); + productSets_.addAll(other.productSets_); + } + onChanged(); + } + } else { + if (!other.productSets_.isEmpty()) { + if (productSetsBuilder_.isEmpty()) { + productSetsBuilder_.dispose(); + productSetsBuilder_ = null; + productSets_ = other.productSets_; + bitField0_ = (bitField0_ & ~0x00000001); + productSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductSetsFieldBuilder() : null; + } else { + productSetsBuilder_.addAllMessages(other.productSets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List productSets_ = + java.util.Collections.emptyList(); + private void ensureProductSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productSets_ = new java.util.ArrayList(productSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetsBuilder_; + + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public java.util.List getProductSetsList() { + if (productSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productSets_); + } else { + return productSetsBuilder_.getMessageList(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public int getProductSetsCount() { + if (productSetsBuilder_ == null) { + return productSets_.size(); + } else { + return productSetsBuilder_.getCount(); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); + } else { + return productSetsBuilder_.getMessage(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.set(index, value); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder setProductSets( + int index, com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.set(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets(com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(value); + onChanged(); + } else { + productSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSetsIsMutable(); + productSets_.add(index, value); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder addProductSets( + int index, com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.add(index, builderForValue.build()); + onChanged(); + } else { + productSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder addAllProductSets( + java.lang.Iterable values) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productSets_); + onChanged(); + } else { + productSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder clearProductSets() { + if (productSetsBuilder_ == null) { + productSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productSetsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public Builder removeProductSets(int index) { + if (productSetsBuilder_ == null) { + ensureProductSetsIsMutable(); + productSets_.remove(index); + onChanged(); + } else { + productSetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index) { + if (productSetsBuilder_ == null) { + return productSets_.get(index); } else { + return productSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsOrBuilderList() { + if (productSetsBuilder_ != null) { + return productSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productSets_); + } + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet.Builder addProductSetsBuilder() { + return getProductSetsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet.Builder addProductSetsBuilder( + int index) { + return getProductSetsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()); + } + /** + *
+     * List of ProductSets.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + public java.util.List + getProductSetsBuilderList() { + return getProductSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> + getProductSetsFieldBuilder() { + if (productSetsBuilder_ == null) { + productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( + productSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productSets_ = null; + } + return productSetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsResponse) + private static final com.google.cloud.vision.v1p4beta1.ListProductSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductSetsResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java new file mode 100644 index 000000000000..d7fb99296f89 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + int getProductSetsCount(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + java.util.List + getProductSetsOrBuilderList(); + /** + *
+   * List of ProductSets.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; + */ + com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java new file mode 100644 index 000000000000..5a3f3996fa3a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} + */ +public final class ListProductsInProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) + ListProductsInProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetRequest.newBuilder() to construct. + private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest(this); + result.name_ = name_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The ProductSet resource for which to retrieve Products.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..d858818974e3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductsInProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The ProductSet resource for which to retrieve Products.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java new file mode 100644 index 000000000000..87c18456e001 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response message for the `ListProductsInProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} + */ +public final class ListProductsInProductSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) + ListProductsInProductSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsInProductSetResponse.newBuilder() to construct. + private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsInProductSetResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsInProductSetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsInProductSetResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProductsInProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse build() { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); + } + /** + *
+     * The list of Products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) + private static final com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsInProductSetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsInProductSetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java new file mode 100644 index 000000000000..f3bf900416d1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductsInProductSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + com.google.cloud.vision.v1p4beta1.Product getProducts(int index); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * The list of Products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java new file mode 100644 index 000000000000..a9f76c9e55e3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java @@ -0,0 +1,855 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsRequest} + */ +public final class ListProductsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsRequest) + ListProductsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsRequest.newBuilder() to construct. + private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsRequest) + com.google.cloud.vision.v1p4beta1.ListProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsRequest build() { + com.google.cloud.vision.v1p4beta1.ListProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductsRequest result = new com.google.cloud.vision.v1p4beta1.ListProductsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project OR ProductSet from which Products should be listed.
+     * Format:
+     * `projects/PROJECT_ID/locations/LOC_ID`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsRequest) + private static final com.google.cloud.vision.v1p4beta1.ListProductsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java new file mode 100644 index 000000000000..900fcf86f47b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project OR ProductSet from which Products should be listed.
+   * Format:
+   * `projects/PROJECT_ID/locations/LOC_ID`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java new file mode 100644 index 000000000000..ac7a78e41b78 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response message for the `ListProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsResponse} + */ +public final class ListProductsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsResponse) + ListProductsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListProductsResponse.newBuilder() to construct. + private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProductsResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProductsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProductsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { + return products_.get(index); + } + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListProductsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsResponse) obj; + + if (!getProductsList() + .equals(other.getProductsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsResponse) + com.google.cloud.vision.v1p4beta1.ListProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListProductsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsResponse build() { + com.google.cloud.vision.v1p4beta1.ListProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.ListProductsResponse result = new com.google.cloud.vision.v1p4beta1.ListProductsResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance()) return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductsFieldBuilder() : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListProductsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productsBuilder_; + + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p4beta1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder getProductsBuilder( + int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index) { + if (productsBuilder_ == null) { + return products_.get(index); } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder( + int index) { + return getProductsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); + } + /** + *
+     * List of products.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( + products_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsResponse) + private static final com.google.cloud.vision.v1p4beta1.ListProductsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java new file mode 100644 index 000000000000..5844ea2a17da --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListProductsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + java.util.List + getProductsList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + com.google.cloud.vision.v1p4beta1.Product getProducts(int index); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + int getProductsCount(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + /** + *
+   * List of products.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product products = 1; + */ + com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java new file mode 100644 index 000000000000..45e744070dbf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java @@ -0,0 +1,869 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} + */ +public final class ListReferenceImagesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) + ListReferenceImagesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesRequest.newBuilder() to construct. + private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest build() { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the product containing the reference images.
+     * Format is
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token identifying a page of results to be returned. This is the value
+     * of `nextPageToken` returned in a previous reference image list request.
+     * Defaults to the first page if not specified.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) + private static final com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java new file mode 100644 index 000000000000..421a0803343d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java @@ -0,0 +1,67 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListReferenceImagesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Resource name of the product containing the reference images.
+   * Format is
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * A token identifying a page of results to be returned. This is the value
+   * of `nextPageToken` returned in a previous reference image list request.
+   * Defaults to the first page if not specified.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java new file mode 100644 index 000000000000..3edd79740df4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java @@ -0,0 +1,1118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Response message for the `ListReferenceImages` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} + */ +public final class ListReferenceImagesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) + ListReferenceImagesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListReferenceImagesResponse.newBuilder() to construct. + private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListReferenceImagesResponse() { + referenceImages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListReferenceImagesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListReferenceImagesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + referenceImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry)); + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.Builder.class); + } + + public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; + private java.util.List referenceImages_; + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List getReferenceImagesList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public java.util.List + getReferenceImagesOrBuilderList() { + return referenceImages_; + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public int getReferenceImagesCount() { + return referenceImages_.size(); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { + return referenceImages_.get(index); + } + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + return referenceImages_.get(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < referenceImages_.size(); i++) { + output.writeMessage(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < referenceImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, referenceImages_.get(i)); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) obj; + + if (!getReferenceImagesList() + .equals(other.getReferenceImagesList())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReferenceImagesCount() > 0) { + hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceImagesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for the `ListReferenceImages` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getReferenceImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referenceImagesBuilder_.clear(); + } + pageSize_ = 0; + + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse build() { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse buildPartial() { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse(this); + int from_bitField0_ = bitField0_; + if (referenceImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.referenceImages_ = referenceImages_; + } else { + result.referenceImages_ = referenceImagesBuilder_.build(); + } + result.pageSize_ = pageSize_; + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse other) { + if (other == com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance()) return this; + if (referenceImagesBuilder_ == null) { + if (!other.referenceImages_.isEmpty()) { + if (referenceImages_.isEmpty()) { + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferenceImagesIsMutable(); + referenceImages_.addAll(other.referenceImages_); + } + onChanged(); + } + } else { + if (!other.referenceImages_.isEmpty()) { + if (referenceImagesBuilder_.isEmpty()) { + referenceImagesBuilder_.dispose(); + referenceImagesBuilder_ = null; + referenceImages_ = other.referenceImages_; + bitField0_ = (bitField0_ & ~0x00000001); + referenceImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getReferenceImagesFieldBuilder() : null; + } else { + referenceImagesBuilder_.addAllMessages(other.referenceImages_); + } + } + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List referenceImages_ = + java.util.Collections.emptyList(); + private void ensureReferenceImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + referenceImages_ = new java.util.ArrayList(referenceImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; + + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List getReferenceImagesList() { + if (referenceImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(referenceImages_); + } else { + return referenceImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public int getReferenceImagesCount() { + if (referenceImagesBuilder_ == null) { + return referenceImages_.size(); + } else { + return referenceImagesBuilder_.getCount(); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); + } else { + return referenceImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, value); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder setReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.set(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { + if (referenceImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, value); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addReferenceImages( + int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.add(index, builderForValue.build()); + onChanged(); + } else { + referenceImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder addAllReferenceImages( + java.lang.Iterable values) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, referenceImages_); + onChanged(); + } else { + referenceImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder clearReferenceImages() { + if (referenceImagesBuilder_ == null) { + referenceImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referenceImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public Builder removeReferenceImages(int index) { + if (referenceImagesBuilder_ == null) { + ensureReferenceImagesIsMutable(); + referenceImages_.remove(index); + onChanged(); + } else { + referenceImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index) { + if (referenceImagesBuilder_ == null) { + return referenceImages_.get(index); } else { + return referenceImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesOrBuilderList() { + if (referenceImagesBuilder_ != null) { + return referenceImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(referenceImages_); + } + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder() { + return getReferenceImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder( + int index) { + return getReferenceImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); + } + /** + *
+     * The list of reference images.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + public java.util.List + getReferenceImagesBuilderList() { + return getReferenceImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> + getReferenceImagesFieldBuilder() { + if (referenceImagesBuilder_ == null) { + referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( + referenceImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + referenceImages_ = null; + } + return referenceImagesBuilder_; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of items to return. Default 10, maximum 100.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The next_page_token returned from a previous List request, if any.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) + private static final com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse(); + } + + public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListReferenceImagesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListReferenceImagesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java new file mode 100644 index 000000000000..0460633c3e20 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ListReferenceImagesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + int getReferenceImagesCount(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + java.util.List + getReferenceImagesOrBuilderList(); + /** + *
+   * The list of reference images.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; + */ + com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( + int index); + + /** + *
+   * The maximum number of items to return. Default 10, maximum 100.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The next_page_token returned from a previous List request, if any.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java new file mode 100644 index 000000000000..d1e2d9eafadc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java @@ -0,0 +1,1259 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Set of detected objects with bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} + */ +public final class LocalizedObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) + LocalizedObjectAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocalizedObjectAnnotation.newBuilder() to construct. + private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocalizedObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocalizedObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocalizedObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + case 42: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 5; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + if (boundingPoly_ != null) { + output.writeMessage(5, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of detected objects with bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation build() { + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * Image region to which this object belongs. This must be populated.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) + private static final com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalizedObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalizedObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java new file mode 100644 index 000000000000..f73265e41746 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface LocalizedObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+   * Object ID that should align with EntityAnnotation mid.
+   * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Object name, expressed in its `language_code` language.
+   * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Score of the result. Range [0, 1].
+   * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * Image region to which this object belongs. This must be populated.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java new file mode 100644 index 000000000000..7f8849a10f22 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Detected entity location information.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LocationInfo} + */ +public final class LocationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LocationInfo) + LocationInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use LocationInfo.newBuilder() to construct. + private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LocationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LocationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LocationInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.LatLng.Builder subBuilder = null; + if (latLng_ != null) { + subBuilder = latLng_.toBuilder(); + } + latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latLng_); + latLng_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LocationInfo.class, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder.class); + } + + public static final int LAT_LNG_FIELD_NUMBER = 1; + private com.google.type.LatLng latLng_; + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + @java.lang.Override + public boolean hasLatLng() { + return latLng_ != null; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + @java.lang.Override + public com.google.type.LatLng getLatLng() { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + return getLatLng(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (latLng_ != null) { + output.writeMessage(1, getLatLng()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (latLng_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatLng()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LocationInfo)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.LocationInfo other = (com.google.cloud.vision.v1p4beta1.LocationInfo) obj; + + if (hasLatLng() != other.hasLatLng()) return false; + if (hasLatLng()) { + if (!getLatLng() + .equals(other.getLatLng())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLatLng()) { + hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; + hash = (53 * hash) + getLatLng().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LocationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected entity location information.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.LocationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LocationInfo) + com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.LocationInfo.class, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.LocationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (latLngBuilder_ == null) { + latLng_ = null; + } else { + latLng_ = null; + latLngBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfo build() { + com.google.cloud.vision.v1p4beta1.LocationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfo buildPartial() { + com.google.cloud.vision.v1p4beta1.LocationInfo result = new com.google.cloud.vision.v1p4beta1.LocationInfo(this); + if (latLngBuilder_ == null) { + result.latLng_ = latLng_; + } else { + result.latLng_ = latLngBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.LocationInfo) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.LocationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LocationInfo other) { + if (other == com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()) return this; + if (other.hasLatLng()) { + mergeLatLng(other.getLatLng()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.LocationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.LocationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.LatLng latLng_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + public boolean hasLatLng() { + return latLngBuilder_ != null || latLng_ != null; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + public com.google.type.LatLng getLatLng() { + if (latLngBuilder_ == null) { + return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; + } else { + return latLngBuilder_.getMessage(); + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latLng_ = value; + onChanged(); + } else { + latLngBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder setLatLng( + com.google.type.LatLng.Builder builderForValue) { + if (latLngBuilder_ == null) { + latLng_ = builderForValue.build(); + onChanged(); + } else { + latLngBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder mergeLatLng(com.google.type.LatLng value) { + if (latLngBuilder_ == null) { + if (latLng_ != null) { + latLng_ = + com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); + } else { + latLng_ = value; + } + onChanged(); + } else { + latLngBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public Builder clearLatLng() { + if (latLngBuilder_ == null) { + latLng_ = null; + onChanged(); + } else { + latLng_ = null; + latLngBuilder_ = null; + } + + return this; + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLng.Builder getLatLngBuilder() { + + onChanged(); + return getLatLngFieldBuilder().getBuilder(); + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { + if (latLngBuilder_ != null) { + return latLngBuilder_.getMessageOrBuilder(); + } else { + return latLng_ == null ? + com.google.type.LatLng.getDefaultInstance() : latLng_; + } + } + /** + *
+     * lat/long location coordinates.
+     * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLatLngFieldBuilder() { + if (latLngBuilder_ == null) { + latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( + getLatLng(), + getParentForChildren(), + isClean()); + latLng_ = null; + } + return latLngBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LocationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocationInfo) + private static final com.google.cloud.vision.v1p4beta1.LocationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LocationInfo(); + } + + public static com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java new file mode 100644 index 000000000000..f186f7fc05ec --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface LocationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LocationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return Whether the latLng field is set. + */ + boolean hasLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + * @return The latLng. + */ + com.google.type.LatLng getLatLng(); + /** + *
+   * lat/long location coordinates.
+   * 
+ * + * .google.type.LatLng lat_lng = 1; + */ + com.google.type.LatLngOrBuilder getLatLngOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java new file mode 100644 index 000000000000..be3765fca205 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java new file mode 100644 index 000000000000..8a6062a4abb5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java @@ -0,0 +1,597 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.NormalizedVertex} + */ +public final class NormalizedVertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.NormalizedVertex) + NormalizedVertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NormalizedVertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NormalizedVertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.NormalizedVertex.class, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.NormalizedVertex other = (com.google.cloud.vision.v1p4beta1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.NormalizedVertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.NormalizedVertex) + com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.NormalizedVertex.class, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertex build() { + com.google.cloud.vision.v1p4beta1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertex buildPartial() { + com.google.cloud.vision.v1p4beta1.NormalizedVertex result = new com.google.cloud.vision.v1p4beta1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.NormalizedVertex) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.NormalizedVertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.NormalizedVertex other) { + if (other == com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.NormalizedVertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.NormalizedVertex) + private static final com.google.cloud.vision.v1p4beta1.NormalizedVertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.NormalizedVertex(); + } + + public static com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..80edfacff25d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface NormalizedVertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java new file mode 100644 index 000000000000..87edb7fc713d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java @@ -0,0 +1,1204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Contains metadata for the BatchAnnotateImages operation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.OperationMetadata} + */ +public final class OperationMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.OperationMetadata) + OperationMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OperationMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.OperationMetadata.class, com.google.cloud.vision.v1p4beta1.OperationMetadata.Builder.class); + } + + /** + *
+   * Batch operation states.
+   * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.OperationMetadata.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Invalid.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Request is received.
+     * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + *
+     * Request is actively being processed.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + *
+     * The batch processing is done.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + /** + *
+     * The batch processing was cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return CREATED; + case 2: return RUNNING; + case 3: return DONE; + case 4: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.OperationMetadata.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.OperationMetadata.State result = com.google.cloud.vision.v1p4beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p4beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (state_ != com.google.cloud.vision.v1p4beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.vision.v1p4beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.OperationMetadata other = (com.google.cloud.vision.v1p4beta1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Contains metadata for the BatchAnnotateImages operation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.OperationMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.OperationMetadata) + com.google.cloud.vision.v1p4beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.OperationMetadata.class, com.google.cloud.vision.v1p4beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OperationMetadata build() { + com.google.cloud.vision.v1p4beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OperationMetadata buildPartial() { + com.google.cloud.vision.v1p4beta1.OperationMetadata result = new com.google.cloud.vision.v1p4beta1.OperationMetadata(this); + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.OperationMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.OperationMetadata other) { + if (other == com.google.cloud.vision.v1p4beta1.OperationMetadata.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The state. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.OperationMetadata.State result = com.google.cloud.vision.v1p4beta1.OperationMetadata.State.valueOf(state_); + return result == null ? com.google.cloud.vision.v1p4beta1.OperationMetadata.State.UNRECOGNIZED : result; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.vision.v1p4beta1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Current state of the batch operation.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time when the batch request was received.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The time when the operation result was last updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OperationMetadata) + private static final com.google.cloud.vision.v1p4beta1.OperationMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.OperationMetadata(); + } + + public static com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..3bb8651242c7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface OperationMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Current state of the batch operation.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; + * @return The state. + */ + com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState(); + + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time when the batch request was received.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The time when the operation result was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java new file mode 100644 index 000000000000..6bdb7e150e4e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java @@ -0,0 +1,777 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * The desired output location and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.GcsDestination.Builder subBuilder = null; + if (gcsDestination_ != null) { + subBuilder = gcsDestination_.toBuilder(); + } + gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p4beta1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(gcsDestination_); + gcsDestination_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + batchSize_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.OutputConfig.class, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder.class); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_; + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return gcsDestination_ != null; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination() { + return gcsDestination_ == null ? com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + return getGcsDestination(); + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_; + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (gcsDestination_ != null) { + output.writeMessage(1, getGcsDestination()); + } + if (batchSize_ != 0) { + output.writeInt32(2, batchSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gcsDestination_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getGcsDestination()); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, batchSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.OutputConfig other = (com.google.cloud.vision.v1p4beta1.OutputConfig) obj; + + if (hasGcsDestination() != other.hasGcsDestination()) return false; + if (hasGcsDestination()) { + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + } + if (getBatchSize() + != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGcsDestination()) { + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + } + hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The desired output location and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.OutputConfig) + com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.OutputConfig.class, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + batchSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig build() { + com.google.cloud.vision.v1p4beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig buildPartial() { + com.google.cloud.vision.v1p4beta1.OutputConfig result = new com.google.cloud.vision.v1p4beta1.OutputConfig(this); + if (gcsDestinationBuilder_ == null) { + result.gcsDestination_ = gcsDestination_; + } else { + result.gcsDestination_ = gcsDestinationBuilder_.build(); + } + result.batchSize_ = batchSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.OutputConfig) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.OutputConfig other) { + if (other == com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()) return this; + if (other.hasGcsDestination()) { + mergeGcsDestination(other.getGcsDestination()); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return gcsDestinationBuilder_ != null || gcsDestination_ != null; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + public com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + return gcsDestination_ == null ? com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } else { + return gcsDestinationBuilder_.getMessage(); + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.vision.v1p4beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcsDestination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.vision.v1p4beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.vision.v1p4beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (gcsDestination_ != null) { + gcsDestination_ = + com.google.cloud.vision.v1p4beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); + } else { + gcsDestination_ = value; + } + onChanged(); + } else { + gcsDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + gcsDestination_ = null; + onChanged(); + } else { + gcsDestination_ = null; + gcsDestinationBuilder_ = null; + } + + return this; + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p4beta1.GcsDestination.Builder getGcsDestinationBuilder() { + + onChanged(); + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (gcsDestinationBuilder_ != null) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + return gcsDestination_ == null ? + com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; + } + } + /** + *
+     * The Google Cloud Storage location to write the output(s) to.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder>( + getGcsDestination(), + getParentForChildren(), + isClean()); + gcsDestination_ = null; + } + return gcsDestinationBuilder_; + } + + private int batchSize_ ; + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The max number of response protos to put into each output JSON file on
+     * Google Cloud Storage.
+     * The valid range is [1, 100]. If not specified, the default value is 20.
+     * For example, for one pdf file with 100 pages, 100 response protos will
+     * be generated. If `batch_size` = 20, then 5 json files each
+     * containing 20 response protos will be written under the prefix
+     * `gcs_destination`.`uri`.
+     * Currently, batch_size only applies to GcsDestination, with potential future
+     * support for other output configurations.
+     * 
+ * + * int32 batch_size = 2; + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + + batchSize_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OutputConfig) + private static final com.google.cloud.vision.v1p4beta1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.OutputConfig(); + } + + public static com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..3548d5df257c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination(); + /** + *
+   * The Google Cloud Storage location to write the output(s) to.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * The max number of response protos to put into each output JSON file on
+   * Google Cloud Storage.
+   * The valid range is [1, 100]. If not specified, the default value is 20.
+   * For example, for one pdf file with 100 pages, 100 response protos will
+   * be generated. If `batch_size` = 20, then 5 json files each
+   * containing 20 response protos will be written under the prefix
+   * `gcs_destination`.`uri`.
+   * Currently, batch_size only applies to GcsDestination, with potential future
+   * support for other output configurations.
+   * 
+ * + * int32 batch_size = 2; + * @return The batchSize. + */ + int getBatchSize(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java new file mode 100644 index 000000000000..779046420894 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java @@ -0,0 +1,1358 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Detected page from OCR.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Page} + */ +public final class Page extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Page) + PageOrBuilder { +private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Page() { + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Page(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Page( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + width_ = input.readInt32(); + break; + } + case 24: { + + height_ = input.readInt32(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blocks_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Block.parser(), extensionRegistry)); + break; + } + case 45: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Page.class, com.google.cloud.vision.v1p4beta1.Page.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_; + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int BLOCKS_FIELD_NUMBER = 4; + private java.util.List blocks_; + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + @java.lang.Override + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + @java.lang.Override + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 5; + private float confidence_; + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(5, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, height_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, blocks_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Page)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Page other = (com.google.cloud.vision.v1p4beta1.Page) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!getBlocksList() + .equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Page parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Page parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Page prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Detected page from OCR.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Page} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Page) + com.google.cloud.vision.v1p4beta1.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Page.class, com.google.cloud.vision.v1p4beta1.Page.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Page.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + width_ = 0; + + height_ = 0; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blocksBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Page getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Page build() { + com.google.cloud.vision.v1p4beta1.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Page buildPartial() { + com.google.cloud.vision.v1p4beta1.Page result = new com.google.cloud.vision.v1p4beta1.Page(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + result.width_ = width_; + result.height_ = height_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Page) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Page)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Page other) { + if (other == com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000001); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Page parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Page) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected on the page.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private int width_ ; + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Page width. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 width = 2; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Page height. For PDFs the unit is points. For images (including
+     * TIFFs) the unit is pixels.
+     * 
+ * + * int32 height = 3; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder> blocksBuilder_; + + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p4beta1.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p4beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder setBlocks( + int index, com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder addBlocks(com.google.cloud.vision.v1p4beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p4beta1.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder addBlocks( + com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder addBlocks( + int index, com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p4beta1.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p4beta1.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public com.google.cloud.vision.v1p4beta1.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()); + } + /** + *
+     * List of blocks of text, images etc on this page.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results on the page. Range [0, 1].
+     * 
+ * + * float confidence = 5; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Page) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Page) + private static final com.google.cloud.vision.v1p4beta1.Page DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Page(); + } + + public static com.google.cloud.vision.v1p4beta1.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Page(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java new file mode 100644 index 000000000000..28ea75a681c2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface PageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Page) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected on the page.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * Page width. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 width = 2; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Page height. For PDFs the unit is points. For images (including
+   * TIFFs) the unit is pixels.
+   * 
+ * + * int32 height = 3; + * @return The height. + */ + int getHeight(); + + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + java.util.List + getBlocksList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p4beta1.Block getBlocks(int index); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + int getBlocksCount(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
+   * List of blocks of text, images etc on this page.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; + */ + com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results on the page. Range [0, 1].
+   * 
+ * + * float confidence = 5; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java new file mode 100644 index 000000000000..b12009a759f3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Structural unit of text representing a number of words in certain order.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Paragraph} + */ +public final class Paragraph extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Paragraph) + ParagraphOrBuilder { +private static final long serialVersionUID = 0L; + // Use Paragraph.newBuilder() to construct. + private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Paragraph() { + words_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Paragraph(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Paragraph( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Word.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Paragraph.class, com.google.cloud.vision.v1p4beta1.Paragraph.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int WORDS_FIELD_NUMBER = 3; + private java.util.List words_; + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List getWordsList() { + return words_; + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + @java.lang.Override + public java.util.List + getWordsOrBuilderList() { + return words_; + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + @java.lang.Override + public int getWordsCount() { + return words_.size(); + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Word getWords(int index) { + return words_.get(index); + } + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( + int index) { + return words_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + output.writeMessage(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < words_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, words_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Paragraph)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Paragraph other = (com.google.cloud.vision.v1p4beta1.Paragraph) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Paragraph prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structural unit of text representing a number of words in certain order.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Paragraph} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Paragraph) + com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Paragraph.class, com.google.cloud.vision.v1p4beta1.Paragraph.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Paragraph.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWordsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + wordsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Paragraph build() { + com.google.cloud.vision.v1p4beta1.Paragraph result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Paragraph buildPartial() { + com.google.cloud.vision.v1p4beta1.Paragraph result = new com.google.cloud.vision.v1p4beta1.Paragraph(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (wordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + words_ = java.util.Collections.unmodifiableList(words_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + } else { + result.words_ = wordsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Paragraph) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Paragraph)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Paragraph other) { + if (other == com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (wordsBuilder_ == null) { + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + } else { + if (!other.words_.isEmpty()) { + if (wordsBuilder_.isEmpty()) { + wordsBuilder_.dispose(); + wordsBuilder_ = null; + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + wordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWordsFieldBuilder() : null; + } else { + wordsBuilder_.addAllMessages(other.words_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Paragraph parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Paragraph) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the paragraph.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the paragraph.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List words_ = + java.util.Collections.emptyList(); + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new java.util.ArrayList(words_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder> wordsBuilder_; + + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public java.util.List getWordsList() { + if (wordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(words_); + } else { + return wordsBuilder_.getMessageList(); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public int getWordsCount() { + if (wordsBuilder_ == null) { + return words_.size(); + } else { + return wordsBuilder_.getCount(); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p4beta1.Word getWords(int index) { + if (wordsBuilder_ == null) { + return words_.get(index); + } else { + return wordsBuilder_.getMessage(index); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p4beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + } else { + wordsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder setWords( + int index, com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.set(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder addWords(com.google.cloud.vision.v1p4beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + } else { + wordsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p4beta1.Word value) { + if (wordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(index, value); + onChanged(); + } else { + wordsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder addWords( + com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder addWords( + int index, com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.add(index, builderForValue.build()); + onChanged(); + } else { + wordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder addAllWords( + java.lang.Iterable values) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + } else { + wordsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder clearWords() { + if (wordsBuilder_ == null) { + words_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wordsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public Builder removeWords(int index) { + if (wordsBuilder_ == null) { + ensureWordsIsMutable(); + words_.remove(index); + onChanged(); + } else { + wordsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p4beta1.Word.Builder getWordsBuilder( + int index) { + return getWordsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( + int index) { + if (wordsBuilder_ == null) { + return words_.get(index); } else { + return wordsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public java.util.List + getWordsOrBuilderList() { + if (wordsBuilder_ != null) { + return wordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(words_); + } + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p4beta1.Word.Builder addWordsBuilder() { + return getWordsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public com.google.cloud.vision.v1p4beta1.Word.Builder addWordsBuilder( + int index) { + return getWordsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()); + } + /** + *
+     * List of all words in this paragraph.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + public java.util.List + getWordsBuilderList() { + return getWordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder> + getWordsFieldBuilder() { + if (wordsBuilder_ == null) { + wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder>( + words_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + words_ = null; + } + return wordsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the paragraph. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Paragraph) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Paragraph) + private static final com.google.cloud.vision.v1p4beta1.Paragraph DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Paragraph(); + } + + public static com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Paragraph parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Paragraph(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java new file mode 100644 index 000000000000..96b5616591ee --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ParagraphOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Paragraph) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the paragraph.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the paragraph.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + java.util.List + getWordsList(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + com.google.cloud.vision.v1p4beta1.Word getWords(int index); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + int getWordsCount(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + java.util.List + getWordsOrBuilderList(); + /** + *
+   * List of all words in this paragraph.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Word words = 3; + */ + com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the paragraph. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java new file mode 100644 index 000000000000..78d4cbbeb7a0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A 3D position in the image, used primarily for Face detection landmarks.
+ * A valid Position must have both x and y coordinates.
+ * The position coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Position} + */ +public final class Position extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Position) + PositionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Position.newBuilder() to construct. + private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Position() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Position(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Position( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + x_ = input.readFloat(); + break; + } + case 21: { + + y_ = input.readFloat(); + break; + } + case 29: { + + z_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Position.class, com.google.cloud.vision.v1p4beta1.Position.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_; + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Position)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Position other = (com.google.cloud.vision.v1p4beta1.Position) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Position parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Position parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Position parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A 3D position in the image, used primarily for Face detection landmarks.
+   * A valid Position must have both x and y coordinates.
+   * The position coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Position} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Position) + com.google.cloud.vision.v1p4beta1.PositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Position.class, com.google.cloud.vision.v1p4beta1.Position.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Position.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + z_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Position getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Position build() { + com.google.cloud.vision.v1p4beta1.Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Position buildPartial() { + com.google.cloud.vision.v1p4beta1.Position result = new com.google.cloud.vision.v1p4beta1.Position(this); + result.x_ = x_; + result.y_ = y_; + result.z_ = z_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Position) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Position)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Position other) { + if (other == com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Position parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + onChanged(); + return this; + } + /** + *
+     * Z coordinate (or depth).
+     * 
+ * + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + + z_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Position) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Position) + private static final com.google.cloud.vision.v1p4beta1.Position DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Position(); + } + + public static com.google.cloud.vision.v1p4beta1.Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Position parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Position(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java new file mode 100644 index 000000000000..780b193f9927 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface PositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Position) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * @return The x. + */ + float getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * @return The y. + */ + float getY(); + + /** + *
+   * Z coordinate (or depth).
+   * 
+ * + * float z = 3; + * @return The z. + */ + float getZ(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java new file mode 100644 index 000000000000..e00e0bca2587 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java @@ -0,0 +1,2617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A Product contains ReferenceImages.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Product} + */ +public final class Product extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Product) + ProductOrBuilder { +private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Product() { + name_ = ""; + displayName_ = ""; + description_ = ""; + productCategory_ = ""; + productLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Product( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + productCategory_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productLabels_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Product.KeyValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Product.class, com.google.cloud.vision.v1p4beta1.Product.Builder.class); + } + + public interface KeyValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Product.KeyValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + *
+   * A product label represented as a key-value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Product.KeyValue} + */ + public static final class KeyValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Product.KeyValue) + KeyValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyValue.newBuilder() to construct. + private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KeyValue() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KeyValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KeyValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Product.KeyValue.class, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+     * The key of the label attached to the product. Cannot be empty and cannot
+     * exceed 128 bytes.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+     * The value of the label attached to the product. Cannot be empty and
+     * cannot exceed 128 bytes.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Product.KeyValue)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Product.KeyValue other = (com.google.cloud.vision.v1p4beta1.Product.KeyValue) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Product.KeyValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A product label represented as a key-value pair.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Product.KeyValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Product.KeyValue) + com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Product.KeyValue.class, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Product.KeyValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + value_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValue build() { + com.google.cloud.vision.v1p4beta1.Product.KeyValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValue buildPartial() { + com.google.cloud.vision.v1p4beta1.Product.KeyValue result = new com.google.cloud.vision.v1p4beta1.Product.KeyValue(this); + result.key_ = key_; + result.value_ = value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Product.KeyValue) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Product.KeyValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Product.KeyValue other) { + if (other == com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Product.KeyValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Product.KeyValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       * The key of the label attached to the product. Cannot be empty and cannot
+       * exceed 128 bytes.
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+       * The value of the label attached to the product. Cannot be empty and
+       * cannot exceed 128 bytes.
+       * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Product.KeyValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product.KeyValue) + private static final com.google.cloud.vision.v1p4beta1.Product.KeyValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Product.KeyValue(); + } + + public static com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeyValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; + private volatile java.lang.Object productCategory_; + /** + *
+   * Immutable. The category for the product identified by the reference image.
+   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+   * legacy categories "homegoods", "apparel", and "toys" are still supported,
+   * but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + @java.lang.Override + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } + } + /** + *
+   * Immutable. The category for the product identified by the reference image.
+   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+   * legacy categories "homegoods", "apparel", and "toys" are still supported,
+   * but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; + private java.util.List productLabels_; + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List getProductLabelsList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public java.util.List + getProductLabelsOrBuilderList() { + return productLabels_; + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public int getProductLabelsCount() { + return productLabels_.size(); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index) { + return productLabels_.get(index); + } + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + return productLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + output.writeMessage(5, productLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); + } + for (int i = 0; i < productLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, productLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Product)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Product other = (com.google.cloud.vision.v1p4beta1.Product) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getProductCategory() + .equals(other.getProductCategory())) return false; + if (!getProductLabelsList() + .equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getProductCategory().hashCode(); + if (getProductLabelsCount() > 0) { + hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getProductLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Product contains ReferenceImages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Product} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Product) + com.google.cloud.vision.v1p4beta1.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Product.class, com.google.cloud.vision.v1p4beta1.Product.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Product.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProductLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + productCategory_ = ""; + + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product build() { + com.google.cloud.vision.v1p4beta1.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product buildPartial() { + com.google.cloud.vision.v1p4beta1.Product result = new com.google.cloud.vision.v1p4beta1.Product(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.productCategory_ = productCategory_; + if (productLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productLabels_ = java.util.Collections.unmodifiableList(productLabels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productLabels_ = productLabels_; + } else { + result.productLabels_ = productLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Product) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Product)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Product other) { + if (other == com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getProductCategory().isEmpty()) { + productCategory_ = other.productCategory_; + onChanged(); + } + if (productLabelsBuilder_ == null) { + if (!other.productLabels_.isEmpty()) { + if (productLabels_.isEmpty()) { + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductLabelsIsMutable(); + productLabels_.addAll(other.productLabels_); + } + onChanged(); + } + } else { + if (!other.productLabels_.isEmpty()) { + if (productLabelsBuilder_.isEmpty()) { + productLabelsBuilder_.dispose(); + productLabelsBuilder_ = null; + productLabels_ = other.productLabels_; + bitField0_ = (bitField0_ & ~0x00000001); + productLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductLabelsFieldBuilder() : null; + } else { + productLabelsBuilder_.addAllMessages(other.productLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Product parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Product) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the product.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+     * This field is ignored when creating a product.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this Product. Must not be empty. Must be at most
+     * 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * User-provided metadata to be stored with this product. Must be at most 4096
+     * characters long.
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object productCategory_ = ""; + /** + *
+     * Immutable. The category for the product identified by the reference image.
+     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+     * legacy categories "homegoods", "apparel", and "toys" are still supported,
+     * but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + public java.lang.String getProductCategory() { + java.lang.Object ref = productCategory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCategory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image.
+     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+     * legacy categories "homegoods", "apparel", and "toys" are still supported,
+     * but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + public com.google.protobuf.ByteString + getProductCategoryBytes() { + java.lang.Object ref = productCategory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productCategory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Immutable. The category for the product identified by the reference image.
+     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+     * legacy categories "homegoods", "apparel", and "toys" are still supported,
+     * but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productCategory_ = value; + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image.
+     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+     * legacy categories "homegoods", "apparel", and "toys" are still supported,
+     * but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return This builder for chaining. + */ + public Builder clearProductCategory() { + + productCategory_ = getDefaultInstance().getProductCategory(); + onChanged(); + return this; + } + /** + *
+     * Immutable. The category for the product identified by the reference image.
+     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+     * legacy categories "homegoods", "apparel", and "toys" are still supported,
+     * but these should not be used for new products.
+     * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param value The bytes for productCategory to set. + * @return This builder for chaining. + */ + public Builder setProductCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productCategory_ = value; + onChanged(); + return this; + } + + private java.util.List productLabels_ = + java.util.Collections.emptyList(); + private void ensureProductLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productLabels_ = new java.util.ArrayList(productLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder> productLabelsBuilder_; + + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List getProductLabelsList() { + if (productLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productLabels_); + } else { + return productLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public int getProductLabelsCount() { + if (productLabelsBuilder_ == null) { + return productLabels_.size(); + } else { + return productLabelsBuilder_.getCount(); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); + } else { + return productLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.set(index, value); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder setProductLabels( + int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels(com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { + if (productLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLabelsIsMutable(); + productLabels_.add(index, value); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder addProductLabels( + int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + productLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder addAllProductLabels( + java.lang.Iterable values) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productLabels_); + onChanged(); + } else { + productLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder clearProductLabels() { + if (productLabelsBuilder_ == null) { + productLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public Builder removeProductLabels(int index) { + if (productLabelsBuilder_ == null) { + ensureProductLabelsIsMutable(); + productLabels_.remove(index); + onChanged(); + } else { + productLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder getProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index) { + if (productLabelsBuilder_ == null) { + return productLabels_.get(index); } else { + return productLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsOrBuilderList() { + if (productLabelsBuilder_ != null) { + return productLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productLabels_); + } + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabelsBuilder() { + return getProductLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabelsBuilder( + int index) { + return getProductLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()); + } + /** + *
+     * Key-value pairs that can be attached to a product. At query time,
+     * constraints can be specified based on the product_labels.
+     * Note that integer values can be provided as strings, e.g. "1199". Only
+     * strings with integer values can match a range-based restriction which is
+     * to be supported soon.
+     * Multiple values can be assigned to the same key. One product may have up to
+     * 500 product_labels.
+     * Notice that the total number of distinct product_labels over all products
+     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+     * will refuse to work for that ProductSet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + public java.util.List + getProductLabelsBuilderList() { + return getProductLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder> + getProductLabelsFieldBuilder() { + if (productLabelsBuilder_ == null) { + productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder>( + productLabels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productLabels_ = null; + } + return productLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Product) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product) + private static final com.google.cloud.vision.v1p4beta1.Product DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Product(); + } + + public static com.google.cloud.vision.v1p4beta1.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Product(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java new file mode 100644 index 000000000000..d20b0dcba791 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + + @Deprecated + protected ProductName() { + project = null; + location = null; + product = null; + } + + private ProductName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductName of(String project, String location, String product) { + return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); + } + + public static String format(String project, String location, String product) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .build() + .toString(); + } + + public static ProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT.validatedMatch( + formattedString, "ProductName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT.instantiate( + "project", project, "location", location, "product", product); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductName that = ((ProductName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + return h; + } + + /** Builder for projects/{project}/locations/{location}/products/{product}. */ + public static class Builder { + private String project; + private String location; + private String product; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + private Builder(ProductName productName) { + this.project = productName.project; + this.location = productName.location; + this.product = productName.product; + } + + public ProductName build() { + return new ProductName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java new file mode 100644 index 000000000000..1255e6fd99c7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java @@ -0,0 +1,194 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ProductOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Product) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the product.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
+   * This field is ignored when creating a product.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this Product. Must not be empty. Must be at most
+   * 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * User-provided metadata to be stored with this product. Must be at most 4096
+   * characters long.
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Immutable. The category for the product identified by the reference image.
+   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+   * legacy categories "homegoods", "apparel", and "toys" are still supported,
+   * but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The productCategory. + */ + java.lang.String getProductCategory(); + /** + *
+   * Immutable. The category for the product identified by the reference image.
+   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
+   * legacy categories "homegoods", "apparel", and "toys" are still supported,
+   * but these should not be used for new products.
+   * 
+ * + * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return The bytes for productCategory. + */ + com.google.protobuf.ByteString + getProductCategoryBytes(); + + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + int getProductLabelsCount(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + java.util.List + getProductLabelsOrBuilderList(); + /** + *
+   * Key-value pairs that can be attached to a product. At query time,
+   * constraints can be specified based on the product_labels.
+   * Note that integer values can be provided as strings, e.g. "1199". Only
+   * strings with integer values can match a range-based restriction which is
+   * to be supported soon.
+   * Multiple values can be assigned to the same key. One product may have up to
+   * 500 product_labels.
+   * Notice that the total number of distinct product_labels over all products
+   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
+   * will refuse to work for that ProductSet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; + */ + com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java new file mode 100644 index 000000000000..abb07a79269f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java @@ -0,0 +1,1404 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Parameters for a product search request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchParams} + */ +public final class ProductSearchParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchParams) + ProductSearchParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchParams.newBuilder() to construct. + private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchParams() { + productSet_ = ""; + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + productSet_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + productCategories_.add(s); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 74: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchParams.class, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 9; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 6; + private volatile java.lang.Object productSet_; + /** + *
+   * The resource name of a
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+   * similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + @java.lang.Override + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } + } + /** + *
+   * The resource name of a
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+   * similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList productCategories_; + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_; + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + + public static final int FILTER_FIELD_NUMBER = 8; + private volatile java.lang.Object filter_; + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); + } + for (int i = 0; i < productCategories_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); + } + if (boundingPoly_ != null) { + output.writeMessage(9, getBoundingPoly()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); + } + { + int dataSize = 0; + for (int i = 0; i < productCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); + } + size += dataSize; + size += 1 * getProductCategoriesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); + } + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getBoundingPoly()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSearchParams other = (com.google.cloud.vision.v1p4beta1.ProductSearchParams) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getProductSet() + .equals(other.getProductSet())) return false; + if (!getProductCategoriesList() + .equals(other.getProductCategoriesList())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + if (getProductCategoriesCount() > 0) { + hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getProductCategoriesList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchParams) + com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchParams.class, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + productSet_ = ""; + + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParams build() { + com.google.cloud.vision.v1p4beta1.ProductSearchParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParams buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSearchParams result = new com.google.cloud.vision.v1p4beta1.ProductSearchParams(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + result.productSet_ = productSet_; + if (((bitField0_ & 0x00000001) != 0)) { + productCategories_ = productCategories_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productCategories_ = productCategories_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchParams) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchParams other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (!other.getProductSet().isEmpty()) { + productSet_ = other.productSet_; + onChanged(); + } + if (!other.productCategories_.isEmpty()) { + if (productCategories_.isEmpty()) { + productCategories_ = other.productCategories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductCategoriesIsMutable(); + productCategories_.addAll(other.productCategories_); + } + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSearchParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+     * The bounding polygon around the area of interest in the image.
+     * If it is not specified, system discretion will be applied.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.lang.Object productSet_ = ""; + /** + *
+     * The resource name of a
+     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+     * similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + public java.lang.String getProductSet() { + java.lang.Object ref = productSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of a
+     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+     * similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + public com.google.protobuf.ByteString + getProductSetBytes() { + java.lang.Object ref = productSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of a
+     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+     * similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSet_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of a
+     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+     * similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProductSet() { + + productSet_ = getDefaultInstance().getProductSet(); + onChanged(); + return this; + } + /** + *
+     * The resource name of a
+     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+     * similar images.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @param value The bytes for productSet to set. + * @return This builder for chaining. + */ + public Builder setProductSetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSet_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProductCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + public com.google.protobuf.ProtocolStringList + getProductCategoriesList() { + return productCategories_.getUnmodifiableView(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + public int getProductCategoriesCount() { + return productCategories_.size(); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + public java.lang.String getProductCategories(int index) { + return productCategories_.get(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + public com.google.protobuf.ByteString + getProductCategoriesBytes(int index) { + return productCategories_.getByteString(index); + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param index The index to set the value at. + * @param value The productCategories to set. + * @return This builder for chaining. + */ + public Builder setProductCategories( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategories( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param values The productCategories to add. + * @return This builder for chaining. + */ + public Builder addAllProductCategories( + java.lang.Iterable values) { + ensureProductCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productCategories_); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @return This builder for chaining. + */ + public Builder clearProductCategories() { + productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The list of product categories to search in. Currently, we only consider
+     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+     * categories "homegoods", "apparel", and "toys" are still supported but will
+     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+     * or "toys-v2" for better product search accuracy. It is recommended to
+     * migrate existing products to these categories as well.
+     * 
+ * + * repeated string product_categories = 7; + * @param value The bytes of the productCategories to add. + * @return This builder for chaining. + */ + public Builder addProductCategoriesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProductCategoriesIsMutable(); + productCategories_.add(value); + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * The filtering expression. This can be used to restrict search results based
+     * on Product labels. We currently support an AND of OR of key-value
+     * expressions, where each expression within an OR must have the same key. An
+     * '=' should be used to connect the key and value.
+     * For example, "(color = red OR color = blue) AND brand = Google" is
+     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+     * "color: red" is not acceptable because it uses a ':' instead of an '='.
+     * 
+ * + * string filter = 8; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchParams) + private static final com.google.cloud.vision.v1p4beta1.ProductSearchParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchParams(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java new file mode 100644 index 000000000000..865e292baead --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ProductSearchParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+   * The bounding polygon around the area of interest in the image.
+   * If it is not specified, system discretion will be applied.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+   * The resource name of a
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+   * similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The productSet. + */ + java.lang.String getProductSet(); + /** + *
+   * The resource name of a
+   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
+   * similar images.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * 
+ * + * string product_set = 6 [(.google.api.resource_reference) = { ... } + * @return The bytes for productSet. + */ + com.google.protobuf.ByteString + getProductSetBytes(); + + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return A list containing the productCategories. + */ + java.util.List + getProductCategoriesList(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @return The count of productCategories. + */ + int getProductCategoriesCount(); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the element to return. + * @return The productCategories at the given index. + */ + java.lang.String getProductCategories(int index); + /** + *
+   * The list of product categories to search in. Currently, we only consider
+   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
+   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
+   * categories "homegoods", "apparel", and "toys" are still supported but will
+   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
+   * or "toys-v2" for better product search accuracy. It is recommended to
+   * migrate existing products to these categories as well.
+   * 
+ * + * repeated string product_categories = 7; + * @param index The index of the value to return. + * @return The bytes of the productCategories at the given index. + */ + com.google.protobuf.ByteString + getProductCategoriesBytes(int index); + + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * The filtering expression. This can be used to restrict search results based
+   * on Product labels. We currently support an AND of OR of key-value
+   * expressions, where each expression within an OR must have the same key. An
+   * '=' should be used to connect the key and value.
+   * For example, "(color = red OR color = blue) AND brand = Google" is
+   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
+   * "color: red" is not acceptable because it uses a ':' instead of an '='.
+   * 
+ * + * string filter = 8; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java new file mode 100644 index 000000000000..4c9b54824f4d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class ProductSearchProto { + private ProductSearchProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/vision/v1p4beta1/product_" + + "search.proto\022\035google.cloud.vision.v1p4be" + + "ta1\032\031google/api/resource.proto\032,google/c" + + "loud/vision/v1p4beta1/geometry.proto\032:go" + + "ogle/cloud/vision/v1p4beta1/product_sear" + + "ch_service.proto\032\037google/protobuf/timest" + + "amp.proto\"\301\001\n\023ProductSearchParams\022B\n\rbou" + + "nding_poly\030\t \001(\0132+.google.cloud.vision.v" + + "1p4beta1.BoundingPoly\022:\n\013product_set\030\006 \001" + + "(\tB%\372A\"\n vision.googleapis.com/ProductSe" + + "t\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006filter\030" + + "\010 \001(\t\"\262\005\n\024ProductSearchResults\022.\n\nindex_" + + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022K" + + "\n\007results\030\005 \003(\0132:.google.cloud.vision.v1" + + "p4beta1.ProductSearchResults.Result\022b\n\027p" + + "roduct_grouped_results\030\006 \003(\0132A.google.cl" + + "oud.vision.v1p4beta1.ProductSearchResult" + + "s.GroupedResult\032_\n\006Result\0227\n\007product\030\001 \001" + + "(\0132&.google.cloud.vision.v1p4beta1.Produ" + + "ct\022\r\n\005score\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020Obje" + + "ctAnnotation\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_co" + + "de\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002" + + "\n\rGroupedResult\022B\n\rbounding_poly\030\001 \001(\0132+" + + ".google.cloud.vision.v1p4beta1.BoundingP" + + "oly\022K\n\007results\030\002 \003(\0132:.google.cloud.visi" + + "on.v1p4beta1.ProductSearchResults.Result" + + "\022`\n\022object_annotations\030\003 \003(\0132D.google.cl" + + "oud.vision.v1p4beta1.ProductSearchResult" + + "s.ObjectAnnotationB\210\001\n!com.google.cloud." + + "vision.v1p4beta1B\022ProductSearchProtoP\001ZC" + + "google.golang.org/genproto/googleapis/cl" + + "oud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor, + new java.lang.String[] { "BoundingPoly", "ProductSet", "ProductCategories", "Filter", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor, + new java.lang.String[] { "IndexTime", "Results", "ProductGroupedResults", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor = + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor, + new java.lang.String[] { "Product", "Score", "Image", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor = + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor, + new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor = + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor, + new java.lang.String[] { "BoundingPoly", "Results", "ObjectAnnotations", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java new file mode 100644 index 000000000000..f2313eff9425 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java @@ -0,0 +1,5384 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Results for a product search request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults} + */ +public final class ProductSearchResults extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults) + ProductSearchResultsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSearchResults.newBuilder() to construct. + private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSearchResults() { + results_ = java.util.Collections.emptyList(); + productGroupedResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSearchResults(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSearchResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + productGroupedResults_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder.class); + } + + public interface ResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return The product. + */ + com.google.cloud.vision.v1p4beta1.Product getProduct(); + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + java.lang.String getImage(); + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + com.google.protobuf.ByteString + getImageBytes(); + } + /** + *
+   * Information about a product.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.Result} + */ + public static final class Result extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Result() { + image_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + image_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.Product product_; + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + /** + *
+     * The Product.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * A confidence level on the match, ranging from 0 (no confidence) to
+     * 1 (full confidence).
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object image_; + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The image. + */ + @java.lang.Override + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } + } + /** + *
+     * The resource name of the image from the product that is the closest match
+     * to the query.
+     * 
+ * + * string image = 3; + * @return The bytes for image. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getImage() + .equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about a product.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.Result} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + score_ = 0F; + + image_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result build() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + result.score_ = score_; + result.image_ = image_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getImage().isEmpty()) { + image_ = other.image_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + * @return The product. + */ + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public Builder setProduct( + com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+       * The Product.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private float score_ ; + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * A confidence level on the match, ranging from 0 (no confidence) to
+       * 1 (full confidence).
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object image_ = ""; + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The image. + */ + public java.lang.String getImage() { + java.lang.Object ref = image_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + image_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return The bytes for image. + */ + public com.google.protobuf.ByteString + getImageBytes() { + java.lang.Object ref = image_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + image_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The image to set. + * @return This builder for chaining. + */ + public Builder setImage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + image_ = value; + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @return This builder for chaining. + */ + public Builder clearImage() { + + image_ = getDefaultInstance().getImage(); + onChanged(); + return this; + } + /** + *
+       * The resource name of the image from the product that is the closest match
+       * to the query.
+       * 
+ * + * string image = 3; + * @param value The bytes for image to set. + * @return This builder for chaining. + */ + public Builder setImageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + image_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) + private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ObjectAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + java.lang.String getMid(); + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + com.google.protobuf.ByteString + getMidBytes(); + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Prediction for what the object in the bounding box is.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} + */ + public static final class ObjectAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + ObjectAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectAnnotation.newBuilder() to construct. + private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ObjectAnnotation() { + mid_ = ""; + languageCode_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ObjectAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ObjectAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + mid_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 37: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + public static final int MID_FIELD_NUMBER = 1; + private volatile java.lang.Object mid_; + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The mid. + */ + @java.lang.Override + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } + } + /** + *
+     * Object ID that should align with EntityAnnotation mid.
+     * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Object name, expressed in its `language_code` language.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 4; + private float score_; + /** + *
+     * Score of the result. Range [0, 1].
+     * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(4, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) obj; + + if (!getMid() + .equals(other.getMid())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getName() + .equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MID_FIELD_NUMBER; + hash = (53 * hash) + getMid().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Prediction for what the object in the bounding box is.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + mid_ = ""; + + languageCode_ = ""; + + name_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation build() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation(this); + result.mid_ = mid_; + result.languageCode_ = languageCode_; + result.name_ = name_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; + if (!other.getMid().isEmpty()) { + mid_ = other.mid_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mid_ = ""; + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The mid. + */ + public java.lang.String getMid() { + java.lang.Object ref = mid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return The bytes for mid. + */ + public com.google.protobuf.ByteString + getMidBytes() { + java.lang.Object ref = mid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The mid to set. + * @return This builder for chaining. + */ + public Builder setMid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mid_ = value; + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @return This builder for chaining. + */ + public Builder clearMid() { + + mid_ = getDefaultInstance().getMid(); + onChanged(); + return this; + } + /** + *
+       * Object ID that should align with EntityAnnotation mid.
+       * 
+ * + * string mid = 1; + * @param value The bytes for mid to set. + * @return This builder for chaining. + */ + public Builder setMidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mid_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Object name, expressed in its `language_code` language.
+       * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Score of the result. Range [0, 1].
+       * 
+ * + * float score = 4; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GroupedResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + boolean hasBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + int getResultsCount(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + int getObjectAnnotationsCount(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + java.util.List + getObjectAnnotationsOrBuilderList(); + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index); + } + /** + *
+   * Information about the products similar to a single product in a query
+   * image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} + */ + public static final class GroupedResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) + GroupedResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use GroupedResult.newBuilder() to construct. + private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GroupedResult() { + results_ = java.util.Collections.emptyList(); + objectAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GroupedResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GroupedResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingPoly_ != null) { + subBuilder = boundingPoly_.toBuilder(); + } + boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingPoly_); + boundingPoly_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + objectAnnotations_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder.class); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + @java.lang.Override + public boolean hasBoundingPoly() { + return boundingPoly_ != null; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + /** + *
+     * The bounding polygon around the product detected in the query image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + return getBoundingPoly(); + } + + public static final int RESULTS_FIELD_NUMBER = 2; + private java.util.List results_; + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; + private java.util.List objectAnnotations_; + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List getObjectAnnotationsList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public java.util.List + getObjectAnnotationsOrBuilderList() { + return objectAnnotations_; + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public int getObjectAnnotationsCount() { + return objectAnnotations_.size(); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + return objectAnnotations_.get(index); + } + /** + *
+     * List of generic predictions for the object in the bounding box.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + return objectAnnotations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (boundingPoly_ != null) { + output.writeMessage(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + output.writeMessage(3, objectAnnotations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundingPoly_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBoundingPoly()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, results_.get(i)); + } + for (int i = 0; i < objectAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, objectAnnotations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) obj; + + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; + if (hasBoundingPoly()) { + if (!getBoundingPoly() + .equals(other.getBoundingPoly())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getObjectAnnotationsList() + .equals(other.getObjectAnnotationsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBoundingPoly()) { + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getObjectAnnotationsCount() > 0) { + hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectAnnotationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about the products similar to a single product in a query
+     * image.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getObjectAnnotationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult build() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult(this); + int from_bitField0_ = bitField0_; + if (boundingPolyBuilder_ == null) { + result.boundingPoly_ = boundingPoly_; + } else { + result.boundingPoly_ = boundingPolyBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (objectAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.objectAnnotations_ = objectAnnotations_; + } else { + result.objectAnnotations_ = objectAnnotationsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; + if (other.hasBoundingPoly()) { + mergeBoundingPoly(other.getBoundingPoly()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (objectAnnotationsBuilder_ == null) { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotations_.isEmpty()) { + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.addAll(other.objectAnnotations_); + } + onChanged(); + } + } else { + if (!other.objectAnnotations_.isEmpty()) { + if (objectAnnotationsBuilder_.isEmpty()) { + objectAnnotationsBuilder_.dispose(); + objectAnnotationsBuilder_ = null; + objectAnnotations_ = other.objectAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + objectAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getObjectAnnotationsFieldBuilder() : null; + } else { + objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return Whether the boundingPoly field is set. + */ + public boolean hasBoundingPoly() { + return boundingPolyBuilder_ != null || boundingPoly_ != null; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + * @return The boundingPoly. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } else { + return boundingPolyBuilder_.getMessage(); + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingPoly_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder setBoundingPoly( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundingPoly_ != null) { + boundingPoly_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); + } else { + boundingPoly_ = value; + } + onChanged(); + } else { + boundingPolyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + boundingPoly_ = null; + onChanged(); + } else { + boundingPoly_ = null; + boundingPolyBuilder_ = null; + } + + return this; + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + + onChanged(); + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundingPolyBuilder_ != null) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + return boundingPoly_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; + } + } + /** + *
+       * The bounding polygon around the product detected in the query image.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingPoly(), + getParentForChildren(), + isClean()); + boundingPoly_ = null; + } + return boundingPolyBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+       * List of results, one for each product match.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List objectAnnotations_ = + java.util.Collections.emptyList(); + private void ensureObjectAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; + + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List getObjectAnnotationsList() { + if (objectAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } else { + return objectAnnotationsBuilder_.getMessageList(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public int getObjectAnnotationsCount() { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.size(); + } else { + return objectAnnotationsBuilder_.getCount(); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); + } else { + return objectAnnotationsBuilder_.getMessage(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder setObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { + if (objectAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, value); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addObjectAnnotations( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder addAllObjectAnnotations( + java.lang.Iterable values) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, objectAnnotations_); + onChanged(); + } else { + objectAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder clearObjectAnnotations() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + objectAnnotationsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public Builder removeObjectAnnotations(int index) { + if (objectAnnotationsBuilder_ == null) { + ensureObjectAnnotationsIsMutable(); + objectAnnotations_.remove(index); + onChanged(); + } else { + objectAnnotationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( + int index) { + if (objectAnnotationsBuilder_ == null) { + return objectAnnotations_.get(index); } else { + return objectAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsOrBuilderList() { + if (objectAnnotationsBuilder_ != null) { + return objectAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectAnnotations_); + } + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { + return getObjectAnnotationsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( + int index) { + return getObjectAnnotationsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); + } + /** + *
+       * List of generic predictions for the object in the bounding box.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + public java.util.List + getObjectAnnotationsBuilderList() { + return getObjectAnnotationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder> + getObjectAnnotationsFieldBuilder() { + if (objectAnnotationsBuilder_ == null) { + objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder>( + objectAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + objectAnnotations_ = null; + } + return objectAnnotationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) + private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroupedResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GroupedResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int INDEX_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int RESULTS_FIELD_NUMBER = 5; + private java.util.List results_; + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { + return results_.get(index); + } + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; + private java.util.List productGroupedResults_; + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List getProductGroupedResultsList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public java.util.List + getProductGroupedResultsOrBuilderList() { + return productGroupedResults_; + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public int getProductGroupedResultsCount() { + return productGroupedResults_.size(); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + return productGroupedResults_.get(index); + } + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + return productGroupedResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (indexTime_ != null) { + output.writeMessage(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + output.writeMessage(6, productGroupedResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getIndexTime()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, results_.get(i)); + } + for (int i = 0; i < productGroupedResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, productGroupedResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSearchResults other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults) obj; + + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getProductGroupedResultsList() + .equals(other.getProductGroupedResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + if (getProductGroupedResultsCount() > 0) { + hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getProductGroupedResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results for a product search request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults) + com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + getProductGroupedResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults build() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSearchResults result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults(this); + int from_bitField0_ = bitField0_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + if (productGroupedResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.productGroupedResults_ = productGroupedResults_; + } else { + result.productGroupedResults_ = productGroupedResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance()) return this; + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (productGroupedResultsBuilder_ == null) { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResults_.isEmpty()) { + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.addAll(other.productGroupedResults_); + } + onChanged(); + } + } else { + if (!other.productGroupedResults_.isEmpty()) { + if (productGroupedResultsBuilder_.isEmpty()) { + productGroupedResultsBuilder_.dispose(); + productGroupedResultsBuilder_ = null; + productGroupedResults_ = other.productGroupedResults_; + bitField0_ = (bitField0_ & ~0x00000002); + productGroupedResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProductGroupedResultsFieldBuilder() : null; + } else { + productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSearchResults parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Timestamp of the index which provided these results. Products added to the
+     * product set and products removed from the product set after this time are
+     * not reflected in the current results.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; + + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder setResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder addResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); + } + /** + *
+     * List of results, one for each product match.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.util.List productGroupedResults_ = + java.util.Collections.emptyList(); + private void ensureProductGroupedResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; + + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List getProductGroupedResultsList() { + if (productGroupedResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } else { + return productGroupedResultsBuilder_.getMessageList(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public int getProductGroupedResultsCount() { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.size(); + } else { + return productGroupedResultsBuilder_.getCount(); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); + } else { + return productGroupedResultsBuilder_.getMessage(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder setProductGroupedResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.set(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { + if (productGroupedResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, value); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addProductGroupedResults( + int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.add(index, builderForValue.build()); + onChanged(); + } else { + productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder addAllProductGroupedResults( + java.lang.Iterable values) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, productGroupedResults_); + onChanged(); + } else { + productGroupedResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder clearProductGroupedResults() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + productGroupedResultsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public Builder removeProductGroupedResults(int index) { + if (productGroupedResultsBuilder_ == null) { + ensureProductGroupedResultsIsMutable(); + productGroupedResults_.remove(index); + onChanged(); + } else { + productGroupedResultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index) { + if (productGroupedResultsBuilder_ == null) { + return productGroupedResults_.get(index); } else { + return productGroupedResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsOrBuilderList() { + if (productGroupedResultsBuilder_ != null) { + return productGroupedResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productGroupedResults_); + } + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { + return getProductGroupedResultsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( + int index) { + return getProductGroupedResultsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); + } + /** + *
+     * List of results grouped by products detected in the query image. Each entry
+     * corresponds to one bounding polygon in the query image, and contains the
+     * matching products specific to that region. There may be duplicate product
+     * matches in the union of all the per-product results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + public java.util.List + getProductGroupedResultsBuilderList() { + return getProductGroupedResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder> + getProductGroupedResultsFieldBuilder() { + if (productGroupedResultsBuilder_ == null) { + productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder>( + productGroupedResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + productGroupedResults_ = null; + } + return productGroupedResultsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults) + private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSearchResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSearchResults(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java new file mode 100644 index 000000000000..727cac78ce1f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java @@ -0,0 +1,145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ProductSearchResultsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Timestamp of the index which provided these results. Products added to the
+   * product set and products removed from the product set after this time are
+   * not reflected in the current results.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + int getResultsCount(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * List of results, one for each product match.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + int getProductGroupedResultsCount(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + java.util.List + getProductGroupedResultsOrBuilderList(); + /** + *
+   * List of results grouped by products detected in the query image. Each entry
+   * corresponds to one bounding polygon in the query image, and contains the
+   * matching products specific to that region. There may be duplicate product
+   * matches in the union of all the per-product results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java new file mode 100644 index 000000000000..2673ab52824c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class ProductSearchServiceProto { + private ProductSearchServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n:google/cloud/vision/v1p4beta1/product_" + + "search_service.proto\022\035google.cloud.visio" + + "n.v1p4beta1\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032,google/cloud/vision/v1p4beta1/ge" + + "ometry.proto\032#google/longrunning/operati" + + "ons.proto\032\033google/protobuf/empty.proto\032 " + + "google/protobuf/field_mask.proto\032\037google" + + "/protobuf/timestamp.proto\032\027google/rpc/st" + + "atus.proto\"\262\002\n\007Product\022\014\n\004name\030\001 \001(\t\022\024\n\014" + + "display_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022" + + "\035\n\020product_category\030\004 \001(\tB\003\340A\005\022G\n\016produc" + + "t_labels\030\005 \003(\0132/.google.cloud.vision.v1p" + + "4beta1.Product.KeyValue\032&\n\010KeyValue\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[\n\035vision.goo" + + "gleapis.com/Product\022:projects/{project}/" + + "locations/{location}/products/{product}\"" + + "\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t\022\024\n\014display_" + + "name\030\002 \001(\t\0223\n\nindex_time\030\003 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022,\n\013index_error\030\004" + + " \001(\0132\022.google.rpc.StatusB\003\340A\003:h\352Ae\n visi" + + "on.googleapis.com/ProductSet\022Aprojects/{" + + "project}/locations/{location}/productSet" + + "s/{product_set}\"\205\002\n\016ReferenceImage\022\014\n\004na" + + "me\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022H\n\016bounding_p" + + "olys\030\003 \003(\0132+.google.cloud.vision.v1p4bet" + + "a1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision.goog" + + "leapis.com/ReferenceImage\022\\projects/{pro" + + "ject}/locations/{location}/products/{pro" + + "duct}/referenceImages/{reference_image}\"" + + "\243\001\n\024CreateProductRequest\0229\n\006parent\030\001 \001(\t" + + "B)\340A\002\372A#\n!locations.googleapis.com/Locat" + + "ion\022<\n\007product\030\002 \001(\0132&.google.cloud.visi" + + "on.v1p4beta1.ProductB\003\340A\002\022\022\n\nproduct_id\030" + + "\003 \001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + + "ocation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"i\n\024ListProductsResponse\0228\n\010produc" + + "ts\030\001 \003(\0132&.google.cloud.vision.v1p4beta1" + + ".Product\022\027\n\017next_page_token\030\002 \001(\t\"H\n\021Get" + + "ProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vi" + + "sion.googleapis.com/Product\"\205\001\n\024UpdatePr" + + "oductRequest\022<\n\007product\030\001 \001(\0132&.google.c" + + "loud.vision.v1p4beta1.ProductB\003\340A\002\022/\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "ask\"K\n\024DeleteProductRequest\0223\n\004name\030\001 \001(" + + "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + + "\"\261\001\n\027CreateProductSetRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + + "ocation\022C\n\013product_set\030\002 \001(\0132).google.cl" + + "oud.vision.v1p4beta1.ProductSetB\003\340A\002\022\026\n\016" + + "product_set_id\030\003 \001(\t\"z\n\026ListProductSetsR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\021\n\tpage_size\030\002" + + " \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027ListProductS" + + "etsResponse\022?\n\014product_sets\030\001 \003(\0132).goog" + + "le.cloud.vision.v1p4beta1.ProductSet\022\027\n\017" + + "next_page_token\030\002 \001(\t\"N\n\024GetProductSetRe" + + "quest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.goog" + + "leapis.com/ProductSet\"\217\001\n\027UpdateProductS" + + "etRequest\022C\n\013product_set\030\001 \001(\0132).google." + + "cloud.vision.v1p4beta1.ProductSetB\003\340A\002\022/" + + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"Q\n\027DeleteProductSetRequest\0226\n\004na" + + "me\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.com/" + + "ProductSet\"\275\001\n\033CreateReferenceImageReque" + + "st\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googl" + + "eapis.com/Product\022K\n\017reference_image\030\002 \001" + + "(\0132-.google.cloud.vision.v1p4beta1.Refer" + + "enceImageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001" + + "(\t\"z\n\032ListReferenceImagesRequest\0225\n\006pare" + + "nt\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/" + + "Product\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\"\222\001\n\033ListReferenceImagesResponse\022G" + + "\n\020reference_images\030\001 \003(\0132-.google.cloud." + + "vision.v1p4beta1.ReferenceImage\022\021\n\tpage_" + + "size\030\002 \001(\005\022\027\n\017next_page_token\030\003 \001(\t\"V\n\030G" + + "etReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340" + + "A\002\372A&\n$vision.googleapis.com/ReferenceIm" + + "age\"Y\n\033DeleteReferenceImageRequest\022:\n\004na" + + "me\030\001 \001(\tB,\340A\002\372A&\n$vision.googleapis.com/" + + "ReferenceImage\"\217\001\n\035AddProductToProductSe" + + "tRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.g" + + "oogleapis.com/ProductSet\0226\n\007product\030\002 \001(" + + "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + + "\"\224\001\n\"RemoveProductFromProductSetRequest\022" + + "6\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis" + + ".com/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037" + + "\n\035vision.googleapis.com/Product\"\200\001\n\037List" + + "ProductsInProductSetRequest\0226\n\004name\030\001 \001(" + + "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + + "Set\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"u\n ListProductsInProductSetResponse\0228" + + "\n\010products\030\001 \003(\0132&.google.cloud.vision.v" + + "1p4beta1.Product\022\027\n\017next_page_token\030\002 \001(" + + "\t\"2\n\032ImportProductSetsGcsSource\022\024\n\014csv_f" + + "ile_uri\030\001 \001(\t\"y\n\034ImportProductSetsInputC" + + "onfig\022O\n\ngcs_source\030\001 \001(\01329.google.cloud" + + ".vision.v1p4beta1.ImportProductSetsGcsSo" + + "urceH\000B\010\n\006source\"\255\001\n\030ImportProductSetsRe" + + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + + ".googleapis.com/Location\022V\n\014input_config" + + "\030\002 \001(\0132;.google.cloud.vision.v1p4beta1.I" + + "mportProductSetsInputConfigB\003\340A\002\"\212\001\n\031Imp" + + "ortProductSetsResponse\022G\n\020reference_imag" + + "es\030\001 \003(\0132-.google.cloud.vision.v1p4beta1" + + ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + + "le.rpc.Status\"\236\002\n\026BatchOperationMetadata" + + "\022J\n\005state\030\001 \001(\0162;.google.cloud.vision.v1" + + "p4beta1.BatchOperationMetadata.State\022/\n\013" + + "submit_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" + + "f.Timestamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\016\n\nPROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006F" + + "AILED\020\003\022\r\n\tCANCELLED\020\004\"/\n\025ProductSetPurg" + + "eConfig\022\026\n\016product_set_id\030\001 \001(\t\"\346\001\n\024Purg" + + "eProductsRequest\022X\n\030product_set_purge_co" + + "nfig\030\002 \001(\01324.google.cloud.vision.v1p4bet" + + "a1.ProductSetPurgeConfigH\000\022 \n\026delete_orp" + + "han_products\030\003 \001(\010H\000\0229\n\006parent\030\001 \001(\tB)\340A" + + "\002\372A#\n!locations.googleapis.com/Location\022" + + "\r\n\005force\030\004 \001(\010B\010\n\006target2\322 \n\rProductSear" + + "ch\022\346\001\n\020CreateProductSet\0226.google.cloud.v" + + "ision.v1p4beta1.CreateProductSetRequest\032" + + ").google.cloud.vision.v1p4beta1.ProductS" + + "et\"o\202\323\344\223\002E\"6/v1p4beta1/{parent=projects/" + + "*/locations/*}/productSets:\013product_set\332" + + "A!parent,product_set,product_set_id\022\311\001\n\017" + + "ListProductSets\0225.google.cloud.vision.v1" + + "p4beta1.ListProductSetsRequest\0326.google." + + "cloud.vision.v1p4beta1.ListProductSetsRe" + + "sponse\"G\202\323\344\223\0028\0226/v1p4beta1/{parent=proje" + + "cts/*/locations/*}/productSets\332A\006parent\022" + + "\266\001\n\rGetProductSet\0223.google.cloud.vision." + + "v1p4beta1.GetProductSetRequest\032).google." + + "cloud.vision.v1p4beta1.ProductSet\"E\202\323\344\223\002" + + "8\0226/v1p4beta1/{name=projects/*/locations" + + "/*/productSets/*}\332A\004name\022\350\001\n\020UpdateProdu" + + "ctSet\0226.google.cloud.vision.v1p4beta1.Up" + + "dateProductSetRequest\032).google.cloud.vis" + + "ion.v1p4beta1.ProductSet\"q\202\323\344\223\002Q2B/v1p4b" + + "eta1/{product_set.name=projects/*/locati" + + "ons/*/productSets/*}:\013product_set\332A\027prod" + + "uct_set,update_mask\022\251\001\n\020DeleteProductSet" + + "\0226.google.cloud.vision.v1p4beta1.DeleteP" + + "roductSetRequest\032\026.google.protobuf.Empty" + + "\"E\202\323\344\223\0028*6/v1p4beta1/{name=projects/*/lo" + + "cations/*/productSets/*}\332A\004name\022\316\001\n\rCrea" + + "teProduct\0223.google.cloud.vision.v1p4beta" + + "1.CreateProductRequest\032&.google.cloud.vi" + + "sion.v1p4beta1.Product\"`\202\323\344\223\002>\"3/v1p4bet" + + "a1/{parent=projects/*/locations/*}/produ" + + "cts:\007product\332A\031parent,product,product_id" + + "\022\275\001\n\014ListProducts\0222.google.cloud.vision." + + "v1p4beta1.ListProductsRequest\0323.google.c" + + "loud.vision.v1p4beta1.ListProductsRespon" + + "se\"D\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/" + + "*/locations/*}/products\332A\006parent\022\252\001\n\nGet" + + "Product\0220.google.cloud.vision.v1p4beta1." + + "GetProductRequest\032&.google.cloud.vision." + + "v1p4beta1.Product\"B\202\323\344\223\0025\0223/v1p4beta1/{n" + + "ame=projects/*/locations/*/products/*}\332A" + + "\004name\022\320\001\n\rUpdateProduct\0223.google.cloud.v" + + "ision.v1p4beta1.UpdateProductRequest\032&.g" + + "oogle.cloud.vision.v1p4beta1.Product\"b\202\323" + + "\344\223\002F2;/v1p4beta1/{product.name=projects/" + + "*/locations/*/products/*}:\007product\332A\023pro" + + "duct,update_mask\022\240\001\n\rDeleteProduct\0223.goo" + + "gle.cloud.vision.v1p4beta1.DeleteProduct" + + "Request\032\026.google.protobuf.Empty\"B\202\323\344\223\0025*" + + "3/v1p4beta1/{name=projects/*/locations/*" + + "/products/*}\332A\004name\022\216\002\n\024CreateReferenceI" + + "mage\022:.google.cloud.vision.v1p4beta1.Cre" + + "ateReferenceImageRequest\032-.google.cloud." + + "vision.v1p4beta1.ReferenceImage\"\212\001\202\323\344\223\002X" + + "\"E/v1p4beta1/{parent=projects/*/location" + + "s/*/products/*}/referenceImages:\017referen" + + "ce_image\332A)parent,reference_image,refere" + + "nce_image_id\022\300\001\n\024DeleteReferenceImage\022:." + + "google.cloud.vision.v1p4beta1.DeleteRefe" + + "renceImageRequest\032\026.google.protobuf.Empt" + + "y\"T\202\323\344\223\002G*E/v1p4beta1/{name=projects/*/l" + + "ocations/*/products/*/referenceImages/*}" + + "\332A\004name\022\344\001\n\023ListReferenceImages\0229.google" + + ".cloud.vision.v1p4beta1.ListReferenceIma" + + "gesRequest\032:.google.cloud.vision.v1p4bet" + + "a1.ListReferenceImagesResponse\"V\202\323\344\223\002G\022E" + + "/v1p4beta1/{parent=projects/*/locations/" + + "*/products/*}/referenceImages\332A\006parent\022\321" + + "\001\n\021GetReferenceImage\0227.google.cloud.visi" + + "on.v1p4beta1.GetReferenceImageRequest\032-." + + "google.cloud.vision.v1p4beta1.ReferenceI" + + "mage\"T\202\323\344\223\002G\022E/v1p4beta1/{name=projects/" + + "*/locations/*/products/*/referenceImages" + + "/*}\332A\004name\022\313\001\n\026AddProductToProductSet\022<." + + "google.cloud.vision.v1p4beta1.AddProduct" + + "ToProductSetRequest\032\026.google.protobuf.Em" + + "pty\"[\202\323\344\223\002F\"A/v1p4beta1/{name=projects/*" + + "/locations/*/productSets/*}:addProduct:\001" + + "*\332A\014name,product\022\330\001\n\033RemoveProductFromPr" + + "oductSet\022A.google.cloud.vision.v1p4beta1" + + ".RemoveProductFromProductSetRequest\032\026.go" + + "ogle.protobuf.Empty\"^\202\323\344\223\002I\"D/v1p4beta1/" + + "{name=projects/*/locations/*/productSets" + + "/*}:removeProduct:\001*\332A\014name,product\022\353\001\n\030" + + "ListProductsInProductSet\022>.google.cloud." + + "vision.v1p4beta1.ListProductsInProductSe" + + "tRequest\032?.google.cloud.vision.v1p4beta1" + + ".ListProductsInProductSetResponse\"N\202\323\344\223\002" + + "A\022?/v1p4beta1/{name=projects/*/locations" + + "/*/productSets/*}/products\332A\004name\022\202\002\n\021Im" + + "portProductSets\0227.google.cloud.vision.v1" + + "p4beta1.ImportProductSetsRequest\032\035.googl" + + "e.longrunning.Operation\"\224\001\202\323\344\223\002B\"=/v1p4b" + + "eta1/{parent=projects/*/locations/*}/pro" + + "ductSets:import:\001*\332A\023parent,input_config" + + "\312A3\n\031ImportProductSetsResponse\022\026BatchOpe" + + "rationMetadata\022\344\001\n\rPurgeProducts\0223.googl" + + "e.cloud.vision.v1p4beta1.PurgeProductsRe" + + "quest\032\035.google.longrunning.Operation\"\177\202\323" + + "\344\223\002>\"9/v1p4beta1/{parent=projects/*/loca" + + "tions/*}/products:purge:\001*\332A\006parent\312A/\n\025" + + "google.protobuf.Empty\022\026BatchOperationMet" + + "adata\032v\312A\025vision.googleapis.com\322A[https:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/cloud-v" + + "isionB\217\001\n!com.google.cloud.vision.v1p4be" + + "ta1B\031ProductSearchServiceProtoP\001ZCgoogle" + + ".golang.org/genproto/googleapis/cloud/vi" + + "sion/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p4beta1_Product_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Product_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", "ProductCategory", "ProductLabels", }); + internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor = + internal_static_google_cloud_vision_v1p4beta1_Product_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor, + new java.lang.String[] { "Name", "DisplayName", "IndexTime", "IndexError", }); + internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor, + new java.lang.String[] { "Name", "Uri", "BoundingPolys", }); + internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor, + new java.lang.String[] { "Parent", "Product", "ProductId", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor, + new java.lang.String[] { "Products", "NextPageToken", }); + internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor, + new java.lang.String[] { "Product", "UpdateMask", }); + internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor, + new java.lang.String[] { "Parent", "ProductSet", "ProductSetId", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor, + new java.lang.String[] { "ProductSets", "NextPageToken", }); + internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor, + new java.lang.String[] { "ProductSet", "UpdateMask", }); + internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor, + new java.lang.String[] { "Parent", "ReferenceImage", "ReferenceImageId", }); + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor, + new java.lang.String[] { "Parent", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor, + new java.lang.String[] { "ReferenceImages", "PageSize", "NextPageToken", }); + internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor, + new java.lang.String[] { "Name", "Product", }); + internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor, + new java.lang.String[] { "Name", "Product", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor, + new java.lang.String[] { "Name", "PageSize", "PageToken", }); + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor, + new java.lang.String[] { "Products", "NextPageToken", }); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor, + new java.lang.String[] { "CsvFileUri", }); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor, + new java.lang.String[] { "GcsSource", "Source", }); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor, + new java.lang.String[] { "Parent", "InputConfig", }); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor, + new java.lang.String[] { "ReferenceImages", "Statuses", }); + internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor, + new java.lang.String[] { "State", "SubmitTime", "EndTime", }); + internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor, + new java.lang.String[] { "ProductSetId", }); + internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor, + new java.lang.String[] { "ProductSetPurgeConfig", "DeleteOrphanProducts", "Parent", "Force", "Target", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java new file mode 100644 index 000000000000..322846f8d2cd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java @@ -0,0 +1,1337 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A ProductSet contains Products. A ProductSet can contain a maximum of 1
+ * million reference images. If the limit is exceeded, periodic indexing will
+ * fail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSet} + */ +public final class ProductSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSet) + ProductSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSet.newBuilder() to construct. + private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSet() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (indexTime_ != null) { + subBuilder = indexTime_.toBuilder(); + } + indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexTime_); + indexTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (indexError_ != null) { + subBuilder = indexError_.toBuilder(); + } + indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexError_); + indexError_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSet.class, com.google.cloud.vision.v1p4beta1.ProductSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp indexTime_; + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + @java.lang.Override + public boolean hasIndexTime() { + return indexTime_ != null; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexTime() { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + return getIndexTime(); + } + + public static final int INDEX_ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status indexError_; + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + @java.lang.Override + public boolean hasIndexError() { + return indexError_ != null; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + @java.lang.Override + public com.google.rpc.Status getIndexError() { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + return getIndexError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (indexTime_ != null) { + output.writeMessage(3, getIndexTime()); + } + if (indexError_ != null) { + output.writeMessage(4, getIndexError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (indexTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIndexTime()); + } + if (indexError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIndexError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSet)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSet other = (com.google.cloud.vision.v1p4beta1.ProductSet) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; + if (hasIndexTime()) { + if (!getIndexTime() + .equals(other.getIndexTime())) return false; + } + if (hasIndexError() != other.hasIndexError()) return false; + if (hasIndexError()) { + if (!getIndexError() + .equals(other.getIndexError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasIndexTime()) { + hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexTime().hashCode(); + } + if (hasIndexError()) { + hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getIndexError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
+   * million reference images. If the limit is exceeded, periodic indexing will
+   * fail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSet) + com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSet.class, com.google.cloud.vision.v1p4beta1.ProductSet.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + if (indexTimeBuilder_ == null) { + indexTime_ = null; + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + if (indexErrorBuilder_ == null) { + indexError_ = null; + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet build() { + com.google.cloud.vision.v1p4beta1.ProductSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSet result = new com.google.cloud.vision.v1p4beta1.ProductSet(this); + result.name_ = name_; + result.displayName_ = displayName_; + if (indexTimeBuilder_ == null) { + result.indexTime_ = indexTime_; + } else { + result.indexTime_ = indexTimeBuilder_.build(); + } + if (indexErrorBuilder_ == null) { + result.indexError_ = indexError_; + } else { + result.indexError_ = indexErrorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSet) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSet other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasIndexTime()) { + mergeIndexTime(other.getIndexTime()); + } + if (other.hasIndexError()) { + mergeIndexError(other.getIndexError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user-provided name for this ProductSet. Must not be empty. Must be at
+     * most 4096 characters long.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp indexTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + public boolean hasIndexTime() { + return indexTimeBuilder_ != null || indexTime_ != null; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + public com.google.protobuf.Timestamp getIndexTime() { + if (indexTimeBuilder_ == null) { + return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } else { + return indexTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexTime_ = value; + onChanged(); + } else { + indexTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexTimeBuilder_ == null) { + indexTime_ = builderForValue.build(); + onChanged(); + } else { + indexTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { + if (indexTimeBuilder_ == null) { + if (indexTime_ != null) { + indexTime_ = + com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); + } else { + indexTime_ = value; + } + onChanged(); + } else { + indexTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexTime() { + if (indexTimeBuilder_ == null) { + indexTime_ = null; + onChanged(); + } else { + indexTime_ = null; + indexTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { + + onChanged(); + return getIndexTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { + if (indexTimeBuilder_ != null) { + return indexTimeBuilder_.getMessageOrBuilder(); + } else { + return indexTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; + } + } + /** + *
+     * Output only. The time at which this ProductSet was last indexed. Query
+     * results will reflect all updates before this time. If this ProductSet has
+     * never been indexed, this timestamp is the default value
+     * "1970-01-01T00:00:00Z".
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getIndexTimeFieldBuilder() { + if (indexTimeBuilder_ == null) { + indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getIndexTime(), + getParentForChildren(), + isClean()); + indexTime_ = null; + } + return indexTimeBuilder_; + } + + private com.google.rpc.Status indexError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + public boolean hasIndexError() { + return indexErrorBuilder_ != null || indexError_ != null; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + public com.google.rpc.Status getIndexError() { + if (indexErrorBuilder_ == null) { + return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; + } else { + return indexErrorBuilder_.getMessage(); + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexError_ = value; + onChanged(); + } else { + indexErrorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setIndexError( + com.google.rpc.Status.Builder builderForValue) { + if (indexErrorBuilder_ == null) { + indexError_ = builderForValue.build(); + onChanged(); + } else { + indexErrorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeIndexError(com.google.rpc.Status value) { + if (indexErrorBuilder_ == null) { + if (indexError_ != null) { + indexError_ = + com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); + } else { + indexError_ = value; + } + onChanged(); + } else { + indexErrorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearIndexError() { + if (indexErrorBuilder_ == null) { + indexError_ = null; + onChanged(); + } else { + indexError_ = null; + indexErrorBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getIndexErrorBuilder() { + + onChanged(); + return getIndexErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { + if (indexErrorBuilder_ != null) { + return indexErrorBuilder_.getMessageOrBuilder(); + } else { + return indexError_ == null ? + com.google.rpc.Status.getDefaultInstance() : indexError_; + } + } + /** + *
+     * Output only. If there was an error with indexing the product set, the field
+     * is populated.
+     * This field is ignored when creating a ProductSet.
+     * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getIndexErrorFieldBuilder() { + if (indexErrorBuilder_ == null) { + indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getIndexError(), + getParentForChildren(), + isClean()); + indexError_ = null; + } + return indexErrorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSet) + private static final com.google.cloud.vision.v1p4beta1.ProductSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSet(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java new file mode 100644 index 000000000000..0323799a1111 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductSetName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/productSets/{product_set}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String productSet; + + @Deprecated + protected ProductSetName() { + project = null; + location = null; + productSet = null; + } + + private ProductSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + productSet = Preconditions.checkNotNull(builder.getProductSet()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductSetName of(String project, String location, String productSet) { + return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); + } + + public static String format(String project, String location, String productSet) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProductSet(productSet) + .build() + .toString(); + } + + public static ProductSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_SET.validatedMatch( + formattedString, "ProductSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductSetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (productSet != null) { + fieldMapBuilder.put("product_set", productSet); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_SET.instantiate( + "project", project, "location", location, "product_set", productSet); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductSetName that = ((ProductSetName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.productSet, that.productSet); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(productSet); + return h; + } + + /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ + public static class Builder { + private String project; + private String location; + private String productSet; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProductSet() { + return productSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProductSet(String productSet) { + this.productSet = productSet; + return this; + } + + private Builder(ProductSetName productSetName) { + this.project = productSetName.project; + this.location = productSetName.location; + this.productSet = productSetName.productSet; + } + + public ProductSetName build() { + return new ProductSetName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java new file mode 100644 index 000000000000..9b10318dc40d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ProductSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user-provided name for this ProductSet. Must not be empty. Must be at
+   * most 4096 characters long.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexTime field is set. + */ + boolean hasIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexTime. + */ + com.google.protobuf.Timestamp getIndexTime(); + /** + *
+   * Output only. The time at which this ProductSet was last indexed. Query
+   * results will reflect all updates before this time. If this ProductSet has
+   * never been indexed, this timestamp is the default value
+   * "1970-01-01T00:00:00Z".
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); + + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the indexError field is set. + */ + boolean hasIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The indexError. + */ + com.google.rpc.Status getIndexError(); + /** + *
+   * Output only. If there was an error with indexing the product set, the field
+   * is populated.
+   * This field is ignored when creating a ProductSet.
+   * 
+ * + * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java new file mode 100644 index 000000000000..30d6cd995b28 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Config to control which ProductSet contains the Products to be deleted.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} + */ +public final class ProductSetPurgeConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + ProductSetPurgeConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProductSetPurgeConfig.newBuilder() to construct. + private ProductSetPurgeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProductSetPurgeConfig() { + productSetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProductSetPurgeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProductSetPurgeConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + productSetId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder.class); + } + + public static final int PRODUCT_SET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object productSetId_; + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + @java.lang.Override + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } + } + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, productSetId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, productSetId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig other = (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) obj; + + if (!getProductSetId() + .equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductSetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Config to control which ProductSet contains the Products to be deleted.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + productSetId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig build() { + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig buildPartial() { + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig result = new com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig(this); + result.productSetId_ = productSetId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig other) { + if (other == com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance()) return this; + if (!other.getProductSetId().isEmpty()) { + productSetId_ = other.productSetId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object productSetId_ = ""; + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + public java.lang.String getProductSetId() { + java.lang.Object ref = productSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + public com.google.protobuf.ByteString + getProductSetIdBytes() { + java.lang.Object ref = productSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + productSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @param value The productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productSetId_ = value; + onChanged(); + return this; + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @return This builder for chaining. + */ + public Builder clearProductSetId() { + + productSetId_ = getDefaultInstance().getProductSetId(); + onChanged(); + return this; + } + /** + *
+     * The ProductSet that contains the Products to delete. If a Product is a
+     * member of product_set_id in addition to other ProductSets, the Product will
+     * still be deleted.
+     * 
+ * + * string product_set_id = 1; + * @param value The bytes for productSetId to set. + * @return This builder for chaining. + */ + public Builder setProductSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productSetId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + private static final com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig(); + } + + public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSetPurgeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProductSetPurgeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java new file mode 100644 index 000000000000..6da4f7de9bae --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ProductSetPurgeConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The productSetId. + */ + java.lang.String getProductSetId(); + /** + *
+   * The ProductSet that contains the Products to delete. If a Product is a
+   * member of product_set_id in addition to other ProductSets, the Product will
+   * still be deleted.
+   * 
+ * + * string product_set_id = 1; + * @return The bytes for productSetId. + */ + com.google.protobuf.ByteString + getProductSetIdBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java new file mode 100644 index 000000000000..102b6ba750b2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A `Property` consists of a user-supplied name/value pair.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Property} + */ +public final class Property extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Property) + PropertyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Property() { + name_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Property(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Property( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: { + + uint64Value_ = input.readUInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Property.class, com.google.cloud.vision.v1p4beta1.Property.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UINT64_VALUE_FIELD_NUMBER = 3; + private long uint64Value_; + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (uint64Value_ != 0L) { + output.writeUInt64(3, uint64Value_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (uint64Value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, uint64Value_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Property)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Property other = (com.google.cloud.vision.v1p4beta1.Property) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getUint64Value() + != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUint64Value()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Property parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Property parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Property prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `Property` consists of a user-supplied name/value pair.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Property} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Property) + com.google.cloud.vision.v1p4beta1.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Property.class, com.google.cloud.vision.v1p4beta1.Property.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Property.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + value_ = ""; + + uint64Value_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Property getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Property build() { + com.google.cloud.vision.v1p4beta1.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Property buildPartial() { + com.google.cloud.vision.v1p4beta1.Property result = new com.google.cloud.vision.v1p4beta1.Property(this); + result.name_ = name_; + result.value_ = value_; + result.uint64Value_ = uint64Value_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Property) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Property)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Property other) { + if (other == com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getUint64Value() != 0L) { + setUint64Value(other.getUint64Value()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Property parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Property) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the property.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+     * Value of the property.
+     * 
+ * + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private long uint64Value_ ; + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + @java.lang.Override + public long getUint64Value() { + return uint64Value_; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @param value The uint64Value to set. + * @return This builder for chaining. + */ + public Builder setUint64Value(long value) { + + uint64Value_ = value; + onChanged(); + return this; + } + /** + *
+     * Value of numeric properties.
+     * 
+ * + * uint64 uint64_value = 3; + * @return This builder for chaining. + */ + public Builder clearUint64Value() { + + uint64Value_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Property) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Property) + private static final com.google.cloud.vision.v1p4beta1.Property DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Property(); + } + + public static com.google.cloud.vision.v1p4beta1.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Property(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java new file mode 100644 index 000000000000..eba732a7d8d5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface PropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Property) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the property.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * Value of the property.
+   * 
+ * + * string value = 2; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Value of numeric properties.
+   * 
+ * + * uint64 uint64_value = 3; + * @return The uint64Value. + */ + long getUint64Value(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java new file mode 100644 index 000000000000..30c0e2389897 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java @@ -0,0 +1,1143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `PurgeProducts` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.PurgeProductsRequest} + */ +public final class PurgeProductsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + PurgeProductsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use PurgeProductsRequest.newBuilder() to construct. + private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PurgeProductsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PurgeProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PurgeProductsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder subBuilder = null; + if (targetCase_ == 2) { + subBuilder = ((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 2; + break; + } + case 24: { + target_ = input.readBool(); + targetCase_ = 3; + break; + } + case 32: { + + force_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.Builder.class); + } + + private int targetCase_ = 0; + private java.lang.Object target_; + public enum TargetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRODUCT_SET_PURGE_CONFIG(2), + DELETE_ORPHAN_PRODUCTS(3), + TARGET_NOT_SET(0); + private final int value; + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 2: return PRODUCT_SET_PURGE_CONFIG; + case 3: return DELETE_ORPHAN_PRODUCTS; + case 0: return TARGET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public static final int PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER = 2; + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + @java.lang.Override + public boolean hasProductSetPurgeConfig() { + return targetCase_ == 2; + } + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig() { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + + public static final int DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER = 3; + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + @java.lang.Override + public boolean hasDeleteOrphanProducts() { + return targetCase_ == 3; + } + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + @java.lang.Override + public boolean getDeleteOrphanProducts() { + if (targetCase_ == 3) { + return (java.lang.Boolean) target_; + } + return false; + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 4; + private boolean force_; + /** + *
+   * The default value is false. Override this value to true to actually perform
+   * the purge.
+   * 
+ * + * bool force = 4; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (targetCase_ == 2) { + output.writeMessage(2, (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); + } + if (targetCase_ == 3) { + output.writeBool( + 3, (boolean)((java.lang.Boolean) target_)); + } + if (force_ != false) { + output.writeBool(4, force_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (targetCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); + } + if (targetCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 3, (boolean)((java.lang.Boolean) target_)); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, force_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest other = (com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getForce() + != other.getForce()) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 2: + if (!getProductSetPurgeConfig() + .equals(other.getProductSetPurgeConfig())) return false; + break; + case 3: + if (getDeleteOrphanProducts() + != other.getDeleteOrphanProducts()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + switch (targetCase_) { + case 2: + hash = (37 * hash) + PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProductSetPurgeConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeleteOrphanProducts()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `PurgeProducts` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.PurgeProductsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + com.google.cloud.vision.v1p4beta1.PurgeProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + force_ = false; + + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest build() { + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest result = new com.google.cloud.vision.v1p4beta1.PurgeProductsRequest(this); + if (targetCase_ == 2) { + if (productSetPurgeConfigBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = productSetPurgeConfigBuilder_.build(); + } + } + if (targetCase_ == 3) { + result.target_ = target_; + } + result.parent_ = parent_; + result.force_ = force_; + result.targetCase_ = targetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + switch (other.getTargetCase()) { + case PRODUCT_SET_PURGE_CONFIG: { + mergeProductSetPurgeConfig(other.getProductSetPurgeConfig()); + break; + } + case DELETE_ORPHAN_PRODUCTS: { + setDeleteOrphanProducts(other.getDeleteOrphanProducts()); + break; + } + case TARGET_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int targetCase_ = 0; + private java.lang.Object target_; + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder> productSetPurgeConfigBuilder_; + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + @java.lang.Override + public boolean hasProductSetPurgeConfig() { + return targetCase_ == 2; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig() { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } else { + if (targetCase_ == 2) { + return productSetPurgeConfigBuilder_.getMessage(); + } + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder setProductSetPurgeConfig(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig value) { + if (productSetPurgeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + productSetPurgeConfigBuilder_.setMessage(value); + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder setProductSetPurgeConfig( + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder builderForValue) { + if (productSetPurgeConfigBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + productSetPurgeConfigBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder mergeProductSetPurgeConfig(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig value) { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2 && + target_ != com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance()) { + target_ = com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.newBuilder((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 2) { + productSetPurgeConfigBuilder_.mergeFrom(value); + } else { + productSetPurgeConfigBuilder_.setMessage(value); + } + } + targetCase_ = 2; + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public Builder clearProductSetPurgeConfig() { + if (productSetPurgeConfigBuilder_ == null) { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + } + productSetPurgeConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder getProductSetPurgeConfigBuilder() { + return getProductSetPurgeConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { + if ((targetCase_ == 2) && (productSetPurgeConfigBuilder_ != null)) { + return productSetPurgeConfigBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 2) { + return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; + } + return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + } + /** + *
+     * Specify which ProductSet contains the Products to be deleted.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder> + getProductSetPurgeConfigFieldBuilder() { + if (productSetPurgeConfigBuilder_ == null) { + if (!(targetCase_ == 2)) { + target_ = com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); + } + productSetPurgeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder>( + (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 2; + onChanged();; + return productSetPurgeConfigBuilder_; + } + + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + public boolean hasDeleteOrphanProducts() { + return targetCase_ == 3; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + public boolean getDeleteOrphanProducts() { + if (targetCase_ == 3) { + return (java.lang.Boolean) target_; + } + return false; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @param value The deleteOrphanProducts to set. + * @return This builder for chaining. + */ + public Builder setDeleteOrphanProducts(boolean value) { + targetCase_ = 3; + target_ = value; + onChanged(); + return this; + } + /** + *
+     * If delete_orphan_products is true, all Products that are not in any
+     * ProductSet will be deleted.
+     * 
+ * + * bool delete_orphan_products = 3; + * @return This builder for chaining. + */ + public Builder clearDeleteOrphanProducts() { + if (targetCase_ == 3) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The project and location in which the Products should be deleted.
+     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * The default value is false. Override this value to true to actually perform
+     * the purge.
+     * 
+ * + * bool force = 4; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + private static final com.google.cloud.vision.v1p4beta1.PurgeProductsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.PurgeProductsRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PurgeProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java new file mode 100644 index 000000000000..1674236f2db8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface PurgeProductsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return Whether the productSetPurgeConfig field is set. + */ + boolean hasProductSetPurgeConfig(); + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return The productSetPurgeConfig. + */ + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig(); + /** + *
+   * Specify which ProductSet contains the Products to be deleted.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; + */ + com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder(); + + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return Whether the deleteOrphanProducts field is set. + */ + boolean hasDeleteOrphanProducts(); + /** + *
+   * If delete_orphan_products is true, all Products that are not in any
+   * ProductSet will be deleted.
+   * 
+ * + * bool delete_orphan_products = 3; + * @return The deleteOrphanProducts. + */ + boolean getDeleteOrphanProducts(); + + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The project and location in which the Products should be deleted.
+   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The default value is false. Override this value to true to actually perform
+   * the purge.
+   * 
+ * + * bool force = 4; + * @return The force. + */ + boolean getForce(); + + public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.TargetCase getTargetCase(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java new file mode 100644 index 000000000000..1db5a0eb6920 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java @@ -0,0 +1,1372 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A `ReferenceImage` represents a product image and its associated metadata,
+ * such as bounding boxes.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ReferenceImage} + */ +public final class ReferenceImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ReferenceImage) + ReferenceImageOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReferenceImage.newBuilder() to construct. + private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReferenceImage() { + name_ = ""; + uri_ = ""; + boundingPolys_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReferenceImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReferenceImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boundingPolys_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ReferenceImage.class, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; + private java.util.List boundingPolys_; + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List getBoundingPolysList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.List + getBoundingPolysOrBuilderList() { + return boundingPolys_; + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public int getBoundingPolysCount() { + return boundingPolys_.size(); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index) { + return boundingPolys_.get(index); + } + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + return boundingPolys_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + output.writeMessage(3, boundingPolys_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + for (int i = 0; i < boundingPolys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, boundingPolys_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ReferenceImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.ReferenceImage other = (com.google.cloud.vision.v1p4beta1.ReferenceImage) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (!getBoundingPolysList() + .equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getBoundingPolysCount() > 0) { + hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPolysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ReferenceImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A `ReferenceImage` represents a product image and its associated metadata,
+   * such as bounding boxes.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.ReferenceImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ReferenceImage) + com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.ReferenceImage.class, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.ReferenceImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoundingPolysFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uri_ = ""; + + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage build() { + com.google.cloud.vision.v1p4beta1.ReferenceImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage buildPartial() { + com.google.cloud.vision.v1p4beta1.ReferenceImage result = new com.google.cloud.vision.v1p4beta1.ReferenceImage(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.uri_ = uri_; + if (boundingPolysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boundingPolys_ = boundingPolys_; + } else { + result.boundingPolys_ = boundingPolysBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.ReferenceImage) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.ReferenceImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ReferenceImage other) { + if (other == com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (boundingPolysBuilder_ == null) { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolys_.isEmpty()) { + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundingPolysIsMutable(); + boundingPolys_.addAll(other.boundingPolys_); + } + onChanged(); + } + } else { + if (!other.boundingPolys_.isEmpty()) { + if (boundingPolysBuilder_.isEmpty()) { + boundingPolysBuilder_.dispose(); + boundingPolysBuilder_ = null; + boundingPolys_ = other.boundingPolys_; + bitField0_ = (bitField0_ & ~0x00000001); + boundingPolysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoundingPolysFieldBuilder() : null; + } else { + boundingPolysBuilder_.addAllMessages(other.boundingPolys_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.ReferenceImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.ReferenceImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the reference image.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+     * This field is ignored when creating a reference image.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+     * Required. The Google Cloud Storage URI of the reference image.
+     * The URI must start with `gs://`.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.util.List boundingPolys_ = + java.util.Collections.emptyList(); + private void ensureBoundingPolysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boundingPolys_ = new java.util.ArrayList(boundingPolys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolysBuilder_; + + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List getBoundingPolysList() { + if (boundingPolysBuilder_ == null) { + return java.util.Collections.unmodifiableList(boundingPolys_); + } else { + return boundingPolysBuilder_.getMessageList(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public int getBoundingPolysCount() { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.size(); + } else { + return boundingPolysBuilder_.getCount(); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); + } else { + return boundingPolysBuilder_.getMessage(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, value); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBoundingPolys( + int index, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.set(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingPolysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, value); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addBoundingPolys( + int index, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.add(index, builderForValue.build()); + onChanged(); + } else { + boundingPolysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder addAllBoundingPolys( + java.lang.Iterable values) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boundingPolys_); + onChanged(); + } else { + boundingPolysBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearBoundingPolys() { + if (boundingPolysBuilder_ == null) { + boundingPolys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boundingPolysBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeBoundingPolys(int index) { + if (boundingPolysBuilder_ == null) { + ensureBoundingPolysIsMutable(); + boundingPolys_.remove(index); + onChanged(); + } else { + boundingPolysBuilder_.remove(index); + } + return this; + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().getBuilder(index); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index) { + if (boundingPolysBuilder_ == null) { + return boundingPolys_.get(index); } else { + return boundingPolysBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysOrBuilderList() { + if (boundingPolysBuilder_ != null) { + return boundingPolysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boundingPolys_); + } + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBuilder() { + return getBoundingPolysFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBuilder( + int index) { + return getBoundingPolysFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()); + } + /** + *
+     * Optional. Bounding polygons around the areas of interest in the reference
+     * image. If this field is empty, the system will try to detect regions of
+     * interest. At most 10 bounding polygons will be used.
+     * The provided shape is converted into a non-rotated rectangle. Once
+     * converted, the small edge of the rectangle must be greater than or equal
+     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+     * is not).
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public java.util.List + getBoundingPolysBuilderList() { + return getBoundingPolysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingPolysFieldBuilder() { + if (boundingPolysBuilder_ == null) { + boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + boundingPolys_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boundingPolys_ = null; + } + return boundingPolysBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ReferenceImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ReferenceImage) + private static final com.google.cloud.vision.v1p4beta1.ReferenceImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ReferenceImage(); + } + + public static com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReferenceImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReferenceImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java new file mode 100644 index 000000000000..23f38e21c30f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ReferenceImageName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + private final String referenceImage; + + @Deprecated + protected ReferenceImageName() { + project = null; + location = null; + product = null; + referenceImage = null; + } + + private ReferenceImageName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ReferenceImageName of( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build(); + } + + public static String format( + String project, String location, String product, String referenceImage) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .setReferenceImage(referenceImage) + .build() + .toString(); + } + + public static ReferenceImageName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( + formattedString, "ReferenceImageName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("product"), + matchMap.get("reference_image")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ReferenceImageName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + if (referenceImage != null) { + fieldMapBuilder.put("reference_image", referenceImage); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( + "project", + project, + "location", + location, + "product", + product, + "reference_image", + referenceImage); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ReferenceImageName that = ((ReferenceImageName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product) + && Objects.equals(this.referenceImage, that.referenceImage); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + h *= 1000003; + h ^= Objects.hashCode(referenceImage); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. + */ + public static class Builder { + private String project; + private String location; + private String product; + private String referenceImage; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public String getReferenceImage() { + return referenceImage; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + public Builder setReferenceImage(String referenceImage) { + this.referenceImage = referenceImage; + return this; + } + + private Builder(ReferenceImageName referenceImageName) { + this.project = referenceImageName.project; + this.location = referenceImageName.location; + this.product = referenceImageName.product; + this.referenceImage = referenceImageName.referenceImage; + } + + public ReferenceImageName build() { + return new ReferenceImageName(this); + } + } +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java new file mode 100644 index 000000000000..0168999b06e7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface ReferenceImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ReferenceImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the reference image.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
+   * This field is ignored when creating a reference image.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * Required. The Google Cloud Storage URI of the reference image.
+   * The URI must start with `gs://`.
+   * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getBoundingPolysCount(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.List + getBoundingPolysOrBuilderList(); + /** + *
+   * Optional. Bounding polygons around the areas of interest in the reference
+   * image. If this field is empty, the system will try to detect regions of
+   * interest. At most 10 bounding polygons will be used.
+   * The provided shape is converted into a non-rotated rectangle. Once
+   * converted, the small edge of the rectangle must be greater than or equal
+   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
+   * is not).
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java new file mode 100644 index 000000000000..fdcef3b96f73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java @@ -0,0 +1,796 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `RemoveProductFromProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} + */ +public final class RemoveProductFromProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) + RemoveProductFromProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RemoveProductFromProductSetRequest.newBuilder() to construct. + private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RemoveProductFromProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RemoveProductFromProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RemoveProductFromProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 2; + private volatile java.lang.Object product_; + /** + *
+   * Required. The resource name for the Product to be removed from this
+   * ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + *
+   * Required. The resource name for the Product to be removed from this
+   * ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProduct() + .equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `RemoveProductFromProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest(this); + result.name_ = name_; + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the ProductSet to modify.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + /** + *
+     * Required. The resource name for the Product to be removed from this
+     * ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this
+     * ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + public com.google.protobuf.ByteString + getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name for the Product to be removed from this
+     * ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this
+     * ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name for the Product to be removed from this
+     * ProductSet.
+     * Format is:
+     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+     * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveProductFromProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveProductFromProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..8e1d54f4ce7d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface RemoveProductFromProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The resource name for the ProductSet to modify.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required. The resource name for the Product to be removed from this
+   * ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The product. + */ + java.lang.String getProduct(); + /** + *
+   * Required. The resource name for the Product to be removed from this
+   * ProductSet.
+   * Format is:
+   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
+   * 
+ * + * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for product. + */ + com.google.protobuf.ByteString + getProductBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java new file mode 100644 index 000000000000..7586ab5abe73 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Set of features pertaining to the image, computed by computer vision
+ * methods over safe-search verticals (for example, adult, spoof, medical,
+ * violence).
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.SafeSearchAnnotation} + */ +public final class SafeSearchAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) + SafeSearchAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use SafeSearchAnnotation.newBuilder() to construct. + private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SafeSearchAnnotation() { + adult_ = 0; + spoof_ = 0; + medical_ = 0; + violence_ = 0; + racy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SafeSearchAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SafeSearchAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + adult_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + + spoof_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + medical_ = rawValue; + break; + } + case 32: { + int rawValue = input.readEnum(); + + violence_ = rawValue; + break; + } + case 72: { + int rawValue = input.readEnum(); + + racy_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder.class); + } + + public static final int ADULT_FIELD_NUMBER = 1; + private int adult_; + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int SPOOF_FIELD_NUMBER = 2; + private int spoof_; + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int MEDICAL_FIELD_NUMBER = 3; + private int medical_; + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int VIOLENCE_FIELD_NUMBER = 4; + private int violence_; + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + public static final int RACY_FIELD_NUMBER = 9; + private int racy_; + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adult_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + output.writeEnum(9, racy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adult_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, adult_); + } + if (spoof_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, spoof_); + } + if (medical_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, medical_); + } + if (violence_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, violence_); + } + if (racy_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(9, racy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) obj; + + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADULT_FIELD_NUMBER; + hash = (53 * hash) + adult_; + hash = (37 * hash) + SPOOF_FIELD_NUMBER; + hash = (53 * hash) + spoof_; + hash = (37 * hash) + MEDICAL_FIELD_NUMBER; + hash = (53 * hash) + medical_; + hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; + hash = (53 * hash) + violence_; + hash = (37 * hash) + RACY_FIELD_NUMBER; + hash = (53 * hash) + racy_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of features pertaining to the image, computed by computer vision
+   * methods over safe-search verticals (for example, adult, spoof, medical,
+   * violence).
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.SafeSearchAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adult_ = 0; + + spoof_ = 0; + + medical_ = 0; + + violence_ = 0; + + racy_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation build() { + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation(this); + result.adult_ = adult_; + result.spoof_ = spoof_; + result.medical_ = medical_; + result.violence_ = violence_; + result.racy_ = racy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance()) return this; + if (other.adult_ != 0) { + setAdultValue(other.getAdultValue()); + } + if (other.spoof_ != 0) { + setSpoofValue(other.getSpoofValue()); + } + if (other.medical_ != 0) { + setMedicalValue(other.getMedicalValue()); + } + if (other.violence_ != 0) { + setViolenceValue(other.getViolenceValue()); + } + if (other.racy_ != 0) { + setRacyValue(other.getRacyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int adult_ = 0; + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + @java.lang.Override public int getAdultValue() { + return adult_; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @param value The enum numeric value on the wire for adult to set. + * @return This builder for chaining. + */ + public Builder setAdultValue(int value) { + + adult_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The adult. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getAdult() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(adult_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @param value The adult to set. + * @return This builder for chaining. + */ + public Builder setAdult(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + adult_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Represents the adult content likelihood for the image. Adult content may
+     * contain elements such as nudity, pornographic images or cartoons, or
+     * sexual activities.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return This builder for chaining. + */ + public Builder clearAdult() { + + adult_ = 0; + onChanged(); + return this; + } + + private int spoof_ = 0; + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + @java.lang.Override public int getSpoofValue() { + return spoof_; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @param value The enum numeric value on the wire for spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoofValue(int value) { + + spoof_ = value; + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The spoof. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getSpoof() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(spoof_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @param value The spoof to set. + * @return This builder for chaining. + */ + public Builder setSpoof(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + spoof_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Spoof likelihood. The likelihood that an modification
+     * was made to the image's canonical version to make it appear
+     * funny or offensive.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return This builder for chaining. + */ + public Builder clearSpoof() { + + spoof_ = 0; + onChanged(); + return this; + } + + private int medical_ = 0; + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + @java.lang.Override public int getMedicalValue() { + return medical_; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @param value The enum numeric value on the wire for medical to set. + * @return This builder for chaining. + */ + public Builder setMedicalValue(int value) { + + medical_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The medical. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getMedical() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(medical_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @param value The medical to set. + * @return This builder for chaining. + */ + public Builder setMedical(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + medical_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this is a medical image.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return This builder for chaining. + */ + public Builder clearMedical() { + + medical_ = 0; + onChanged(); + return this; + } + + private int violence_ = 0; + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + @java.lang.Override public int getViolenceValue() { + return violence_; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @param value The enum numeric value on the wire for violence to set. + * @return This builder for chaining. + */ + public Builder setViolenceValue(int value) { + + violence_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The violence. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getViolence() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(violence_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @param value The violence to set. + * @return This builder for chaining. + */ + public Builder setViolence(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + violence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that this image contains violent content.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return This builder for chaining. + */ + public Builder clearViolence() { + + violence_ = 0; + onChanged(); + return this; + } + + private int racy_ = 0; + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + @java.lang.Override public int getRacyValue() { + return racy_; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @param value The enum numeric value on the wire for racy to set. + * @return This builder for chaining. + */ + public Builder setRacyValue(int value) { + + racy_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The racy. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Likelihood getRacy() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(racy_); + return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @param value The racy to set. + * @return This builder for chaining. + */ + public Builder setRacy(com.google.cloud.vision.v1p4beta1.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + racy_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood that the request image contains racy content. Racy content may
+     * include (but is not limited to) skimpy or sheer clothing, strategically
+     * covered nudity, lewd or provocative poses, or close-ups of sensitive
+     * body areas.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return This builder for chaining. + */ + public Builder clearRacy() { + + racy_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) + private static final com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafeSearchAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SafeSearchAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java new file mode 100644 index 000000000000..215efc0708bd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface SafeSearchAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The enum numeric value on the wire for adult. + */ + int getAdultValue(); + /** + *
+   * Represents the adult content likelihood for the image. Adult content may
+   * contain elements such as nudity, pornographic images or cartoons, or
+   * sexual activities.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; + * @return The adult. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getAdult(); + + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The enum numeric value on the wire for spoof. + */ + int getSpoofValue(); + /** + *
+   * Spoof likelihood. The likelihood that an modification
+   * was made to the image's canonical version to make it appear
+   * funny or offensive.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; + * @return The spoof. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getSpoof(); + + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The enum numeric value on the wire for medical. + */ + int getMedicalValue(); + /** + *
+   * Likelihood that this is a medical image.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; + * @return The medical. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getMedical(); + + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The enum numeric value on the wire for violence. + */ + int getViolenceValue(); + /** + *
+   * Likelihood that this image contains violent content.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; + * @return The violence. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getViolence(); + + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The enum numeric value on the wire for racy. + */ + int getRacyValue(); + /** + *
+   * Likelihood that the request image contains racy content. Racy content may
+   * include (but is not limited to) skimpy or sheer clothing, strategically
+   * covered nudity, lewd or provocative poses, or close-ups of sensitive
+   * body areas.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; + * @return The racy. + */ + com.google.cloud.vision.v1p4beta1.Likelihood getRacy(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java new file mode 100644 index 000000000000..704cc93c6ca5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A single symbol representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Symbol} + */ +public final class Symbol extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Symbol) + SymbolOrBuilder { +private static final long serialVersionUID = 0L; + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Symbol() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Symbol(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Symbol.class, com.google.cloud.vision.v1p4beta1.Symbol.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int TEXT_FIELD_NUMBER = 3; + private volatile java.lang.Object text_; + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Symbol)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Symbol other = (com.google.cloud.vision.v1p4beta1.Symbol) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getText() + .equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Symbol prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single symbol representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Symbol} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Symbol) + com.google.cloud.vision.v1p4beta1.SymbolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Symbol.class, com.google.cloud.vision.v1p4beta1.Symbol.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Symbol.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + text_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Symbol build() { + com.google.cloud.vision.v1p4beta1.Symbol result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Symbol buildPartial() { + com.google.cloud.vision.v1p4beta1.Symbol result = new com.google.cloud.vision.v1p4beta1.Symbol(this); + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + result.text_ = text_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Symbol) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Symbol)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Symbol other) { + if (other == com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Symbol parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Symbol) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the symbol.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the symbol.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * The actual UTF-8 representation of the symbol.
+     * 
+ * + * string text = 3; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the symbol. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Symbol) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Symbol) + private static final com.google.cloud.vision.v1p4beta1.Symbol DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Symbol(); + } + + public static com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java new file mode 100644 index 000000000000..b4ee30e25b1d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Symbol) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the symbol.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the symbol.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * The actual UTF-8 representation of the symbol.
+   * 
+ * + * string text = 3; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + *
+   * Confidence of the OCR results for the symbol. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java new file mode 100644 index 000000000000..70b394e9ce8a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java @@ -0,0 +1,3814 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * TextAnnotation contains a structured representation of OCR extracted text.
+ * The hierarchy of an OCR extracted text structure is like this:
+ *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+ * Each structural component, starting from Page, may further have their own
+ * properties. Properties describe detected languages, breaks etc.. Please refer
+ * to the
+ * [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty]
+ * message definition below for more detail.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation} + */ +public final class TextAnnotation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation) + TextAnnotationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextAnnotation.newBuilder() to construct. + private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextAnnotation() { + pages_ = java.util.Collections.emptyList(); + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextAnnotation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Page.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder.class); + } + + public interface DetectedLanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + float getConfidence(); + } + /** + *
+   * Detected language for a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} + */ + public static final class DetectedLanguage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) + DetectedLanguageOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedLanguage.newBuilder() to construct. + private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedLanguage() { + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedLanguage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedLanguage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 21: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_FIELD_NUMBER = 2; + private float confidence_; + /** + *
+     * Confidence of detected language. Range [0, 1].
+     * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(2, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) obj; + + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected language for a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + languageCode_ = ""; + + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage build() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage buildPartial() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage(this); + result.languageCode_ = languageCode_; + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage other) { + if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+       * information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private float confidence_ ; + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+       * Confidence of detected language. Range [0, 1].
+       * 
+ * + * float confidence = 2; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) + private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage(); + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedLanguage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedLanguage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedBreakOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType(); + + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + boolean getIsPrefix(); + } + /** + *
+   * Detected start or end of a structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} + */ + public static final class DetectedBreak extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) + DetectedBreakOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedBreak.newBuilder() to construct. + private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedBreak() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedBreak(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedBreak( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: { + + isPrefix_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + /** + *
+     * Enum to denote the type of break found. New line, space etc.
+     * 
+ * + * Protobuf enum {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType} + */ + public enum BreakType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + SPACE(1), + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + SURE_SPACE(2), + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + EOL_SURE_SPACE(3), + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + HYPHEN(4), + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + LINE_BREAK(5), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unknown break label type.
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Regular space.
+       * 
+ * + * SPACE = 1; + */ + public static final int SPACE_VALUE = 1; + /** + *
+       * Sure space (very wide).
+       * 
+ * + * SURE_SPACE = 2; + */ + public static final int SURE_SPACE_VALUE = 2; + /** + *
+       * Line-wrapping break.
+       * 
+ * + * EOL_SURE_SPACE = 3; + */ + public static final int EOL_SURE_SPACE_VALUE = 3; + /** + *
+       * End-line hyphen that is not present in text; does not co-occur with
+       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
+       * 
+ * + * HYPHEN = 4; + */ + public static final int HYPHEN_VALUE = 4; + /** + *
+       * Line break that ends a paragraph.
+       * 
+ * + * LINE_BREAK = 5; + */ + public static final int LINE_BREAK_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BreakType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BreakType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return SPACE; + case 2: return SURE_SPACE; + case 3: return EOL_SURE_SPACE; + case 4: return HYPHEN; + case 5: return LINE_BREAK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BreakType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BreakType findValueByNumber(int number) { + return BreakType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); + } + + private static final BreakType[] VALUES = values(); + + public static BreakType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BreakType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Detected break type.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + + public static final int IS_PREFIX_FIELD_NUMBER = 2; + private boolean isPrefix_; + /** + *
+     * True if break prepends the element.
+     * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (isPrefix_ != false) { + output.writeBool(2, isPrefix_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (isPrefix_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isPrefix_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) obj; + + if (type_ != other.type_) return false; + if (getIsPrefix() + != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPrefix()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Detected start or end of a structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + isPrefix_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak build() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak buildPartial() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak(this); + result.type_ = type_; + result.isPrefix_ = isPrefix_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak other) { + if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getIsPrefix() != false) { + setIsPrefix(other.getIsPrefix()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); + return result == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Detected break type.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean isPrefix_ ; + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return The isPrefix. + */ + @java.lang.Override + public boolean getIsPrefix() { + return isPrefix_; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @param value The isPrefix to set. + * @return This builder for chaining. + */ + public Builder setIsPrefix(boolean value) { + + isPrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * True if break prepends the element.
+       * 
+ * + * bool is_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearIsPrefix() { + + isPrefix_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) + private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak(); + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedBreak parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedBreak(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TextPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + int getDetectedLanguagesCount(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + java.util.List + getDetectedLanguagesOrBuilderList(); + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index); + + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + boolean hasDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak(); + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); + } + /** + *
+   * Additional information detected on the structural component.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} + */ + public static final class TextProperty extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) + TextPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextProperty.newBuilder() to construct. + private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextProperty() { + detectedLanguages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextProperty(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextProperty( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectedLanguages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; + if (detectedBreak_ != null) { + subBuilder = detectedBreak_.toBuilder(); + } + detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectedBreak_); + detectedBreak_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder.class); + } + + public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; + private java.util.List detectedLanguages_; + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List getDetectedLanguagesList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public java.util.List + getDetectedLanguagesOrBuilderList() { + return detectedLanguages_; + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public int getDetectedLanguagesCount() { + return detectedLanguages_.size(); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + return detectedLanguages_.get(index); + } + /** + *
+     * A list of detected languages together with confidence.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + return detectedLanguages_.get(index); + } + + public static final int DETECTED_BREAK_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_; + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + @java.lang.Override + public boolean hasDetectedBreak() { + return detectedBreak_ != null; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + return detectedBreak_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + /** + *
+     * Detected start or end of a text segment.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + return getDetectedBreak(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < detectedLanguages_.size(); i++) { + output.writeMessage(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + output.writeMessage(2, getDetectedBreak()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < detectedLanguages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, detectedLanguages_.get(i)); + } + if (detectedBreak_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectedBreak()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) obj; + + if (!getDetectedLanguagesList() + .equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; + if (hasDetectedBreak()) { + if (!getDetectedBreak() + .equals(other.getDetectedBreak())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDetectedLanguagesCount() > 0) { + hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedLanguagesList().hashCode(); + } + if (hasDetectedBreak()) { + hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; + hash = (53 * hash) + getDetectedBreak().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Additional information detected on the structural component.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectedLanguagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectedLanguagesBuilder_.clear(); + } + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty build() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty buildPartial() { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty(this); + int from_bitField0_ = bitField0_; + if (detectedLanguagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectedLanguages_ = detectedLanguages_; + } else { + result.detectedLanguages_ = detectedLanguagesBuilder_.build(); + } + if (detectedBreakBuilder_ == null) { + result.detectedBreak_ = detectedBreak_; + } else { + result.detectedBreak_ = detectedBreakBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty other) { + if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; + if (detectedLanguagesBuilder_ == null) { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguages_.isEmpty()) { + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.addAll(other.detectedLanguages_); + } + onChanged(); + } + } else { + if (!other.detectedLanguages_.isEmpty()) { + if (detectedLanguagesBuilder_.isEmpty()) { + detectedLanguagesBuilder_.dispose(); + detectedLanguagesBuilder_ = null; + detectedLanguages_ = other.detectedLanguages_; + bitField0_ = (bitField0_ & ~0x00000001); + detectedLanguagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectedLanguagesFieldBuilder() : null; + } else { + detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); + } + } + } + if (other.hasDetectedBreak()) { + mergeDetectedBreak(other.getDetectedBreak()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List detectedLanguages_ = + java.util.Collections.emptyList(); + private void ensureDetectedLanguagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; + + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List getDetectedLanguagesList() { + if (detectedLanguagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } else { + return detectedLanguagesBuilder_.getMessageList(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public int getDetectedLanguagesCount() { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.size(); + } else { + return detectedLanguagesBuilder_.getCount(); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); + } else { + return detectedLanguagesBuilder_.getMessage(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder setDetectedLanguages( + int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { + if (detectedLanguagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, value); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addDetectedLanguages( + int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder addAllDetectedLanguages( + java.lang.Iterable values) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedLanguages_); + onChanged(); + } else { + detectedLanguagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder clearDetectedLanguages() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectedLanguagesBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public Builder removeDetectedLanguages(int index) { + if (detectedLanguagesBuilder_ == null) { + ensureDetectedLanguagesIsMutable(); + detectedLanguages_.remove(index); + onChanged(); + } else { + detectedLanguagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( + int index) { + if (detectedLanguagesBuilder_ == null) { + return detectedLanguages_.get(index); } else { + return detectedLanguagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesOrBuilderList() { + if (detectedLanguagesBuilder_ != null) { + return detectedLanguagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedLanguages_); + } + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { + return getDetectedLanguagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( + int index) { + return getDetectedLanguagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); + } + /** + *
+       * A list of detected languages together with confidence.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + public java.util.List + getDetectedLanguagesBuilderList() { + return getDetectedLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder> + getDetectedLanguagesFieldBuilder() { + if (detectedLanguagesBuilder_ == null) { + detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder>( + detectedLanguages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectedLanguages_ = null; + } + return detectedLanguagesBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return Whether the detectedBreak field is set. + */ + public boolean hasDetectedBreak() { + return detectedBreakBuilder_ != null || detectedBreak_ != null; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + * @return The detectedBreak. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak() { + if (detectedBreakBuilder_ == null) { + return detectedBreak_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } else { + return detectedBreakBuilder_.getMessage(); + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedBreak_ = value; + onChanged(); + } else { + detectedBreakBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder setDetectedBreak( + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = builderForValue.build(); + onChanged(); + } else { + detectedBreakBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder mergeDetectedBreak(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak value) { + if (detectedBreakBuilder_ == null) { + if (detectedBreak_ != null) { + detectedBreak_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); + } else { + detectedBreak_ = value; + } + onChanged(); + } else { + detectedBreakBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public Builder clearDetectedBreak() { + if (detectedBreakBuilder_ == null) { + detectedBreak_ = null; + onChanged(); + } else { + detectedBreak_ = null; + detectedBreakBuilder_ = null; + } + + return this; + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { + + onChanged(); + return getDetectedBreakFieldBuilder().getBuilder(); + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { + if (detectedBreakBuilder_ != null) { + return detectedBreakBuilder_.getMessageOrBuilder(); + } else { + return detectedBreak_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; + } + } + /** + *
+       * Detected start or end of a text segment.
+       * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder> + getDetectedBreakFieldBuilder() { + if (detectedBreakBuilder_ == null) { + detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder>( + getDetectedBreak(), + getParentForChildren(), + isClean()); + detectedBreak_ = null; + } + return detectedBreakBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) + private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty(); + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextProperty(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PAGES_FIELD_NUMBER = 1; + private java.util.List pages_; + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + @java.lang.Override + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Page getPages(int index) { + return pages_.get(index); + } + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + + public static final int TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object text_; + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.TextAnnotation other = (com.google.cloud.vision.v1p4beta1.TextAnnotation) obj; + + if (!getPagesList() + .equals(other.getPagesList())) return false; + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * TextAnnotation contains a structured representation of OCR extracted text.
+   * The hierarchy of an OCR extracted text structure is like this:
+   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
+   * Each structural component, starting from Page, may further have their own
+   * properties. Properties describe detected languages, breaks etc.. Please refer
+   * to the
+   * [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty]
+   * message definition below for more detail.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation) + com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextAnnotation.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pagesBuilder_.clear(); + } + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation build() { + com.google.cloud.vision.v1p4beta1.TextAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation buildPartial() { + com.google.cloud.vision.v1p4beta1.TextAnnotation result = new com.google.cloud.vision.v1p4beta1.TextAnnotation(this); + int from_bitField0_ = bitField0_; + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation other) { + if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance()) return this; + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000001); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesFieldBuilder() : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.TextAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pages_ = + java.util.Collections.emptyList(); + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder> pagesBuilder_; + + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p4beta1.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p4beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder setPages( + int index, com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder addPages(com.google.cloud.vision.v1p4beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p4beta1.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder addPages( + com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder addPages( + int index, com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder addAllPages( + java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p4beta1.Page.Builder getPagesBuilder( + int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( + int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public java.util.List + getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p4beta1.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public com.google.cloud.vision.v1p4beta1.Page.Builder addPagesBuilder( + int index) { + return getPagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()); + } + /** + *
+     * List of pages detected by OCR.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + public java.util.List + getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder>( + pages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.lang.Object text_ = ""; + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+     * UTF-8 text detected on the pages.
+     * 
+ * + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation) + private static final com.google.cloud.vision.v1p4beta1.TextAnnotation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation(); + } + + public static com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java new file mode 100644 index 000000000000..5883d723e2da --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface TextAnnotationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + java.util.List + getPagesList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p4beta1.Page getPages(int index); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + int getPagesCount(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + java.util.List + getPagesOrBuilderList(); + /** + *
+   * List of pages detected by OCR.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; + */ + com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( + int index); + + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The text. + */ + java.lang.String getText(); + /** + *
+   * UTF-8 text detected on the pages.
+   * 
+ * + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java new file mode 100644 index 000000000000..a7b95a3adc26 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class TextAnnotationProto { + private TextAnnotationProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/vision/v1p4beta1/text_ann" + + "otation.proto\022\035google.cloud.vision.v1p4b" + + "eta1\032,google/cloud/vision/v1p4beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p4beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p4beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p4beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p4beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p4beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p4beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p4beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p4beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p4beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p4beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p4beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p4beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p4bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "4beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p4beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p4beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p4beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p4beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\211\001\n!com.google.cloud.vision.v1p4" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), + }); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor, + new java.lang.String[] { "Pages", "Text", }); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor = + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor, + new java.lang.String[] { "LanguageCode", "Confidence", }); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor = + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor, + new java.lang.String[] { "Type", "IsPrefix", }); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor = + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor, + new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); + internal_static_google_cloud_vision_v1p4beta1_Page_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Page_descriptor, + new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); + internal_static_google_cloud_vision_v1p4beta1_Block_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Block_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); + internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); + internal_static_google_cloud_vision_v1p4beta1_Word_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Word_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); + internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor, + new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); + com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java new file mode 100644 index 000000000000..c77dee331ebb --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Parameters for text detections. This is used to control TEXT_DETECTION and
+ * DOCUMENT_TEXT_DETECTION features.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextDetectionParams} + */ +public final class TextDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextDetectionParams) + TextDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TextDetectionParams.newBuilder() to construct. + private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TextDetectionParams() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TextDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 72: { + + enableTextDetectionConfidenceScore_ = input.readBool(); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + advancedOcrOptions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextDetectionParams.class, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder.class); + } + + public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; + private boolean enableTextDetectionConfidenceScore_; + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + + public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; + private com.google.protobuf.LazyStringList advancedOcrOptions_; + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_; + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (enableTextDetectionConfidenceScore_ != false) { + output.writeBool(9, enableTextDetectionConfidenceScore_); + } + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTextDetectionConfidenceScore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, enableTextDetectionConfidenceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < advancedOcrOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvancedOcrOptionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.TextDetectionParams other = (com.google.cloud.vision.v1p4beta1.TextDetectionParams) obj; + + if (getEnableTextDetectionConfidenceScore() + != other.getEnableTextDetectionConfidenceScore()) return false; + if (!getAdvancedOcrOptionsList() + .equals(other.getAdvancedOcrOptionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableTextDetectionConfidenceScore()); + if (getAdvancedOcrOptionsCount() > 0) { + hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for text detections. This is used to control TEXT_DETECTION and
+   * DOCUMENT_TEXT_DETECTION features.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.TextDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextDetectionParams) + com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.TextDetectionParams.class, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.TextDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + enableTextDetectionConfidenceScore_ = false; + + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParams build() { + com.google.cloud.vision.v1p4beta1.TextDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParams buildPartial() { + com.google.cloud.vision.v1p4beta1.TextDetectionParams result = new com.google.cloud.vision.v1p4beta1.TextDetectionParams(this); + int from_bitField0_ = bitField0_; + result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; + if (((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.advancedOcrOptions_ = advancedOcrOptions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.TextDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.TextDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextDetectionParams other) { + if (other == com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance()) return this; + if (other.getEnableTextDetectionConfidenceScore() != false) { + setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); + } + if (!other.advancedOcrOptions_.isEmpty()) { + if (advancedOcrOptions_.isEmpty()) { + advancedOcrOptions_ = other.advancedOcrOptions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.addAll(other.advancedOcrOptions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.TextDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.TextDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private boolean enableTextDetectionConfidenceScore_ ; + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + @java.lang.Override + public boolean getEnableTextDetectionConfidenceScore() { + return enableTextDetectionConfidenceScore_; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @param value The enableTextDetectionConfidenceScore to set. + * @return This builder for chaining. + */ + public Builder setEnableTextDetectionConfidenceScore(boolean value) { + + enableTextDetectionConfidenceScore_ = value; + onChanged(); + return this; + } + /** + *
+     * By default, Cloud Vision API only includes confidence score for
+     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+     * score for TEXT_DETECTION as well.
+     * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return This builder for chaining. + */ + public Builder clearEnableTextDetectionConfidenceScore() { + + enableTextDetectionConfidenceScore_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdvancedOcrOptionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + public com.google.protobuf.ProtocolStringList + getAdvancedOcrOptionsList() { + return advancedOcrOptions_.getUnmodifiableView(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + public int getAdvancedOcrOptionsCount() { + return advancedOcrOptions_.size(); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + public java.lang.String getAdvancedOcrOptions(int index) { + return advancedOcrOptions_.get(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + public com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index) { + return advancedOcrOptions_.getByteString(index); + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index to set the value at. + * @param value The advancedOcrOptions to set. + * @return This builder for chaining. + */ + public Builder setAdvancedOcrOptions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param values The advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAllAdvancedOcrOptions( + java.lang.Iterable values) { + ensureAdvancedOcrOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, advancedOcrOptions_); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @return This builder for chaining. + */ + public Builder clearAdvancedOcrOptions() { + advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of advanced OCR options to fine-tune OCR behavior.
+     * 
+ * + * repeated string advanced_ocr_options = 11; + * @param value The bytes of the advancedOcrOptions to add. + * @return This builder for chaining. + */ + public Builder addAdvancedOcrOptionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvancedOcrOptionsIsMutable(); + advancedOcrOptions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextDetectionParams) + private static final com.google.cloud.vision.v1p4beta1.TextDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextDetectionParams(); + } + + public static com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..6740edf2cae5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface TextDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * By default, Cloud Vision API only includes confidence score for
+   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
+   * score for TEXT_DETECTION as well.
+   * 
+ * + * bool enable_text_detection_confidence_score = 9; + * @return The enableTextDetectionConfidenceScore. + */ + boolean getEnableTextDetectionConfidenceScore(); + + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return A list containing the advancedOcrOptions. + */ + java.util.List + getAdvancedOcrOptionsList(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @return The count of advancedOcrOptions. + */ + int getAdvancedOcrOptionsCount(); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the element to return. + * @return The advancedOcrOptions at the given index. + */ + java.lang.String getAdvancedOcrOptions(int index); + /** + *
+   * A list of advanced OCR options to fine-tune OCR behavior.
+   * 
+ * + * repeated string advanced_ocr_options = 11; + * @param index The index of the value to return. + * @return The bytes of the advancedOcrOptions at the given index. + */ + com.google.protobuf.ByteString + getAdvancedOcrOptionsBytes(int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java new file mode 100644 index 000000000000..261460028d11 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java @@ -0,0 +1,961 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `UpdateProduct` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductRequest} + */ +public final class UpdateProductRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.UpdateProductRequest) + UpdateProductRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductRequest.newBuilder() to construct. + private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductRequest.Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.Product product_; + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (product_ != null) { + output.writeMessage(1, getProduct()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProduct()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.UpdateProductRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductRequest) obj; + + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct() + .equals(other.getProduct())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.UpdateProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProduct` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.UpdateProductRequest) + com.google.cloud.vision.v1p4beta1.UpdateProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.UpdateProductRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductRequest build() { + com.google.cloud.vision.v1p4beta1.UpdateProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.UpdateProductRequest result = new com.google.cloud.vision.v1p4beta1.UpdateProductRequest(this); + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.UpdateProductRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.UpdateProductRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.UpdateProductRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance()) return this; + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.UpdateProductRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.UpdateProductRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + public com.google.cloud.vision.v1p4beta1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProduct( + com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null ? + com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; + } + } + /** + *
+     * Required. The Product resource which replaces the one on the server.
+     * product.name is immutable.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( + getProduct(), + getParentForChildren(), + isClean()); + product_ = null; + } + return productBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+     * to update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask paths include `product_labels`, `display_name`, and
+     * `description`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.UpdateProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductRequest) + private static final com.google.cloud.vision.v1p4beta1.UpdateProductRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.UpdateProductRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java new file mode 100644 index 000000000000..2386419471f2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface UpdateProductRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.UpdateProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The product. + */ + com.google.cloud.vision.v1p4beta1.Product getProduct(); + /** + *
+   * Required. The Product resource which replaces the one on the server.
+   * product.name is immutable.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
+   * to update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask paths include `product_labels`, `display_name`, and
+   * `description`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java new file mode 100644 index 000000000000..eef96da65072 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java @@ -0,0 +1,937 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Request message for the `UpdateProductSet` method.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductSetRequest} + */ +public final class UpdateProductSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) + UpdateProductSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateProductSetRequest.newBuilder() to construct. + private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateProductSetRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateProductSetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.ProductSet.Builder subBuilder = null; + if (productSet_ != null) { + subBuilder = productSet_.toBuilder(); + } + productSet_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(productSet_); + productSet_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.Builder.class); + } + + public static final int PRODUCT_SET_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + @java.lang.Override + public boolean hasProductSet() { + return productSet_ != null; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { + return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { + return getProductSet(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (productSet_ != null) { + output.writeMessage(1, getProductSet()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (productSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProductSet()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) obj; + + if (hasProductSet() != other.hasProductSet()) return false; + if (hasProductSet()) { + if (!getProductSet() + .equals(other.getProductSet())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProductSet()) { + hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; + hash = (53 * hash) + getProductSet().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for the `UpdateProductSet` method.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (productSetBuilder_ == null) { + productSet_ = null; + } else { + productSet_ = null; + productSetBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest build() { + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest buildPartial() { + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest result = new com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest(this); + if (productSetBuilder_ == null) { + result.productSet_ = productSet_; + } else { + result.productSet_ = productSetBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest other) { + if (other == com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance()) return this; + if (other.hasProductSet()) { + mergeProductSet(other.getProductSet()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetBuilder_; + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + public boolean hasProductSet() { + return productSetBuilder_ != null || productSet_ != null; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { + if (productSetBuilder_ == null) { + return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } else { + return productSetBuilder_.getMessage(); + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productSet_ = value; + onChanged(); + } else { + productSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setProductSet( + com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { + if (productSetBuilder_ == null) { + productSet_ = builderForValue.build(); + onChanged(); + } else { + productSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { + if (productSetBuilder_ == null) { + if (productSet_ != null) { + productSet_ = + com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); + } else { + productSet_ = value; + } + onChanged(); + } else { + productSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearProductSet() { + if (productSetBuilder_ == null) { + productSet_ = null; + onChanged(); + } else { + productSet_ = null; + productSetBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetBuilder() { + + onChanged(); + return getProductSetFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { + if (productSetBuilder_ != null) { + return productSetBuilder_.getMessageOrBuilder(); + } else { + return productSet_ == null ? + com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; + } + } + /** + *
+     * Required. The ProductSet resource which replaces the one on the server.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> + getProductSetFieldBuilder() { + if (productSetBuilder_ == null) { + productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( + getProductSet(), + getParentForChildren(), + isClean()); + productSet_ = null; + } + return productSetBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+     * update.
+     * If update_mask isn't specified, all mutable fields are to be updated.
+     * Valid mask path is `display_name`.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) + private static final com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest(); + } + + public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProductSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateProductSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java new file mode 100644 index 000000000000..bf61f1ef04f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/product_search_service.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface UpdateProductSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the productSet field is set. + */ + boolean hasProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The productSet. + */ + com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(); + /** + *
+   * Required. The ProductSet resource which replaces the one on the server.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder(); + + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
+   * update.
+   * If update_mask isn't specified, all mutable fields are to be updated.
+   * Valid mask path is `display_name`.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java new file mode 100644 index 000000000000..45a6c19c1689 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Vertex} + */ +public final class Vertex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Vertex) + VertexOrBuilder { +private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Vertex() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Vertex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + x_ = input.readInt32(); + break; + } + case 16: { + + y_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Vertex.class, com.google.cloud.vision.v1p4beta1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Vertex other = (com.google.cloud.vision.v1p4beta1.Vertex) obj; + + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Vertex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Vertex) + com.google.cloud.vision.v1p4beta1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Vertex.class, com.google.cloud.vision.v1p4beta1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Vertex build() { + com.google.cloud.vision.v1p4beta1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Vertex buildPartial() { + com.google.cloud.vision.v1p4beta1.Vertex result = new com.google.cloud.vision.v1p4beta1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Vertex) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Vertex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Vertex other) { + if (other == com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_ ; + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Vertex) + private static final com.google.cloud.vision.v1p4beta1.Vertex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Vertex(); + } + + public static com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java new file mode 100644 index 000000000000..7dc7ef73c9f9 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/geometry.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface VertexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + * @return The x. + */ + int getX(); + + /** + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + * @return The y. + */ + int getY(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java new file mode 100644 index 000000000000..3c798741eabe --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java @@ -0,0 +1,7560 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/web_detection.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Relevant information for the image from the Internet.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} + */ +public final class WebDetection extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection) + WebDetectionOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetection.newBuilder() to construct. + private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetection() { + webEntities_ = java.util.Collections.emptyList(); + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + visuallySimilarImages_ = java.util.Collections.emptyList(); + bestGuessLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + webEntities_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pagesWithMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + visuallySimilarImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + bestGuessLabels_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); + } + + public interface WebEntityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + java.lang.String getEntityId(); + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + com.google.protobuf.ByteString + getEntityIdBytes(); + + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + } + /** + *
+   * Entity deduced from similar images on the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} + */ + public static final class WebEntity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) + WebEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebEntity.newBuilder() to construct. + private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebEntity() { + entityId_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebEntity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebEntity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + entityId_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object entityId_; + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + @java.lang.Override + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } + } + /** + *
+     * Opaque entity ID.
+     * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * Overall relevancy score for the entity.
+     * Not normalized and not comparable across different image queries.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * Canonical description of the entity, in English.
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) obj; + + if (!getEntityId() + .equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Entity deduced from similar images on the Internet.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + entityId_ = ""; + + score_ = 0F; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity build() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(this); + result.entityId_ = entityId_; + result.score_ = score_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()) return this; + if (!other.getEntityId().isEmpty()) { + entityId_ = other.entityId_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entityId_ = ""; + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The entityId. + */ + public java.lang.String getEntityId() { + java.lang.Object ref = entityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return The bytes for entityId. + */ + public com.google.protobuf.ByteString + getEntityIdBytes() { + java.lang.Object ref = entityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + entityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entityId_ = value; + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @return This builder for chaining. + */ + public Builder clearEntityId() { + + entityId_ = getDefaultInstance().getEntityId(); + onChanged(); + return this; + } + /** + *
+       * Opaque entity ID.
+       * 
+ * + * string entity_id = 1; + * @param value The bytes for entityId to set. + * @return This builder for chaining. + */ + public Builder setEntityIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entityId_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * Overall relevancy score for the entity.
+       * Not normalized and not comparable across different image queries.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * Canonical description of the entity, in English.
+       * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) + private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebEntity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebImage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + } + /** + *
+   * Metadata for online images.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} + */ + public static final class WebImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) + WebImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebImage.newBuilder() to construct. + private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebImage() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result image URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the image.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for online images.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage build() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(this); + result.url_ = url_; + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result image URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the image.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) + private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebPageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebPage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + float getScore(); + + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + java.lang.String getPageTitle(); + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + com.google.protobuf.ByteString + getPageTitleBytes(); + + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + int getFullMatchingImagesCount(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + int getPartialMatchingImagesCount(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + } + /** + *
+   * Metadata for web pages.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} + */ + public static final class WebPage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) + WebPageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebPage.newBuilder() to construct. + private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebPage() { + url_ = ""; + pageTitle_ = ""; + fullMatchingImages_ = java.util.Collections.emptyList(); + partialMatchingImages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebPage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebPage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 21: { + + score_ = input.readFloat(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageTitle_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fullMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialMatchingImages_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The result web page URL.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCORE_FIELD_NUMBER = 2; + private float score_; + /** + *
+     * (Deprecated) Overall relevancy score for the web page.
+     * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int PAGE_TITLE_FIELD_NUMBER = 3; + private volatile java.lang.Object pageTitle_; + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + @java.lang.Override + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } + } + /** + *
+     * Title for the web page, may contain HTML markups.
+     * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List fullMatchingImages_; + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+     * Fully matching images on the page.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; + private java.util.List partialMatchingImages_; + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+     * Partial matching images on the page.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its
+     * crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(5, partialMatchingImages_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, partialMatchingImages_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits( + other.getScore())) return false; + if (!getPageTitle() + .equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScore()); + hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; + hash = (53 * hash) + getPageTitle().hashCode(); + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Metadata for web pages.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) + com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + score_ = 0F; + + pageTitle_ = ""; + + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage build() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + result.score_ = score_; + result.pageTitle_ = pageTitle_; + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebPage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (!other.getPageTitle().isEmpty()) { + pageTitle_ = other.pageTitle_; + onChanged(); + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000001); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The result web page URL.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private float score_ ; + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+       * (Deprecated) Overall relevancy score for the web page.
+       * 
+ * + * float score = 2; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object pageTitle_ = ""; + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The pageTitle. + */ + public java.lang.String getPageTitle() { + java.lang.Object ref = pageTitle_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageTitle_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return The bytes for pageTitle. + */ + public com.google.protobuf.ByteString + getPageTitleBytes() { + java.lang.Object ref = pageTitle_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageTitle_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitle( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageTitle_ = value; + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @return This builder for chaining. + */ + public Builder clearPageTitle() { + + pageTitle_ = getDefaultInstance().getPageTitle(); + onChanged(); + return this; + } + /** + *
+       * Title for the web page, may contain HTML markups.
+       * 
+ * + * string page_title = 3; + * @param value The bytes for pageTitle to set. + * @return This builder for chaining. + */ + public Builder setPageTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageTitle_ = value; + onChanged(); + return this; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Fully matching images on the page.
+       * Can include resized copies of the query image.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+       * Partial matching images on the page.
+       * Those images are similar enough to share some key-point features. For
+       * example an original image will likely have partial matching for its
+       * crops.
+       * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) + private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebPage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebPage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebPage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + } + /** + *
+   * Label to provide extra metadata for the web detection.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} + */ + public static final class WebLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + WebLabelOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLabel.newBuilder() to construct. + private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebLabel() { + label_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + label_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); + } + + public static final int LABEL_FIELD_NUMBER = 1; + private volatile java.lang.Object label_; + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * Label for extra metadata.
+     * 
+ * + * string label = 1; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object languageCode_; + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) obj; + + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Label to provide extra metadata for the web detection.
+     * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + label_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel build() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(this); + result.label_ = label_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()) return this; + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * Label for extra metadata.
+       * 
+ * + * string label = 1; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
+       * For more information, see
+       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+       * 
+ * + * string language_code = 2; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int WEB_ENTITIES_FIELD_NUMBER = 1; + private java.util.List webEntities_; + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List getWebEntitiesList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public java.util.List + getWebEntitiesOrBuilderList() { + return webEntities_; + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public int getWebEntitiesCount() { + return webEntities_.size(); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { + return webEntities_.get(index); + } + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + return webEntities_.get(index); + } + + public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; + private java.util.List fullMatchingImages_; + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List getFullMatchingImagesList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public java.util.List + getFullMatchingImagesOrBuilderList() { + return fullMatchingImages_; + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public int getFullMatchingImagesCount() { + return fullMatchingImages_.size(); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { + return fullMatchingImages_.get(index); + } + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + return fullMatchingImages_.get(index); + } + + public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; + private java.util.List partialMatchingImages_; + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List getPartialMatchingImagesList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public java.util.List + getPartialMatchingImagesOrBuilderList() { + return partialMatchingImages_; + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public int getPartialMatchingImagesCount() { + return partialMatchingImages_.size(); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + return partialMatchingImages_.get(index); + } + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + return partialMatchingImages_.get(index); + } + + public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; + private java.util.List pagesWithMatchingImages_; + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List getPagesWithMatchingImagesList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + return pagesWithMatchingImages_; + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public int getPagesWithMatchingImagesCount() { + return pagesWithMatchingImages_.size(); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + return pagesWithMatchingImages_.get(index); + } + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + return pagesWithMatchingImages_.get(index); + } + + public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; + private java.util.List visuallySimilarImages_; + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List getVisuallySimilarImagesList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + return visuallySimilarImages_; + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public int getVisuallySimilarImagesCount() { + return visuallySimilarImages_.size(); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + return visuallySimilarImages_.get(index); + } + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + return visuallySimilarImages_.get(index); + } + + public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; + private java.util.List bestGuessLabels_; + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List getBestGuessLabelsList() { + return bestGuessLabels_; + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public java.util.List + getBestGuessLabelsOrBuilderList() { + return bestGuessLabels_; + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public int getBestGuessLabelsCount() { + return bestGuessLabels_.size(); + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + return bestGuessLabels_.get(index); + } + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + return bestGuessLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < webEntities_.size(); i++) { + output.writeMessage(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + output.writeMessage(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + output.writeMessage(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + output.writeMessage(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + output.writeMessage(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + output.writeMessage(8, bestGuessLabels_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < webEntities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, webEntities_.get(i)); + } + for (int i = 0; i < fullMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fullMatchingImages_.get(i)); + } + for (int i = 0; i < partialMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, partialMatchingImages_.get(i)); + } + for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pagesWithMatchingImages_.get(i)); + } + for (int i = 0; i < visuallySimilarImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, visuallySimilarImages_.get(i)); + } + for (int i = 0; i < bestGuessLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, bestGuessLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetection other = (com.google.cloud.vision.v1p4beta1.WebDetection) obj; + + if (!getWebEntitiesList() + .equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList() + .equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList() + .equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList() + .equals(other.getPagesWithMatchingImagesList())) return false; + if (!getVisuallySimilarImagesList() + .equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList() + .equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWebEntitiesCount() > 0) { + hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getWebEntitiesList().hashCode(); + } + if (getFullMatchingImagesCount() > 0) { + hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getFullMatchingImagesList().hashCode(); + } + if (getPartialMatchingImagesCount() > 0) { + hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); + } + if (getPagesWithMatchingImagesCount() > 0) { + hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); + } + if (getVisuallySimilarImagesCount() > 0) { + hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); + } + if (getBestGuessLabelsCount() > 0) { + hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getBestGuessLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Relevant information for the image from the Internet.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection) + com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getWebEntitiesFieldBuilder(); + getFullMatchingImagesFieldBuilder(); + getPartialMatchingImagesFieldBuilder(); + getPagesWithMatchingImagesFieldBuilder(); + getVisuallySimilarImagesFieldBuilder(); + getBestGuessLabelsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + webEntitiesBuilder_.clear(); + } + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fullMatchingImagesBuilder_.clear(); + } + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + partialMatchingImagesBuilder_.clear(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + visuallySimilarImagesBuilder_.clear(); + } + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection build() { + com.google.cloud.vision.v1p4beta1.WebDetection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetection result = new com.google.cloud.vision.v1p4beta1.WebDetection(this); + int from_bitField0_ = bitField0_; + if (webEntitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + webEntities_ = java.util.Collections.unmodifiableList(webEntities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.webEntities_ = webEntities_; + } else { + result.webEntities_ = webEntitiesBuilder_.build(); + } + if (fullMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fullMatchingImages_ = fullMatchingImages_; + } else { + result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); + } + if (partialMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.partialMatchingImages_ = partialMatchingImages_; + } else { + result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pagesWithMatchingImages_ = pagesWithMatchingImages_; + } else { + result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); + } + if (visuallySimilarImagesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.visuallySimilarImages_ = visuallySimilarImages_; + } else { + result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); + } + if (bestGuessLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bestGuessLabels_ = bestGuessLabels_; + } else { + result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()) return this; + if (webEntitiesBuilder_ == null) { + if (!other.webEntities_.isEmpty()) { + if (webEntities_.isEmpty()) { + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWebEntitiesIsMutable(); + webEntities_.addAll(other.webEntities_); + } + onChanged(); + } + } else { + if (!other.webEntities_.isEmpty()) { + if (webEntitiesBuilder_.isEmpty()) { + webEntitiesBuilder_.dispose(); + webEntitiesBuilder_ = null; + webEntities_ = other.webEntities_; + bitField0_ = (bitField0_ & ~0x00000001); + webEntitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWebEntitiesFieldBuilder() : null; + } else { + webEntitiesBuilder_.addAllMessages(other.webEntities_); + } + } + } + if (fullMatchingImagesBuilder_ == null) { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImages_.isEmpty()) { + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.addAll(other.fullMatchingImages_); + } + onChanged(); + } + } else { + if (!other.fullMatchingImages_.isEmpty()) { + if (fullMatchingImagesBuilder_.isEmpty()) { + fullMatchingImagesBuilder_.dispose(); + fullMatchingImagesBuilder_ = null; + fullMatchingImages_ = other.fullMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000002); + fullMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFullMatchingImagesFieldBuilder() : null; + } else { + fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); + } + } + } + if (partialMatchingImagesBuilder_ == null) { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImages_.isEmpty()) { + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.addAll(other.partialMatchingImages_); + } + onChanged(); + } + } else { + if (!other.partialMatchingImages_.isEmpty()) { + if (partialMatchingImagesBuilder_.isEmpty()) { + partialMatchingImagesBuilder_.dispose(); + partialMatchingImagesBuilder_ = null; + partialMatchingImages_ = other.partialMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000004); + partialMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPartialMatchingImagesFieldBuilder() : null; + } else { + partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); + } + } + } + if (pagesWithMatchingImagesBuilder_ == null) { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImages_.isEmpty()) { + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); + } + onChanged(); + } + } else { + if (!other.pagesWithMatchingImages_.isEmpty()) { + if (pagesWithMatchingImagesBuilder_.isEmpty()) { + pagesWithMatchingImagesBuilder_.dispose(); + pagesWithMatchingImagesBuilder_ = null; + pagesWithMatchingImages_ = other.pagesWithMatchingImages_; + bitField0_ = (bitField0_ & ~0x00000008); + pagesWithMatchingImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPagesWithMatchingImagesFieldBuilder() : null; + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); + } + } + } + if (visuallySimilarImagesBuilder_ == null) { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImages_.isEmpty()) { + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.addAll(other.visuallySimilarImages_); + } + onChanged(); + } + } else { + if (!other.visuallySimilarImages_.isEmpty()) { + if (visuallySimilarImagesBuilder_.isEmpty()) { + visuallySimilarImagesBuilder_.dispose(); + visuallySimilarImagesBuilder_ = null; + visuallySimilarImages_ = other.visuallySimilarImages_; + bitField0_ = (bitField0_ & ~0x00000010); + visuallySimilarImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVisuallySimilarImagesFieldBuilder() : null; + } else { + visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); + } + } + } + if (bestGuessLabelsBuilder_ == null) { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabels_.isEmpty()) { + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.addAll(other.bestGuessLabels_); + } + onChanged(); + } + } else { + if (!other.bestGuessLabels_.isEmpty()) { + if (bestGuessLabelsBuilder_.isEmpty()) { + bestGuessLabelsBuilder_.dispose(); + bestGuessLabelsBuilder_ = null; + bestGuessLabels_ = other.bestGuessLabels_; + bitField0_ = (bitField0_ & ~0x00000020); + bestGuessLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBestGuessLabelsFieldBuilder() : null; + } else { + bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List webEntities_ = + java.util.Collections.emptyList(); + private void ensureWebEntitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + webEntities_ = new java.util.ArrayList(webEntities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; + + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List getWebEntitiesList() { + if (webEntitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webEntities_); + } else { + return webEntitiesBuilder_.getMessageList(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public int getWebEntitiesCount() { + if (webEntitiesBuilder_ == null) { + return webEntities_.size(); + } else { + return webEntitiesBuilder_.getCount(); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); + } else { + return webEntitiesBuilder_.getMessage(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.set(index, value); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder setWebEntities( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.set(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { + if (webEntitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebEntitiesIsMutable(); + webEntities_.add(index, value); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addWebEntities( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.add(index, builderForValue.build()); + onChanged(); + } else { + webEntitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder addAllWebEntities( + java.lang.Iterable values) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, webEntities_); + onChanged(); + } else { + webEntitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder clearWebEntities() { + if (webEntitiesBuilder_ == null) { + webEntities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + webEntitiesBuilder_.clear(); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public Builder removeWebEntities(int index) { + if (webEntitiesBuilder_ == null) { + ensureWebEntitiesIsMutable(); + webEntities_.remove(index); + onChanged(); + } else { + webEntitiesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().getBuilder(index); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index) { + if (webEntitiesBuilder_ == null) { + return webEntities_.get(index); } else { + return webEntitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesOrBuilderList() { + if (webEntitiesBuilder_ != null) { + return webEntitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webEntities_); + } + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { + return getWebEntitiesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( + int index) { + return getWebEntitiesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); + } + /** + *
+     * Deduced entities from similar images on the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + public java.util.List + getWebEntitiesBuilderList() { + return getWebEntitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> + getWebEntitiesFieldBuilder() { + if (webEntitiesBuilder_ == null) { + webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder>( + webEntities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + webEntities_ = null; + } + return webEntitiesBuilder_; + } + + private java.util.List fullMatchingImages_ = + java.util.Collections.emptyList(); + private void ensureFullMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; + + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List getFullMatchingImagesList() { + if (fullMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } else { + return fullMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public int getFullMatchingImagesCount() { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.size(); + } else { + return fullMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); + } else { + return fullMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder setFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (fullMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, value); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addFullMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder addAllFullMatchingImages( + java.lang.Iterable values) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fullMatchingImages_); + onChanged(); + } else { + fullMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder clearFullMatchingImages() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fullMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public Builder removeFullMatchingImages(int index) { + if (fullMatchingImagesBuilder_ == null) { + ensureFullMatchingImagesIsMutable(); + fullMatchingImages_.remove(index); + onChanged(); + } else { + fullMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index) { + if (fullMatchingImagesBuilder_ == null) { + return fullMatchingImages_.get(index); } else { + return fullMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesOrBuilderList() { + if (fullMatchingImagesBuilder_ != null) { + return fullMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullMatchingImages_); + } + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { + return getFullMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( + int index) { + return getFullMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Fully matching images from the Internet.
+     * Can include resized copies of the query image.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + public java.util.List + getFullMatchingImagesBuilderList() { + return getFullMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> + getFullMatchingImagesFieldBuilder() { + if (fullMatchingImagesBuilder_ == null) { + fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( + fullMatchingImages_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + fullMatchingImages_ = null; + } + return fullMatchingImagesBuilder_; + } + + private java.util.List partialMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePartialMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; + + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List getPartialMatchingImagesList() { + if (partialMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } else { + return partialMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public int getPartialMatchingImagesCount() { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.size(); + } else { + return partialMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); + } else { + return partialMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder setPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (partialMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, value); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addPartialMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder addAllPartialMatchingImages( + java.lang.Iterable values) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, partialMatchingImages_); + onChanged(); + } else { + partialMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder clearPartialMatchingImages() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + partialMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public Builder removePartialMatchingImages(int index) { + if (partialMatchingImagesBuilder_ == null) { + ensurePartialMatchingImagesIsMutable(); + partialMatchingImages_.remove(index); + onChanged(); + } else { + partialMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index) { + if (partialMatchingImagesBuilder_ == null) { + return partialMatchingImages_.get(index); } else { + return partialMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesOrBuilderList() { + if (partialMatchingImagesBuilder_ != null) { + return partialMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialMatchingImages_); + } + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { + return getPartialMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( + int index) { + return getPartialMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * Partial matching images from the Internet.
+     * Those images are similar enough to share some key-point features. For
+     * example an original image will likely have partial matching for its crops.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + public java.util.List + getPartialMatchingImagesBuilderList() { + return getPartialMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> + getPartialMatchingImagesFieldBuilder() { + if (partialMatchingImagesBuilder_ == null) { + partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( + partialMatchingImages_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + partialMatchingImages_ = null; + } + return partialMatchingImagesBuilder_; + } + + private java.util.List pagesWithMatchingImages_ = + java.util.Collections.emptyList(); + private void ensurePagesWithMatchingImagesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; + + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List getPagesWithMatchingImagesList() { + if (pagesWithMatchingImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } else { + return pagesWithMatchingImagesBuilder_.getMessageList(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public int getPagesWithMatchingImagesCount() { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.size(); + } else { + return pagesWithMatchingImagesBuilder_.getCount(); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); + } else { + return pagesWithMatchingImagesBuilder_.getMessage(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder setPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { + if (pagesWithMatchingImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, value); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addPagesWithMatchingImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder addAllPagesWithMatchingImages( + java.lang.Iterable values) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pagesWithMatchingImages_); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder clearPagesWithMatchingImages() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public Builder removePagesWithMatchingImages(int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + ensurePagesWithMatchingImagesIsMutable(); + pagesWithMatchingImages_.remove(index); + onChanged(); + } else { + pagesWithMatchingImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index) { + if (pagesWithMatchingImagesBuilder_ == null) { + return pagesWithMatchingImages_.get(index); } else { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesOrBuilderList() { + if (pagesWithMatchingImagesBuilder_ != null) { + return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); + } + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( + int index) { + return getPagesWithMatchingImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); + } + /** + *
+     * Web pages containing the matching images from the Internet.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + public java.util.List + getPagesWithMatchingImagesBuilderList() { + return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> + getPagesWithMatchingImagesFieldBuilder() { + if (pagesWithMatchingImagesBuilder_ == null) { + pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder>( + pagesWithMatchingImages_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + pagesWithMatchingImages_ = null; + } + return pagesWithMatchingImagesBuilder_; + } + + private java.util.List visuallySimilarImages_ = + java.util.Collections.emptyList(); + private void ensureVisuallySimilarImagesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; + + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List getVisuallySimilarImagesList() { + if (visuallySimilarImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } else { + return visuallySimilarImagesBuilder_.getMessageList(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public int getVisuallySimilarImagesCount() { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.size(); + } else { + return visuallySimilarImagesBuilder_.getCount(); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); + } else { + return visuallySimilarImagesBuilder_.getMessage(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder setVisuallySimilarImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.set(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { + if (visuallySimilarImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, value); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addVisuallySimilarImages( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.add(index, builderForValue.build()); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder addAllVisuallySimilarImages( + java.lang.Iterable values) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, visuallySimilarImages_); + onChanged(); + } else { + visuallySimilarImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder clearVisuallySimilarImages() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + visuallySimilarImagesBuilder_.clear(); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public Builder removeVisuallySimilarImages(int index) { + if (visuallySimilarImagesBuilder_ == null) { + ensureVisuallySimilarImagesIsMutable(); + visuallySimilarImages_.remove(index); + onChanged(); + } else { + visuallySimilarImagesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().getBuilder(index); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index) { + if (visuallySimilarImagesBuilder_ == null) { + return visuallySimilarImages_.get(index); } else { + return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesOrBuilderList() { + if (visuallySimilarImagesBuilder_ != null) { + return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visuallySimilarImages_); + } + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( + int index) { + return getVisuallySimilarImagesFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); + } + /** + *
+     * The visually similar image results.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + public java.util.List + getVisuallySimilarImagesBuilderList() { + return getVisuallySimilarImagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> + getVisuallySimilarImagesFieldBuilder() { + if (visuallySimilarImagesBuilder_ == null) { + visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( + visuallySimilarImages_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + visuallySimilarImages_ = null; + } + return visuallySimilarImagesBuilder_; + } + + private java.util.List bestGuessLabels_ = + java.util.Collections.emptyList(); + private void ensureBestGuessLabelsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; + + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List getBestGuessLabelsList() { + if (bestGuessLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } else { + return bestGuessLabelsBuilder_.getMessageList(); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public int getBestGuessLabelsCount() { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.size(); + } else { + return bestGuessLabelsBuilder_.getCount(); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); + } else { + return bestGuessLabelsBuilder_.getMessage(index); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder setBestGuessLabels( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { + if (bestGuessLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, value); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addBestGuessLabels( + int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder addAllBestGuessLabels( + java.lang.Iterable values) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bestGuessLabels_); + onChanged(); + } else { + bestGuessLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder clearBestGuessLabels() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + bestGuessLabelsBuilder_.clear(); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public Builder removeBestGuessLabels(int index) { + if (bestGuessLabelsBuilder_ == null) { + ensureBestGuessLabelsIsMutable(); + bestGuessLabels_.remove(index); + onChanged(); + } else { + bestGuessLabelsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().getBuilder(index); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index) { + if (bestGuessLabelsBuilder_ == null) { + return bestGuessLabels_.get(index); } else { + return bestGuessLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsOrBuilderList() { + if (bestGuessLabelsBuilder_ != null) { + return bestGuessLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bestGuessLabels_); + } + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { + return getBestGuessLabelsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( + int index) { + return getBestGuessLabelsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); + } + /** + *
+     * The service's best guess as to the topic of the request image.
+     * Inferred from similar images on the open web.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + public java.util.List + getBestGuessLabelsBuilderList() { + return getBestGuessLabelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> + getBestGuessLabelsFieldBuilder() { + if (bestGuessLabelsBuilder_ == null) { + bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder>( + bestGuessLabels_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + bestGuessLabels_ = null; + } + return bestGuessLabelsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection) + private static final com.google.cloud.vision.v1p4beta1.WebDetection DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java new file mode 100644 index 000000000000..a82240253f43 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java @@ -0,0 +1,293 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/web_detection.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface WebDetectionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + int getWebEntitiesCount(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + java.util.List + getWebEntitiesOrBuilderList(); + /** + *
+   * Deduced entities from similar images on the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( + int index); + + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + int getFullMatchingImagesCount(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + java.util.List + getFullMatchingImagesOrBuilderList(); + /** + *
+   * Fully matching images from the Internet.
+   * Can include resized copies of the query image.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( + int index); + + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + int getPartialMatchingImagesCount(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + java.util.List + getPartialMatchingImagesOrBuilderList(); + /** + *
+   * Partial matching images from the Internet.
+   * Those images are similar enough to share some key-point features. For
+   * example an original image will likely have partial matching for its crops.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( + int index); + + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + int getPagesWithMatchingImagesCount(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + java.util.List + getPagesWithMatchingImagesOrBuilderList(); + /** + *
+   * Web pages containing the matching images from the Internet.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( + int index); + + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + int getVisuallySimilarImagesCount(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + java.util.List + getVisuallySimilarImagesOrBuilderList(); + /** + *
+   * The visually similar image results.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( + int index); + + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsList(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + int getBestGuessLabelsCount(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + java.util.List + getBestGuessLabelsOrBuilderList(); + /** + *
+   * The service's best guess as to the topic of the request image.
+   * Inferred from similar images on the open web.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; + */ + com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java new file mode 100644 index 000000000000..e49a16c72f84 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * Parameters for web detection request.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetectionParams} + */ +public final class WebDetectionParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetectionParams) + WebDetectionParamsOrBuilder { +private static final long serialVersionUID = 0L; + // Use WebDetectionParams.newBuilder() to construct. + private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebDetectionParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebDetectionParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebDetectionParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + includeGeoResults_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetectionParams.class, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder.class); + } + + public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; + private boolean includeGeoResults_; + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (includeGeoResults_ != false) { + output.writeBool(2, includeGeoResults_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (includeGeoResults_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, includeGeoResults_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetectionParams)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.WebDetectionParams other = (com.google.cloud.vision.v1p4beta1.WebDetectionParams) obj; + + if (getIncludeGeoResults() + != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeGeoResults()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetectionParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Parameters for web detection request.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetectionParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetectionParams) + com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.WebDetectionParams.class, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.WebDetectionParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + includeGeoResults_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParams build() { + com.google.cloud.vision.v1p4beta1.WebDetectionParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParams buildPartial() { + com.google.cloud.vision.v1p4beta1.WebDetectionParams result = new com.google.cloud.vision.v1p4beta1.WebDetectionParams(this); + result.includeGeoResults_ = includeGeoResults_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetectionParams) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetectionParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetectionParams other) { + if (other == com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance()) return this; + if (other.getIncludeGeoResults() != false) { + setIncludeGeoResults(other.getIncludeGeoResults()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.WebDetectionParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetectionParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean includeGeoResults_ ; + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + @java.lang.Override + public boolean getIncludeGeoResults() { + return includeGeoResults_; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @param value The includeGeoResults to set. + * @return This builder for chaining. + */ + public Builder setIncludeGeoResults(boolean value) { + + includeGeoResults_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether to include results derived from the geo information in the image.
+     * 
+ * + * bool include_geo_results = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeGeoResults() { + + includeGeoResults_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetectionParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetectionParams) + private static final com.google.cloud.vision.v1p4beta1.WebDetectionParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetectionParams(); + } + + public static com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebDetectionParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebDetectionParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java new file mode 100644 index 000000000000..7e3a25f12c8b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/image_annotator.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface WebDetectionParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetectionParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Whether to include results derived from the geo information in the image.
+   * 
+ * + * bool include_geo_results = 2; + * @return The includeGeoResults. + */ + boolean getIncludeGeoResults(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java new file mode 100644 index 000000000000..41a4814bd698 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java @@ -0,0 +1,118 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/web_detection.proto + +package com.google.cloud.vision.v1p4beta1; + +public final class WebDetectionProto { + private WebDetectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/vision/v1p4beta1/web_dete" + + "ction.proto\022\035google.cloud.vision.v1p4bet" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p4beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p4beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p4" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p4beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p4beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p4beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p4beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p4beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\207\001\n!co" + + "m.google.cloud.vision.v1p4beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p4beta1;visio" + + "n\370\001\001\242\002\004GCVNb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor, + new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor = + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor, + new java.lang.String[] { "EntityId", "Score", "Description", }); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor = + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor, + new java.lang.String[] { "Url", "Score", }); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor = + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor, + new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor = + internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor, + new java.lang.String[] { "Label", "LanguageCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java new file mode 100644 index 000000000000..e27b6e943d61 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java @@ -0,0 +1,1617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +/** + *
+ * A word representation.
+ * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Word} + */ +public final class Word extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Word) + WordOrBuilder { +private static final long serialVersionUID = 0L; + // Use Word.newBuilder() to construct. + private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Word() { + symbols_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Word(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Word( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; + if (property_ != null) { + subBuilder = property_.toBuilder(); + } + property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(property_); + property_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; + if (boundingBox_ != null) { + subBuilder = boundingBox_.toBuilder(); + } + boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(boundingBox_); + boundingBox_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + symbols_.add( + input.readMessage(com.google.cloud.vision.v1p4beta1.Symbol.parser(), extensionRegistry)); + break; + } + case 37: { + + confidence_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Word.class, com.google.cloud.vision.v1p4beta1.Word.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + @java.lang.Override + public boolean hasProperty() { + return property_ != null; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + return getProperty(); + } + + public static final int BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + @java.lang.Override + public boolean hasBoundingBox() { + return boundingBox_ != null; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + return getBoundingBox(); + } + + public static final int SYMBOLS_FIELD_NUMBER = 3; + private java.util.List symbols_; + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List getSymbolsList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + @java.lang.Override + public java.util.List + getSymbolsOrBuilderList() { + return symbols_; + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + @java.lang.Override + public int getSymbolsCount() { + return symbols_.size(); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index) { + return symbols_.get(index); + } + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + return symbols_.get(index); + } + + public static final int CONFIDENCE_FIELD_NUMBER = 4; + private float confidence_; + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (property_ != null) { + output.writeMessage(1, getProperty()); + } + if (boundingBox_ != null) { + output.writeMessage(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + output.writeMessage(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + output.writeFloat(4, confidence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (property_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProperty()); + } + if (boundingBox_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getBoundingBox()); + } + for (int i = 0; i < symbols_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, symbols_.get(i)); + } + if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, confidence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Word)) { + return super.equals(obj); + } + com.google.cloud.vision.v1p4beta1.Word other = (com.google.cloud.vision.v1p4beta1.Word) obj; + + if (hasProperty() != other.hasProperty()) return false; + if (hasProperty()) { + if (!getProperty() + .equals(other.getProperty())) return false; + } + if (hasBoundingBox() != other.hasBoundingBox()) return false; + if (hasBoundingBox()) { + if (!getBoundingBox() + .equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList() + .equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits( + other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProperty()) { + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + } + if (hasBoundingBox()) { + hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBox().hashCode(); + } + if (getSymbolsCount() > 0) { + hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; + hash = (53 * hash) + getSymbolsList().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getConfidence()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Word parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Word parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.vision.v1p4beta1.Word parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Word prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A word representation.
+   * 
+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.Word} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Word) + com.google.cloud.vision.v1p4beta1.WordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.Word.class, com.google.cloud.vision.v1p4beta1.Word.Builder.class); + } + + // Construct using com.google.cloud.vision.v1p4beta1.Word.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSymbolsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (propertyBuilder_ == null) { + property_ = null; + } else { + property_ = null; + propertyBuilder_ = null; + } + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + symbolsBuilder_.clear(); + } + confidence_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Word getDefaultInstanceForType() { + return com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Word build() { + com.google.cloud.vision.v1p4beta1.Word result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Word buildPartial() { + com.google.cloud.vision.v1p4beta1.Word result = new com.google.cloud.vision.v1p4beta1.Word(this); + int from_bitField0_ = bitField0_; + if (propertyBuilder_ == null) { + result.property_ = property_; + } else { + result.property_ = propertyBuilder_.build(); + } + if (boundingBoxBuilder_ == null) { + result.boundingBox_ = boundingBox_; + } else { + result.boundingBox_ = boundingBoxBuilder_.build(); + } + if (symbolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + symbols_ = java.util.Collections.unmodifiableList(symbols_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.symbols_ = symbols_; + } else { + result.symbols_ = symbolsBuilder_.build(); + } + result.confidence_ = confidence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vision.v1p4beta1.Word) { + return mergeFrom((com.google.cloud.vision.v1p4beta1.Word)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Word other) { + if (other == com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()) return this; + if (other.hasProperty()) { + mergeProperty(other.getProperty()); + } + if (other.hasBoundingBox()) { + mergeBoundingBox(other.getBoundingBox()); + } + if (symbolsBuilder_ == null) { + if (!other.symbols_.isEmpty()) { + if (symbols_.isEmpty()) { + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSymbolsIsMutable(); + symbols_.addAll(other.symbols_); + } + onChanged(); + } + } else { + if (!other.symbols_.isEmpty()) { + if (symbolsBuilder_.isEmpty()) { + symbolsBuilder_.dispose(); + symbolsBuilder_ = null; + symbols_ = other.symbols_; + bitField0_ = (bitField0_ & ~0x00000001); + symbolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSymbolsFieldBuilder() : null; + } else { + symbolsBuilder_.addAllMessages(other.symbols_); + } + } + } + if (other.getConfidence() != 0F) { + setConfidence(other.getConfidence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.vision.v1p4beta1.Word parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.vision.v1p4beta1.Word) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + public boolean hasProperty() { + return propertyBuilder_ != null || property_ != null; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { + if (propertyBuilder_ == null) { + return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } else { + return propertyBuilder_.getMessage(); + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + property_ = value; + onChanged(); + } else { + propertyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder setProperty( + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { + if (propertyBuilder_ == null) { + property_ = builderForValue.build(); + onChanged(); + } else { + propertyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { + if (propertyBuilder_ == null) { + if (property_ != null) { + property_ = + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); + } else { + property_ = value; + } + onChanged(); + } else { + propertyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public Builder clearProperty() { + if (propertyBuilder_ == null) { + property_ = null; + onChanged(); + } else { + property_ = null; + propertyBuilder_ = null; + } + + return this; + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { + + onChanged(); + return getPropertyFieldBuilder().getBuilder(); + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { + if (propertyBuilder_ != null) { + return propertyBuilder_.getMessageOrBuilder(); + } else { + return property_ == null ? + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; + } + } + /** + *
+     * Additional information detected for the word.
+     * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> + getPropertyFieldBuilder() { + if (propertyBuilder_ == null) { + propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( + getProperty(), + getParentForChildren(), + isClean()); + property_ = null; + } + return propertyBuilder_; + } + + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + public boolean hasBoundingBox() { + return boundingBoxBuilder_ != null || boundingBox_ != null; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { + if (boundingBoxBuilder_ == null) { + return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } else { + return boundingBoxBuilder_.getMessage(); + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundingBox_ = value; + onChanged(); + } else { + boundingBoxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder setBoundingBox( + com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { + if (boundingBoxBuilder_ == null) { + boundingBox_ = builderForValue.build(); + onChanged(); + } else { + boundingBoxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { + if (boundingBoxBuilder_ == null) { + if (boundingBox_ != null) { + boundingBox_ = + com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); + } else { + boundingBox_ = value; + } + onChanged(); + } else { + boundingBoxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public Builder clearBoundingBox() { + if (boundingBoxBuilder_ == null) { + boundingBox_ = null; + onChanged(); + } else { + boundingBox_ = null; + boundingBoxBuilder_ = null; + } + + return this; + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { + + onChanged(); + return getBoundingBoxFieldBuilder().getBuilder(); + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { + if (boundingBoxBuilder_ != null) { + return boundingBoxBuilder_.getMessageOrBuilder(); + } else { + return boundingBox_ == null ? + com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; + } + } + /** + *
+     * The bounding box for the word.
+     * The vertices are in the order of top-left, top-right, bottom-right,
+     * bottom-left. When a rotation of the bounding box is detected the rotation
+     * is represented as around the top-left corner as defined when the text is
+     * read in the 'natural' orientation.
+     * For example:
+     *   * when the text is horizontal it might look like:
+     *      0----1
+     *      |    |
+     *      3----2
+     *   * when it's rotated 180 degrees around the top-left corner it becomes:
+     *      2----3
+     *      |    |
+     *      1----0
+     *   and the vertex order will still be (0, 1, 2, 3).
+     * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> + getBoundingBoxFieldBuilder() { + if (boundingBoxBuilder_ == null) { + boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( + getBoundingBox(), + getParentForChildren(), + isClean()); + boundingBox_ = null; + } + return boundingBoxBuilder_; + } + + private java.util.List symbols_ = + java.util.Collections.emptyList(); + private void ensureSymbolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + symbols_ = new java.util.ArrayList(symbols_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder> symbolsBuilder_; + + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public java.util.List getSymbolsList() { + if (symbolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(symbols_); + } else { + return symbolsBuilder_.getMessageList(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public int getSymbolsCount() { + if (symbolsBuilder_ == null) { + return symbols_.size(); + } else { + return symbolsBuilder_.getCount(); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); + } else { + return symbolsBuilder_.getMessage(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p4beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.set(index, value); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder setSymbols( + int index, com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.set(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder addSymbols(com.google.cloud.vision.v1p4beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(value); + onChanged(); + } else { + symbolsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p4beta1.Symbol value) { + if (symbolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSymbolsIsMutable(); + symbols_.add(index, value); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder addSymbols( + int index, com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.add(index, builderForValue.build()); + onChanged(); + } else { + symbolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder addAllSymbols( + java.lang.Iterable values) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, symbols_); + onChanged(); + } else { + symbolsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder clearSymbols() { + if (symbolsBuilder_ == null) { + symbols_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + symbolsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public Builder removeSymbols(int index) { + if (symbolsBuilder_ == null) { + ensureSymbolsIsMutable(); + symbols_.remove(index); + onChanged(); + } else { + symbolsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p4beta1.Symbol.Builder getSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index) { + if (symbolsBuilder_ == null) { + return symbols_.get(index); } else { + return symbolsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsOrBuilderList() { + if (symbolsBuilder_ != null) { + return symbolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(symbols_); + } + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p4beta1.Symbol.Builder addSymbolsBuilder() { + return getSymbolsFieldBuilder().addBuilder( + com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public com.google.cloud.vision.v1p4beta1.Symbol.Builder addSymbolsBuilder( + int index) { + return getSymbolsFieldBuilder().addBuilder( + index, com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()); + } + /** + *
+     * List of symbols in the word.
+     * The order of the symbols follows the natural reading order.
+     * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + public java.util.List + getSymbolsBuilderList() { + return getSymbolsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder> + getSymbolsFieldBuilder() { + if (symbolsBuilder_ == null) { + symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder>( + symbols_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + symbols_ = null; + } + return symbolsBuilder_; + } + + private float confidence_ ; + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return The confidence. + */ + @java.lang.Override + public float getConfidence() { + return confidence_; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @param value The confidence to set. + * @return This builder for chaining. + */ + public Builder setConfidence(float value) { + + confidence_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of the OCR results for the word. Range [0, 1].
+     * 
+ * + * float confidence = 4; + * @return This builder for chaining. + */ + public Builder clearConfidence() { + + confidence_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Word) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Word) + private static final com.google.cloud.vision.v1p4beta1.Word DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Word(); + } + + public static com.google.cloud.vision.v1p4beta1.Word getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Word parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Word(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vision.v1p4beta1.Word getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java new file mode 100644 index 000000000000..47ef3d774c70 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java @@ -0,0 +1,164 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vision/v1p4beta1/text_annotation.proto + +package com.google.cloud.vision.v1p4beta1; + +public interface WordOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Word) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return Whether the property field is set. + */ + boolean hasProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + * @return The property. + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); + /** + *
+   * Additional information detected for the word.
+   * 
+ * + * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; + */ + com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); + + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return Whether the boundingBox field is set. + */ + boolean hasBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + * @return The boundingBox. + */ + com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); + /** + *
+   * The bounding box for the word.
+   * The vertices are in the order of top-left, top-right, bottom-right,
+   * bottom-left. When a rotation of the bounding box is detected the rotation
+   * is represented as around the top-left corner as defined when the text is
+   * read in the 'natural' orientation.
+   * For example:
+   *   * when the text is horizontal it might look like:
+   *      0----1
+   *      |    |
+   *      3----2
+   *   * when it's rotated 180 degrees around the top-left corner it becomes:
+   *      2----3
+   *      |    |
+   *      1----0
+   *   and the vertex order will still be (0, 1, 2, 3).
+   * 
+ * + * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; + */ + com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); + + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + int getSymbolsCount(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + java.util.List + getSymbolsOrBuilderList(); + /** + *
+   * List of symbols in the word.
+   * The order of the symbols follows the natural reading order.
+   * 
+ * + * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; + */ + com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( + int index); + + /** + *
+   * Confidence of the OCR results for the word. Range [0, 1].
+   * 
+ * + * float confidence = 4; + * @return The confidence. + */ + float getConfidence(); +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto new file mode 100644 index 000000000000..d2ab72f0cded --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto @@ -0,0 +1,60 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/cloud/vision/v1p4beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "CelebrityProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a celebrity recognition request. +message FaceRecognitionParams { + // The resource names for one or more + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity + // set is preloaded and can be specified as "builtin/default". If this is + // specified, the algorithm will try to match the faces detected in the input + // image to the Celebrities in the CelebritySets. + repeated string celebrity_set = 1; +} + +// A Celebrity is a group of Faces with an identity. +message Celebrity { + // The resource name of the preloaded Celebrity. Has the format + // `builtin/{mid}`. + string name = 1; + + // The Celebrity's display name. + string display_name = 2; + + // The Celebrity's description. + string description = 3; +} + +// Information about a face's identity. +message FaceRecognitionResult { + // The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was + // matched to. + Celebrity celebrity = 1; + + // Recognition confidence. Range [0, 1]. + float confidence = 2; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto new file mode 100644 index 000000000000..877fd8972dfe --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto @@ -0,0 +1,70 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// A bounding polygon for the detected image annotation. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; + + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 2; +} + +// A 3D position in the image, used primarily for Face detection landmarks. +// A valid Position must have both x and y coordinates. +// The position coordinates are in the same scale as the original image. +message Position { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; + + // Z coordinate (or depth). + float z = 3; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto new file mode 100644 index 000000000000..cc7836974588 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto @@ -0,0 +1,967 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p4beta1/face.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/cloud/vision/v1p4beta1/product_search.proto"; +import "google/cloud/vision/v1p4beta1/text_annotation.proto"; +import "google/cloud/vision/v1p4beta1/web_detection.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/color.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ImageAnnotatorProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Service that performs Google Cloud Vision API detection tasks over client +// images, such as face, landmark, logo, label, and text detection. The +// ImageAnnotator service returns detected entities from the images. +service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Run image detection and annotation for a batch of images. + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) + returns (BatchAnnotateImagesResponse) { + option (google.api.http) = { + post: "/v1p4beta1/images:annotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + } + + // Service that performs image detection and annotation for a batch of files. + // Now only "application/pdf", "image/tiff" and "image/gif" are supported. + // + // This service will extract at most 5 (customers can specify which 5 in + // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + // file provided and perform detection and annotation for each image + // extracted. + rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) + returns (BatchAnnotateFilesResponse) { + option (google.api.http) = { + post: "/v1p4beta1/files:annotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + } + + // Run asynchronous image detection and annotation for a list of images. + // + // Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + // + // This service will write image annotation outputs to json files in customer + // GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/images:asyncBatchAnnotate" + body: "*" + }; + option (google.api.method_signature) = "requests,output_config"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateImagesResponse" + metadata_type: "OperationMetadata" + }; + } + + // Run asynchronous image detection and annotation for a list of generic + // files, such as PDF files, which may contain multiple pages and multiple + // images per page. Progress and results can be retrieved through the + // `google.longrunning.Operations` interface. + // `Operation.metadata` contains `OperationMetadata` (metadata). + // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/files:asyncBatchAnnotate" + body: "*" + }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; + } +} + +// The type of Google Cloud Vision API detection to perform, and the maximum +// number of results to return for that type. Multiple `Feature` objects can +// be specified in the `features` list. +message Feature { + // Type of Google Cloud Vision API feature to be extracted. + enum Type { + // Unspecified feature type. + TYPE_UNSPECIFIED = 0; + + // Run face detection. + FACE_DETECTION = 1; + + // Run landmark detection. + LANDMARK_DETECTION = 2; + + // Run logo detection. + LOGO_DETECTION = 3; + + // Run label detection. + LABEL_DETECTION = 4; + + // Run text detection / optical character recognition (OCR). Text detection + // is optimized for areas of text within a larger image; if the image is + // a document, use `DOCUMENT_TEXT_DETECTION` instead. + TEXT_DETECTION = 5; + + // Run dense text document OCR. Takes precedence when both + // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + DOCUMENT_TEXT_DETECTION = 11; + + // Run Safe Search to detect potentially unsafe + // or undesirable content. + SAFE_SEARCH_DETECTION = 6; + + // Compute a set of image properties, such as the + // image's dominant colors. + IMAGE_PROPERTIES = 7; + + // Run crop hints. + CROP_HINTS = 9; + + // Run web detection. + WEB_DETECTION = 10; + + // Run Product Search. + PRODUCT_SEARCH = 12; + + // Run localizer for object detection. + OBJECT_LOCALIZATION = 19; + } + + // The feature type. + Type type = 1; + + // Maximum number of results of this type. Does not apply to + // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + int32 max_results = 2; + + // Model to use for the feature. + // Supported values: "builtin/stable" (the default if unset) and + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. + string model = 3; +} + +// External image source (Google Cloud Storage or web URL image location). +message ImageSource { + // **Use `image_uri` instead.** + // + // The Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + string gcs_image_uri = 1; + + // The URI of the source image. Can be either: + // + // 1. A Google Cloud Storage URI of the form + // `gs://bucket_name/object_name`. Object versioning is not supported. See + // [Google Cloud Storage Request + // URIs](https://cloud.google.com/storage/docs/reference-uris) for more + // info. + // + // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + // HTTP/HTTPS URLs, Google cannot guarantee that the request will be + // completed. Your request may fail if the specified host denies the + // request (e.g. due to request throttling or DOS prevention), or if Google + // throttles requests to the site for abuse prevention. You should not + // depend on externally-hosted images for production applications. + // + // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + // precedence. + string image_uri = 2; +} + +// Client image to perform Google Cloud Vision API tasks over. +message Image { + // Image content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + bytes content = 1; + + // Google Cloud Storage image location, or publicly-accessible image + // URL. If both `content` and `source` are provided for an image, `content` + // takes precedence and is used to perform the image annotation request. + ImageSource source = 2; +} + +// A bucketized representation of likelihood, which is intended to give clients +// highly stable results across model upgrades. +enum Likelihood { + // Unknown likelihood. + UNKNOWN = 0; + + // It is very unlikely. + VERY_UNLIKELY = 1; + + // It is unlikely. + UNLIKELY = 2; + + // It is possible. + POSSIBLE = 3; + + // It is likely. + LIKELY = 4; + + // It is very likely. + VERY_LIKELY = 5; +} + +// A face annotation object contains the results of face detection. +message FaceAnnotation { + // A face-specific landmark (for example, a face feature). + message Landmark { + // Face landmark (feature) type. + // Left and right are defined from the vantage of the viewer of the image + // without considering mirror projections typical of photos. So, `LEFT_EYE`, + // typically, is the person's right eye. + enum Type { + // Unknown face landmark detected. Should not be filled. + UNKNOWN_LANDMARK = 0; + + // Left eye. + LEFT_EYE = 1; + + // Right eye. + RIGHT_EYE = 2; + + // Left of left eyebrow. + LEFT_OF_LEFT_EYEBROW = 3; + + // Right of left eyebrow. + RIGHT_OF_LEFT_EYEBROW = 4; + + // Left of right eyebrow. + LEFT_OF_RIGHT_EYEBROW = 5; + + // Right of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW = 6; + + // Midpoint between eyes. + MIDPOINT_BETWEEN_EYES = 7; + + // Nose tip. + NOSE_TIP = 8; + + // Upper lip. + UPPER_LIP = 9; + + // Lower lip. + LOWER_LIP = 10; + + // Mouth left. + MOUTH_LEFT = 11; + + // Mouth right. + MOUTH_RIGHT = 12; + + // Mouth center. + MOUTH_CENTER = 13; + + // Nose, bottom right. + NOSE_BOTTOM_RIGHT = 14; + + // Nose, bottom left. + NOSE_BOTTOM_LEFT = 15; + + // Nose, bottom center. + NOSE_BOTTOM_CENTER = 16; + + // Left eye, top boundary. + LEFT_EYE_TOP_BOUNDARY = 17; + + // Left eye, right corner. + LEFT_EYE_RIGHT_CORNER = 18; + + // Left eye, bottom boundary. + LEFT_EYE_BOTTOM_BOUNDARY = 19; + + // Left eye, left corner. + LEFT_EYE_LEFT_CORNER = 20; + + // Right eye, top boundary. + RIGHT_EYE_TOP_BOUNDARY = 21; + + // Right eye, right corner. + RIGHT_EYE_RIGHT_CORNER = 22; + + // Right eye, bottom boundary. + RIGHT_EYE_BOTTOM_BOUNDARY = 23; + + // Right eye, left corner. + RIGHT_EYE_LEFT_CORNER = 24; + + // Left eyebrow, upper midpoint. + LEFT_EYEBROW_UPPER_MIDPOINT = 25; + + // Right eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + + // Left ear tragion. + LEFT_EAR_TRAGION = 27; + + // Right ear tragion. + RIGHT_EAR_TRAGION = 28; + + // Left eye pupil. + LEFT_EYE_PUPIL = 29; + + // Right eye pupil. + RIGHT_EYE_PUPIL = 30; + + // Forehead glabella. + FOREHEAD_GLABELLA = 31; + + // Chin gnathion. + CHIN_GNATHION = 32; + + // Chin left gonion. + CHIN_LEFT_GONION = 33; + + // Chin right gonion. + CHIN_RIGHT_GONION = 34; + } + + // Face landmark type. + Type type = 3; + + // Face landmark position. + Position position = 4; + } + + // The bounding polygon around the face. The coordinates of the bounding box + // are in the original image's scale. + // The bounding box is computed to "frame" the face in accordance with human + // expectations. It is based on the landmarker results. + // Note that one or more x and/or y coordinates may not be generated in the + // `BoundingPoly` (the polygon will be unbounded) if only a partial face + // appears in the image to be annotated. + BoundingPoly bounding_poly = 1; + + // The `fd_bounding_poly` bounding polygon is tighter than the + // `boundingPoly`, and encloses only the skin part of the face. Typically, it + // is used to eliminate the face from any image analysis that detects the + // "amount of skin" visible in an image. It is not based on the + // landmarker results, only on the initial face detection, hence + // the fd (face detection) prefix. + BoundingPoly fd_bounding_poly = 2; + + // Detected face landmarks. + repeated Landmark landmarks = 3; + + // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + // of the face relative to the image vertical about the axis perpendicular to + // the face. Range [-180,180]. + float roll_angle = 4; + + // Yaw angle, which indicates the leftward/rightward angle that the face is + // pointing relative to the vertical plane perpendicular to the image. Range + // [-180,180]. + float pan_angle = 5; + + // Pitch angle, which indicates the upwards/downwards angle that the face is + // pointing relative to the image's horizontal plane. Range [-180,180]. + float tilt_angle = 6; + + // Detection confidence. Range [0, 1]. + float detection_confidence = 7; + + // Face landmarking confidence. Range [0, 1]. + float landmarking_confidence = 8; + + // Joy likelihood. + Likelihood joy_likelihood = 9; + + // Sorrow likelihood. + Likelihood sorrow_likelihood = 10; + + // Anger likelihood. + Likelihood anger_likelihood = 11; + + // Surprise likelihood. + Likelihood surprise_likelihood = 12; + + // Under-exposed likelihood. + Likelihood under_exposed_likelihood = 13; + + // Blurred likelihood. + Likelihood blurred_likelihood = 14; + + // Headwear likelihood. + Likelihood headwear_likelihood = 15; + + // Additional recognition information. Only computed if + // image_context.face_recognition_params is provided, **and** a match is found + // to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is + // sorted in order of decreasing confidence values. + repeated FaceRecognitionResult recognition_result = 16; +} + +// Detected entity location information. +message LocationInfo { + // lat/long location coordinates. + google.type.LatLng lat_lng = 1; +} + +// A `Property` consists of a user-supplied name/value pair. +message Property { + // Name of the property. + string name = 1; + + // Value of the property. + string value = 2; + + // Value of numeric properties. + uint64 uint64_value = 3; +} + +// Set of detected entity features. +message EntityAnnotation { + // Opaque entity ID. Some IDs may be available in + // [Google Knowledge Graph Search + // API](https://developers.google.com/knowledge-graph/). + string mid = 1; + + // The language code for the locale in which the entity textual + // `description` is expressed. + string locale = 2; + + // Entity textual description, expressed in its `locale` language. + string description = 3; + + // Overall score of the result. Range [0, 1]. + float score = 4; + + // **Deprecated. Use `score` instead.** + // The accuracy of the entity detection in an image. + // For example, for an image in which the "Eiffel Tower" entity is detected, + // this field represents the confidence that there is a tower in the query + // image. Range [0, 1]. + float confidence = 5 [deprecated = true]; + + // The relevancy of the ICA (Image Content Annotation) label to the + // image. For example, the relevancy of "tower" is likely higher to an image + // containing the detected "Eiffel Tower" than to an image containing a + // detected distant towering building, even though the confidence that + // there is a tower in each image may be the same. Range [0, 1]. + float topicality = 6; + + // Image region to which this entity belongs. Not produced + // for `LABEL_DETECTION` features. + BoundingPoly bounding_poly = 7; + + // The location information for the detected entity. Multiple + // `LocationInfo` elements can be present because one location may + // indicate the location of the scene in the image, and another location + // may indicate the location of the place where the image was taken. + // Location information is usually present for landmarks. + repeated LocationInfo locations = 8; + + // Some entities may have optional user-supplied `Property` (name/value) + // fields, such a score or string that qualifies the entity. + repeated Property properties = 9; +} + +// Set of detected objects with bounding boxes. +message LocalizedObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + + // Image region to which this object belongs. This must be populated. + BoundingPoly bounding_poly = 5; +} + +// Set of features pertaining to the image, computed by computer vision +// methods over safe-search verticals (for example, adult, spoof, medical, +// violence). +message SafeSearchAnnotation { + // Represents the adult content likelihood for the image. Adult content may + // contain elements such as nudity, pornographic images or cartoons, or + // sexual activities. + Likelihood adult = 1; + + // Spoof likelihood. The likelihood that an modification + // was made to the image's canonical version to make it appear + // funny or offensive. + Likelihood spoof = 2; + + // Likelihood that this is a medical image. + Likelihood medical = 3; + + // Likelihood that this image contains violent content. + Likelihood violence = 4; + + // Likelihood that the request image contains racy content. Racy content may + // include (but is not limited to) skimpy or sheer clothing, strategically + // covered nudity, lewd or provocative poses, or close-ups of sensitive + // body areas. + Likelihood racy = 9; +} + +// Rectangle determined by min and max `LatLng` pairs. +message LatLongRect { + // Min lat/long pair. + google.type.LatLng min_lat_lng = 1; + + // Max lat/long pair. + google.type.LatLng max_lat_lng = 2; +} + +// Color information consists of RGB channels, score, and the fraction of +// the image that the color occupies in the image. +message ColorInfo { + // RGB components of the color. + google.type.Color color = 1; + + // Image-specific score for this color. Value in range [0, 1]. + float score = 2; + + // The fraction of pixels the color occupies in the image. + // Value in range [0, 1]. + float pixel_fraction = 3; +} + +// Set of dominant colors and their corresponding scores. +message DominantColorsAnnotation { + // RGB color values with their score and pixel fraction. + repeated ColorInfo colors = 1; +} + +// Stores image properties, such as dominant colors. +message ImageProperties { + // If present, dominant colors completed successfully. + DominantColorsAnnotation dominant_colors = 1; +} + +// Single crop hint that is used to generate a new crop when serving an image. +message CropHint { + // The bounding polygon for the crop region. The coordinates of the bounding + // box are in the original image's scale. + BoundingPoly bounding_poly = 1; + + // Confidence of this being a salient region. Range [0, 1]. + float confidence = 2; + + // Fraction of importance of this salient region with respect to the original + // image. + float importance_fraction = 3; +} + +// Set of crop hints that are used to generate new crops when serving images. +message CropHintsAnnotation { + // Crop hint results. + repeated CropHint crop_hints = 1; +} + +// Parameters for crop hints annotation request. +message CropHintsParams { + // Aspect ratios in floats, representing the ratio of the width to the height + // of the image. For example, if the desired aspect ratio is 4/3, the + // corresponding float value should be 1.33333. If not specified, the + // best possible crop is returned. The number of provided aspect ratios is + // limited to a maximum of 16; any aspect ratios provided after the 16th are + // ignored. + repeated float aspect_ratios = 1; +} + +// Parameters for web detection request. +message WebDetectionParams { + // Whether to include results derived from the geo information in the image. + bool include_geo_results = 2; +} + +// Parameters for text detections. This is used to control TEXT_DETECTION and +// DOCUMENT_TEXT_DETECTION features. +message TextDetectionParams { + + // By default, Cloud Vision API only includes confidence score for + // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + // score for TEXT_DETECTION as well. + bool enable_text_detection_confidence_score = 9; + + // A list of advanced OCR options to fine-tune OCR behavior. + repeated string advanced_ocr_options = 11; +} + +// Image context and/or feature-specific parameters. +message ImageContext { + // Not used. + LatLongRect lat_long_rect = 1; + + // List of languages to use for TEXT_DETECTION. In most cases, an empty value + // yields the best results since it enables automatic language detection. For + // languages based on the Latin alphabet, setting `language_hints` is not + // needed. In rare cases, when the language of the text in the image is known, + // setting a hint will help get better results (although it will be a + // significant hindrance if the hint is wrong). Text detection returns an + // error if one or more of the specified languages is not one of the + // [supported languages](https://cloud.google.com/vision/docs/languages). + repeated string language_hints = 2; + + // Parameters for crop hints annotation request. + CropHintsParams crop_hints_params = 4; + + // Parameters for face recognition. + FaceRecognitionParams face_recognition_params = 10; + + // Parameters for product search. + ProductSearchParams product_search_params = 5; + + // Parameters for web detection. + WebDetectionParams web_detection_params = 6; + + // Parameters for text detection and document text detection. + TextDetectionParams text_detection_params = 12; +} + +// Request for performing Google Cloud Vision API tasks over a user-provided +// image, with user-requested features, and with context information. +message AnnotateImageRequest { + // The image to be processed. + Image image = 1; + + // Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image. + ImageContext image_context = 3; +} + +// If an image was produced from a file (e.g. a PDF), this message gives +// information about the source of that image. +message ImageAnnotationContext { + // The URI of the file used to produce the image. + string uri = 1; + + // If the file was a PDF or TIFF, this field gives the page number within + // the file used to produce the image. + int32 page_number = 2; +} + +// Response to an image annotation request. +message AnnotateImageResponse { + // If present, face detection has completed successfully. + repeated FaceAnnotation face_annotations = 1; + + // If present, landmark detection has completed successfully. + repeated EntityAnnotation landmark_annotations = 2; + + // If present, logo detection has completed successfully. + repeated EntityAnnotation logo_annotations = 3; + + // If present, label detection has completed successfully. + repeated EntityAnnotation label_annotations = 4; + + // If present, localized object detection has completed successfully. + // This will be sorted descending by confidence score. + repeated LocalizedObjectAnnotation localized_object_annotations = 22; + + // If present, text (OCR) detection has completed successfully. + repeated EntityAnnotation text_annotations = 5; + + // If present, text (OCR) detection or document (OCR) text detection has + // completed successfully. + // This annotation provides the structural hierarchy for the OCR detected + // text. + TextAnnotation full_text_annotation = 12; + + // If present, safe-search annotation has completed successfully. + SafeSearchAnnotation safe_search_annotation = 6; + + // If present, image properties were extracted successfully. + ImageProperties image_properties_annotation = 8; + + // If present, crop hints have completed successfully. + CropHintsAnnotation crop_hints_annotation = 11; + + // If present, web detection has completed successfully. + WebDetection web_detection = 13; + + // If present, product search has completed successfully. + ProductSearchResults product_search_results = 14; + + // If set, represents the error message for the operation. + // Note that filled-in image annotations are guaranteed to be + // correct, even when `error` is set. + google.rpc.Status error = 9; + + // If present, contextual information is needed to understand where this image + // comes from. + ImageAnnotationContext context = 21; +} + +// Multiple image annotation requests are batched into a single service call. +message BatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to a batch image annotation request. +message BatchAnnotateImagesResponse { + // Individual responses to image annotation requests within the batch. + repeated AnnotateImageResponse responses = 1; +} + +// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. +message AnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Pages of the file to perform image annotation. + // + // Pages starts from 1, we assume the first page of the file is page 1. + // At most 5 pages are supported per request. Pages can be negative. + // + // Page 1 means the first page. + // Page 2 means the second page. + // Page -1 means the last page. + // Page -2 means the second to the last page. + // + // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + // + // If this field is empty, by default the service performs image annotation + // for the first 5 pages of the file. + repeated int32 pages = 4; +} + +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. This field will be + // empty if the `error` field is set. + repeated AnnotateImageResponse responses = 2; + + // This field gives the total number of pages in the file. + int32 total_pages = 3; + + // If set, represents the error message for the failed request. The + // `responses` field will not be set in this case. + google.rpc.Status error = 4; +} + +// A list of requests to annotate files using the BatchAnnotateFiles API. +message BatchAnnotateFilesRequest { + // Required. The list of file annotation requests. Right now we support only + // one AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// A list of file annotation responses. +message BatchAnnotateFilesResponse { + // The list of file annotation responses, each response corresponding to each + // AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileResponse responses = 1; +} + +// An offline file annotation request. +message AsyncAnnotateFileRequest { + // Required. Information about the input file. + InputConfig input_config = 1; + + // Required. Requested features. + repeated Feature features = 2; + + // Additional context that may accompany the image(s) in the file. + ImageContext image_context = 3; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 4; +} + +// The response for a single offline file annotation request. +message AsyncAnnotateFileResponse { + // The output location and metadata from AsyncAnnotateFileRequest. + OutputConfig output_config = 1; +} + +// Request for async image annotation for a list of images. +message AsyncBatchAnnotateImagesRequest { + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The desired output location and metadata (e.g. format). + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response to an async batch image annotation request. +message AsyncBatchAnnotateImagesResponse { + // The output location and metadata from AsyncBatchAnnotateImagesRequest. + OutputConfig output_config = 1; +} + +// Multiple async file annotation requests are batched into a single service +// call. +message AsyncBatchAnnotateFilesRequest { + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response to an async batch file annotation request. +message AsyncBatchAnnotateFilesResponse { + // The list of file annotation responses, one for each request in + // AsyncBatchAnnotateFilesRequest. + repeated AsyncAnnotateFileResponse responses = 1; +} + +// The desired input location and metadata. +message InputConfig { + // The Google Cloud Storage location to read the input from. + GcsSource gcs_source = 1; + + // File content, represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + // + // Currently, this field only works for BatchAnnotateFiles requests. It does + // not work for AsyncBatchAnnotateFiles requests. + bytes content = 3; + + // The type of the file. Currently only "application/pdf", "image/tiff" and + // "image/gif" are supported. Wildcards are not supported. + string mime_type = 2; +} + +// The desired output location and metadata. +message OutputConfig { + // The Google Cloud Storage location to write the output(s) to. + GcsDestination gcs_destination = 1; + + // The max number of response protos to put into each output JSON file on + // Google Cloud Storage. + // The valid range is [1, 100]. If not specified, the default value is 20. + // + // For example, for one pdf file with 100 pages, 100 response protos will + // be generated. If `batch_size` = 20, then 5 json files each + // containing 20 response protos will be written under the prefix + // `gcs_destination`.`uri`. + // + // Currently, batch_size only applies to GcsDestination, with potential future + // support for other output configurations. + int32 batch_size = 2; +} + +// The Google Cloud Storage location where the input will be read from. +message GcsSource { + // Google Cloud Storage URI for the input file. This must only be a + // Google Cloud Storage object. Wildcards are not currently supported. + string uri = 1; +} + +// The Google Cloud Storage location where the output will be written to. +message GcsDestination { + // Google Cloud Storage URI prefix where the results will be stored. Results + // will be in JSON format and preceded by its corresponding input URI prefix. + // This field can either represent a gcs file prefix or gcs directory. In + // either case, the uri should be unique because in order to get all of the + // output files, you will need to do a wildcard gcs search on the uri prefix + // you provide. + // + // Examples: + // + // * File Prefix: gs://bucket-name/here/filenameprefix The output files + // will be created in gs://bucket-name/here/ and the names of the + // output files will begin with "filenameprefix". + // + // * Directory Prefix: gs://bucket-name/some/location/ The output files + // will be created in gs://bucket-name/some/location/ and the names of the + // output files could be anything because there was no filename prefix + // specified. + // + // If multiple outputs, each response is still AnnotateFileResponse, each of + // which contains some subset of the full list of AnnotateImageResponse. + // Multiple outputs can happen if, for example, the output JSON is too large + // and overflows into multiple sharded files. + string uri = 1; +} + +// Contains metadata for the BatchAnnotateImages operation. +message OperationMetadata { + // Batch operation states. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is received. + CREATED = 1; + + // Request is actively being processed. + RUNNING = 2; + + // The batch processing is done. + DONE = 3; + + // The batch processing was cancelled. + CANCELLED = 4; + } + + // Current state of the batch operation. + State state = 1; + + // The time when the batch request was received. + google.protobuf.Timestamp create_time = 5; + + // The time when the operation result was last updated. + google.protobuf.Timestamp update_time = 6; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto new file mode 100644 index 000000000000..ebb428acc800 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto @@ -0,0 +1,127 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/api/resource.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/cloud/vision/v1p4beta1/product_search_service.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a product search request. +message ProductSearchParams { + // The bounding polygon around the area of interest in the image. + // If it is not specified, system discretion will be applied. + BoundingPoly bounding_poly = 9; + + // The resource name of a + // [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for + // similar images. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; + + // The list of product categories to search in. Currently, we only consider + // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + // "packagedgoods-v1", or "general-v1" should be specified. The legacy + // categories "homegoods", "apparel", and "toys" are still supported but will + // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + // or "toys-v2" for better product search accuracy. It is recommended to + // migrate existing products to these categories as well. + repeated string product_categories = 7; + + // The filtering expression. This can be used to restrict search results based + // on Product labels. We currently support an AND of OR of key-value + // expressions, where each expression within an OR must have the same key. An + // '=' should be used to connect the key and value. + // + // For example, "(color = red OR color = blue) AND brand = Google" is + // acceptable, but "(color = red OR brand = Google)" is not acceptable. + // "color: red" is not acceptable because it uses a ':' instead of an '='. + string filter = 8; +} + +// Results for a product search request. +message ProductSearchResults { + // Information about a product. + message Result { + // The Product. + Product product = 1; + + // A confidence level on the match, ranging from 0 (no confidence) to + // 1 (full confidence). + float score = 2; + + // The resource name of the image from the product that is the closest match + // to the query. + string image = 3; + } + + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + + // Information about the products similar to a single product in a query + // image. + message GroupedResult { + // The bounding polygon around the product detected in the query image. + BoundingPoly bounding_poly = 1; + + // List of results, one for each product match. + repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; + } + + // Timestamp of the index which provided these results. Products added to the + // product set and products removed from the product set after this time are + // not reflected in the current results. + google.protobuf.Timestamp index_time = 2; + + // List of results, one for each product match. + repeated Result results = 5; + + // List of results grouped by products detected in the query image. Each entry + // corresponds to one bounding polygon in the query image, and contains the + // matching products specific to that region. There may be duplicate product + // matches in the union of all the per-product results. + repeated GroupedResult product_grouped_results = 6; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto new file mode 100644 index 000000000000..df7bc7a38a4d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto @@ -0,0 +1,1039 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "ProductSearchServiceProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Manages Products and ProductSets of reference images for use in product +// search. It uses the following resource model: +// +// - The API has a collection of +// [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named +// `projects/*/locations/*/productSets/*`, which acts as a way to put different +// products into groups to limit identification. +// +// In parallel, +// +// - The API has a collection of +// [Product][google.cloud.vision.v1p4beta1.Product] resources, named +// `projects/*/locations/*/products/*` +// +// - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of +// [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, +// named +// `projects/*/locations/*/products/*/referenceImages/*` +service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + + // Creates and returns a new ProductSet resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + // 4096 characters. + rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" + body: "product_set" + }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; + } + + // Lists ProductSets in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + // than 1. + rpc ListProductSets(ListProductSetsRequest) + returns (ListProductSetsResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ProductSet. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a ProductSet resource. + // Only display_name can be updated currently. + // + // Possible errors: + // + // * Returns NOT_FOUND if the ProductSet does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but + // missing from the request or longer than 4096 characters. + rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { + option (google.api.http) = { + patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}" + body: "product_set" + }; + option (google.api.method_signature) = "product_set,update_mask"; + } + + // Permanently deletes a ProductSet. Products and ReferenceImages in the + // ProductSet are not deleted. + // + // The actual image files are not deleted from Google Cloud Storage. + rpc DeleteProductSet(DeleteProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new product resource. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is missing or invalid. + rpc CreateProduct(CreateProductRequest) returns (Product) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/products" + body: "product" + }; + option (google.api.method_signature) = "parent,product,product_id"; + } + + // Lists products in an unspecified order. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*}/products" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a Product. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Makes changes to a Product resource. + // Only the `display_name`, `description`, and `labels` fields can be updated + // right now. + // + // If labels are updated, the change will not be reflected in queries until + // the next index time. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product does not exist. + // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + // missing from the request or longer than 4096 characters. + // * Returns INVALID_ARGUMENT if description is present in update_mask but is + // longer than 4096 characters. + // * Returns INVALID_ARGUMENT if product_category is present in update_mask. + rpc UpdateProduct(UpdateProductRequest) returns (Product) { + option (google.api.http) = { + patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}" + body: "product" + }; + option (google.api.method_signature) = "product,update_mask"; + } + + // Permanently deletes a product and its reference images. + // + // Metadata of the product and all its images will be deleted right away, but + // search queries against ProductSets containing the product may still work + // until all related caches are refreshed. + rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p4beta1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates and returns a new ReferenceImage resource. + // + // The `bounding_poly` field is optional. If `bounding_poly` is not specified, + // the system will try to detect regions of interest in the image that are + // compatible with the product_category on the parent product. If it is + // specified, detection is ALWAYS skipped. The system converts polygons into + // non-rotated rectangles. + // + // Note that the pipeline will resize the image if the image resolution is too + // large to process (above 50MP). + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + // characters. + // * Returns INVALID_ARGUMENT if the product does not exist. + // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + // compatible with the parent product's product_category is detected. + // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + rpc CreateReferenceImage(CreateReferenceImageRequest) + returns (ReferenceImage) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + body: "reference_image" + }; + option (google.api.method_signature) = + "parent,reference_image,reference_image_id"; + } + + // Permanently deletes a reference image. + // + // The image metadata will be deleted right away, but search queries + // against ProductSets containing the image may still work until all related + // caches are refreshed. + // + // The actual image files are not deleted from Google Cloud Storage. + rpc DeleteReferenceImage(DeleteReferenceImageRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists reference images. + // + // Possible errors: + // + // * Returns NOT_FOUND if the parent product does not exist. + // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + // than 1. + rpc ListReferenceImages(ListReferenceImagesRequest) + returns (ListReferenceImagesResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets information associated with a ReferenceImage. + // + // Possible errors: + // + // * Returns NOT_FOUND if the specified image does not exist. + rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Adds a Product to the specified ProductSet. If the Product is already + // present, no change is made. + // + // One Product can be added to at most 100 ProductSets. + // + // Possible errors: + // + // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + rpc AddProductToProductSet(AddProductToProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Removes a Product from the specified ProductSet. + rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" + body: "*" + }; + option (google.api.method_signature) = "name,product"; + } + + // Lists the Products in a ProductSet, in an unspecified order. If the + // ProductSet does not exist, the products field of the response will be + // empty. + // + // Possible errors: + // + // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + rpc ListProductsInProductSet(ListProductsInProductSetRequest) + returns (ListProductsInProductSetResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" + }; + option (google.api.method_signature) = "name"; + } + + // Asynchronous API that imports a list of reference images to specified + // product sets based on a list of image information. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be + // used to keep track of the progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + // `Operation.response` contains `ImportProductSetsResponse`. (results) + // + // The input source of this method is a csv file on Google Cloud Storage. + // For the format of the csv file please see + // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + rpc ImportProductSets(ImportProductSetsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import" + body: "*" + }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Asynchronous API to delete all Products in a ProductSet or all Products + // that are in no ProductSet. + // + // If a Product is a member of the specified ProductSet in addition to other + // ProductSets, the Product will still be deleted. + // + // It is recommended to not delete the specified ProductSet until after this + // operation has completed. It is also recommended to not add any of the + // Products involved in the batch delete to a new ProductSet while this + // operation is running because those Products may still end up deleted. + // + // It's not possible to undo the PurgeProducts operation. Therefore, it is + // recommended to keep the csv files used in ImportProductSets (if that was + // how you originally built the Product Set) before starting PurgeProducts, in + // case you need to re-import the data after deletion. + // + // If the plan is to purge all of the Products from a ProductSet and then + // re-use the empty ProductSet to re-import new Products into the empty + // ProductSet, you must wait until the PurgeProducts operation has finished + // for that ProductSet. + // + // The [google.longrunning.Operation][google.longrunning.Operation] API can be + // used to keep track of the progress and results of the request. + // `Operation.metadata` contains `BatchOperationMetadata`. (progress) + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/products:purge" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "BatchOperationMetadata" + }; + } +} + +// A Product contains ReferenceImages. +message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + + // A product label represented as a key-value pair. + message KeyValue { + // The key of the label attached to the product. Cannot be empty and cannot + // exceed 128 bytes. + string key = 1; + + // The value of the label attached to the product. Cannot be empty and + // cannot exceed 128 bytes. + string value = 2; + } + + // The resource name of the product. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + // + // This field is ignored when creating a product. + string name = 1; + + // The user-provided name for this Product. Must not be empty. Must be at most + // 4096 characters long. + string display_name = 2; + + // User-provided metadata to be stored with this product. Must be at most 4096 + // characters long. + string description = 3; + + // Immutable. The category for the product identified by the reference image. + // This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The + // legacy categories "homegoods", "apparel", and "toys" are still supported, + // but these should not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; + + // Key-value pairs that can be attached to a product. At query time, + // constraints can be specified based on the product_labels. + // + // Note that integer values can be provided as strings, e.g. "1199". Only + // strings with integer values can match a range-based restriction which is + // to be supported soon. + // + // Multiple values can be assigned to the same key. One product may have up to + // 500 product_labels. + // + // Notice that the total number of distinct product_labels over all products + // in one ProductSet cannot exceed 1M, otherwise the product search pipeline + // will refuse to work for that ProductSet. + repeated KeyValue product_labels = 5; +} + +// A ProductSet contains Products. A ProductSet can contain a maximum of 1 +// million reference images. If the limit is exceeded, periodic indexing will +// fail. +message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + + // The resource name of the ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + // + // This field is ignored when creating a ProductSet. + string name = 1; + + // The user-provided name for this ProductSet. Must not be empty. Must be at + // most 4096 characters long. + string display_name = 2; + + // Output only. The time at which this ProductSet was last indexed. Query + // results will reflect all updates before this time. If this ProductSet has + // never been indexed, this timestamp is the default value + // "1970-01-01T00:00:00Z". + // + // This field is ignored when creating a ProductSet. + google.protobuf.Timestamp index_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If there was an error with indexing the product set, the field + // is populated. + // + // This field is ignored when creating a ProductSet. + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A `ReferenceImage` represents a product image and its associated metadata, +// such as bounding boxes. +message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + + // The resource name of the reference image. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + // + // This field is ignored when creating a reference image. + string name = 1; + + // Required. The Google Cloud Storage URI of the reference image. + // + // The URI must start with `gs://`. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Bounding polygons around the areas of interest in the reference + // image. If this field is empty, the system will try to detect regions of + // interest. At most 10 bounding polygons will be used. + // + // The provided shape is converted into a non-rotated rectangle. Once + // converted, the small edge of the rectangle must be greater than or equal + // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + // is not). + repeated BoundingPoly bounding_polys = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the `CreateProduct` method. +message CreateProductRequest { + // Required. The project in which the Product should be created. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this Product. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_id = 3; +} + +// Request message for the `ListProducts` method. +message ListProductsRequest { + // Required. The project OR ProductSet from which Products should be listed. + // + // Format: + // `projects/PROJECT_ID/locations/LOC_ID` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProducts` method. +message ListProductsResponse { + // List of products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProduct` method. +message GetProductRequest { + // Required. Resource name of the Product to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; +} + +// Request message for the `UpdateProduct` method. +message UpdateProductRequest { + // Required. The Product resource which replaces the one on the server. + // product.name is immutable. + Product product = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields + // to update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask paths include `product_labels`, `display_name`, and + // `description`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProduct` method. +message DeleteProductRequest { + // Required. Resource name of product to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; +} + +// Request message for the `CreateProductSet` method. +message CreateProductSetRequest { + // Required. The project in which the ProductSet should be created. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for this ProductSet. If set, the server will + // attempt to use this value as the resource id. If it is already in use, an + // error is returned with code ALREADY_EXISTS. Must be at most 128 characters + // long. It cannot contain the character `/`. + string product_set_id = 3; +} + +// Request message for the `ListProductSets` method. +message ListProductSetsRequest { + // Required. The project from which ProductSets should be listed. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductSets` method. +message ListProductSetsResponse { + // List of ProductSets. + repeated ProductSet product_sets = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for the `GetProductSet` method. +message GetProductSetRequest { + // Required. Resource name of the ProductSet to get. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `UpdateProductSet` method. +message UpdateProductSetRequest { + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + // update. + // If update_mask isn't specified, all mutable fields are to be updated. + // Valid mask path is `display_name`. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for the `DeleteProductSet` method. +message DeleteProductSetRequest { + // Required. Resource name of the ProductSet to delete. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; +} + +// Request message for the `CreateReferenceImage` method. +message CreateReferenceImageRequest { + // Required. Resource name of the product in which to create the reference + // image. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; + + // Required. The reference image to create. + // If an image ID is specified, it is ignored. + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; + + // A user-supplied resource id for the ReferenceImage to be added. If set, + // the server will attempt to use this value as the resource id. If it is + // already in use, an error is returned with code ALREADY_EXISTS. Must be at + // most 128 characters long. It cannot contain the character `/`. + string reference_image_id = 3; +} + +// Request message for the `ListReferenceImages` method. +message ListReferenceImagesRequest { + // Required. Resource name of the product containing the reference images. + // + // Format is + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // A token identifying a page of results to be returned. This is the value + // of `nextPageToken` returned in a previous reference image list request. + // + // Defaults to the first page if not specified. + string page_token = 3; +} + +// Response message for the `ListReferenceImages` method. +message ListReferenceImagesResponse { + // The list of reference images. + repeated ReferenceImage reference_images = 1; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string next_page_token = 3; +} + +// Request message for the `GetReferenceImage` method. +message GetReferenceImageRequest { + // Required. The resource name of the ReferenceImage to get. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `DeleteReferenceImage` method. +message DeleteReferenceImageRequest { + // Required. The resource name of the reference image to delete. + // + // Format is: + // + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; +} + +// Request message for the `AddProductToProductSet` method. +message AddProductToProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be added to this ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; +} + +// Request message for the `RemoveProductFromProductSet` method. +message RemoveProductFromProductSetRequest { + // Required. The resource name for the ProductSet to modify. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // Required. The resource name for the Product to be removed from this + // ProductSet. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; +} + +// Request message for the `ListProductsInProductSet` method. +message ListProductsInProductSetRequest { + // Required. The ProductSet resource for which to retrieve Products. + // + // Format is: + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; + + // The maximum number of items to return. Default 10, maximum 100. + int32 page_size = 2; + + // The next_page_token returned from a previous List request, if any. + string page_token = 3; +} + +// Response message for the `ListProductsInProductSet` method. +message ListProductsInProductSetResponse { + // The list of Products. + repeated Product products = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The Google Cloud Storage location for a csv file which preserves a list of +// ImportProductSetRequests in each line. +message ImportProductSetsGcsSource { + // The Google Cloud Storage URI of the input csv file. + // + // The URI must start with `gs://`. + // + // The format of the input csv file should be one image per line. + // In each line, there are 8 columns. + // + // 1. image-uri + // 2. image-id + // 3. product-set-id + // 4. product-id + // 5. product-category + // 6. product-display-name + // 7. labels + // 8. bounding-poly + // + // The `image-uri`, `product-set-id`, `product-id`, and `product-category` + // columns are required. All other columns are optional. + // + // If the `ProductSet` or `Product` specified by the `product-set-id` and + // `product-id` values does not exist, then the system will create a new + // `ProductSet` or `Product` for the image. In this case, the + // `product-display-name` column refers to + // [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the + // `product-category` column refers to + // [product_category][google.cloud.vision.v1p4beta1.Product.product_category], + // and the `labels` column refers to + // [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels]. + // + // The `image-id` column is optional but must be unique if provided. If it is + // empty, the system will automatically assign a unique id to the image. + // + // The `product-display-name` column is optional. If it is empty, the system + // sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name] + // field for the product to a space (" "). You can update the `display_name` + // later by using the API. + // + // If a `Product` with the specified `product-id` already exists, then the + // system ignores the `product-display-name`, `product-category`, and `labels` + // columns. + // + // The `labels` column (optional) is a line containing a list of + // comma-separated key-value pairs, in the following format: + // + // "key_1=value_1,key_2=value_2,...,key_n=value_n" + // + // The `bounding-poly` column (optional) identifies one region of + // interest from the image in the same manner as `CreateReferenceImage`. If + // you do not specify the `bounding-poly` column, then the system will try to + // detect regions of interest automatically. + // + // At most one `bounding-poly` column is allowed per line. If the image + // contains multiple regions of interest, add a line to the CSV file that + // includes the same product information, and the `bounding-poly` values for + // each region of interest. + // + // The `bounding-poly` column must contain an even number of comma-separated + // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + // non-negative integers for absolute bounding polygons, and float values + // in [0, 1] for normalized bounding polygons. + // + // The system will resize the image if the image resolution is too + // large to process (larger than 20MP). + string csv_file_uri = 1; +} + +// The input content for the `ImportProductSets` method. +message ImportProductSetsInputConfig { + // The source of the input. + oneof source { + // The Google Cloud Storage location for a csv file which preserves a list + // of ImportProductSetRequests in each line. + ImportProductSetsGcsSource gcs_source = 1; + } +} + +// Request message for the `ImportProductSets` method. +message ImportProductSetsRequest { + // Required. The project in which the ProductSets should be imported. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for the `ImportProductSets` method. +// +// This message is returned by the +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] +// method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field. +message ImportProductSetsResponse { + // The list of reference_images that are imported successfully. + repeated ReferenceImage reference_images = 1; + + // The rpc status for each ImportProductSet request, including both successes + // and errors. + // + // The number of statuses here matches the number of lines in the csv file, + // and statuses[i] stores the success or failure status of processing the i-th + // line of the csv, starting from line 0. + repeated google.rpc.Status statuses = 2; +} + +// Metadata for the batch operations such as the current state. +// +// This is included in the `metadata` field of the `Operation` returned by the +// `GetOperation` call of the `google::longrunning::Operations` service. +message BatchOperationMetadata { + // Enumerates the possible states that the batch request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is actively being processed. + PROCESSING = 1; + + // The request is done and at least one item has been successfully + // processed. + SUCCESSFUL = 2; + + // The request is done and no item has been successfully processed. + FAILED = 3; + + // The request is done after the longrunning.Operations.CancelOperation has + // been called by the user. Any records that were processed before the + // cancel command are output as specified in the request. + CANCELLED = 4; + } + + // The current state of the batch operation. + State state = 1; + + // The time when the batch request was submitted to the server. + google.protobuf.Timestamp submit_time = 2; + + // The time when the batch request is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is + // set to true. + google.protobuf.Timestamp end_time = 3; +} + +// Config to control which ProductSet contains the Products to be deleted. +message ProductSetPurgeConfig { + // The ProductSet that contains the Products to delete. If a Product is a + // member of product_set_id in addition to other ProductSets, the Product will + // still be deleted. + string product_set_id = 1; +} + +// Request message for the `PurgeProducts` method. +message PurgeProductsRequest { + // The Products to delete. + oneof target { + // Specify which ProductSet contains the Products to be deleted. + ProductSetPurgeConfig product_set_purge_config = 2; + + // If delete_orphan_products is true, all Products that are not in any + // ProductSet will be deleted. + bool delete_orphan_products = 3; + } + + // Required. The project and location in which the Products should be deleted. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The default value is false. Override this value to true to actually perform + // the purge. + bool force = 4; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto new file mode 100644 index 000000000000..233c4c689e4f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto @@ -0,0 +1,260 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/cloud/vision/v1p4beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "TextAnnotationProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// TextAnnotation contains a structured representation of OCR extracted text. +// The hierarchy of an OCR extracted text structure is like this: +// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol +// Each structural component, starting from Page, may further have their own +// properties. Properties describe detected languages, breaks etc.. Please refer +// to the +// [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty] +// message definition below for more detail. +message TextAnnotation { + // Detected language for a structural component. + message DetectedLanguage { + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 1; + + // Confidence of detected language. Range [0, 1]. + float confidence = 2; + } + + // Detected start or end of a structural component. + message DetectedBreak { + // Enum to denote the type of break found. New line, space etc. + enum BreakType { + // Unknown break label type. + UNKNOWN = 0; + + // Regular space. + SPACE = 1; + + // Sure space (very wide). + SURE_SPACE = 2; + + // Line-wrapping break. + EOL_SURE_SPACE = 3; + + // End-line hyphen that is not present in text; does not co-occur with + // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + HYPHEN = 4; + + // Line break that ends a paragraph. + LINE_BREAK = 5; + } + + // Detected break type. + BreakType type = 1; + + // True if break prepends the element. + bool is_prefix = 2; + } + + // Additional information detected on the structural component. + message TextProperty { + // A list of detected languages together with confidence. + repeated DetectedLanguage detected_languages = 1; + + // Detected start or end of a text segment. + DetectedBreak detected_break = 2; + } + + // List of pages detected by OCR. + repeated Page pages = 1; + + // UTF-8 text detected on the pages. + string text = 2; +} + +// Detected page from OCR. +message Page { + // Additional information detected on the page. + TextAnnotation.TextProperty property = 1; + + // Page width. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 width = 2; + + // Page height. For PDFs the unit is points. For images (including + // TIFFs) the unit is pixels. + int32 height = 3; + + // List of blocks of text, images etc on this page. + repeated Block blocks = 4; + + // Confidence of the OCR results on the page. Range [0, 1]. + float confidence = 5; +} + +// Logical element on the page. +message Block { + // Type of a block (text, image etc) as identified by OCR. + enum BlockType { + // Unknown block type. + UNKNOWN = 0; + + // Regular text block. + TEXT = 1; + + // Table block. + TABLE = 2; + + // Image block. + PICTURE = 3; + + // Horizontal/vertical line box. + RULER = 4; + + // Barcode block. + BARCODE = 5; + } + + // Additional information detected for the block. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the block. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // + // * when the text is horizontal it might look like: + // + // 0----1 + // | | + // 3----2 + // + // * when it's rotated 180 degrees around the top-left corner it becomes: + // + // 2----3 + // | | + // 1----0 + // + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of paragraphs in this block (if this blocks is of type text). + repeated Paragraph paragraphs = 3; + + // Detected block type (text, image etc) for this block. + BlockType block_type = 4; + + // Confidence of the OCR results on the block. Range [0, 1]. + float confidence = 5; +} + +// Structural unit of text representing a number of words in certain order. +message Paragraph { + // Additional information detected for the paragraph. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the paragraph. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of all words in this paragraph. + repeated Word words = 3; + + // Confidence of the OCR results for the paragraph. Range [0, 1]. + float confidence = 4; +} + +// A word representation. +message Word { + // Additional information detected for the word. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the word. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // List of symbols in the word. + // The order of the symbols follows the natural reading order. + repeated Symbol symbols = 3; + + // Confidence of the OCR results for the word. Range [0, 1]. + float confidence = 4; +} + +// A single symbol representation. +message Symbol { + // Additional information detected for the symbol. + TextAnnotation.TextProperty property = 1; + + // The bounding box for the symbol. + // The vertices are in the order of top-left, top-right, bottom-right, + // bottom-left. When a rotation of the bounding box is detected the rotation + // is represented as around the top-left corner as defined when the text is + // read in the 'natural' orientation. + // For example: + // * when the text is horizontal it might look like: + // 0----1 + // | | + // 3----2 + // * when it's rotated 180 degrees around the top-left corner it becomes: + // 2----3 + // | | + // 1----0 + // and the vertex order will still be (0, 1, 2, 3). + BoundingPoly bounding_box = 2; + + // The actual UTF-8 representation of the symbol. + string text = 3; + + // Confidence of the OCR results for the symbol. Range [0, 1]. + float confidence = 4; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto new file mode 100644 index 000000000000..7d716570f45d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto @@ -0,0 +1,106 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "WebDetectionProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Relevant information for the image from the Internet. +message WebDetection { + // Entity deduced from similar images on the Internet. + message WebEntity { + // Opaque entity ID. + string entity_id = 1; + + // Overall relevancy score for the entity. + // Not normalized and not comparable across different image queries. + float score = 2; + + // Canonical description of the entity, in English. + string description = 3; + } + + // Metadata for online images. + message WebImage { + // The result image URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the image. + float score = 2; + } + + // Metadata for web pages. + message WebPage { + // The result web page URL. + string url = 1; + + // (Deprecated) Overall relevancy score for the web page. + float score = 2; + + // Title for the web page, may contain HTML markups. + string page_title = 3; + + // Fully matching images on the page. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 4; + + // Partial matching images on the page. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its + // crops. + repeated WebImage partial_matching_images = 5; + } + + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + + // Deduced entities from similar images on the Internet. + repeated WebEntity web_entities = 1; + + // Fully matching images from the Internet. + // Can include resized copies of the query image. + repeated WebImage full_matching_images = 2; + + // Partial matching images from the Internet. + // Those images are similar enough to share some key-point features. For + // example an original image will likely have partial matching for its crops. + repeated WebImage partial_matching_images = 3; + + // Web pages containing the matching images from the Internet. + repeated WebPage pages_with_matching_images = 4; + + // The visually similar image results. + repeated WebImage visually_similar_images = 6; + + // The service's best guess as to the topic of the request image. + // Inferred from similar images on the open web. + repeated WebLabel best_guess_labels = 8; +} diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..3560b383184f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFiles(); + } + + public static void asyncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java new file mode 100644 index 000000000000..fe9f4bcd280d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateFilesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateFilesLRO(); + } + + public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..a7f94cf4cf38 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] +import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFiles(); + } + + public static void syncAsyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateFilesRequest request = + AsyncBatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java new file mode 100644 index 000000000000..cca207531cdc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] +import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); + } + + public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + AsyncBatchAnnotateFilesResponse response = + imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..f0b8de781153 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.OutputConfig; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateImages(); + } + + public static void asyncAsyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + ApiFuture future = + imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java new file mode 100644 index 000000000000..8b8c67b8d86b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.OperationMetadata; +import com.google.cloud.vision.v1p4beta1.OutputConfig; +import java.util.ArrayList; + +public class AsyncAsyncBatchAnnotateImagesLRO { + + public static void main(String[] args) throws Exception { + asyncAsyncBatchAnnotateImagesLRO(); + } + + public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + OperationFuture future = + imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request); + // Do something. + AsyncBatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..9e5abd57b143 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.OutputConfig; +import java.util.ArrayList; + +public class SyncAsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateImages(); + } + + public static void syncAsyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + AsyncBatchAnnotateImagesRequest request = + AsyncBatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .build(); + AsyncBatchAnnotateImagesResponse response = + imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java new file mode 100644 index 000000000000..ac9ad1dff5ee --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.OutputConfig; +import java.util.ArrayList; +import java.util.List; + +public class SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig { + + public static void main(String[] args) throws Exception { + syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig(); + } + + public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + AsyncBatchAnnotateImagesResponse response = + imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..dcbc6b6d15ea --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateFiles(); + } + + public static void asyncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request); + // Do something. + BatchAnnotateFilesResponse response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java new file mode 100644 index 000000000000..36ebcb7fd2ea --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateFiles { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateFiles(); + } + + public static void syncBatchAnnotateFiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateFilesRequest request = + BatchAnnotateFilesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java new file mode 100644 index 000000000000..6d2cb3d4faef --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateFilesListannotatefilerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateFilesListannotatefilerequest(); + } + + public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java new file mode 100644 index 000000000000..d3be582406ed --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class AsyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + asyncBatchAnnotateImages(); + } + + public static void asyncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + ApiFuture future = + imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); + // Do something. + BatchAnnotateImagesResponse response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..77c4afa9fb95 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + BatchAnnotateImagesRequest request = + BatchAnnotateImagesRequest.newBuilder() + .addAllRequests(new ArrayList()) + .build(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java new file mode 100644 index 000000000000..a68569dbd06e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] +import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; +import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import java.util.ArrayList; +import java.util.List; + +public class SyncBatchAnnotateImagesListannotateimagerequest { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImagesListannotateimagerequest(); + } + + public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { + List requests = new ArrayList<>(); + BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); + } + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..81361ed4fc17 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p4beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..76b3f9bd4ab0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder() + .setTransportChannelProvider( + ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ebf53528ca10 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; +import com.google.cloud.vision.v1p4beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings imageAnnotatorSettings = + ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); + ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); + } +} +// [END vision_v1p4beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..76f5c4e198ac --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_imageannotatorsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p4beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java new file mode 100644 index 000000000000..826b621f04a2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + asyncAddProductToProductSet(); + } + + public static void asyncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.addProductToProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java new file mode 100644 index 000000000000..73fa23f52b2b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_sync] +import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSet { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSet(); + } + + public static void syncAddProductToProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + AddProductToProductSetRequest request = + AddProductToProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.addProductToProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..8b5f8d7c5023 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameProductname(); + } + + public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java new file mode 100644 index 000000000000..1afa9bb839cc --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetProductsetnameString(); + } + + public static void syncAddProductToProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java new file mode 100644 index 000000000000..1fe7ef4254f0 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringProductname(); + } + + public static void syncAddProductToProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java new file mode 100644 index 000000000000..61a46026adee --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncAddProductToProductSetStringString { + + public static void main(String[] args) throws Exception { + syncAddProductToProductSetStringString(); + } + + public static void syncAddProductToProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.addProductToProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c95d346c734c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; +import com.google.cloud.vision.v1p4beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..3a95805781f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder() + .setTransportChannelProvider( + ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..3f394b403dd7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_create_setendpoint_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; +import com.google.cloud.vision.v1p4beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings productSearchSettings = + ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); + ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); + } +} +// [END vision_v1p4beta1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java new file mode 100644 index 000000000000..07650db00def --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class AsyncCreateProduct { + + public static void main(String[] args) throws Exception { + asyncCreateProduct(); + } + + public static void asyncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + ApiFuture future = productSearchClient.createProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java new file mode 100644 index 000000000000..84bd73a29378 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproduct_sync] +import com.google.cloud.vision.v1p4beta1.CreateProductRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncCreateProduct { + + public static void main(String[] args) throws Exception { + syncCreateProduct(); + } + + public static void syncCreateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductRequest request = + CreateProductRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProduct(Product.newBuilder().build()) + .setProductId("productId-1051830678") + .build(); + Product response = productSearchClient.createProduct(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java new file mode 100644 index 000000000000..15d8dc4c863c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncCreateProductLocationnameProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductLocationnameProductString(); + } + + public static void syncCreateProductLocationnameProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java new file mode 100644 index 000000000000..f7fad35f7074 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproduct_stringproductstring_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncCreateProductStringProductString { + + public static void main(String[] args) throws Exception { + syncCreateProductStringProductString(); + } + + public static void syncCreateProductStringProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Product product = Product.newBuilder().build(); + String productId = "productId-1051830678"; + Product response = productSearchClient.createProduct(parent, product, productId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java new file mode 100644 index 000000000000..b128072caf92 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class AsyncCreateProductSet { + + public static void main(String[] args) throws Exception { + asyncCreateProductSet(); + } + + public static void asyncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ApiFuture future = + productSearchClient.createProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..dd81ded3f2c2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproductset_sync] +import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateProductSetRequest request = + CreateProductSetRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setProductSet(ProductSet.newBuilder().build()) + .setProductSetId("productSetId1003042158") + .build(); + ProductSet response = productSearchClient.createProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java new file mode 100644 index 000000000000..fc9ca3591107 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncCreateProductSetLocationnameProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetLocationnameProductsetString(); + } + + public static void syncCreateProductSetLocationnameProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java new file mode 100644 index 000000000000..d4a7ec2fde40 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncCreateProductSetStringProductsetString { + + public static void main(String[] args) throws Exception { + syncCreateProductSetStringProductsetString(); + } + + public static void syncCreateProductSetStringProductsetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ProductSet productSet = ProductSet.newBuilder().build(); + String productSetId = "productSetId1003042158"; + ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java new file mode 100644 index 000000000000..3172b3b3f90d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class AsyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + asyncCreateReferenceImage(); + } + + public static void asyncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ApiFuture future = + productSearchClient.createReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java new file mode 100644 index 000000000000..533d6344ab01 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_sync] +import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncCreateReferenceImage { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImage(); + } + + public static void syncCreateReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + CreateReferenceImageRequest request = + CreateReferenceImageRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setReferenceImage(ReferenceImage.newBuilder().build()) + .setReferenceImageId("referenceImageId1224107531") + .build(); + ReferenceImage response = productSearchClient.createReferenceImage(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java new file mode 100644 index 000000000000..f5f00ef3a16f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncCreateReferenceImageProductnameReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageProductnameReferenceimageString(); + } + + public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java new file mode 100644 index 000000000000..5882fd385d67 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncCreateReferenceImageStringReferenceimageString { + + public static void main(String[] args) throws Exception { + syncCreateReferenceImageStringReferenceimageString(); + } + + public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); + String referenceImageId = "referenceImageId1224107531"; + ReferenceImage response = + productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java new file mode 100644 index 000000000000..f1b9e84c8b7c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteProduct { + + public static void main(String[] args) throws Exception { + asyncDeleteProduct(); + } + + public static void asyncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java new file mode 100644 index 000000000000..4812dd1df924 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_sync] +import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProduct { + + public static void main(String[] args) throws Exception { + syncDeleteProduct(); + } + + public static void syncDeleteProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductRequest request = + DeleteProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.deleteProduct(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java new file mode 100644 index 000000000000..ad0bae7d6672 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_productname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductProductname { + + public static void main(String[] args) throws Exception { + syncDeleteProductProductname(); + } + + public static void syncDeleteProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java new file mode 100644 index 000000000000..10cd71d23b80 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncDeleteProductString { + + public static void main(String[] args) throws Exception { + syncDeleteProductString(); + } + + public static void syncDeleteProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.deleteProduct(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java new file mode 100644 index 000000000000..efe3a25c5858 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class AsyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + asyncDeleteProductSet(); + } + + public static void asyncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java new file mode 100644 index 000000000000..e44c89e7db0c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_sync] +import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSet { + + public static void main(String[] args) throws Exception { + syncDeleteProductSet(); + } + + public static void syncDeleteProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteProductSetRequest request = + DeleteProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + productSearchClient.deleteProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java new file mode 100644 index 000000000000..e582d2735c93 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_productsetname_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetProductsetname(); + } + + public static void syncDeleteProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java new file mode 100644 index 000000000000..ad1e731dc973 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncDeleteProductSetString { + + public static void main(String[] args) throws Exception { + syncDeleteProductSetString(); + } + + public static void syncDeleteProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + productSearchClient.deleteProductSet(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java new file mode 100644 index 000000000000..f1aecab1b8d6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class AsyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + asyncDeleteReferenceImage(); + } + + public static void asyncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.deleteReferenceImageCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java new file mode 100644 index 000000000000..6395f93a0b5a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_sync] +import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImage { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImage(); + } + + public static void syncDeleteReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + DeleteReferenceImageRequest request = + DeleteReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + productSearchClient.deleteReferenceImage(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..46352b0a6f2d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageReferenceimagename(); + } + + public static void syncDeleteReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java new file mode 100644 index 000000000000..b917ac1570fd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; +import com.google.protobuf.Empty; + +public class SyncDeleteReferenceImageString { + + public static void main(String[] args) throws Exception { + syncDeleteReferenceImageString(); + } + + public static void syncDeleteReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + productSearchClient.deleteReferenceImage(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java new file mode 100644 index 000000000000..fe223c94d35c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class AsyncGetProduct { + + public static void main(String[] args) throws Exception { + asyncGetProduct(); + } + + public static void asyncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = productSearchClient.getProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java new file mode 100644 index 000000000000..d882ff04c1aa --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproduct_sync] +import com.google.cloud.vision.v1p4beta1.GetProductRequest; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncGetProduct { + + public static void main(String[] args) throws Exception { + syncGetProduct(); + } + + public static void syncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + Product response = productSearchClient.getProduct(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java new file mode 100644 index 000000000000..b2d76a567e04 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproduct_productname_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncGetProductProductname { + + public static void main(String[] args) throws Exception { + syncGetProductProductname(); + } + + public static void syncGetProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java new file mode 100644 index 000000000000..bb02aba4f7d8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproduct_string_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncGetProductString { + + public static void main(String[] args) throws Exception { + syncGetProductString(); + } + + public static void syncGetProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + Product response = productSearchClient.getProduct(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java new file mode 100644 index 000000000000..85f4202dcc99 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class AsyncGetProductSet { + + public static void main(String[] args) throws Exception { + asyncGetProductSet(); + } + + public static void asyncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ApiFuture future = + productSearchClient.getProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java new file mode 100644 index 000000000000..538605a99b1c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproductset_sync] +import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncGetProductSet { + + public static void main(String[] args) throws Exception { + syncGetProductSet(); + } + + public static void syncGetProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetProductSetRequest request = + GetProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .build(); + ProductSet response = productSearchClient.getProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java new file mode 100644 index 000000000000..4555b7710b05 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproductset_productsetname_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncGetProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncGetProductSetProductsetname(); + } + + public static void syncGetProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java new file mode 100644 index 000000000000..0ce7f569f705 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getproductset_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncGetProductSetString { + + public static void main(String[] args) throws Exception { + syncGetProductSetString(); + } + + public static void syncGetProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductSet response = productSearchClient.getProductSet(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java new file mode 100644 index 000000000000..14bd71a62a72 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; + +public class AsyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + asyncGetReferenceImage(); + } + + public static void asyncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ApiFuture future = + productSearchClient.getReferenceImageCallable().futureCall(request); + // Do something. + ReferenceImage response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java new file mode 100644 index 000000000000..3ad5a3db5f20 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_sync] +import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; + +public class SyncGetReferenceImage { + + public static void main(String[] args) throws Exception { + syncGetReferenceImage(); + } + + public static void syncGetReferenceImage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + GetReferenceImageRequest request = + GetReferenceImageRequest.newBuilder() + .setName( + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString()) + .build(); + ReferenceImage response = productSearchClient.getReferenceImage(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java new file mode 100644 index 000000000000..15738a52dbb4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; + +public class SyncGetReferenceImageReferenceimagename { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageReferenceimagename(); + } + + public static void syncGetReferenceImageReferenceimagename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ReferenceImageName name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java new file mode 100644 index 000000000000..b4f16dc3601c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.cloud.vision.v1p4beta1.ReferenceImageName; + +public class SyncGetReferenceImageString { + + public static void main(String[] args) throws Exception { + syncGetReferenceImageString(); + } + + public static void syncGetReferenceImageString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = + ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") + .toString(); + ReferenceImage response = productSearchClient.getReferenceImage(name); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java new file mode 100644 index 000000000000..3c466d78b02d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.longrunning.Operation; + +public class AsyncImportProductSets { + + public static void main(String[] args) throws Exception { + asyncImportProductSets(); + } + + public static void asyncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.importProductSetsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java new file mode 100644 index 000000000000..e69236bd1210 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class AsyncImportProductSetsLRO { + + public static void main(String[] args) throws Exception { + asyncImportProductSetsLRO(); + } + + public static void asyncImportProductSetsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + OperationFuture future = + productSearchClient.importProductSetsOperationCallable().futureCall(request); + // Do something. + ImportProductSetsResponse response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java new file mode 100644 index 000000000000..98d8717a5618 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_sync] +import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncImportProductSets { + + public static void main(String[] args) throws Exception { + syncImportProductSets(); + } + + public static void syncImportProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ImportProductSetsRequest request = + ImportProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) + .build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(request).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java new file mode 100644 index 000000000000..06350d69882d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsLocationnameImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java new file mode 100644 index 000000000000..d61be7abb0c2 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] +import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; +import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncImportProductSetsStringImportproductsetsinputconfig { + + public static void main(String[] args) throws Exception { + syncImportProductSetsStringImportproductsetsinputconfig(); + } + + public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); + ImportProductSetsResponse response = + productSearchClient.importProductSetsAsync(parent, inputConfig).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java new file mode 100644 index 000000000000..530baf6cf05a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class AsyncListProducts { + + public static void main(String[] args) throws Exception { + asyncListProducts(); + } + + public static void asyncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java new file mode 100644 index 000000000000..4a10769b4e03 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproducts_paged_async] +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.common.base.Strings; + +public class AsyncListProductsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsPaged(); + } + + public static void asyncListProductsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsResponse response = productSearchClient.listProductsCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java new file mode 100644 index 000000000000..f8803d503432 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproducts_sync] +import com.google.cloud.vision.v1p4beta1.ListProductsRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncListProducts { + + public static void main(String[] args) throws Exception { + syncListProducts(); + } + + public static void syncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProducts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java new file mode 100644 index 000000000000..6403e8c13eaf --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproducts_locationname_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncListProductsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductsLocationname(); + } + + public static void syncListProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java new file mode 100644 index 000000000000..606953592de3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproducts_string_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; + +public class SyncListProductsString { + + public static void main(String[] args) throws Exception { + syncListProductsString(); + } + + public static void syncListProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Product element : productSearchClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java new file mode 100644 index 000000000000..f2c73fed2e06 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class AsyncListProductSets { + + public static void main(String[] args) throws Exception { + asyncListProductSets(); + } + + public static void asyncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductSetsPagedCallable().futureCall(request); + // Do something. + for (ProductSet element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java new file mode 100644 index 000000000000..05ef50702322 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_paged_async] +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.common.base.Strings; + +public class AsyncListProductSetsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductSetsPaged(); + } + + public static void asyncListProductSetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductSetsResponse response = + productSearchClient.listProductSetsCallable().call(request); + for (ProductSet element : response.getProductSetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java new file mode 100644 index 000000000000..d2866996e864 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_sync] +import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncListProductSets { + + public static void main(String[] args) throws Exception { + syncListProductSets(); + } + + public static void syncListProductSets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductSetsRequest request = + ListProductSetsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java new file mode 100644 index 000000000000..01f5b5a7ffa1 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_locationname_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncListProductSetsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductSetsLocationname(); + } + + public static void syncListProductSetsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java new file mode 100644 index 000000000000..2be635726289 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_string_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; + +public class SyncListProductSetsString { + + public static void main(String[] args) throws Exception { + syncListProductSetsString(); + } + + public static void syncListProductSetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java new file mode 100644 index 000000000000..00a1e318e919 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class AsyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSet(); + } + + public static void asyncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java new file mode 100644 index 000000000000..7b5f873cb776 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_paged_async] +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.common.base.Strings; + +public class AsyncListProductsInProductSetPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsInProductSetPaged(); + } + + public static void asyncListProductsInProductSetPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductsInProductSetResponse response = + productSearchClient.listProductsInProductSetCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java new file mode 100644 index 000000000000..97832d7cbe38 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_sync] +import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncListProductsInProductSet { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSet(); + } + + public static void syncListProductsInProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListProductsInProductSetRequest request = + ListProductsInProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java new file mode 100644 index 000000000000..0c656c2ed6f5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncListProductsInProductSetProductsetname { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetProductsetname(); + } + + public static void syncListProductsInProductSetProductsetname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java new file mode 100644 index 000000000000..7febaade01d8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_string_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; + +public class SyncListProductsInProductSetString { + + public static void main(String[] args) throws Exception { + syncListProductsInProductSetString(); + } + + public static void syncListProductsInProductSetString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java new file mode 100644 index 000000000000..b54425a43cdd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class AsyncListReferenceImages { + + public static void main(String[] args) throws Exception { + asyncListReferenceImages(); + } + + public static void asyncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + productSearchClient.listReferenceImagesPagedCallable().futureCall(request); + // Do something. + for (ReferenceImage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java new file mode 100644 index 000000000000..53b128c781b6 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_paged_async] +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; +import com.google.common.base.Strings; + +public class AsyncListReferenceImagesPaged { + + public static void main(String[] args) throws Exception { + asyncListReferenceImagesPaged(); + } + + public static void asyncListReferenceImagesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListReferenceImagesResponse response = + productSearchClient.listReferenceImagesCallable().call(request); + for (ReferenceImage element : response.getReferenceImagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java new file mode 100644 index 000000000000..8b6e2f9b7fcd --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_sync] +import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncListReferenceImages { + + public static void main(String[] args) throws Exception { + syncListReferenceImages(); + } + + public static void syncListReferenceImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ListReferenceImagesRequest request = + ListReferenceImagesRequest.newBuilder() + .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java new file mode 100644 index 000000000000..e307423e9801 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_productname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncListReferenceImagesProductname { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesProductname(); + } + + public static void syncListReferenceImagesProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java new file mode 100644 index 000000000000..0e5dbc6f2b0b --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_string_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ReferenceImage; + +public class SyncListReferenceImagesString { + + public static void main(String[] args) throws Exception { + syncListReferenceImagesString(); + } + + public static void syncListReferenceImagesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java new file mode 100644 index 000000000000..f573a4788e3a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeProducts { + + public static void main(String[] args) throws Exception { + asyncPurgeProducts(); + } + + public static void asyncPurgeProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java new file mode 100644 index 000000000000..ec01509dcd3f --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.protobuf.Empty; + +public class AsyncPurgeProductsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeProductsLRO(); + } + + public static void asyncPurgeProductsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + OperationFuture future = + productSearchClient.purgeProductsOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java new file mode 100644 index 000000000000..91ae2175daf7 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; +import com.google.protobuf.Empty; + +public class SyncPurgeProducts { + + public static void main(String[] args) throws Exception { + syncPurgeProducts(); + } + + public static void syncPurgeProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + PurgeProductsRequest request = + PurgeProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setForce(true) + .build(); + productSearchClient.purgeProductsAsync(request).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java new file mode 100644 index 000000000000..990682c1ef37 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_locationname_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncPurgeProductsLocationname { + + public static void main(String[] args) throws Exception { + syncPurgeProductsLocationname(); + } + + public static void syncPurgeProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + productSearchClient.purgeProductsAsync(parent).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java new file mode 100644 index 000000000000..d2b09229c08e --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_string_sync] +import com.google.cloud.vision.v1p4beta1.LocationName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.Empty; + +public class SyncPurgeProductsString { + + public static void main(String[] args) throws Exception { + syncPurgeProductsString(); + } + + public static void syncPurgeProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + productSearchClient.purgeProductsAsync(parent).get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..90a8d41259b5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class AsyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + asyncRemoveProductFromProductSet(); + } + + public static void asyncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = + productSearchClient.removeProductFromProductSetCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java new file mode 100644 index 000000000000..6b9a54798872 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSet { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSet(); + } + + public static void syncRemoveProductFromProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + RemoveProductFromProductSetRequest request = + RemoveProductFromProductSetRequest.newBuilder() + .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + productSearchClient.removeProductFromProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java new file mode 100644 index 000000000000..804f5772d2d8 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameProductname(); + } + + public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java new file mode 100644 index 000000000000..2943c3dba374 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetProductsetnameString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetProductsetnameString(); + } + + public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java new file mode 100644 index 000000000000..50201fa1e716 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringProductname { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringProductname(); + } + + public static void syncRemoveProductFromProductSetStringProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java new file mode 100644 index 000000000000..2acbf86656d5 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] +import com.google.cloud.vision.v1p4beta1.ProductName; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSetName; +import com.google.protobuf.Empty; + +public class SyncRemoveProductFromProductSetStringString { + + public static void main(String[] args) throws Exception { + syncRemoveProductFromProductSetStringString(); + } + + public static void syncRemoveProductFromProductSetStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); + String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + productSearchClient.removeProductFromProductSet(name, product); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java new file mode 100644 index 000000000000..d868c9b5d1a4 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProduct { + + public static void main(String[] args) throws Exception { + asyncUpdateProduct(); + } + + public static void asyncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java new file mode 100644 index 000000000000..103e182d4272 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProduct { + + public static void main(String[] args) throws Exception { + syncUpdateProduct(); + } + + public static void syncUpdateProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductRequest request = + UpdateProductRequest.newBuilder() + .setProduct(Product.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Product response = productSearchClient.updateProduct(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java new file mode 100644 index 000000000000..14ed817ce21d --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] +import com.google.cloud.vision.v1p4beta1.Product; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductProductFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductProductFieldmask(); + } + + public static void syncUpdateProductProductFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + Product product = Product.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Product response = productSearchClient.updateProduct(product, updateMask); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java new file mode 100644 index 000000000000..f075fe2694e3 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + asyncUpdateProductSet(); + } + + public static void asyncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + productSearchClient.updateProductSetCallable().futureCall(request); + // Do something. + ProductSet response = future.get(); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java new file mode 100644 index 000000000000..1f5f451318be --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSet { + + public static void main(String[] args) throws Exception { + syncUpdateProductSet(); + } + + public static void syncUpdateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + UpdateProductSetRequest request = + UpdateProductSetRequest.newBuilder() + .setProductSet(ProductSet.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ProductSet response = productSearchClient.updateProductSet(request); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java new file mode 100644 index 000000000000..9ae891af3586 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchClient; +import com.google.cloud.vision.v1p4beta1.ProductSet; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProductSetProductsetFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProductSetProductsetFieldmask(); + } + + public static void syncUpdateProductSetProductsetFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { + ProductSet productSet = ProductSet.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); + } + } +} +// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..1434aed48845 --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.samples; + +// [START vision_v1p4beta1_generated_productsearchsettings_createproductset_sync] +import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1p4beta1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java new file mode 100644 index 000000000000..d1c22650ed1a --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub.samples; + +// [START vision_v1p4beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] +import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; +import java.time.Duration; + +public class SyncBatchAnnotateImages { + + public static void main(String[] args) throws Exception { + syncBatchAnnotateImages(); + } + + public static void syncBatchAnnotateImages() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = + ImageAnnotatorStubSettings.newBuilder(); + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .setRetrySettings( + imageAnnotatorSettingsBuilder + .batchAnnotateImagesSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); + } +} +// [END vision_v1p4beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java new file mode 100644 index 000000000000..f47575caf07c --- /dev/null +++ b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.vision.v1p4beta1.stub.samples; + +// [START vision_v1p4beta1_generated_productsearchstubsettings_createproductset_sync] +import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; +import java.time.Duration; + +public class SyncCreateProductSet { + + public static void main(String[] args) throws Exception { + syncCreateProductSet(); + } + + public static void syncCreateProductSet() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ProductSearchStubSettings.Builder productSearchSettingsBuilder = + ProductSearchStubSettings.newBuilder(); + productSearchSettingsBuilder + .createProductSetSettings() + .setRetrySettings( + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); + } +} +// [END vision_v1p4beta1_generated_productsearchstubsettings_createproductset_sync] From a19ad9d7a7d7c7cc55076e21ece73bf1a5b480a2 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 13 Sep 2022 20:12:34 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-vision/README.md | 4 +- .../cloud/vision/v1/ImageAnnotatorClient.java | 126 +- .../vision/v1/ImageAnnotatorSettings.java | 7 +- .../cloud/vision/v1/ProductSearchClient.java | 616 +- .../vision/v1/ProductSearchSettings.java | 12 +- .../google/cloud/vision/v1/package-info.java | 14 +- .../v1/stub/HttpJsonImageAnnotatorStub.java | 8 +- .../v1/stub/HttpJsonProductSearchStub.java | 20 +- .../v1/stub/ImageAnnotatorStubSettings.java | 7 +- .../v1/stub/ProductSearchStubSettings.java | 12 +- .../v1p1beta1/ImageAnnotatorClient.java | 49 +- .../v1p1beta1/ImageAnnotatorSettings.java | 7 +- .../cloud/vision/v1p1beta1/package-info.java | 7 +- .../stub/HttpJsonImageAnnotatorStub.java | 3 +- .../stub/ImageAnnotatorStubSettings.java | 7 +- .../v1p2beta1/ImageAnnotatorClient.java | 77 +- .../v1p2beta1/ImageAnnotatorSettings.java | 7 +- .../cloud/vision/v1p2beta1/package-info.java | 7 +- .../stub/HttpJsonImageAnnotatorStub.java | 6 +- .../stub/ImageAnnotatorStubSettings.java | 7 +- .../v1p3beta1/ImageAnnotatorClient.java | 77 +- .../v1p3beta1/ImageAnnotatorSettings.java | 7 +- .../vision/v1p3beta1/ProductSearchClient.java | 581 +- .../v1p3beta1/ProductSearchSettings.java | 12 +- .../cloud/vision/v1p3beta1/package-info.java | 14 +- .../stub/HttpJsonImageAnnotatorStub.java | 6 +- .../stub/HttpJsonProductSearchStub.java | 18 +- .../stub/ImageAnnotatorStubSettings.java | 7 +- .../stub/ProductSearchStubSettings.java | 12 +- .../v1p4beta1/ImageAnnotatorClient.java | 126 +- .../v1p4beta1/ImageAnnotatorSettings.java | 7 +- .../vision/v1p4beta1/ProductSearchClient.java | 616 +- .../v1p4beta1/ProductSearchSettings.java | 12 +- .../cloud/vision/v1p4beta1/package-info.java | 14 +- .../stub/HttpJsonImageAnnotatorStub.java | 12 +- .../stub/HttpJsonProductSearchStub.java | 20 +- .../stub/ImageAnnotatorStubSettings.java | 7 +- .../stub/ProductSearchStubSettings.java | 12 +- .../google/cloud/vision/it/ITSystemTest.java | 2 +- .../cloud/vision/v1/EntityAnnotation.java | 8 +- .../vision/v1/EntityAnnotationOrBuilder.java | 2 +- .../com/google/cloud/vision/v1/Feature.java | 21 +- .../cloud/vision/v1/FeatureOrBuilder.java | 6 +- .../cloud/vision/v1/image_annotator.proto | 3 +- .../cloud/vision/v1p1beta1/Feature.java | 21 +- .../vision/v1p1beta1/FeatureOrBuilder.java | 6 +- .../vision/v1p1beta1/TextAnnotationProto.java | 103 +- .../vision/v1p1beta1/WebDetectionProto.java | 61 +- .../vision/v1p1beta1/image_annotator.proto | 3 +- .../vision/v1p1beta1/text_annotation.proto | 1 - .../vision/v1p1beta1/web_detection.proto | 1 - .../cloud/vision/v1p2beta1/Feature.java | 21 +- .../vision/v1p2beta1/FeatureOrBuilder.java | 6 +- .../vision/v1p2beta1/TextAnnotationProto.java | 103 +- .../vision/v1p2beta1/WebDetectionProto.java | 61 +- .../vision/v1p2beta1/image_annotator.proto | 3 +- .../vision/v1p2beta1/text_annotation.proto | 1 - .../vision/v1p2beta1/web_detection.proto | 1 - .../cloud/vision/v1p3beta1/Feature.java | 21 +- .../vision/v1p3beta1/FeatureOrBuilder.java | 6 +- .../vision/v1p3beta1/TextAnnotationProto.java | 103 +- .../vision/v1p3beta1/WebDetectionProto.java | 61 +- .../vision/v1p3beta1/image_annotator.proto | 3 +- .../vision/v1p3beta1/text_annotation.proto | 1 - .../vision/v1p3beta1/web_detection.proto | 1 - .../vision/v1p4beta1/CelebrityProto.java | 26 +- .../cloud/vision/v1p4beta1/Feature.java | 21 +- .../vision/v1p4beta1/FeatureOrBuilder.java | 6 +- .../cloud/vision/v1p4beta1/GeometryProto.java | 30 +- .../vision/v1p4beta1/ImageAnnotatorProto.java | 488 +- .../vision/v1p4beta1/ProductSearchProto.java | 64 +- .../vision/v1p4beta1/TextAnnotationProto.java | 103 +- .../vision/v1p4beta1/WebDetectionProto.java | 61 +- .../google/cloud/vision/v1p4beta1/face.proto | 1 - .../cloud/vision/v1p4beta1/geometry.proto | 1 - .../vision/v1p4beta1/image_annotator.proto | 4 +- .../vision/v1p4beta1/product_search.proto | 1 - .../vision/v1p4beta1/text_annotation.proto | 1 - .../vision/v1p4beta1/web_detection.proto | 1 - .../AsyncAsyncBatchAnnotateFiles.java | 7 +- .../AsyncAsyncBatchAnnotateFilesLRO.java | 7 +- .../SyncAsyncBatchAnnotateFiles.java | 7 +- ...tateFilesListasyncannotatefilerequest.java | 7 +- .../AsyncAsyncBatchAnnotateImages.java | 7 +- .../AsyncAsyncBatchAnnotateImagesLRO.java | 7 +- .../SyncAsyncBatchAnnotateImages.java | 7 +- ...sListannotateimagerequestOutputconfig.java | 7 +- .../AsyncBatchAnnotateFiles.java | 7 +- .../SyncBatchAnnotateFiles.java | 7 +- ...hAnnotateFilesListannotatefilerequest.java | 7 +- .../AsyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- ...nnotateImagesListannotateimagerequest.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../AsyncAddProductToProductSet.java | 7 +- .../SyncAddProductToProductSet.java | 7 +- ...ToProductSetProductsetnameProductname.java | 7 +- ...oductToProductSetProductsetnameString.java | 7 +- ...dProductToProductSetStringProductname.java | 7 +- ...yncAddProductToProductSetStringString.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../createproduct/AsyncCreateProduct.java | 7 +- .../createproduct/SyncCreateProduct.java | 7 +- ...reateProductLocationnameProductString.java | 7 +- .../SyncCreateProductStringProductString.java | 7 +- .../AsyncCreateProductSet.java | 7 +- .../SyncCreateProductSet.java | 7 +- ...roductSetLocationnameProductsetString.java | 7 +- ...reateProductSetStringProductsetString.java | 7 +- .../AsyncCreateReferenceImage.java | 7 +- .../SyncCreateReferenceImage.java | 7 +- ...eImageProductnameReferenceimageString.java | 7 +- ...erenceImageStringReferenceimageString.java | 7 +- .../deleteproduct/AsyncDeleteProduct.java | 7 +- .../deleteproduct/SyncDeleteProduct.java | 7 +- .../SyncDeleteProductProductname.java | 7 +- .../SyncDeleteProductString.java | 7 +- .../AsyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSetProductsetname.java | 7 +- .../SyncDeleteProductSetString.java | 7 +- .../AsyncDeleteReferenceImage.java | 7 +- .../SyncDeleteReferenceImage.java | 7 +- ...eleteReferenceImageReferenceimagename.java | 7 +- .../SyncDeleteReferenceImageString.java | 7 +- .../getproduct/AsyncGetProduct.java | 7 +- .../getproduct/SyncGetProduct.java | 7 +- .../getproduct/SyncGetProductProductname.java | 7 +- .../getproduct/SyncGetProductString.java | 7 +- .../getproductset/AsyncGetProductSet.java | 7 +- .../getproductset/SyncGetProductSet.java | 7 +- .../SyncGetProductSetProductsetname.java | 7 +- .../SyncGetProductSetString.java | 7 +- .../AsyncGetReferenceImage.java | 7 +- .../SyncGetReferenceImage.java | 7 +- ...ncGetReferenceImageReferenceimagename.java | 7 +- .../SyncGetReferenceImageString.java | 7 +- .../AsyncImportProductSets.java | 7 +- .../AsyncImportProductSetsLRO.java | 7 +- .../SyncImportProductSets.java | 7 +- ...ationnameImportproductsetsinputconfig.java | 7 +- ...etsStringImportproductsetsinputconfig.java | 7 +- .../listproducts/AsyncListProducts.java | 7 +- .../listproducts/AsyncListProductsPaged.java | 7 +- .../listproducts/SyncListProducts.java | 7 +- .../SyncListProductsLocationname.java | 7 +- .../listproducts/SyncListProductsString.java | 7 +- .../listproductsets/AsyncListProductSets.java | 7 +- .../AsyncListProductSetsPaged.java | 7 +- .../listproductsets/SyncListProductSets.java | 7 +- .../SyncListProductSetsLocationname.java | 7 +- .../SyncListProductSetsString.java | 7 +- .../AsyncListProductsInProductSet.java | 7 +- .../AsyncListProductsInProductSetPaged.java | 7 +- .../SyncListProductsInProductSet.java | 7 +- ...istProductsInProductSetProductsetname.java | 7 +- .../SyncListProductsInProductSetString.java | 7 +- .../AsyncListReferenceImages.java | 7 +- .../AsyncListReferenceImagesPaged.java | 7 +- .../SyncListReferenceImages.java | 7 +- .../SyncListReferenceImagesProductname.java | 7 +- .../SyncListReferenceImagesString.java | 7 +- .../purgeproducts/AsyncPurgeProducts.java | 7 +- .../purgeproducts/AsyncPurgeProductsLRO.java | 7 +- .../purgeproducts/SyncPurgeProducts.java | 7 +- .../SyncPurgeProductsLocationname.java | 7 +- .../SyncPurgeProductsString.java | 7 +- .../AsyncRemoveProductFromProductSet.java | 7 +- .../SyncRemoveProductFromProductSet.java | 7 +- ...omProductSetProductsetnameProductname.java | 7 +- ...uctFromProductSetProductsetnameString.java | 7 +- ...roductFromProductSetStringProductname.java | 7 +- ...moveProductFromProductSetStringString.java | 7 +- .../updateproduct/AsyncUpdateProduct.java | 7 +- .../updateproduct/SyncUpdateProduct.java | 7 +- .../SyncUpdateProductProductFieldmask.java | 7 +- .../AsyncUpdateProductSet.java | 7 +- .../SyncUpdateProductSet.java | 7 +- ...ncUpdateProductSetProductsetFieldmask.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../SyncBatchAnnotateImages.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../AsyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- ...nnotateImagesListannotateimagerequest.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../AsyncAsyncBatchAnnotateFiles.java | 7 +- .../AsyncAsyncBatchAnnotateFilesLRO.java | 7 +- .../SyncAsyncBatchAnnotateFiles.java | 7 +- ...tateFilesListasyncannotatefilerequest.java | 7 +- .../AsyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- ...nnotateImagesListannotateimagerequest.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../AsyncAsyncBatchAnnotateFiles.java | 7 +- .../AsyncAsyncBatchAnnotateFilesLRO.java | 7 +- .../SyncAsyncBatchAnnotateFiles.java | 7 +- ...tateFilesListasyncannotatefilerequest.java | 7 +- .../AsyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- ...nnotateImagesListannotateimagerequest.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../AsyncAddProductToProductSet.java | 7 +- .../SyncAddProductToProductSet.java | 7 +- ...ToProductSetProductsetnameProductname.java | 7 +- ...oductToProductSetProductsetnameString.java | 7 +- ...dProductToProductSetStringProductname.java | 7 +- ...yncAddProductToProductSetStringString.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../createproduct/AsyncCreateProduct.java | 7 +- .../createproduct/SyncCreateProduct.java | 7 +- ...reateProductLocationnameProductString.java | 7 +- .../SyncCreateProductStringProductString.java | 7 +- .../AsyncCreateProductSet.java | 7 +- .../SyncCreateProductSet.java | 7 +- ...roductSetLocationnameProductsetString.java | 7 +- ...reateProductSetStringProductsetString.java | 7 +- .../AsyncCreateReferenceImage.java | 7 +- .../SyncCreateReferenceImage.java | 7 +- ...eImageProductnameReferenceimageString.java | 7 +- ...erenceImageStringReferenceimageString.java | 7 +- .../deleteproduct/AsyncDeleteProduct.java | 7 +- .../deleteproduct/SyncDeleteProduct.java | 7 +- .../SyncDeleteProductProductname.java | 7 +- .../SyncDeleteProductString.java | 7 +- .../AsyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSetProductsetname.java | 7 +- .../SyncDeleteProductSetString.java | 7 +- .../AsyncDeleteReferenceImage.java | 7 +- .../SyncDeleteReferenceImage.java | 7 +- ...eleteReferenceImageReferenceimagename.java | 7 +- .../SyncDeleteReferenceImageString.java | 7 +- .../getproduct/AsyncGetProduct.java | 7 +- .../getproduct/SyncGetProduct.java | 7 +- .../getproduct/SyncGetProductProductname.java | 7 +- .../getproduct/SyncGetProductString.java | 7 +- .../getproductset/AsyncGetProductSet.java | 7 +- .../getproductset/SyncGetProductSet.java | 7 +- .../SyncGetProductSetProductsetname.java | 7 +- .../SyncGetProductSetString.java | 7 +- .../AsyncGetReferenceImage.java | 7 +- .../SyncGetReferenceImage.java | 7 +- ...ncGetReferenceImageReferenceimagename.java | 7 +- .../SyncGetReferenceImageString.java | 7 +- .../AsyncImportProductSets.java | 7 +- .../AsyncImportProductSetsLRO.java | 7 +- .../SyncImportProductSets.java | 7 +- ...ationnameImportproductsetsinputconfig.java | 7 +- ...etsStringImportproductsetsinputconfig.java | 7 +- .../listproducts/AsyncListProducts.java | 7 +- .../listproducts/AsyncListProductsPaged.java | 7 +- .../listproducts/SyncListProducts.java | 7 +- .../SyncListProductsLocationname.java | 7 +- .../listproducts/SyncListProductsString.java | 7 +- .../listproductsets/AsyncListProductSets.java | 7 +- .../AsyncListProductSetsPaged.java | 7 +- .../listproductsets/SyncListProductSets.java | 7 +- .../SyncListProductSetsLocationname.java | 7 +- .../SyncListProductSetsString.java | 7 +- .../AsyncListProductsInProductSet.java | 7 +- .../AsyncListProductsInProductSetPaged.java | 7 +- .../SyncListProductsInProductSet.java | 7 +- ...istProductsInProductSetProductsetname.java | 7 +- .../SyncListProductsInProductSetString.java | 7 +- .../AsyncListReferenceImages.java | 7 +- .../AsyncListReferenceImagesPaged.java | 7 +- .../SyncListReferenceImages.java | 7 +- .../SyncListReferenceImagesProductname.java | 7 +- .../SyncListReferenceImagesString.java | 7 +- .../AsyncRemoveProductFromProductSet.java | 7 +- .../SyncRemoveProductFromProductSet.java | 7 +- ...omProductSetProductsetnameProductname.java | 7 +- ...uctFromProductSetProductsetnameString.java | 7 +- ...roductFromProductSetStringProductname.java | 7 +- ...moveProductFromProductSetStringString.java | 7 +- .../updateproduct/AsyncUpdateProduct.java | 7 +- .../updateproduct/SyncUpdateProduct.java | 7 +- .../SyncUpdateProductProductFieldmask.java | 7 +- .../AsyncUpdateProductSet.java | 7 +- .../SyncUpdateProductSet.java | 7 +- ...ncUpdateProductSetProductsetFieldmask.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../SyncBatchAnnotateImages.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../AsyncAsyncBatchAnnotateFiles.java | 7 +- .../AsyncAsyncBatchAnnotateFilesLRO.java | 7 +- .../SyncAsyncBatchAnnotateFiles.java | 7 +- ...tateFilesListasyncannotatefilerequest.java | 7 +- .../AsyncAsyncBatchAnnotateImages.java | 7 +- .../AsyncAsyncBatchAnnotateImagesLRO.java | 7 +- .../SyncAsyncBatchAnnotateImages.java | 7 +- ...sListannotateimagerequestOutputconfig.java | 7 +- .../AsyncBatchAnnotateFiles.java | 7 +- .../SyncBatchAnnotateFiles.java | 7 +- ...hAnnotateFilesListannotatefilerequest.java | 7 +- .../AsyncBatchAnnotateImages.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- ...nnotateImagesListannotateimagerequest.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../SyncBatchAnnotateImages.java | 7 +- .../AsyncAddProductToProductSet.java | 7 +- .../SyncAddProductToProductSet.java | 7 +- ...ToProductSetProductsetnameProductname.java | 7 +- ...oductToProductSetProductsetnameString.java | 7 +- ...dProductToProductSetStringProductname.java | 7 +- ...yncAddProductToProductSetStringString.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../createproduct/AsyncCreateProduct.java | 7 +- .../createproduct/SyncCreateProduct.java | 7 +- ...reateProductLocationnameProductString.java | 7 +- .../SyncCreateProductStringProductString.java | 7 +- .../AsyncCreateProductSet.java | 7 +- .../SyncCreateProductSet.java | 7 +- ...roductSetLocationnameProductsetString.java | 7 +- ...reateProductSetStringProductsetString.java | 7 +- .../AsyncCreateReferenceImage.java | 7 +- .../SyncCreateReferenceImage.java | 7 +- ...eImageProductnameReferenceimageString.java | 7 +- ...erenceImageStringReferenceimageString.java | 7 +- .../deleteproduct/AsyncDeleteProduct.java | 7 +- .../deleteproduct/SyncDeleteProduct.java | 7 +- .../SyncDeleteProductProductname.java | 7 +- .../SyncDeleteProductString.java | 7 +- .../AsyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSet.java | 7 +- .../SyncDeleteProductSetProductsetname.java | 7 +- .../SyncDeleteProductSetString.java | 7 +- .../AsyncDeleteReferenceImage.java | 7 +- .../SyncDeleteReferenceImage.java | 7 +- ...eleteReferenceImageReferenceimagename.java | 7 +- .../SyncDeleteReferenceImageString.java | 7 +- .../getproduct/AsyncGetProduct.java | 7 +- .../getproduct/SyncGetProduct.java | 7 +- .../getproduct/SyncGetProductProductname.java | 7 +- .../getproduct/SyncGetProductString.java | 7 +- .../getproductset/AsyncGetProductSet.java | 7 +- .../getproductset/SyncGetProductSet.java | 7 +- .../SyncGetProductSetProductsetname.java | 7 +- .../SyncGetProductSetString.java | 7 +- .../AsyncGetReferenceImage.java | 7 +- .../SyncGetReferenceImage.java | 7 +- ...ncGetReferenceImageReferenceimagename.java | 7 +- .../SyncGetReferenceImageString.java | 7 +- .../AsyncImportProductSets.java | 7 +- .../AsyncImportProductSetsLRO.java | 7 +- .../SyncImportProductSets.java | 7 +- ...ationnameImportproductsetsinputconfig.java | 7 +- ...etsStringImportproductsetsinputconfig.java | 7 +- .../listproducts/AsyncListProducts.java | 7 +- .../listproducts/AsyncListProductsPaged.java | 7 +- .../listproducts/SyncListProducts.java | 7 +- .../SyncListProductsLocationname.java | 7 +- .../listproducts/SyncListProductsString.java | 7 +- .../listproductsets/AsyncListProductSets.java | 7 +- .../AsyncListProductSetsPaged.java | 7 +- .../listproductsets/SyncListProductSets.java | 7 +- .../SyncListProductSetsLocationname.java | 7 +- .../SyncListProductSetsString.java | 7 +- .../AsyncListProductsInProductSet.java | 7 +- .../AsyncListProductsInProductSetPaged.java | 7 +- .../SyncListProductsInProductSet.java | 7 +- ...istProductsInProductSetProductsetname.java | 7 +- .../SyncListProductsInProductSetString.java | 7 +- .../AsyncListReferenceImages.java | 7 +- .../AsyncListReferenceImagesPaged.java | 7 +- .../SyncListReferenceImages.java | 7 +- .../SyncListReferenceImagesProductname.java | 7 +- .../SyncListReferenceImagesString.java | 7 +- .../purgeproducts/AsyncPurgeProducts.java | 7 +- .../purgeproducts/AsyncPurgeProductsLRO.java | 7 +- .../purgeproducts/SyncPurgeProducts.java | 7 +- .../SyncPurgeProductsLocationname.java | 7 +- .../SyncPurgeProductsString.java | 7 +- .../AsyncRemoveProductFromProductSet.java | 7 +- .../SyncRemoveProductFromProductSet.java | 7 +- ...omProductSetProductsetnameProductname.java | 7 +- ...uctFromProductSetProductsetnameString.java | 7 +- ...roductFromProductSetStringProductname.java | 7 +- ...moveProductFromProductSetStringString.java | 7 +- .../updateproduct/AsyncUpdateProduct.java | 7 +- .../updateproduct/SyncUpdateProduct.java | 7 +- .../SyncUpdateProductProductFieldmask.java | 7 +- .../AsyncUpdateProductSet.java | 7 +- .../SyncUpdateProductSet.java | 7 +- ...ncUpdateProductSetProductsetFieldmask.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../SyncBatchAnnotateImages.java | 7 +- .../SyncCreateProductSet.java | 12 +- .../cloud/vision/v1/ImageAnnotatorClient.java | 715 -- .../vision/v1/ImageAnnotatorSettings.java | 276 - .../cloud/vision/v1/ProductSearchClient.java | 3873 --------- .../vision/v1/ProductSearchSettings.java | 448 - .../cloud/vision/v1/gapic_metadata.json | 96 - .../google/cloud/vision/v1/package-info.java | 79 - .../GrpcImageAnnotatorCallableFactory.java | 113 - .../v1/stub/GrpcImageAnnotatorStub.java | 313 - .../GrpcProductSearchCallableFactory.java | 113 - .../vision/v1/stub/GrpcProductSearchStub.java | 826 -- ...HttpJsonImageAnnotatorCallableFactory.java | 105 - .../v1/stub/HttpJsonImageAnnotatorStub.java | 442 - .../HttpJsonProductSearchCallableFactory.java | 105 - .../v1/stub/HttpJsonProductSearchStub.java | 1266 --- .../vision/v1/stub/ImageAnnotatorStub.java | 88 - .../v1/stub/ImageAnnotatorStubSettings.java | 530 -- .../vision/v1/stub/ProductSearchStub.java | 191 - .../v1/stub/ProductSearchStubSettings.java | 1187 --- .../v1/ImageAnnotatorClientHttpJsonTest.java | 267 - .../vision/v1/ImageAnnotatorClientTest.java | 257 - .../cloud/vision/v1/MockImageAnnotator.java | 59 - .../vision/v1/MockImageAnnotatorImpl.java | 147 - .../cloud/vision/v1/MockProductSearch.java | 59 - .../vision/v1/MockProductSearchImpl.java | 461 - .../v1/ProductSearchClientHttpJsonTest.java | 1991 ----- .../vision/v1/ProductSearchClientTest.java | 1775 ---- .../cloud/vision/v1/ImageAnnotatorGrpc.java | 635 -- .../cloud/vision/v1/ProductSearchGrpc.java | 2280 ----- .../v1/AddProductToProductSetRequest.java | 789 -- ...ddProductToProductSetRequestOrBuilder.java | 57 - .../cloud/vision/v1/AnnotateFileRequest.java | 1651 ---- .../v1/AnnotateFileRequestOrBuilder.java | 163 - .../cloud/vision/v1/AnnotateFileResponse.java | 1461 ---- .../v1/AnnotateFileResponseOrBuilder.java | 125 - .../cloud/vision/v1/AnnotateImageRequest.java | 1346 --- .../v1/AnnotateImageRequestOrBuilder.java | 107 - .../vision/v1/AnnotateImageResponse.java | 5055 ----------- .../v1/AnnotateImageResponseOrBuilder.java | 512 -- .../vision/v1/AsyncAnnotateFileRequest.java | 1580 ---- .../v1/AsyncAnnotateFileRequestOrBuilder.java | 134 - .../vision/v1/AsyncAnnotateFileResponse.java | 665 -- .../AsyncAnnotateFileResponseOrBuilder.java | 36 - .../v1/AsyncBatchAnnotateFilesRequest.java | 1089 --- ...yncBatchAnnotateFilesRequestOrBuilder.java | 87 - .../v1/AsyncBatchAnnotateFilesResponse.java | 895 -- ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 - .../v1/AsyncBatchAnnotateImagesRequest.java | 1323 --- ...ncBatchAnnotateImagesRequestOrBuilder.java | 114 - .../v1/AsyncBatchAnnotateImagesResponse.java | 665 -- ...cBatchAnnotateImagesResponseOrBuilder.java | 36 - .../vision/v1/BatchAnnotateFilesRequest.java | 1110 --- .../BatchAnnotateFilesRequestOrBuilder.java | 92 - .../vision/v1/BatchAnnotateFilesResponse.java | 895 -- .../BatchAnnotateFilesResponseOrBuilder.java | 58 - .../vision/v1/BatchAnnotateImagesRequest.java | 1087 --- .../BatchAnnotateImagesRequestOrBuilder.java | 87 - .../v1/BatchAnnotateImagesResponse.java | 872 -- .../BatchAnnotateImagesResponseOrBuilder.java | 53 - .../vision/v1/BatchOperationMetadata.java | 1226 --- .../v1/BatchOperationMetadataOrBuilder.java | 85 - .../com/google/cloud/vision/v1/Block.java | 1914 ----- .../cloud/vision/v1/BlockOrBuilder.java | 178 - .../google/cloud/vision/v1/BoundingPoly.java | 1312 --- .../vision/v1/BoundingPolyOrBuilder.java | 97 - .../com/google/cloud/vision/v1/ColorInfo.java | 835 -- .../cloud/vision/v1/ColorInfoOrBuilder.java | 57 - .../cloud/vision/v1/CreateProductRequest.java | 1032 --- .../v1/CreateProductRequestOrBuilder.java | 86 - .../vision/v1/CreateProductSetRequest.java | 1025 --- .../v1/CreateProductSetRequestOrBuilder.java | 84 - .../v1/CreateReferenceImageRequest.java | 1044 --- .../CreateReferenceImageRequestOrBuilder.java | 89 - .../com/google/cloud/vision/v1/CropHint.java | 845 -- .../cloud/vision/v1/CropHintOrBuilder.java | 60 - .../cloud/vision/v1/CropHintsAnnotation.java | 872 -- .../v1/CropHintsAnnotationOrBuilder.java | 53 - .../cloud/vision/v1/CropHintsParams.java | 696 -- .../vision/v1/CropHintsParamsOrBuilder.java | 53 - .../cloud/vision/v1/DeleteProductRequest.java | 609 -- .../v1/DeleteProductRequestOrBuilder.java | 33 - .../vision/v1/DeleteProductSetRequest.java | 609 -- .../v1/DeleteProductSetRequestOrBuilder.java | 33 - .../v1/DeleteReferenceImageRequest.java | 609 -- .../DeleteReferenceImageRequestOrBuilder.java | 33 - .../vision/v1/DominantColorsAnnotation.java | 872 -- .../v1/DominantColorsAnnotationOrBuilder.java | 53 - .../cloud/vision/v1/EntityAnnotation.java | 2480 ------ .../vision/v1/EntityAnnotationOrBuilder.java | 258 - .../cloud/vision/v1/FaceAnnotation.java | 4334 ---------- .../vision/v1/FaceAnnotationOrBuilder.java | 328 - .../com/google/cloud/vision/v1/Feature.java | 1153 --- .../cloud/vision/v1/FeatureOrBuilder.java | 65 - .../cloud/vision/v1/GcsDestination.java | 714 -- .../vision/v1/GcsDestinationOrBuilder.java | 63 - .../com/google/cloud/vision/v1/GcsSource.java | 602 -- .../cloud/vision/v1/GcsSourceOrBuilder.java | 31 - .../google/cloud/vision/v1/GeometryProto.java | 90 - .../cloud/vision/v1/GetProductRequest.java | 609 -- .../vision/v1/GetProductRequestOrBuilder.java | 33 - .../cloud/vision/v1/GetProductSetRequest.java | 609 -- .../v1/GetProductSetRequestOrBuilder.java | 33 - .../vision/v1/GetReferenceImageRequest.java | 609 -- .../v1/GetReferenceImageRequestOrBuilder.java | 33 - .../com/google/cloud/vision/v1/Image.java | 789 -- .../vision/v1/ImageAnnotationContext.java | 681 -- .../v1/ImageAnnotationContextOrBuilder.java | 40 - .../cloud/vision/v1/ImageAnnotatorProto.java | 756 -- .../google/cloud/vision/v1/ImageContext.java | 1947 ----- .../vision/v1/ImageContextOrBuilder.java | 213 - .../cloud/vision/v1/ImageOrBuilder.java | 56 - .../cloud/vision/v1/ImageProperties.java | 665 -- .../vision/v1/ImagePropertiesOrBuilder.java | 36 - .../google/cloud/vision/v1/ImageSource.java | 880 -- .../cloud/vision/v1/ImageSourceOrBuilder.java | 83 - .../vision/v1/ImportProductSetsGcsSource.java | 919 -- .../ImportProductSetsGcsSourceOrBuilder.java | 121 - .../v1/ImportProductSetsInputConfig.java | 773 -- ...ImportProductSetsInputConfigOrBuilder.java | 41 - .../vision/v1/ImportProductSetsRequest.java | 838 -- .../v1/ImportProductSetsRequestOrBuilder.java | 58 - .../vision/v1/ImportProductSetsResponse.java | 1410 --- .../ImportProductSetsResponseOrBuilder.java | 117 - .../google/cloud/vision/v1/InputConfig.java | 938 -- .../cloud/vision/v1/InputConfigOrBuilder.java | 72 - .../google/cloud/vision/v1/LatLongRect.java | 901 -- .../cloud/vision/v1/LatLongRectOrBuilder.java | 63 - .../google/cloud/vision/v1/Likelihood.java | 202 - .../vision/v1/ListProductSetsRequest.java | 848 -- .../v1/ListProductSetsRequestOrBuilder.java | 61 - .../vision/v1/ListProductSetsResponse.java | 1045 --- .../v1/ListProductSetsResponseOrBuilder.java | 75 - .../v1/ListProductsInProductSetRequest.java | 855 -- ...tProductsInProductSetRequestOrBuilder.java | 63 - .../v1/ListProductsInProductSetResponse.java | 1045 --- ...ProductsInProductSetResponseOrBuilder.java | 75 - .../cloud/vision/v1/ListProductsRequest.java | 855 -- .../v1/ListProductsRequestOrBuilder.java | 63 - .../cloud/vision/v1/ListProductsResponse.java | 1045 --- .../v1/ListProductsResponseOrBuilder.java | 75 - .../vision/v1/ListReferenceImagesRequest.java | 869 -- .../ListReferenceImagesRequestOrBuilder.java | 67 - .../v1/ListReferenceImagesResponse.java | 1118 --- .../ListReferenceImagesResponseOrBuilder.java | 83 - .../vision/v1/LocalizedObjectAnnotation.java | 1259 --- .../LocalizedObjectAnnotationOrBuilder.java | 110 - .../google/cloud/vision/v1/LocationInfo.java | 665 -- .../vision/v1/LocationInfoOrBuilder.java | 36 - .../google/cloud/vision/v1/LocationName.java | 192 - .../cloud/vision/v1/NormalizedVertex.java | 597 -- .../vision/v1/NormalizedVertexOrBuilder.java | 29 - .../cloud/vision/v1/OperationMetadata.java | 1204 --- .../vision/v1/OperationMetadataOrBuilder.java | 82 - .../google/cloud/vision/v1/OutputConfig.java | 777 -- .../vision/v1/OutputConfigOrBuilder.java | 54 - .../java/com/google/cloud/vision/v1/Page.java | 1358 --- .../google/cloud/vision/v1/PageOrBuilder.java | 112 - .../com/google/cloud/vision/v1/Paragraph.java | 1594 ---- .../cloud/vision/v1/ParagraphOrBuilder.java | 159 - .../com/google/cloud/vision/v1/Position.java | 679 -- .../cloud/vision/v1/PositionOrBuilder.java | 39 - .../com/google/cloud/vision/v1/Product.java | 2617 ------ .../google/cloud/vision/v1/ProductName.java | 223 - .../cloud/vision/v1/ProductOrBuilder.java | 194 - .../cloud/vision/v1/ProductSearchParams.java | 1390 --- .../v1/ProductSearchParamsOrBuilder.java | 160 - .../cloud/vision/v1/ProductSearchProto.java | 132 - .../cloud/vision/v1/ProductSearchResults.java | 5384 ------------ .../v1/ProductSearchResultsOrBuilder.java | 145 - .../vision/v1/ProductSearchServiceProto.java | 637 -- .../google/cloud/vision/v1/ProductSet.java | 1337 --- .../cloud/vision/v1/ProductSetName.java | 223 - .../cloud/vision/v1/ProductSetOrBuilder.java | 129 - .../vision/v1/ProductSetPurgeConfig.java | 609 -- .../v1/ProductSetPurgeConfigOrBuilder.java | 33 - .../com/google/cloud/vision/v1/Property.java | 842 -- .../cloud/vision/v1/PropertyOrBuilder.java | 59 - .../cloud/vision/v1/PurgeProductsRequest.java | 1143 --- .../v1/PurgeProductsRequestOrBuilder.java | 92 - .../cloud/vision/v1/ReferenceImage.java | 1372 --- .../cloud/vision/v1/ReferenceImageName.java | 269 - .../vision/v1/ReferenceImageOrBuilder.java | 131 - .../RemoveProductFromProductSetRequest.java | 789 -- ...ProductFromProductSetRequestOrBuilder.java | 57 - .../cloud/vision/v1/SafeSearchAnnotation.java | 1102 --- .../v1/SafeSearchAnnotationOrBuilder.java | 118 - .../com/google/cloud/vision/v1/Symbol.java | 1317 --- .../cloud/vision/v1/SymbolOrBuilder.java | 135 - .../cloud/vision/v1/TextAnnotation.java | 3812 --------- .../vision/v1/TextAnnotationOrBuilder.java | 73 - .../cloud/vision/v1/TextAnnotationProto.java | 183 - .../cloud/vision/v1/TextDetectionParams.java | 767 -- .../v1/TextDetectionParamsOrBuilder.java | 62 - .../cloud/vision/v1/UpdateProductRequest.java | 961 --- .../v1/UpdateProductRequestOrBuilder.java | 78 - .../vision/v1/UpdateProductSetRequest.java | 937 -- .../v1/UpdateProductSetRequestOrBuilder.java | 72 - .../com/google/cloud/vision/v1/Vertex.java | 591 -- .../cloud/vision/v1/VertexOrBuilder.java | 29 - .../google/cloud/vision/v1/WebDetection.java | 7560 ----------------- .../vision/v1/WebDetectionOrBuilder.java | 293 - .../cloud/vision/v1/WebDetectionParams.java | 510 -- .../v1/WebDetectionParamsOrBuilder.java | 19 - .../cloud/vision/v1/WebDetectionProto.java | 116 - .../java/com/google/cloud/vision/v1/Word.java | 1617 ---- .../google/cloud/vision/v1/WordOrBuilder.java | 164 - .../google/cloud/vision/v1/geometry.proto | 68 - .../cloud/vision/v1/image_annotator.proto | 1044 --- .../cloud/vision/v1/product_search.proto | 124 - .../vision/v1/product_search_service.proto | 1022 --- .../cloud/vision/v1/text_annotation.proto | 258 - .../cloud/vision/v1/web_detection.proto | 104 - .../AsyncAsyncBatchAnnotateFiles.java | 52 - .../AsyncAsyncBatchAnnotateFilesLRO.java | 53 - .../SyncAsyncBatchAnnotateFiles.java | 49 - ...tateFilesListasyncannotatefilerequest.java | 45 - .../AsyncAsyncBatchAnnotateImages.java | 54 - .../AsyncAsyncBatchAnnotateImagesLRO.java | 55 - .../SyncAsyncBatchAnnotateImages.java | 51 - ...sListannotateimagerequestOutputconfig.java | 48 - .../AsyncBatchAnnotateFiles.java | 52 - .../SyncBatchAnnotateFiles.java | 48 - ...hAnnotateFilesListannotatefilerequest.java | 44 - .../AsyncBatchAnnotateImages.java | 52 - .../SyncBatchAnnotateImages.java | 48 - ...nnotateImagesListannotateimagerequest.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../SyncBatchAnnotateImages.java | 49 - .../AsyncAddProductToProductSet.java | 52 - .../SyncAddProductToProductSet.java | 48 - ...ToProductSetProductsetnameProductname.java | 44 - ...oductToProductSetProductsetnameString.java | 44 - ...dProductToProductSetStringProductname.java | 44 - ...yncAddProductToProductSetStringString.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../createproduct/AsyncCreateProduct.java | 51 - .../createproduct/SyncCreateProduct.java | 48 - ...reateProductLocationnameProductString.java | 44 - .../SyncCreateProductStringProductString.java | 44 - .../AsyncCreateProductSet.java | 52 - .../SyncCreateProductSet.java | 48 - ...roductSetLocationnameProductsetString.java | 44 - ...reateProductSetStringProductsetString.java | 44 - .../AsyncCreateReferenceImage.java | 52 - .../SyncCreateReferenceImage.java | 48 - ...eImageProductnameReferenceimageString.java | 45 - ...erenceImageStringReferenceimageString.java | 45 - .../deleteproduct/AsyncDeleteProduct.java | 49 - .../deleteproduct/SyncDeleteProduct.java | 46 - .../SyncDeleteProductProductname.java | 42 - .../SyncDeleteProductString.java | 42 - .../AsyncDeleteProductSet.java | 49 - .../SyncDeleteProductSet.java | 46 - .../SyncDeleteProductSetProductsetname.java | 42 - .../SyncDeleteProductSetString.java | 42 - .../AsyncDeleteReferenceImage.java | 52 - .../SyncDeleteReferenceImage.java | 48 - ...eleteReferenceImageReferenceimagename.java | 43 - .../SyncDeleteReferenceImageString.java | 44 - .../getproduct/AsyncGetProduct.java | 49 - .../getproduct/SyncGetProduct.java | 46 - .../getproduct/SyncGetProductProductname.java | 42 - .../getproduct/SyncGetProductString.java | 42 - .../getproductset/AsyncGetProductSet.java | 50 - .../getproductset/SyncGetProductSet.java | 46 - .../SyncGetProductSetProductsetname.java | 42 - .../SyncGetProductSetString.java | 42 - .../AsyncGetReferenceImage.java | 52 - .../SyncGetReferenceImage.java | 48 - ...ncGetReferenceImageReferenceimagename.java | 43 - .../SyncGetReferenceImageString.java | 44 - .../AsyncImportProductSets.java | 52 - .../AsyncImportProductSetsLRO.java | 53 - .../SyncImportProductSets.java | 49 - ...ationnameImportproductsetsinputconfig.java | 46 - ...etsStringImportproductsetsinputconfig.java | 45 - .../listproducts/AsyncListProducts.java | 54 - .../listproducts/AsyncListProductsPaged.java | 61 - .../listproducts/SyncListProducts.java | 50 - .../SyncListProductsLocationname.java | 44 - .../listproducts/SyncListProductsString.java | 44 - .../listproductsets/AsyncListProductSets.java | 54 - .../AsyncListProductSetsPaged.java | 62 - .../listproductsets/SyncListProductSets.java | 50 - .../SyncListProductSetsLocationname.java | 44 - .../SyncListProductSetsString.java | 44 - .../AsyncListProductsInProductSet.java | 54 - .../AsyncListProductsInProductSetPaged.java | 62 - .../SyncListProductsInProductSet.java | 50 - ...istProductsInProductSetProductsetname.java | 44 - .../SyncListProductsInProductSetString.java | 44 - .../AsyncListReferenceImages.java | 54 - .../AsyncListReferenceImagesPaged.java | 62 - .../SyncListReferenceImages.java | 50 - .../SyncListReferenceImagesProductname.java | 44 - .../SyncListReferenceImagesString.java | 44 - .../purgeproducts/AsyncPurgeProducts.java | 50 - .../purgeproducts/AsyncPurgeProductsLRO.java | 52 - .../purgeproducts/SyncPurgeProducts.java | 47 - .../SyncPurgeProductsLocationname.java | 42 - .../SyncPurgeProductsString.java | 42 - .../AsyncRemoveProductFromProductSet.java | 52 - .../SyncRemoveProductFromProductSet.java | 48 - ...omProductSetProductsetnameProductname.java | 44 - ...uctFromProductSetProductsetnameString.java | 44 - ...roductFromProductSetStringProductname.java | 44 - ...moveProductFromProductSetStringString.java | 44 - .../updateproduct/AsyncUpdateProduct.java | 50 - .../updateproduct/SyncUpdateProduct.java | 47 - .../SyncUpdateProductProductFieldmask.java | 43 - .../AsyncUpdateProductSet.java | 51 - .../SyncUpdateProductSet.java | 47 - ...ncUpdateProductSetProductsetFieldmask.java | 43 - .../SyncCreateProductSet.java | 45 - .../SyncBatchAnnotateImages.java | 49 - .../SyncCreateProductSet.java | 46 - .../v1p1beta1/ImageAnnotatorClient.java | 288 - .../v1p1beta1/ImageAnnotatorSettings.java | 209 - .../vision/v1p1beta1/gapic_metadata.json | 21 - .../cloud/vision/v1p1beta1/package-info.java | 43 - .../GrpcImageAnnotatorCallableFactory.java | 115 - .../stub/GrpcImageAnnotatorStub.java | 163 - ...HttpJsonImageAnnotatorCallableFactory.java | 105 - .../stub/HttpJsonImageAnnotatorStub.java | 199 - .../v1p1beta1/stub/ImageAnnotatorStub.java | 43 - .../stub/ImageAnnotatorStubSettings.java | 335 - .../ImageAnnotatorClientHttpJsonTest.java | 118 - .../v1p1beta1/ImageAnnotatorClientTest.java | 116 - .../vision/v1p1beta1/MockImageAnnotator.java | 59 - .../v1p1beta1/MockImageAnnotatorImpl.java | 82 - .../vision/v1p1beta1/ImageAnnotatorGrpc.java | 313 - .../v1p1beta1/AnnotateImageRequest.java | 1346 --- .../AnnotateImageRequestOrBuilder.java | 107 - .../v1p1beta1/AnnotateImageResponse.java | 4108 --------- .../AnnotateImageResponseOrBuilder.java | 406 - .../v1p1beta1/BatchAnnotateImagesRequest.java | 872 -- .../BatchAnnotateImagesRequestOrBuilder.java | 53 - .../BatchAnnotateImagesResponse.java | 872 -- .../BatchAnnotateImagesResponseOrBuilder.java | 53 - .../google/cloud/vision/v1p1beta1/Block.java | 1914 ----- .../vision/v1p1beta1/BlockOrBuilder.java | 178 - .../cloud/vision/v1p1beta1/BoundingPoly.java | 872 -- .../v1p1beta1/BoundingPolyOrBuilder.java | 53 - .../cloud/vision/v1p1beta1/ColorInfo.java | 835 -- .../vision/v1p1beta1/ColorInfoOrBuilder.java | 57 - .../cloud/vision/v1p1beta1/CropHint.java | 845 -- .../vision/v1p1beta1/CropHintOrBuilder.java | 60 - .../vision/v1p1beta1/CropHintsAnnotation.java | 872 -- .../CropHintsAnnotationOrBuilder.java | 53 - .../vision/v1p1beta1/CropHintsParams.java | 696 -- .../v1p1beta1/CropHintsParamsOrBuilder.java | 53 - .../v1p1beta1/DominantColorsAnnotation.java | 872 -- .../DominantColorsAnnotationOrBuilder.java | 53 - .../vision/v1p1beta1/EntityAnnotation.java | 2468 ------ .../v1p1beta1/EntityAnnotationOrBuilder.java | 255 - .../vision/v1p1beta1/FaceAnnotation.java | 4300 ---------- .../v1p1beta1/FaceAnnotationOrBuilder.java | 328 - .../cloud/vision/v1p1beta1/Feature.java | 1109 --- .../vision/v1p1beta1/FeatureOrBuilder.java | 64 - .../cloud/vision/v1p1beta1/GeometryProto.java | 77 - .../google/cloud/vision/v1p1beta1/Image.java | 781 -- .../vision/v1p1beta1/ImageAnnotatorProto.java | 475 -- .../cloud/vision/v1p1beta1/ImageContext.java | 1711 ---- .../v1p1beta1/ImageContextOrBuilder.java | 186 - .../vision/v1p1beta1/ImageOrBuilder.java | 54 - .../vision/v1p1beta1/ImageProperties.java | 665 -- .../v1p1beta1/ImagePropertiesOrBuilder.java | 36 - .../cloud/vision/v1p1beta1/ImageSource.java | 859 -- .../v1p1beta1/ImageSourceOrBuilder.java | 77 - .../cloud/vision/v1p1beta1/LatLongRect.java | 901 -- .../v1p1beta1/LatLongRectOrBuilder.java | 63 - .../cloud/vision/v1p1beta1/Likelihood.java | 202 - .../cloud/vision/v1p1beta1/LocationInfo.java | 665 -- .../v1p1beta1/LocationInfoOrBuilder.java | 36 - .../google/cloud/vision/v1p1beta1/Page.java | 1350 --- .../cloud/vision/v1p1beta1/PageOrBuilder.java | 110 - .../cloud/vision/v1p1beta1/Paragraph.java | 1594 ---- .../vision/v1p1beta1/ParagraphOrBuilder.java | 159 - .../cloud/vision/v1p1beta1/Position.java | 679 -- .../vision/v1p1beta1/PositionOrBuilder.java | 39 - .../cloud/vision/v1p1beta1/Property.java | 842 -- .../vision/v1p1beta1/PropertyOrBuilder.java | 59 - .../v1p1beta1/SafeSearchAnnotation.java | 1102 --- .../SafeSearchAnnotationOrBuilder.java | 118 - .../google/cloud/vision/v1p1beta1/Symbol.java | 1317 --- .../vision/v1p1beta1/SymbolOrBuilder.java | 135 - .../vision/v1p1beta1/TextAnnotation.java | 3814 --------- .../v1p1beta1/TextAnnotationOrBuilder.java | 73 - .../vision/v1p1beta1/TextAnnotationProto.java | 187 - .../vision/v1p1beta1/TextDetectionParams.java | 767 -- .../TextDetectionParamsOrBuilder.java | 62 - .../google/cloud/vision/v1p1beta1/Vertex.java | 591 -- .../vision/v1p1beta1/VertexOrBuilder.java | 29 - .../cloud/vision/v1p1beta1/WebDetection.java | 7537 ---------------- .../v1p1beta1/WebDetectionOrBuilder.java | 288 - .../vision/v1p1beta1/WebDetectionParams.java | 510 -- .../WebDetectionParamsOrBuilder.java | 19 - .../vision/v1p1beta1/WebDetectionProto.java | 118 - .../google/cloud/vision/v1p1beta1/Word.java | 1617 ---- .../cloud/vision/v1p1beta1/WordOrBuilder.java | 164 - .../cloud/vision/v1p1beta1/geometry.proto | 53 - .../vision/v1p1beta1/image_annotator.proto | 618 -- .../vision/v1p1beta1/text_annotation.proto | 251 - .../vision/v1p1beta1/web_detection.proto | 103 - .../AsyncBatchAnnotateImages.java | 51 - .../SyncBatchAnnotateImages.java | 47 - ...nnotateImagesListannotateimagerequest.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../SyncBatchAnnotateImages.java | 49 - .../SyncBatchAnnotateImages.java | 49 - .../v1p2beta1/ImageAnnotatorClient.java | 451 - .../v1p2beta1/ImageAnnotatorSettings.java | 238 - .../vision/v1p2beta1/gapic_metadata.json | 24 - .../cloud/vision/v1p2beta1/package-info.java | 43 - .../GrpcImageAnnotatorCallableFactory.java | 115 - .../stub/GrpcImageAnnotatorStub.java | 213 - ...HttpJsonImageAnnotatorCallableFactory.java | 105 - .../stub/HttpJsonImageAnnotatorStub.java | 293 - .../v1p2beta1/stub/ImageAnnotatorStub.java | 69 - .../stub/ImageAnnotatorStubSettings.java | 421 - .../ImageAnnotatorClientHttpJsonTest.java | 171 - .../v1p2beta1/ImageAnnotatorClientTest.java | 168 - .../vision/v1p2beta1/MockImageAnnotator.java | 59 - .../v1p2beta1/MockImageAnnotatorImpl.java | 104 - .../vision/v1p2beta1/ImageAnnotatorGrpc.java | 419 - .../v1p2beta1/AnnotateFileResponse.java | 1110 --- .../AnnotateFileResponseOrBuilder.java | 80 - .../v1p2beta1/AnnotateImageRequest.java | 1346 --- .../AnnotateImageRequestOrBuilder.java | 107 - .../v1p2beta1/AnnotateImageResponse.java | 4356 ---------- .../AnnotateImageResponseOrBuilder.java | 436 - .../v1p2beta1/AsyncAnnotateFileRequest.java | 1580 ---- .../AsyncAnnotateFileRequestOrBuilder.java | 134 - .../v1p2beta1/AsyncAnnotateFileResponse.java | 665 -- .../AsyncAnnotateFileResponseOrBuilder.java | 36 - .../AsyncBatchAnnotateFilesRequest.java | 874 -- ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 - .../AsyncBatchAnnotateFilesResponse.java | 895 -- ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 - .../v1p2beta1/BatchAnnotateImagesRequest.java | 872 -- .../BatchAnnotateImagesRequestOrBuilder.java | 53 - .../BatchAnnotateImagesResponse.java | 872 -- .../BatchAnnotateImagesResponseOrBuilder.java | 53 - .../google/cloud/vision/v1p2beta1/Block.java | 1914 ----- .../vision/v1p2beta1/BlockOrBuilder.java | 178 - .../cloud/vision/v1p2beta1/BoundingPoly.java | 1312 --- .../v1p2beta1/BoundingPolyOrBuilder.java | 97 - .../cloud/vision/v1p2beta1/ColorInfo.java | 835 -- .../vision/v1p2beta1/ColorInfoOrBuilder.java | 57 - .../cloud/vision/v1p2beta1/CropHint.java | 845 -- .../vision/v1p2beta1/CropHintOrBuilder.java | 60 - .../vision/v1p2beta1/CropHintsAnnotation.java | 872 -- .../CropHintsAnnotationOrBuilder.java | 53 - .../vision/v1p2beta1/CropHintsParams.java | 696 -- .../v1p2beta1/CropHintsParamsOrBuilder.java | 53 - .../v1p2beta1/DominantColorsAnnotation.java | 872 -- .../DominantColorsAnnotationOrBuilder.java | 53 - .../vision/v1p2beta1/EntityAnnotation.java | 2472 ------ .../v1p2beta1/EntityAnnotationOrBuilder.java | 256 - .../vision/v1p2beta1/FaceAnnotation.java | 4300 ---------- .../v1p2beta1/FaceAnnotationOrBuilder.java | 328 - .../cloud/vision/v1p2beta1/Feature.java | 1119 --- .../vision/v1p2beta1/FeatureOrBuilder.java | 65 - .../vision/v1p2beta1/GcsDestination.java | 672 -- .../v1p2beta1/GcsDestinationOrBuilder.java | 51 - .../cloud/vision/v1p2beta1/GcsSource.java | 602 -- .../vision/v1p2beta1/GcsSourceOrBuilder.java | 31 - .../cloud/vision/v1p2beta1/GeometryProto.java | 91 - .../google/cloud/vision/v1p2beta1/Image.java | 781 -- .../v1p2beta1/ImageAnnotationContext.java | 681 -- .../ImageAnnotationContextOrBuilder.java | 40 - .../vision/v1p2beta1/ImageAnnotatorProto.java | 645 -- .../cloud/vision/v1p2beta1/ImageContext.java | 1711 ---- .../v1p2beta1/ImageContextOrBuilder.java | 186 - .../vision/v1p2beta1/ImageOrBuilder.java | 54 - .../vision/v1p2beta1/ImageProperties.java | 665 -- .../v1p2beta1/ImagePropertiesOrBuilder.java | 36 - .../cloud/vision/v1p2beta1/ImageSource.java | 880 -- .../v1p2beta1/ImageSourceOrBuilder.java | 83 - .../cloud/vision/v1p2beta1/InputConfig.java | 838 -- .../v1p2beta1/InputConfigOrBuilder.java | 58 - .../cloud/vision/v1p2beta1/LatLongRect.java | 901 -- .../v1p2beta1/LatLongRectOrBuilder.java | 63 - .../cloud/vision/v1p2beta1/Likelihood.java | 202 - .../cloud/vision/v1p2beta1/LocationInfo.java | 665 -- .../v1p2beta1/LocationInfoOrBuilder.java | 36 - .../vision/v1p2beta1/NormalizedVertex.java | 597 -- .../v1p2beta1/NormalizedVertexOrBuilder.java | 29 - .../vision/v1p2beta1/OperationMetadata.java | 1204 --- .../v1p2beta1/OperationMetadataOrBuilder.java | 82 - .../cloud/vision/v1p2beta1/OutputConfig.java | 773 -- .../v1p2beta1/OutputConfigOrBuilder.java | 53 - .../google/cloud/vision/v1p2beta1/Page.java | 1358 --- .../cloud/vision/v1p2beta1/PageOrBuilder.java | 112 - .../cloud/vision/v1p2beta1/Paragraph.java | 1594 ---- .../vision/v1p2beta1/ParagraphOrBuilder.java | 159 - .../cloud/vision/v1p2beta1/Position.java | 679 -- .../vision/v1p2beta1/PositionOrBuilder.java | 39 - .../cloud/vision/v1p2beta1/Property.java | 842 -- .../vision/v1p2beta1/PropertyOrBuilder.java | 59 - .../v1p2beta1/SafeSearchAnnotation.java | 1102 --- .../SafeSearchAnnotationOrBuilder.java | 118 - .../google/cloud/vision/v1p2beta1/Symbol.java | 1317 --- .../vision/v1p2beta1/SymbolOrBuilder.java | 135 - .../vision/v1p2beta1/TextAnnotation.java | 3814 --------- .../v1p2beta1/TextAnnotationOrBuilder.java | 73 - .../vision/v1p2beta1/TextAnnotationProto.java | 187 - .../vision/v1p2beta1/TextDetectionParams.java | 767 -- .../TextDetectionParamsOrBuilder.java | 62 - .../google/cloud/vision/v1p2beta1/Vertex.java | 591 -- .../vision/v1p2beta1/VertexOrBuilder.java | 29 - .../cloud/vision/v1p2beta1/WebDetection.java | 7537 ---------------- .../v1p2beta1/WebDetectionOrBuilder.java | 288 - .../vision/v1p2beta1/WebDetectionParams.java | 510 -- .../WebDetectionParamsOrBuilder.java | 19 - .../vision/v1p2beta1/WebDetectionProto.java | 118 - .../google/cloud/vision/v1p2beta1/Word.java | 1617 ---- .../cloud/vision/v1p2beta1/WordOrBuilder.java | 164 - .../cloud/vision/v1p2beta1/geometry.proto | 67 - .../vision/v1p2beta1/image_annotator.proto | 794 -- .../vision/v1p2beta1/text_annotation.proto | 258 - .../vision/v1p2beta1/web_detection.proto | 103 - .../AsyncAsyncBatchAnnotateFiles.java | 51 - .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 - .../SyncAsyncBatchAnnotateFiles.java | 48 - ...tateFilesListasyncannotatefilerequest.java | 45 - .../AsyncBatchAnnotateImages.java | 51 - .../SyncBatchAnnotateImages.java | 47 - ...nnotateImagesListannotateimagerequest.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../SyncBatchAnnotateImages.java | 49 - .../SyncBatchAnnotateImages.java | 49 - .../v1p3beta1/ImageAnnotatorClient.java | 451 - .../v1p3beta1/ImageAnnotatorSettings.java | 238 - .../vision/v1p3beta1/ProductSearchClient.java | 3731 -------- .../v1p3beta1/ProductSearchSettings.java | 427 - .../vision/v1p3beta1/gapic_metadata.json | 87 - .../cloud/vision/v1p3beta1/package-info.java | 77 - .../GrpcImageAnnotatorCallableFactory.java | 115 - .../stub/GrpcImageAnnotatorStub.java | 213 - .../GrpcProductSearchCallableFactory.java | 115 - .../v1p3beta1/stub/GrpcProductSearchStub.java | 787 -- ...HttpJsonImageAnnotatorCallableFactory.java | 105 - .../stub/HttpJsonImageAnnotatorStub.java | 293 - .../HttpJsonProductSearchCallableFactory.java | 105 - .../stub/HttpJsonProductSearchStub.java | 1199 --- .../v1p3beta1/stub/ImageAnnotatorStub.java | 69 - .../stub/ImageAnnotatorStubSettings.java | 434 - .../v1p3beta1/stub/ProductSearchStub.java | 183 - .../stub/ProductSearchStubSettings.java | 1120 --- .../ImageAnnotatorClientHttpJsonTest.java | 171 - .../v1p3beta1/ImageAnnotatorClientTest.java | 168 - .../vision/v1p3beta1/MockImageAnnotator.java | 59 - .../v1p3beta1/MockImageAnnotatorImpl.java | 104 - .../vision/v1p3beta1/MockProductSearch.java | 59 - .../v1p3beta1/MockProductSearchImpl.java | 440 - .../ProductSearchClientHttpJsonTest.java | 1901 ----- .../v1p3beta1/ProductSearchClientTest.java | 1691 ---- .../vision/v1p3beta1/ImageAnnotatorGrpc.java | 419 - .../vision/v1p3beta1/ProductSearchGrpc.java | 2150 ----- .../AddProductToProductSetRequest.java | 789 -- ...ddProductToProductSetRequestOrBuilder.java | 57 - .../v1p3beta1/AnnotateFileResponse.java | 1110 --- .../AnnotateFileResponseOrBuilder.java | 80 - .../v1p3beta1/AnnotateImageRequest.java | 1346 --- .../AnnotateImageRequestOrBuilder.java | 107 - .../v1p3beta1/AnnotateImageResponse.java | 5055 ----------- .../AnnotateImageResponseOrBuilder.java | 512 -- .../v1p3beta1/AsyncAnnotateFileRequest.java | 1580 ---- .../AsyncAnnotateFileRequestOrBuilder.java | 134 - .../v1p3beta1/AsyncAnnotateFileResponse.java | 665 -- .../AsyncAnnotateFileResponseOrBuilder.java | 36 - .../AsyncBatchAnnotateFilesRequest.java | 874 -- ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 - .../AsyncBatchAnnotateFilesResponse.java | 895 -- ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 - .../v1p3beta1/BatchAnnotateImagesRequest.java | 872 -- .../BatchAnnotateImagesRequestOrBuilder.java | 53 - .../BatchAnnotateImagesResponse.java | 872 -- .../BatchAnnotateImagesResponseOrBuilder.java | 53 - .../v1p3beta1/BatchOperationMetadata.java | 1238 --- .../BatchOperationMetadataOrBuilder.java | 88 - .../google/cloud/vision/v1p3beta1/Block.java | 1914 ----- .../vision/v1p3beta1/BlockOrBuilder.java | 178 - .../cloud/vision/v1p3beta1/BoundingPoly.java | 1312 --- .../v1p3beta1/BoundingPolyOrBuilder.java | 97 - .../cloud/vision/v1p3beta1/ColorInfo.java | 835 -- .../vision/v1p3beta1/ColorInfoOrBuilder.java | 57 - .../v1p3beta1/CreateProductRequest.java | 1032 --- .../CreateProductRequestOrBuilder.java | 86 - .../v1p3beta1/CreateProductSetRequest.java | 1025 --- .../CreateProductSetRequestOrBuilder.java | 84 - .../CreateReferenceImageRequest.java | 1044 --- .../CreateReferenceImageRequestOrBuilder.java | 89 - .../cloud/vision/v1p3beta1/CropHint.java | 845 -- .../vision/v1p3beta1/CropHintOrBuilder.java | 60 - .../vision/v1p3beta1/CropHintsAnnotation.java | 872 -- .../CropHintsAnnotationOrBuilder.java | 53 - .../vision/v1p3beta1/CropHintsParams.java | 696 -- .../v1p3beta1/CropHintsParamsOrBuilder.java | 53 - .../v1p3beta1/DeleteProductRequest.java | 609 -- .../DeleteProductRequestOrBuilder.java | 33 - .../v1p3beta1/DeleteProductSetRequest.java | 609 -- .../DeleteProductSetRequestOrBuilder.java | 33 - .../DeleteReferenceImageRequest.java | 609 -- .../DeleteReferenceImageRequestOrBuilder.java | 33 - .../v1p3beta1/DominantColorsAnnotation.java | 872 -- .../DominantColorsAnnotationOrBuilder.java | 53 - .../vision/v1p3beta1/EntityAnnotation.java | 2472 ------ .../v1p3beta1/EntityAnnotationOrBuilder.java | 256 - .../vision/v1p3beta1/FaceAnnotation.java | 4300 ---------- .../v1p3beta1/FaceAnnotationOrBuilder.java | 328 - .../cloud/vision/v1p3beta1/Feature.java | 1153 --- .../vision/v1p3beta1/FeatureOrBuilder.java | 65 - .../vision/v1p3beta1/GcsDestination.java | 672 -- .../v1p3beta1/GcsDestinationOrBuilder.java | 51 - .../cloud/vision/v1p3beta1/GcsSource.java | 602 -- .../vision/v1p3beta1/GcsSourceOrBuilder.java | 31 - .../cloud/vision/v1p3beta1/GeometryProto.java | 91 - .../vision/v1p3beta1/GetProductRequest.java | 609 -- .../v1p3beta1/GetProductRequestOrBuilder.java | 33 - .../v1p3beta1/GetProductSetRequest.java | 609 -- .../GetProductSetRequestOrBuilder.java | 33 - .../v1p3beta1/GetReferenceImageRequest.java | 609 -- .../GetReferenceImageRequestOrBuilder.java | 33 - .../google/cloud/vision/v1p3beta1/Image.java | 781 -- .../v1p3beta1/ImageAnnotationContext.java | 681 -- .../ImageAnnotationContextOrBuilder.java | 40 - .../vision/v1p3beta1/ImageAnnotatorProto.java | 671 -- .../cloud/vision/v1p3beta1/ImageContext.java | 1947 ----- .../v1p3beta1/ImageContextOrBuilder.java | 213 - .../vision/v1p3beta1/ImageOrBuilder.java | 54 - .../vision/v1p3beta1/ImageProperties.java | 665 -- .../v1p3beta1/ImagePropertiesOrBuilder.java | 36 - .../cloud/vision/v1p3beta1/ImageSource.java | 880 -- .../v1p3beta1/ImageSourceOrBuilder.java | 83 - .../v1p3beta1/ImportProductSetsGcsSource.java | 905 -- .../ImportProductSetsGcsSourceOrBuilder.java | 117 - .../ImportProductSetsInputConfig.java | 773 -- ...ImportProductSetsInputConfigOrBuilder.java | 41 - .../v1p3beta1/ImportProductSetsRequest.java | 838 -- .../ImportProductSetsRequestOrBuilder.java | 58 - .../v1p3beta1/ImportProductSetsResponse.java | 1414 --- .../ImportProductSetsResponseOrBuilder.java | 117 - .../cloud/vision/v1p3beta1/InputConfig.java | 838 -- .../v1p3beta1/InputConfigOrBuilder.java | 58 - .../cloud/vision/v1p3beta1/LatLongRect.java | 901 -- .../v1p3beta1/LatLongRectOrBuilder.java | 63 - .../cloud/vision/v1p3beta1/Likelihood.java | 202 - .../v1p3beta1/ListProductSetsRequest.java | 848 -- .../ListProductSetsRequestOrBuilder.java | 61 - .../v1p3beta1/ListProductSetsResponse.java | 1045 --- .../ListProductSetsResponseOrBuilder.java | 75 - .../ListProductsInProductSetRequest.java | 855 -- ...tProductsInProductSetRequestOrBuilder.java | 63 - .../ListProductsInProductSetResponse.java | 1045 --- ...ProductsInProductSetResponseOrBuilder.java | 75 - .../vision/v1p3beta1/ListProductsRequest.java | 855 -- .../ListProductsRequestOrBuilder.java | 63 - .../v1p3beta1/ListProductsResponse.java | 1045 --- .../ListProductsResponseOrBuilder.java | 75 - .../v1p3beta1/ListReferenceImagesRequest.java | 869 -- .../ListReferenceImagesRequestOrBuilder.java | 67 - .../ListReferenceImagesResponse.java | 1118 --- .../ListReferenceImagesResponseOrBuilder.java | 83 - .../v1p3beta1/LocalizedObjectAnnotation.java | 1259 --- .../LocalizedObjectAnnotationOrBuilder.java | 110 - .../cloud/vision/v1p3beta1/LocationInfo.java | 665 -- .../v1p3beta1/LocationInfoOrBuilder.java | 36 - .../cloud/vision/v1p3beta1/LocationName.java | 192 - .../vision/v1p3beta1/NormalizedVertex.java | 597 -- .../v1p3beta1/NormalizedVertexOrBuilder.java | 29 - .../vision/v1p3beta1/OperationMetadata.java | 1204 --- .../v1p3beta1/OperationMetadataOrBuilder.java | 82 - .../cloud/vision/v1p3beta1/OutputConfig.java | 777 -- .../v1p3beta1/OutputConfigOrBuilder.java | 54 - .../google/cloud/vision/v1p3beta1/Page.java | 1358 --- .../cloud/vision/v1p3beta1/PageOrBuilder.java | 112 - .../cloud/vision/v1p3beta1/Paragraph.java | 1594 ---- .../vision/v1p3beta1/ParagraphOrBuilder.java | 159 - .../cloud/vision/v1p3beta1/Position.java | 679 -- .../vision/v1p3beta1/PositionOrBuilder.java | 39 - .../cloud/vision/v1p3beta1/Product.java | 2548 ------ .../cloud/vision/v1p3beta1/ProductName.java | 223 - .../vision/v1p3beta1/ProductOrBuilder.java | 179 - .../vision/v1p3beta1/ProductSearchParams.java | 1390 --- .../ProductSearchParamsOrBuilder.java | 160 - .../vision/v1p3beta1/ProductSearchProto.java | 135 - .../v1p3beta1/ProductSearchResults.java | 5384 ------------ .../ProductSearchResultsOrBuilder.java | 145 - .../v1p3beta1/ProductSearchServiceProto.java | 614 -- .../cloud/vision/v1p3beta1/ProductSet.java | 1325 --- .../vision/v1p3beta1/ProductSetName.java | 223 - .../vision/v1p3beta1/ProductSetOrBuilder.java | 126 - .../cloud/vision/v1p3beta1/Property.java | 842 -- .../vision/v1p3beta1/PropertyOrBuilder.java | 59 - .../vision/v1p3beta1/ReferenceImage.java | 1372 --- .../vision/v1p3beta1/ReferenceImageName.java | 269 - .../v1p3beta1/ReferenceImageOrBuilder.java | 131 - .../RemoveProductFromProductSetRequest.java | 789 -- ...ProductFromProductSetRequestOrBuilder.java | 57 - .../v1p3beta1/SafeSearchAnnotation.java | 1102 --- .../SafeSearchAnnotationOrBuilder.java | 118 - .../google/cloud/vision/v1p3beta1/Symbol.java | 1317 --- .../vision/v1p3beta1/SymbolOrBuilder.java | 135 - .../vision/v1p3beta1/TextAnnotation.java | 3814 --------- .../v1p3beta1/TextAnnotationOrBuilder.java | 73 - .../vision/v1p3beta1/TextAnnotationProto.java | 187 - .../vision/v1p3beta1/TextDetectionParams.java | 767 -- .../TextDetectionParamsOrBuilder.java | 62 - .../v1p3beta1/UpdateProductRequest.java | 961 --- .../UpdateProductRequestOrBuilder.java | 78 - .../v1p3beta1/UpdateProductSetRequest.java | 937 -- .../UpdateProductSetRequestOrBuilder.java | 72 - .../google/cloud/vision/v1p3beta1/Vertex.java | 591 -- .../vision/v1p3beta1/VertexOrBuilder.java | 29 - .../cloud/vision/v1p3beta1/WebDetection.java | 7537 ---------------- .../v1p3beta1/WebDetectionOrBuilder.java | 288 - .../vision/v1p3beta1/WebDetectionParams.java | 510 -- .../WebDetectionParamsOrBuilder.java | 19 - .../vision/v1p3beta1/WebDetectionProto.java | 118 - .../google/cloud/vision/v1p3beta1/Word.java | 1617 ---- .../cloud/vision/v1p3beta1/WordOrBuilder.java | 164 - .../cloud/vision/v1p3beta1/geometry.proto | 68 - .../vision/v1p3beta1/image_annotator.proto | 833 -- .../vision/v1p3beta1/product_search.proto | 124 - .../v1p3beta1/product_search_service.proto | 971 --- .../vision/v1p3beta1/text_annotation.proto | 258 - .../vision/v1p3beta1/web_detection.proto | 103 - .../AsyncAsyncBatchAnnotateFiles.java | 51 - .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 - .../SyncAsyncBatchAnnotateFiles.java | 48 - ...tateFilesListasyncannotatefilerequest.java | 45 - .../AsyncBatchAnnotateImages.java | 51 - .../SyncBatchAnnotateImages.java | 47 - ...nnotateImagesListannotateimagerequest.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../SyncBatchAnnotateImages.java | 49 - .../AsyncAddProductToProductSet.java | 52 - .../SyncAddProductToProductSet.java | 48 - ...ToProductSetProductsetnameProductname.java | 44 - ...oductToProductSetProductsetnameString.java | 44 - ...dProductToProductSetStringProductname.java | 44 - ...yncAddProductToProductSetStringString.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../createproduct/AsyncCreateProduct.java | 51 - .../createproduct/SyncCreateProduct.java | 48 - ...reateProductLocationnameProductString.java | 44 - .../SyncCreateProductStringProductString.java | 44 - .../AsyncCreateProductSet.java | 52 - .../SyncCreateProductSet.java | 48 - ...roductSetLocationnameProductsetString.java | 44 - ...reateProductSetStringProductsetString.java | 44 - .../AsyncCreateReferenceImage.java | 52 - .../SyncCreateReferenceImage.java | 48 - ...eImageProductnameReferenceimageString.java | 45 - ...erenceImageStringReferenceimageString.java | 45 - .../deleteproduct/AsyncDeleteProduct.java | 49 - .../deleteproduct/SyncDeleteProduct.java | 46 - .../SyncDeleteProductProductname.java | 42 - .../SyncDeleteProductString.java | 42 - .../AsyncDeleteProductSet.java | 49 - .../SyncDeleteProductSet.java | 46 - .../SyncDeleteProductSetProductsetname.java | 42 - .../SyncDeleteProductSetString.java | 42 - .../AsyncDeleteReferenceImage.java | 52 - .../SyncDeleteReferenceImage.java | 48 - ...eleteReferenceImageReferenceimagename.java | 43 - .../SyncDeleteReferenceImageString.java | 44 - .../getproduct/AsyncGetProduct.java | 49 - .../getproduct/SyncGetProduct.java | 46 - .../getproduct/SyncGetProductProductname.java | 42 - .../getproduct/SyncGetProductString.java | 42 - .../getproductset/AsyncGetProductSet.java | 50 - .../getproductset/SyncGetProductSet.java | 46 - .../SyncGetProductSetProductsetname.java | 42 - .../SyncGetProductSetString.java | 42 - .../AsyncGetReferenceImage.java | 52 - .../SyncGetReferenceImage.java | 48 - ...ncGetReferenceImageReferenceimagename.java | 43 - .../SyncGetReferenceImageString.java | 44 - .../AsyncImportProductSets.java | 52 - .../AsyncImportProductSetsLRO.java | 53 - .../SyncImportProductSets.java | 49 - ...ationnameImportproductsetsinputconfig.java | 46 - ...etsStringImportproductsetsinputconfig.java | 45 - .../listproducts/AsyncListProducts.java | 54 - .../listproducts/AsyncListProductsPaged.java | 61 - .../listproducts/SyncListProducts.java | 50 - .../SyncListProductsLocationname.java | 44 - .../listproducts/SyncListProductsString.java | 44 - .../listproductsets/AsyncListProductSets.java | 54 - .../AsyncListProductSetsPaged.java | 62 - .../listproductsets/SyncListProductSets.java | 50 - .../SyncListProductSetsLocationname.java | 44 - .../SyncListProductSetsString.java | 44 - .../AsyncListProductsInProductSet.java | 54 - .../AsyncListProductsInProductSetPaged.java | 62 - .../SyncListProductsInProductSet.java | 50 - ...istProductsInProductSetProductsetname.java | 44 - .../SyncListProductsInProductSetString.java | 44 - .../AsyncListReferenceImages.java | 54 - .../AsyncListReferenceImagesPaged.java | 62 - .../SyncListReferenceImages.java | 50 - .../SyncListReferenceImagesProductname.java | 44 - .../SyncListReferenceImagesString.java | 44 - .../AsyncRemoveProductFromProductSet.java | 52 - .../SyncRemoveProductFromProductSet.java | 48 - ...omProductSetProductsetnameProductname.java | 44 - ...uctFromProductSetProductsetnameString.java | 44 - ...roductFromProductSetStringProductname.java | 44 - ...moveProductFromProductSetStringString.java | 44 - .../updateproduct/AsyncUpdateProduct.java | 50 - .../updateproduct/SyncUpdateProduct.java | 47 - .../SyncUpdateProductProductFieldmask.java | 43 - .../AsyncUpdateProductSet.java | 51 - .../SyncUpdateProductSet.java | 47 - ...ncUpdateProductSetProductsetFieldmask.java | 43 - .../SyncCreateProductSet.java | 45 - .../SyncBatchAnnotateImages.java | 49 - .../SyncCreateProductSet.java | 46 - .../v1p4beta1/ImageAnnotatorClient.java | 706 -- .../v1p4beta1/ImageAnnotatorSettings.java | 277 - .../vision/v1p4beta1/ProductSearchClient.java | 3874 --------- .../v1p4beta1/ProductSearchSettings.java | 449 - .../vision/v1p4beta1/gapic_metadata.json | 96 - .../cloud/vision/v1p4beta1/package-info.java | 77 - .../GrpcImageAnnotatorCallableFactory.java | 115 - .../stub/GrpcImageAnnotatorStub.java | 291 - .../GrpcProductSearchCallableFactory.java | 115 - .../v1p4beta1/stub/GrpcProductSearchStub.java | 831 -- ...HttpJsonImageAnnotatorCallableFactory.java | 105 - .../stub/HttpJsonImageAnnotatorStub.java | 428 - .../HttpJsonProductSearchCallableFactory.java | 105 - .../stub/HttpJsonProductSearchStub.java | 1269 --- .../v1p4beta1/stub/ImageAnnotatorStub.java | 90 - .../stub/ImageAnnotatorStubSettings.java | 528 -- .../v1p4beta1/stub/ProductSearchStub.java | 193 - .../stub/ProductSearchStubSettings.java | 1191 --- .../ImageAnnotatorClientHttpJsonTest.java | 267 - .../v1p4beta1/ImageAnnotatorClientTest.java | 257 - .../vision/v1p4beta1/MockImageAnnotator.java | 59 - .../v1p4beta1/MockImageAnnotatorImpl.java | 147 - .../vision/v1p4beta1/MockProductSearch.java | 59 - .../v1p4beta1/MockProductSearchImpl.java | 461 - .../ProductSearchClientHttpJsonTest.java | 1991 ----- .../v1p4beta1/ProductSearchClientTest.java | 1775 ---- .../vision/v1p4beta1/ImageAnnotatorGrpc.java | 635 -- .../vision/v1p4beta1/ProductSearchGrpc.java | 2300 ----- .../AddProductToProductSetRequest.java | 789 -- ...ddProductToProductSetRequestOrBuilder.java | 57 - .../vision/v1p4beta1/AnnotateFileRequest.java | 1651 ---- .../AnnotateFileRequestOrBuilder.java | 163 - .../v1p4beta1/AnnotateFileResponse.java | 1461 ---- .../AnnotateFileResponseOrBuilder.java | 125 - .../v1p4beta1/AnnotateImageRequest.java | 1346 --- .../AnnotateImageRequestOrBuilder.java | 107 - .../v1p4beta1/AnnotateImageResponse.java | 5055 ----------- .../AnnotateImageResponseOrBuilder.java | 512 -- .../v1p4beta1/AsyncAnnotateFileRequest.java | 1580 ---- .../AsyncAnnotateFileRequestOrBuilder.java | 134 - .../v1p4beta1/AsyncAnnotateFileResponse.java | 665 -- .../AsyncAnnotateFileResponseOrBuilder.java | 36 - .../AsyncBatchAnnotateFilesRequest.java | 874 -- ...yncBatchAnnotateFilesRequestOrBuilder.java | 53 - .../AsyncBatchAnnotateFilesResponse.java | 895 -- ...ncBatchAnnotateFilesResponseOrBuilder.java | 58 - .../AsyncBatchAnnotateImagesRequest.java | 1108 --- ...ncBatchAnnotateImagesRequestOrBuilder.java | 80 - .../AsyncBatchAnnotateImagesResponse.java | 665 -- ...cBatchAnnotateImagesResponseOrBuilder.java | 36 - .../v1p4beta1/BatchAnnotateFilesRequest.java | 895 -- .../BatchAnnotateFilesRequestOrBuilder.java | 58 - .../v1p4beta1/BatchAnnotateFilesResponse.java | 895 -- .../BatchAnnotateFilesResponseOrBuilder.java | 58 - .../v1p4beta1/BatchAnnotateImagesRequest.java | 872 -- .../BatchAnnotateImagesRequestOrBuilder.java | 53 - .../BatchAnnotateImagesResponse.java | 872 -- .../BatchAnnotateImagesResponseOrBuilder.java | 53 - .../v1p4beta1/BatchOperationMetadata.java | 1238 --- .../BatchOperationMetadataOrBuilder.java | 88 - .../google/cloud/vision/v1p4beta1/Block.java | 1914 ----- .../vision/v1p4beta1/BlockOrBuilder.java | 178 - .../cloud/vision/v1p4beta1/BoundingPoly.java | 1312 --- .../v1p4beta1/BoundingPolyOrBuilder.java | 97 - .../cloud/vision/v1p4beta1/Celebrity.java | 934 -- .../vision/v1p4beta1/CelebrityOrBuilder.java | 71 - .../vision/v1p4beta1/CelebrityProto.java | 82 - .../cloud/vision/v1p4beta1/ColorInfo.java | 835 -- .../vision/v1p4beta1/ColorInfoOrBuilder.java | 57 - .../v1p4beta1/CreateProductRequest.java | 1032 --- .../CreateProductRequestOrBuilder.java | 86 - .../v1p4beta1/CreateProductSetRequest.java | 1025 --- .../CreateProductSetRequestOrBuilder.java | 84 - .../CreateReferenceImageRequest.java | 1051 --- .../CreateReferenceImageRequestOrBuilder.java | 91 - .../cloud/vision/v1p4beta1/CropHint.java | 845 -- .../vision/v1p4beta1/CropHintOrBuilder.java | 60 - .../vision/v1p4beta1/CropHintsAnnotation.java | 872 -- .../CropHintsAnnotationOrBuilder.java | 53 - .../vision/v1p4beta1/CropHintsParams.java | 696 -- .../v1p4beta1/CropHintsParamsOrBuilder.java | 53 - .../v1p4beta1/DeleteProductRequest.java | 609 -- .../DeleteProductRequestOrBuilder.java | 33 - .../v1p4beta1/DeleteProductSetRequest.java | 609 -- .../DeleteProductSetRequestOrBuilder.java | 33 - .../DeleteReferenceImageRequest.java | 609 -- .../DeleteReferenceImageRequestOrBuilder.java | 33 - .../v1p4beta1/DominantColorsAnnotation.java | 872 -- .../DominantColorsAnnotationOrBuilder.java | 53 - .../vision/v1p4beta1/EntityAnnotation.java | 2480 ------ .../v1p4beta1/EntityAnnotationOrBuilder.java | 258 - .../vision/v1p4beta1/FaceAnnotation.java | 4832 ----------- .../v1p4beta1/FaceAnnotationOrBuilder.java | 392 - .../v1p4beta1/FaceRecognitionParams.java | 728 -- .../FaceRecognitionParamsOrBuilder.java | 66 - .../v1p4beta1/FaceRecognitionResult.java | 759 -- .../FaceRecognitionResultOrBuilder.java | 49 - .../cloud/vision/v1p4beta1/Feature.java | 1153 --- .../vision/v1p4beta1/FeatureOrBuilder.java | 65 - .../vision/v1p4beta1/GcsDestination.java | 714 -- .../v1p4beta1/GcsDestinationOrBuilder.java | 63 - .../cloud/vision/v1p4beta1/GcsSource.java | 602 -- .../vision/v1p4beta1/GcsSourceOrBuilder.java | 31 - .../cloud/vision/v1p4beta1/GeometryProto.java | 91 - .../vision/v1p4beta1/GetProductRequest.java | 609 -- .../v1p4beta1/GetProductRequestOrBuilder.java | 33 - .../v1p4beta1/GetProductSetRequest.java | 609 -- .../GetProductSetRequestOrBuilder.java | 33 - .../v1p4beta1/GetReferenceImageRequest.java | 609 -- .../GetReferenceImageRequestOrBuilder.java | 33 - .../google/cloud/vision/v1p4beta1/Image.java | 781 -- .../v1p4beta1/ImageAnnotationContext.java | 681 -- .../ImageAnnotationContextOrBuilder.java | 40 - .../vision/v1p4beta1/ImageAnnotatorProto.java | 765 -- .../cloud/vision/v1p4beta1/ImageContext.java | 2183 ----- .../v1p4beta1/ImageContextOrBuilder.java | 240 - .../vision/v1p4beta1/ImageOrBuilder.java | 54 - .../vision/v1p4beta1/ImageProperties.java | 665 -- .../v1p4beta1/ImagePropertiesOrBuilder.java | 36 - .../cloud/vision/v1p4beta1/ImageSource.java | 880 -- .../v1p4beta1/ImageSourceOrBuilder.java | 83 - .../v1p4beta1/ImportProductSetsGcsSource.java | 933 -- .../ImportProductSetsGcsSourceOrBuilder.java | 125 - .../ImportProductSetsInputConfig.java | 773 -- ...ImportProductSetsInputConfigOrBuilder.java | 41 - .../v1p4beta1/ImportProductSetsRequest.java | 838 -- .../ImportProductSetsRequestOrBuilder.java | 58 - .../v1p4beta1/ImportProductSetsResponse.java | 1414 --- .../ImportProductSetsResponseOrBuilder.java | 117 - .../cloud/vision/v1p4beta1/InputConfig.java | 938 -- .../v1p4beta1/InputConfigOrBuilder.java | 72 - .../cloud/vision/v1p4beta1/LatLongRect.java | 901 -- .../v1p4beta1/LatLongRectOrBuilder.java | 63 - .../cloud/vision/v1p4beta1/Likelihood.java | 202 - .../v1p4beta1/ListProductSetsRequest.java | 848 -- .../ListProductSetsRequestOrBuilder.java | 61 - .../v1p4beta1/ListProductSetsResponse.java | 1045 --- .../ListProductSetsResponseOrBuilder.java | 75 - .../ListProductsInProductSetRequest.java | 855 -- ...tProductsInProductSetRequestOrBuilder.java | 63 - .../ListProductsInProductSetResponse.java | 1045 --- ...ProductsInProductSetResponseOrBuilder.java | 75 - .../vision/v1p4beta1/ListProductsRequest.java | 855 -- .../ListProductsRequestOrBuilder.java | 63 - .../v1p4beta1/ListProductsResponse.java | 1045 --- .../ListProductsResponseOrBuilder.java | 75 - .../v1p4beta1/ListReferenceImagesRequest.java | 869 -- .../ListReferenceImagesRequestOrBuilder.java | 67 - .../ListReferenceImagesResponse.java | 1118 --- .../ListReferenceImagesResponseOrBuilder.java | 83 - .../v1p4beta1/LocalizedObjectAnnotation.java | 1259 --- .../LocalizedObjectAnnotationOrBuilder.java | 110 - .../cloud/vision/v1p4beta1/LocationInfo.java | 665 -- .../v1p4beta1/LocationInfoOrBuilder.java | 36 - .../cloud/vision/v1p4beta1/LocationName.java | 192 - .../vision/v1p4beta1/NormalizedVertex.java | 597 -- .../v1p4beta1/NormalizedVertexOrBuilder.java | 29 - .../vision/v1p4beta1/OperationMetadata.java | 1204 --- .../v1p4beta1/OperationMetadataOrBuilder.java | 82 - .../cloud/vision/v1p4beta1/OutputConfig.java | 777 -- .../v1p4beta1/OutputConfigOrBuilder.java | 54 - .../google/cloud/vision/v1p4beta1/Page.java | 1358 --- .../cloud/vision/v1p4beta1/PageOrBuilder.java | 112 - .../cloud/vision/v1p4beta1/Paragraph.java | 1594 ---- .../vision/v1p4beta1/ParagraphOrBuilder.java | 159 - .../cloud/vision/v1p4beta1/Position.java | 679 -- .../vision/v1p4beta1/PositionOrBuilder.java | 39 - .../cloud/vision/v1p4beta1/Product.java | 2617 ------ .../cloud/vision/v1p4beta1/ProductName.java | 223 - .../vision/v1p4beta1/ProductOrBuilder.java | 194 - .../vision/v1p4beta1/ProductSearchParams.java | 1404 --- .../ProductSearchParamsOrBuilder.java | 164 - .../vision/v1p4beta1/ProductSearchProto.java | 135 - .../v1p4beta1/ProductSearchResults.java | 5384 ------------ .../ProductSearchResultsOrBuilder.java | 145 - .../v1p4beta1/ProductSearchServiceProto.java | 649 -- .../cloud/vision/v1p4beta1/ProductSet.java | 1337 --- .../vision/v1p4beta1/ProductSetName.java | 223 - .../vision/v1p4beta1/ProductSetOrBuilder.java | 129 - .../v1p4beta1/ProductSetPurgeConfig.java | 609 -- .../ProductSetPurgeConfigOrBuilder.java | 33 - .../cloud/vision/v1p4beta1/Property.java | 842 -- .../vision/v1p4beta1/PropertyOrBuilder.java | 59 - .../v1p4beta1/PurgeProductsRequest.java | 1143 --- .../PurgeProductsRequestOrBuilder.java | 92 - .../vision/v1p4beta1/ReferenceImage.java | 1372 --- .../vision/v1p4beta1/ReferenceImageName.java | 269 - .../v1p4beta1/ReferenceImageOrBuilder.java | 131 - .../RemoveProductFromProductSetRequest.java | 796 -- ...ProductFromProductSetRequestOrBuilder.java | 59 - .../v1p4beta1/SafeSearchAnnotation.java | 1102 --- .../SafeSearchAnnotationOrBuilder.java | 118 - .../google/cloud/vision/v1p4beta1/Symbol.java | 1317 --- .../vision/v1p4beta1/SymbolOrBuilder.java | 135 - .../vision/v1p4beta1/TextAnnotation.java | 3814 --------- .../v1p4beta1/TextAnnotationOrBuilder.java | 73 - .../vision/v1p4beta1/TextAnnotationProto.java | 187 - .../vision/v1p4beta1/TextDetectionParams.java | 767 -- .../TextDetectionParamsOrBuilder.java | 62 - .../v1p4beta1/UpdateProductRequest.java | 961 --- .../UpdateProductRequestOrBuilder.java | 78 - .../v1p4beta1/UpdateProductSetRequest.java | 937 -- .../UpdateProductSetRequestOrBuilder.java | 72 - .../google/cloud/vision/v1p4beta1/Vertex.java | 591 -- .../vision/v1p4beta1/VertexOrBuilder.java | 29 - .../cloud/vision/v1p4beta1/WebDetection.java | 7560 ----------------- .../v1p4beta1/WebDetectionOrBuilder.java | 293 - .../vision/v1p4beta1/WebDetectionParams.java | 510 -- .../WebDetectionParamsOrBuilder.java | 19 - .../vision/v1p4beta1/WebDetectionProto.java | 118 - .../google/cloud/vision/v1p4beta1/Word.java | 1617 ---- .../cloud/vision/v1p4beta1/WordOrBuilder.java | 164 - .../google/cloud/vision/v1p4beta1/face.proto | 60 - .../cloud/vision/v1p4beta1/geometry.proto | 70 - .../vision/v1p4beta1/image_annotator.proto | 967 --- .../vision/v1p4beta1/product_search.proto | 127 - .../v1p4beta1/product_search_service.proto | 1039 --- .../vision/v1p4beta1/text_annotation.proto | 260 - .../vision/v1p4beta1/web_detection.proto | 106 - .../AsyncAsyncBatchAnnotateFiles.java | 51 - .../AsyncAsyncBatchAnnotateFilesLRO.java | 52 - .../SyncAsyncBatchAnnotateFiles.java | 48 - ...tateFilesListasyncannotatefilerequest.java | 45 - .../AsyncAsyncBatchAnnotateImages.java | 53 - .../AsyncAsyncBatchAnnotateImagesLRO.java | 54 - .../SyncAsyncBatchAnnotateImages.java | 50 - ...sListannotateimagerequestOutputconfig.java | 48 - .../AsyncBatchAnnotateFiles.java | 51 - .../SyncBatchAnnotateFiles.java | 47 - ...hAnnotateFilesListannotatefilerequest.java | 44 - .../AsyncBatchAnnotateImages.java | 51 - .../SyncBatchAnnotateImages.java | 47 - ...nnotateImagesListannotateimagerequest.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../SyncBatchAnnotateImages.java | 49 - .../AsyncAddProductToProductSet.java | 52 - .../SyncAddProductToProductSet.java | 48 - ...ToProductSetProductsetnameProductname.java | 44 - ...oductToProductSetProductsetnameString.java | 44 - ...dProductToProductSetStringProductname.java | 44 - ...yncAddProductToProductSetStringString.java | 44 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../createproduct/AsyncCreateProduct.java | 51 - .../createproduct/SyncCreateProduct.java | 48 - ...reateProductLocationnameProductString.java | 44 - .../SyncCreateProductStringProductString.java | 44 - .../AsyncCreateProductSet.java | 52 - .../SyncCreateProductSet.java | 48 - ...roductSetLocationnameProductsetString.java | 44 - ...reateProductSetStringProductsetString.java | 44 - .../AsyncCreateReferenceImage.java | 52 - .../SyncCreateReferenceImage.java | 48 - ...eImageProductnameReferenceimageString.java | 45 - ...erenceImageStringReferenceimageString.java | 45 - .../deleteproduct/AsyncDeleteProduct.java | 49 - .../deleteproduct/SyncDeleteProduct.java | 46 - .../SyncDeleteProductProductname.java | 42 - .../SyncDeleteProductString.java | 42 - .../AsyncDeleteProductSet.java | 49 - .../SyncDeleteProductSet.java | 46 - .../SyncDeleteProductSetProductsetname.java | 42 - .../SyncDeleteProductSetString.java | 42 - .../AsyncDeleteReferenceImage.java | 52 - .../SyncDeleteReferenceImage.java | 48 - ...eleteReferenceImageReferenceimagename.java | 43 - .../SyncDeleteReferenceImageString.java | 44 - .../getproduct/AsyncGetProduct.java | 49 - .../getproduct/SyncGetProduct.java | 46 - .../getproduct/SyncGetProductProductname.java | 42 - .../getproduct/SyncGetProductString.java | 42 - .../getproductset/AsyncGetProductSet.java | 50 - .../getproductset/SyncGetProductSet.java | 46 - .../SyncGetProductSetProductsetname.java | 42 - .../SyncGetProductSetString.java | 42 - .../AsyncGetReferenceImage.java | 52 - .../SyncGetReferenceImage.java | 48 - ...ncGetReferenceImageReferenceimagename.java | 43 - .../SyncGetReferenceImageString.java | 44 - .../AsyncImportProductSets.java | 52 - .../AsyncImportProductSetsLRO.java | 53 - .../SyncImportProductSets.java | 49 - ...ationnameImportproductsetsinputconfig.java | 46 - ...etsStringImportproductsetsinputconfig.java | 45 - .../listproducts/AsyncListProducts.java | 54 - .../listproducts/AsyncListProductsPaged.java | 61 - .../listproducts/SyncListProducts.java | 50 - .../SyncListProductsLocationname.java | 44 - .../listproducts/SyncListProductsString.java | 44 - .../listproductsets/AsyncListProductSets.java | 54 - .../AsyncListProductSetsPaged.java | 62 - .../listproductsets/SyncListProductSets.java | 50 - .../SyncListProductSetsLocationname.java | 44 - .../SyncListProductSetsString.java | 44 - .../AsyncListProductsInProductSet.java | 54 - .../AsyncListProductsInProductSetPaged.java | 62 - .../SyncListProductsInProductSet.java | 50 - ...istProductsInProductSetProductsetname.java | 44 - .../SyncListProductsInProductSetString.java | 44 - .../AsyncListReferenceImages.java | 54 - .../AsyncListReferenceImagesPaged.java | 62 - .../SyncListReferenceImages.java | 50 - .../SyncListReferenceImagesProductname.java | 44 - .../SyncListReferenceImagesString.java | 44 - .../purgeproducts/AsyncPurgeProducts.java | 50 - .../purgeproducts/AsyncPurgeProductsLRO.java | 52 - .../purgeproducts/SyncPurgeProducts.java | 47 - .../SyncPurgeProductsLocationname.java | 42 - .../SyncPurgeProductsString.java | 42 - .../AsyncRemoveProductFromProductSet.java | 52 - .../SyncRemoveProductFromProductSet.java | 48 - ...omProductSetProductsetnameProductname.java | 44 - ...uctFromProductSetProductsetnameString.java | 44 - ...roductFromProductSetStringProductname.java | 44 - ...moveProductFromProductSetStringString.java | 44 - .../updateproduct/AsyncUpdateProduct.java | 50 - .../updateproduct/SyncUpdateProduct.java | 47 - .../SyncUpdateProductProductFieldmask.java | 43 - .../AsyncUpdateProductSet.java | 51 - .../SyncUpdateProductSet.java | 47 - ...ncUpdateProductSetProductsetFieldmask.java | 43 - .../SyncCreateProductSet.java | 45 - .../SyncBatchAnnotateImages.java | 49 - .../SyncCreateProductSet.java | 46 - 1570 files changed, 4185 insertions(+), 551283 deletions(-) delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto delete mode 100644 owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java delete mode 100644 owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java diff --git a/java-vision/README.md b/java-vision/README.md index a18aa250db9f..979513680ec9 100644 --- a/java-vision/README.md +++ b/java-vision/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.0.0 + 26.1.1 pom import @@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.0') +implementation platform('com.google.cloud:libraries-bom:26.1.1') implementation 'com.google.cloud:google-cloud-vision' ``` diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java index d3cf2a5f5e69..e4052e59e0cc 100644 --- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java +++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java @@ -40,8 +40,11 @@ * calls that map to API methods. Sample code to get started: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -77,8 +80,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -89,8 +95,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -100,8 +109,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -194,8 +206,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -219,8 +234,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -245,8 +263,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -277,8 +298,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
@@ -307,8 +331,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(ListSample code:
    *
    * 
{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateFilesRequest request =
    *       BatchAnnotateFilesRequest.newBuilder()
@@ -338,8 +365,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateFilesRequest request =
    *       BatchAnnotateFilesRequest.newBuilder()
@@ -372,8 +402,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
@@ -411,8 +444,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -447,8 +483,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -483,8 +522,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -515,8 +557,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   AsyncBatchAnnotateFilesResponse response =
@@ -545,8 +590,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -577,8 +625,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -609,8 +660,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java
index e70991ac91c5..e2e2d3208012 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java
@@ -52,8 +52,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
index 2eb7f81a87a9..07e14db991a5 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
@@ -61,8 +61,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -100,8 +103,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -112,8 +118,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
@@ -123,8 +132,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -223,8 +235,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -266,8 +281,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -309,8 +327,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -342,8 +363,11 @@ public final ProductSet createProductSet(CreateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -375,8 +399,11 @@ public final UnaryCallable createProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -410,8 +437,11 @@ public final ListProductSetsPagedResponse listProductSets(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -442,8 +472,11 @@ public final ListProductSetsPagedResponse listProductSets(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -477,8 +510,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -513,8 +549,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -556,8 +595,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -587,8 +629,11 @@ public final ProductSet getProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -617,8 +662,11 @@ public final ProductSet getProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -648,8 +696,11 @@ public final ProductSet getProductSet(GetProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -681,8 +732,11 @@ public final UnaryCallable getProductSetCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSet productSet = ProductSet.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -720,8 +774,11 @@ public final ProductSet updateProductSet(ProductSet productSet, FieldMask update
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -754,8 +811,11 @@ public final ProductSet updateProductSet(UpdateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -783,8 +843,11 @@ public final UnaryCallable updateProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   productSearchClient.deleteProductSet(name);
@@ -811,8 +874,11 @@ public final void deleteProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   productSearchClient.deleteProductSet(name);
@@ -838,8 +904,11 @@ public final void deleteProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -866,8 +935,11 @@ public final void deleteProductSet(DeleteProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -898,8 +970,11 @@ public final UnaryCallable deleteProductSetCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   Product product = Product.newBuilder().build();
@@ -942,8 +1017,11 @@ public final Product createProduct(LocationName parent, Product product, String
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   Product product = Product.newBuilder().build();
@@ -986,8 +1064,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1021,8 +1102,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1053,8 +1137,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1088,8 +1175,11 @@ public final ListProductsPagedResponse listProducts(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1120,8 +1210,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1155,8 +1248,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1191,8 +1287,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1232,8 +1331,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   Product response = productSearchClient.getProduct(name);
@@ -1263,8 +1365,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   Product response = productSearchClient.getProduct(name);
@@ -1293,8 +1398,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1324,8 +1432,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1363,8 +1474,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1407,8 +1521,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1448,8 +1565,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1477,8 +1597,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   productSearchClient.deleteProduct(name);
@@ -1506,8 +1629,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   productSearchClient.deleteProduct(name);
@@ -1534,8 +1660,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1563,8 +1692,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1605,8 +1737,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1662,8 +1797,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1719,8 +1857,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1764,8 +1905,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1797,8 +1941,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -1831,8 +1978,11 @@ public final void deleteReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -1864,8 +2014,11 @@ public final void deleteReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -1896,8 +2049,11 @@ public final void deleteReferenceImage(DeleteReferenceImageRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -1930,8 +2086,11 @@ public final UnaryCallable deleteReferenceIm
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -1966,8 +2125,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(ProductName pa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -2000,8 +2162,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(String parent)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2037,8 +2202,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2074,8 +2242,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2117,8 +2288,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -2152,8 +2326,11 @@ public final ReferenceImage getReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -2185,8 +2362,11 @@ public final ReferenceImage getReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2218,8 +2398,11 @@ public final ReferenceImage getReferenceImage(GetReferenceImageRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2254,8 +2437,11 @@ public final UnaryCallable getReferenc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2294,8 +2480,11 @@ public final void addProductToProductSet(ProductSetName name, ProductName produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2334,8 +2523,11 @@ public final void addProductToProductSet(ProductSetName name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2374,8 +2566,11 @@ public final void addProductToProductSet(String name, ProductName product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2411,8 +2606,11 @@ public final void addProductToProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2446,8 +2644,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2473,8 +2674,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2504,8 +2708,11 @@ public final void removeProductFromProductSet(ProductSetName name, ProductName p
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2535,8 +2742,11 @@ public final void removeProductFromProductSet(ProductSetName name, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2566,8 +2776,11 @@ public final void removeProductFromProductSet(String name, ProductName product)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2594,8 +2807,11 @@ public final void removeProductFromProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2620,8 +2836,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2654,8 +2873,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2690,8 +2912,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Prod
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2724,8 +2949,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Stri
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2761,8 +2989,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2798,8 +3029,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2845,8 +3079,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -2887,8 +3124,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -2926,8 +3166,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -2964,8 +3207,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3002,8 +3248,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3049,8 +3298,11 @@ public final UnaryCallable importProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   productSearchClient.purgeProductsAsync(parent).get();
@@ -3098,8 +3350,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   productSearchClient.purgeProductsAsync(parent).get();
@@ -3143,8 +3398,11 @@ public final OperationFuture purgeProductsAsync(S
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -3191,8 +3449,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -3239,8 +3500,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java
index 948e34eb5ef7..d1d12f60c96c 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java
@@ -59,16 +59,16 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java
index 01b562ec0919..4604adec721f 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java
@@ -28,8 +28,11 @@
  * 

Sample for ImageAnnotatorClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -57,8 +60,11 @@
  * 

Sample for ProductSearchClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java
index c07ae59b7f2d..bf2bf264d926 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java
@@ -96,7 +96,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -135,7 +135,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -174,7 +174,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -216,7 +216,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java
index b5b127dfe814..a5ad37392daf 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java
@@ -120,7 +120,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -226,7 +226,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -295,7 +295,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -399,7 +400,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -470,7 +472,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("referenceImage", request.getReferenceImage()))
+                                  .toBody("referenceImage", request.getReferenceImage(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -607,7 +609,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -643,7 +645,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -716,7 +718,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -755,7 +757,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java
index 8daa7c798054..86400478a0a2 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java
@@ -75,8 +75,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorStubSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java
index 7c1b0a74254e..c5399f28adf5 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java
@@ -107,17 +107,17 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
  *     ProductSearchStubSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java
index 8d16fb8402d5..9b220983e950 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java
@@ -36,8 +36,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -73,8 +76,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -85,8 +91,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -96,8 +105,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -166,8 +178,11 @@ public ImageAnnotatorStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -191,8 +206,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -216,8 +234,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java
index 058193a73ad5..5da85f32af54 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java
@@ -50,8 +50,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java
index b77de0aa9e65..9220329c88a8 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for ImageAnnotatorClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java
index 3b2a35511bfd..52cdf9382108 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java
@@ -75,7 +75,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java
index 424d51e6948a..8e99499dccad 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java
@@ -63,8 +63,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorStubSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java
index 10430a6c4dfa..f1e9ad6c2093 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java
@@ -40,8 +40,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -77,8 +80,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -89,8 +95,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -100,8 +109,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -195,8 +207,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -220,8 +235,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -245,8 +263,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -275,8 +296,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   AsyncBatchAnnotateFilesResponse response =
@@ -305,8 +329,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -336,8 +363,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -367,8 +397,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java
index 238b1be077a8..553849807e0a 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java
@@ -52,8 +52,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java
index fdf5c84c7720..f1254f6cdf57 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for ImageAnnotatorClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java
index 3d5e84f5bd3b..7668adce3e86 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java
@@ -86,7 +86,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -121,7 +122,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java
index 485b965c83e2..eab5af0ff930 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java
@@ -71,8 +71,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorStubSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java
index 44a6355ac218..fb9e74cb83a6 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java
@@ -40,8 +40,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -77,8 +80,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -89,8 +95,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -100,8 +109,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -195,8 +207,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -220,8 +235,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -245,8 +263,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -275,8 +296,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   AsyncBatchAnnotateFilesResponse response =
@@ -305,8 +329,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -336,8 +363,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -367,8 +397,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java
index fc248ff6a044..95accabd60a5 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java
@@ -52,8 +52,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java
index 62156f45db84..c12c902cc268 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java
@@ -61,8 +61,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -100,8 +103,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -112,8 +118,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
@@ -123,8 +132,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -224,8 +236,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -267,8 +282,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -310,8 +328,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -343,8 +364,11 @@ public final ProductSet createProductSet(CreateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -376,8 +400,11 @@ public final UnaryCallable createProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -411,8 +438,11 @@ public final ListProductSetsPagedResponse listProductSets(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -443,8 +473,11 @@ public final ListProductSetsPagedResponse listProductSets(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -478,8 +511,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -514,8 +550,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -557,8 +596,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -588,8 +630,11 @@ public final ProductSet getProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -618,8 +663,11 @@ public final ProductSet getProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -649,8 +697,11 @@ public final ProductSet getProductSet(GetProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -682,8 +733,11 @@ public final UnaryCallable getProductSetCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSet productSet = ProductSet.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -721,8 +775,11 @@ public final ProductSet updateProductSet(ProductSet productSet, FieldMask update
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -755,8 +812,11 @@ public final ProductSet updateProductSet(UpdateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -790,8 +850,11 @@ public final UnaryCallable updateProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   productSearchClient.deleteProductSet(name);
@@ -824,8 +887,11 @@ public final void deleteProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   productSearchClient.deleteProductSet(name);
@@ -857,8 +923,11 @@ public final void deleteProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -891,8 +960,11 @@ public final void deleteProductSet(DeleteProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -923,8 +995,11 @@ public final UnaryCallable deleteProductSetCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   Product product = Product.newBuilder().build();
@@ -967,8 +1042,11 @@ public final Product createProduct(LocationName parent, Product product, String
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   Product product = Product.newBuilder().build();
@@ -1011,8 +1089,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1046,8 +1127,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1078,8 +1162,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1113,8 +1200,11 @@ public final ListProductsPagedResponse listProducts(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1145,8 +1235,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1180,8 +1273,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1216,8 +1312,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1257,8 +1356,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   Product response = productSearchClient.getProduct(name);
@@ -1288,8 +1390,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   Product response = productSearchClient.getProduct(name);
@@ -1318,8 +1423,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1349,8 +1457,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1388,8 +1499,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1432,8 +1546,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1473,8 +1590,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1508,8 +1628,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   productSearchClient.deleteProduct(name);
@@ -1543,8 +1666,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   productSearchClient.deleteProduct(name);
@@ -1577,8 +1703,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1612,8 +1741,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1654,8 +1786,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1711,8 +1846,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1768,8 +1906,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1813,8 +1954,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1852,8 +1996,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -1892,8 +2039,11 @@ public final void deleteReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -1931,8 +2081,11 @@ public final void deleteReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -1969,8 +2122,11 @@ public final void deleteReferenceImage(DeleteReferenceImageRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -2003,8 +2159,11 @@ public final UnaryCallable deleteReferenceIm
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -2039,8 +2198,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(ProductName pa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -2073,8 +2235,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(String parent)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2110,8 +2275,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2147,8 +2315,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2190,8 +2361,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -2225,8 +2399,11 @@ public final ReferenceImage getReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -2258,8 +2435,11 @@ public final ReferenceImage getReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2291,8 +2471,11 @@ public final ReferenceImage getReferenceImage(GetReferenceImageRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2327,8 +2510,11 @@ public final UnaryCallable getReferenc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2367,8 +2553,11 @@ public final void addProductToProductSet(ProductSetName name, ProductName produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2407,8 +2596,11 @@ public final void addProductToProductSet(ProductSetName name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2447,8 +2639,11 @@ public final void addProductToProductSet(String name, ProductName product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2484,8 +2679,11 @@ public final void addProductToProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2519,8 +2717,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2552,8 +2753,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2589,8 +2793,11 @@ public final void removeProductFromProductSet(ProductSetName name, ProductName p
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2626,8 +2833,11 @@ public final void removeProductFromProductSet(ProductSetName name, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2663,8 +2873,11 @@ public final void removeProductFromProductSet(String name, ProductName product)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2697,8 +2910,11 @@ public final void removeProductFromProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2729,8 +2945,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2763,8 +2982,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2799,8 +3021,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Prod
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2833,8 +3058,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Stri
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2870,8 +3098,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2907,8 +3138,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2954,8 +3188,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -2996,8 +3233,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -3035,8 +3275,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3073,8 +3316,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3111,8 +3357,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java
index 46e8ae4f7c58..becac393a64b 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java
@@ -59,16 +59,16 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java
index 6d7851c9caba..705b0cc2846c 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for ImageAnnotatorClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -55,8 +58,11 @@
  * 

Sample for ProductSearchClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java
index e75814f71c86..bc731e1f87d7 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java
@@ -86,7 +86,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -121,7 +122,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java
index 2156152ce91a..adf0d2335b2e 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java
@@ -118,7 +118,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -224,7 +224,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -293,7 +293,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -397,7 +398,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -468,7 +470,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("referenceImage", request.getReferenceImage()))
+                                  .toBody("referenceImage", request.getReferenceImage(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -606,7 +608,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -643,7 +645,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -717,7 +719,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java
index 409fa48040c8..27d08b00d327 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java
@@ -71,8 +71,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorStubSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java
index e5ba04f4bfac..485c0939f8e3 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java
@@ -106,17 +106,17 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
  *     ProductSearchStubSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java
index 2f1cabcf5c89..6d53017e3be1 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java
@@ -40,8 +40,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -77,8 +80,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -89,8 +95,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -100,8 +109,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings imageAnnotatorSettings =
  *     ImageAnnotatorSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -195,8 +207,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -220,8 +235,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -245,8 +263,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateImagesRequest request =
    *       BatchAnnotateImagesRequest.newBuilder()
@@ -276,8 +297,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
@@ -306,8 +330,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(ListSample code:
    *
    * 
{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateFilesRequest request =
    *       BatchAnnotateFilesRequest.newBuilder()
@@ -336,8 +363,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   BatchAnnotateFilesRequest request =
    *       BatchAnnotateFilesRequest.newBuilder()
@@ -369,8 +399,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
@@ -408,8 +441,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -443,8 +479,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -478,8 +517,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateImagesRequest request =
    *       AsyncBatchAnnotateImagesRequest.newBuilder()
@@ -509,8 +551,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   List requests = new ArrayList<>();
    *   AsyncBatchAnnotateFilesResponse response =
@@ -539,8 +584,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -570,8 +618,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
@@ -601,8 +652,11 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
    *   AsyncBatchAnnotateFilesRequest request =
    *       AsyncBatchAnnotateFilesRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java
index 02757a739afb..acaf411358b1 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java
@@ -52,8 +52,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java
index f4ee7d0caefe..9cca0b4648b3 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java
@@ -61,8 +61,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -100,8 +103,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -112,8 +118,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
@@ -123,8 +132,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings productSearchSettings =
  *     ProductSearchSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -224,8 +236,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -267,8 +282,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ProductSet productSet = ProductSet.newBuilder().build();
@@ -310,8 +328,11 @@ public final ProductSet createProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -343,8 +364,11 @@ public final ProductSet createProductSet(CreateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductSetRequest request =
    *       CreateProductSetRequest.newBuilder()
@@ -376,8 +400,11 @@ public final UnaryCallable createProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -411,8 +438,11 @@ public final ListProductSetsPagedResponse listProductSets(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
@@ -443,8 +473,11 @@ public final ListProductSetsPagedResponse listProductSets(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -478,8 +511,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -514,8 +550,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductSetsRequest request =
    *       ListProductSetsRequest.newBuilder()
@@ -557,8 +596,11 @@ public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -588,8 +630,11 @@ public final ProductSet getProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductSet response = productSearchClient.getProductSet(name);
@@ -618,8 +663,11 @@ public final ProductSet getProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -649,8 +697,11 @@ public final ProductSet getProductSet(GetProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductSetRequest request =
    *       GetProductSetRequest.newBuilder()
@@ -682,8 +733,11 @@ public final UnaryCallable getProductSetCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSet productSet = ProductSet.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -721,8 +775,11 @@ public final ProductSet updateProductSet(ProductSet productSet, FieldMask update
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -755,8 +812,11 @@ public final ProductSet updateProductSet(UpdateProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductSetRequest request =
    *       UpdateProductSetRequest.newBuilder()
@@ -784,8 +844,11 @@ public final UnaryCallable updateProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   productSearchClient.deleteProductSet(name);
@@ -812,8 +875,11 @@ public final void deleteProductSet(ProductSetName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   productSearchClient.deleteProductSet(name);
@@ -839,8 +905,11 @@ public final void deleteProductSet(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -867,8 +936,11 @@ public final void deleteProductSet(DeleteProductSetRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductSetRequest request =
    *       DeleteProductSetRequest.newBuilder()
@@ -899,8 +971,11 @@ public final UnaryCallable deleteProductSetCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   Product product = Product.newBuilder().build();
@@ -943,8 +1018,11 @@ public final Product createProduct(LocationName parent, Product product, String
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   Product product = Product.newBuilder().build();
@@ -987,8 +1065,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1022,8 +1103,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -1054,8 +1138,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1089,8 +1176,11 @@ public final ListProductsPagedResponse listProducts(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
@@ -1121,8 +1211,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1156,8 +1249,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1192,8 +1288,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -1233,8 +1332,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   Product response = productSearchClient.getProduct(name);
@@ -1264,8 +1366,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   Product response = productSearchClient.getProduct(name);
@@ -1294,8 +1399,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1325,8 +1433,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -1364,8 +1475,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1408,8 +1522,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1449,8 +1566,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -1478,8 +1598,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   productSearchClient.deleteProduct(name);
@@ -1507,8 +1630,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   productSearchClient.deleteProduct(name);
@@ -1535,8 +1661,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1564,8 +1693,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -1606,8 +1738,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1663,8 +1798,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
@@ -1720,8 +1858,11 @@ public final ReferenceImage createReferenceImage(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1765,8 +1906,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   CreateReferenceImageRequest request =
    *       CreateReferenceImageRequest.newBuilder()
@@ -1798,8 +1942,11 @@ public final ReferenceImage createReferenceImage(CreateReferenceImageRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -1832,8 +1979,11 @@ public final void deleteReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -1865,8 +2015,11 @@ public final void deleteReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -1897,8 +2050,11 @@ public final void deleteReferenceImage(DeleteReferenceImageRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   DeleteReferenceImageRequest request =
    *       DeleteReferenceImageRequest.newBuilder()
@@ -1931,8 +2087,11 @@ public final UnaryCallable deleteReferenceIm
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -1967,8 +2126,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(ProductName pa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
    *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
@@ -2001,8 +2163,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(String parent)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2038,8 +2203,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2075,8 +2243,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListReferenceImagesRequest request =
    *       ListReferenceImagesRequest.newBuilder()
@@ -2118,8 +2289,11 @@ public final ListReferenceImagesPagedResponse listReferenceImages(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ReferenceImageName name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
@@ -2153,8 +2327,11 @@ public final ReferenceImage getReferenceImage(ReferenceImageName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name =
    *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
@@ -2186,8 +2363,11 @@ public final ReferenceImage getReferenceImage(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2219,8 +2399,11 @@ public final ReferenceImage getReferenceImage(GetReferenceImageRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   GetReferenceImageRequest request =
    *       GetReferenceImageRequest.newBuilder()
@@ -2255,8 +2438,11 @@ public final UnaryCallable getReferenc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2295,8 +2481,11 @@ public final void addProductToProductSet(ProductSetName name, ProductName produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2335,8 +2524,11 @@ public final void addProductToProductSet(ProductSetName name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2375,8 +2567,11 @@ public final void addProductToProductSet(String name, ProductName product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2412,8 +2607,11 @@ public final void addProductToProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2447,8 +2645,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   AddProductToProductSetRequest request =
    *       AddProductToProductSetRequest.newBuilder()
@@ -2474,8 +2675,11 @@ public final void addProductToProductSet(AddProductToProductSetRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2505,8 +2709,11 @@ public final void removeProductFromProductSet(ProductSetName name, ProductName p
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2536,8 +2743,11 @@ public final void removeProductFromProductSet(ProductSetName name, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
@@ -2567,8 +2777,11 @@ public final void removeProductFromProductSet(String name, ProductName product)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
@@ -2595,8 +2808,11 @@ public final void removeProductFromProductSet(String name, String product) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2621,8 +2837,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   RemoveProductFromProductSetRequest request =
    *       RemoveProductFromProductSetRequest.newBuilder()
@@ -2655,8 +2874,11 @@ public final void removeProductFromProductSet(RemoveProductFromProductSetRequest
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2691,8 +2913,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Prod
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
    *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
@@ -2725,8 +2950,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(Stri
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2762,8 +2990,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2799,8 +3030,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ListProductsInProductSetRequest request =
    *       ListProductsInProductSetRequest.newBuilder()
@@ -2846,8 +3080,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -2888,8 +3125,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
@@ -2927,8 +3167,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -2965,8 +3208,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3003,8 +3249,11 @@ public final ListProductsInProductSetPagedResponse listProductsInProductSet(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   ImportProductSetsRequest request =
    *       ImportProductSetsRequest.newBuilder()
@@ -3050,8 +3299,11 @@ public final UnaryCallable importProductSet
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   productSearchClient.purgeProductsAsync(parent).get();
@@ -3099,8 +3351,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   productSearchClient.purgeProductsAsync(parent).get();
@@ -3144,8 +3399,11 @@ public final OperationFuture purgeProductsAsync(S
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -3192,8 +3450,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -3240,8 +3501,11 @@ public final OperationFuture purgeProductsAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java
index 24833d6b69b6..1f1009f01994 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java
@@ -59,16 +59,16 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java
index a9710a4978cc..9f00d3089dce 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for ImageAnnotatorClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
  *   List requests = new ArrayList<>();
  *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -55,8 +58,11 @@
  * 

Sample for ProductSearchClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
  *   ProductSet productSet = ProductSet.newBuilder().build();
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java
index 2338450666d4..c5fb8b77362f 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java
@@ -91,7 +91,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -125,7 +126,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -160,7 +162,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -198,7 +201,8 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java
index 91d9edfc0e34..14419fea91fd 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java
@@ -120,7 +120,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -226,7 +226,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("productSet", request.getProductSet()))
+                                  .toBody("productSet", request.getProductSet(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -295,7 +295,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -399,7 +400,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -470,7 +472,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("referenceImage", request.getReferenceImage()))
+                                  .toBody("referenceImage", request.getReferenceImage(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -608,7 +610,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -645,7 +647,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearName().build()))
+                                  .toBody("*", request.toBuilder().clearName().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -719,7 +721,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -758,7 +760,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java
index d604bd13b1ac..c8094c685383 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java
@@ -75,8 +75,11 @@
  * 

For example, to set the total timeout of batchAnnotateImages to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
  *     ImageAnnotatorStubSettings.newBuilder();
  * imageAnnotatorSettingsBuilder
diff --git a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java
index ecb4054b1030..b890b18e0009 100644
--- a/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java
+++ b/java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java
@@ -107,17 +107,17 @@
  * 

For example, to set the total timeout of createProductSet to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
  *     ProductSearchStubSettings.newBuilder();
  * productSearchSettingsBuilder
  *     .createProductSetSettings()
  *     .setRetrySettings(
- *         productSearchSettingsBuilder
- *             .createProductSetSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
diff --git a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java
index 0cc086d8fa8e..35837ecf52a6 100644
--- a/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java
+++ b/java-vision/google-cloud-vision/src/test/java/com/google/cloud/vision/it/ITSystemTest.java
@@ -99,7 +99,7 @@ public class ITSystemTest {
   private static final String ID = UUID.randomUUID().toString().substring(0, 8);
   // GraalVM native-image test uses the project root as working directory, not google-cloud-vision
   private static final String RESOURCES =
-      Files.exists(Paths.get("java-vision","google-cloud-vision", "src", "test", "resources"))
+      Files.exists(Paths.get("java-vision", "google-cloud-vision", "src", "test", "resources"))
           ? "java-vision/google-cloud-vision/src/test/resources/"
           : "src/test/resources/";
 
diff --git a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java
index d699fcc13405..720445e62f21 100644
--- a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java
+++ b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java
@@ -378,7 +378,7 @@ public float getScore() {
    * float confidence = 5 [deprecated = true];
    *
    * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See
-   *     google/cloud/vision/v1/image_annotator.proto;l=505
+   *     google/cloud/vision/v1/image_annotator.proto;l=506
    * @return The confidence.
    */
   @java.lang.Override
@@ -1559,7 +1559,7 @@ public Builder clearScore() {
      * float confidence = 5 [deprecated = true];
      *
      * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See
-     *     google/cloud/vision/v1/image_annotator.proto;l=505
+     *     google/cloud/vision/v1/image_annotator.proto;l=506
      * @return The confidence.
      */
     @java.lang.Override
@@ -1581,7 +1581,7 @@ public float getConfidence() {
      * float confidence = 5 [deprecated = true];
      *
      * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See
-     *     google/cloud/vision/v1/image_annotator.proto;l=505
+     *     google/cloud/vision/v1/image_annotator.proto;l=506
      * @param value The confidence to set.
      * @return This builder for chaining.
      */
@@ -1606,7 +1606,7 @@ public Builder setConfidence(float value) {
      * float confidence = 5 [deprecated = true];
      *
      * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See
-     *     google/cloud/vision/v1/image_annotator.proto;l=505
+     *     google/cloud/vision/v1/image_annotator.proto;l=506
      * @return This builder for chaining.
      */
     @java.lang.Deprecated
diff --git a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java
index 979005b274dd..4031257d8888 100644
--- a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java
+++ b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java
@@ -131,7 +131,7 @@ public interface EntityAnnotationOrBuilder
    * float confidence = 5 [deprecated = true];
    *
    * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. See
-   *     google/cloud/vision/v1/image_annotator.proto;l=505
+   *     google/cloud/vision/v1/image_annotator.proto;l=506
    * @return The confidence.
    */
   @java.lang.Deprecated
diff --git a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java
index 18d6f3fc7ed1..8a4058fa9b3b 100644
--- a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java
+++ b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java
@@ -578,7 +578,8 @@ public int getMaxResults() {
    * 
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -603,7 +604,8 @@ public java.lang.String getModel() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -1121,7 +1123,8 @@ public Builder clearMaxResults() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1145,7 +1148,8 @@ public java.lang.String getModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1169,7 +1173,8 @@ public com.google.protobuf.ByteString getModelBytes() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1192,7 +1197,8 @@ public Builder setModel(java.lang.String value) { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1211,7 +1217,8 @@ public Builder clearModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java index 3bea82449184..ee1b7f90f06a 100644 --- a/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java +++ b/java-vision/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java @@ -68,7 +68,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -82,7 +83,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto b/java-vision/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto index 10464b0e0d83..6fed6112bec7 100644 --- a/java-vision/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto +++ b/java-vision/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto @@ -223,7 +223,8 @@ message Feature { // Model to use for the feature. // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. string model = 3; } diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java index 85d7d9ec4c82..94c38c3f73f8 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java @@ -526,7 +526,8 @@ public int getMaxResults() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -551,7 +552,8 @@ public java.lang.String getModel() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -1070,7 +1072,8 @@ public Builder clearMaxResults() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1094,7 +1097,8 @@ public java.lang.String getModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1118,7 +1122,8 @@ public com.google.protobuf.ByteString getModelBytes() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1141,7 +1146,8 @@ public Builder setModel(java.lang.String value) { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1160,7 +1166,8 @@ public Builder clearModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java index 27b501642b70..f708c53ea227 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java @@ -67,7 +67,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -81,7 +82,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java index 7e36fe84ee15..cace968cd62b 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java @@ -74,63 +74,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/vision/v1p1beta1/text_ann" + "otation.proto\022\035google.cloud.vision.v1p1b" - + "eta1\032\034google/api/annotations.proto\032,goog" - + "le/cloud/vision/v1p1beta1/geometry.proto" - + "\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001 \003(\0132#.goo" - + "gle.cloud.vision.v1p1beta1.Page\022\014\n\004text\030" - + "\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_co" - + "de\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334\001\n\rDetecte" - + "dBreak\022S\n\004type\030\001 \001(\0162E.google.cloud.visi" - + "on.v1p1beta1.TextAnnotation.DetectedBrea" - + "k.BreakType\022\021\n\tis_prefix\030\002 \001(\010\"c\n\tBreakT" - + "ype\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n\nSURE_SPAC" - + "E\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYPHEN\020\004\022\016\n\nL" - + "INE_BREAK\020\005\032\277\001\n\014TextProperty\022Z\n\022detected" - + "_languages\030\001 \003(\0132>.google.cloud.vision.v" - + "1p1beta1.TextAnnotation.DetectedLanguage" - + "\022S\n\016detected_break\030\002 \001(\0132;.google.cloud." - + "vision.v1p1beta1.TextAnnotation.Detected" - + "Break\"\275\001\n\004Page\022L\n\010property\030\001 \001(\0132:.googl" - + "e.cloud.vision.v1p1beta1.TextAnnotation." - + "TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 " - + "\001(\005\0224\n\006blocks\030\004 \003(\0132$.google.cloud.visio" - + "n.v1p1beta1.Block\022\022\n\nconfidence\030\005 \001(\002\"\202\003" - + "\n\005Block\022L\n\010property\030\001 \001(\0132:.google.cloud" - + ".vision.v1p1beta1.TextAnnotation.TextPro" - + "perty\022A\n\014bounding_box\030\002 \001(\0132+.google.clo" - + "ud.vision.v1p1beta1.BoundingPoly\022<\n\npara" - + "graphs\030\003 \003(\0132(.google.cloud.vision.v1p1b" - + "eta1.Paragraph\022B\n\nblock_type\030\004 \001(\0162..goo" - + "gle.cloud.vision.v1p1beta1.Block.BlockTy" - + "pe\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007U" - + "NKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE" - + "\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n\tParagraph" - + "\022L\n\010property\030\001 \001(\0132:.google.cloud.vision" - + ".v1p1beta1.TextAnnotation.TextProperty\022A" - + "\n\014bounding_box\030\002 \001(\0132+.google.cloud.visi" - + "on.v1p1beta1.BoundingPoly\0222\n\005words\030\003 \003(\013" - + "2#.google.cloud.vision.v1p1beta1.Word\022\022\n" - + "\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010property\030\001" - + " \001(\0132:.google.cloud.vision.v1p1beta1.Tex" - + "tAnnotation.TextProperty\022A\n\014bounding_box" - + "\030\002 \001(\0132+.google.cloud.vision.v1p1beta1.B" - + "oundingPoly\0226\n\007symbols\030\003 \003(\0132%.google.cl" - + "oud.vision.v1p1beta1.Symbol\022\022\n\nconfidenc" - + "e\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property\030\001 \001(\0132:.g" - + "oogle.cloud.vision.v1p1beta1.TextAnnotat" - + "ion.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+" - + ".google.cloud.vision.v1p1beta1.BoundingP" - + "oly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002B\202\001" - + "\n!com.google.cloud.vision.v1p1beta1B\023Tex" - + "tAnnotationProtoP\001ZCgoogle.golang.org/ge" - + "nproto/googleapis/cloud/vision/v1p1beta1" - + ";vision\370\001\001b\006proto3" + + "eta1\032,google/cloud/vision/v1p1beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p1beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p1beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p1beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p1beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p1beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p1beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p1beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p1beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p1beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p1beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p1beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p1beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p1bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "1beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p1beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p1beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p1beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p1beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p1" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p1beta1;vision\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(), }); internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor = @@ -211,7 +209,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(); } diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java index 359b058c0deb..54784683e98f 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java @@ -58,41 +58,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/vision/v1p1beta1/web_dete" + "ction.proto\022\035google.cloud.vision.v1p1bet" - + "a1\032\034google/api/annotations.proto\"\214\007\n\014Web" - + "Detection\022K\n\014web_entities\030\001 \003(\01325.google" - + ".cloud.vision.v1p1beta1.WebDetection.Web" - + "Entity\022R\n\024full_matching_images\030\002 \003(\01324.g" - + "oogle.cloud.vision.v1p1beta1.WebDetectio" - + "n.WebImage\022U\n\027partial_matching_images\030\003 " - + "\003(\01324.google.cloud.vision.v1p1beta1.WebD" - + "etection.WebImage\022W\n\032pages_with_matching" - + "_images\030\004 \003(\01323.google.cloud.vision.v1p1" - + "beta1.WebDetection.WebPage\022U\n\027visually_s" - + "imilar_images\030\006 \003(\01324.google.cloud.visio" - + "n.v1p1beta1.WebDetection.WebImage\022O\n\021bes" - + "t_guess_labels\030\010 \003(\01324.google.cloud.visi" - + "on.v1p1beta1.WebDetection.WebLabel\032B\n\tWe" - + "bEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(" - + "\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebImage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007WebPage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001" - + "(\t\022R\n\024full_matching_images\030\004 \003(\01324.googl" - + "e.cloud.vision.v1p1beta1.WebDetection.We" - + "bImage\022U\n\027partial_matching_images\030\005 \003(\0132" - + "4.google.cloud.vision.v1p1beta1.WebDetec" - + "tion.WebImage\0320\n\010WebLabel\022\r\n\005label\030\001 \001(\t" - + "\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!com.google.c" - + "loud.vision.v1p1beta1B\021WebDetectionProto" - + "P\001ZCgoogle.golang.org/genproto/googleapi" - + "s/cloud/vision/v1p1beta1;vision\370\001\001b\006prot" - + "o3" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p1beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p1beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p1" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p1beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p1beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p1beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p1beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p1beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p1beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p1beta1;visio" + + "n\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable = @@ -146,7 +142,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Label", "LanguageCode", }); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto index 729a0fa08e6b..f66ad504fca9 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto @@ -103,7 +103,8 @@ message Feature { // Model to use for the feature. // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. string model = 3; } diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto index 928e6e88bb07..f85cc44dfd59 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p1beta1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1p1beta1/geometry.proto"; option cc_enable_arenas = true; diff --git a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto index 28249cbdec22..c50e1ad62cc8 100644 --- a/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto +++ b/java-vision/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p1beta1; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java index 9b70f5a74983..c5b17829be55 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java @@ -534,7 +534,8 @@ public int getMaxResults() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -559,7 +560,8 @@ public java.lang.String getModel() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -1080,7 +1082,8 @@ public Builder clearMaxResults() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1104,7 +1107,8 @@ public java.lang.String getModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1128,7 +1132,8 @@ public com.google.protobuf.ByteString getModelBytes() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1151,7 +1156,8 @@ public Builder setModel(java.lang.String value) { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1170,7 +1176,8 @@ public Builder clearModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java index 0eed6b0ec5ac..71748e0b915b 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java @@ -68,7 +68,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -82,7 +83,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java index 8358e73f7497..4b441b8828f1 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java @@ -74,63 +74,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/vision/v1p2beta1/text_ann" + "otation.proto\022\035google.cloud.vision.v1p2b" - + "eta1\032\034google/api/annotations.proto\032,goog" - + "le/cloud/vision/v1p2beta1/geometry.proto" - + "\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001 \003(\0132#.goo" - + "gle.cloud.vision.v1p2beta1.Page\022\014\n\004text\030" - + "\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_co" - + "de\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334\001\n\rDetecte" - + "dBreak\022S\n\004type\030\001 \001(\0162E.google.cloud.visi" - + "on.v1p2beta1.TextAnnotation.DetectedBrea" - + "k.BreakType\022\021\n\tis_prefix\030\002 \001(\010\"c\n\tBreakT" - + "ype\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n\nSURE_SPAC" - + "E\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYPHEN\020\004\022\016\n\nL" - + "INE_BREAK\020\005\032\277\001\n\014TextProperty\022Z\n\022detected" - + "_languages\030\001 \003(\0132>.google.cloud.vision.v" - + "1p2beta1.TextAnnotation.DetectedLanguage" - + "\022S\n\016detected_break\030\002 \001(\0132;.google.cloud." - + "vision.v1p2beta1.TextAnnotation.Detected" - + "Break\"\275\001\n\004Page\022L\n\010property\030\001 \001(\0132:.googl" - + "e.cloud.vision.v1p2beta1.TextAnnotation." - + "TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 " - + "\001(\005\0224\n\006blocks\030\004 \003(\0132$.google.cloud.visio" - + "n.v1p2beta1.Block\022\022\n\nconfidence\030\005 \001(\002\"\202\003" - + "\n\005Block\022L\n\010property\030\001 \001(\0132:.google.cloud" - + ".vision.v1p2beta1.TextAnnotation.TextPro" - + "perty\022A\n\014bounding_box\030\002 \001(\0132+.google.clo" - + "ud.vision.v1p2beta1.BoundingPoly\022<\n\npara" - + "graphs\030\003 \003(\0132(.google.cloud.vision.v1p2b" - + "eta1.Paragraph\022B\n\nblock_type\030\004 \001(\0162..goo" - + "gle.cloud.vision.v1p2beta1.Block.BlockTy" - + "pe\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007U" - + "NKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE" - + "\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n\tParagraph" - + "\022L\n\010property\030\001 \001(\0132:.google.cloud.vision" - + ".v1p2beta1.TextAnnotation.TextProperty\022A" - + "\n\014bounding_box\030\002 \001(\0132+.google.cloud.visi" - + "on.v1p2beta1.BoundingPoly\0222\n\005words\030\003 \003(\013" - + "2#.google.cloud.vision.v1p2beta1.Word\022\022\n" - + "\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010property\030\001" - + " \001(\0132:.google.cloud.vision.v1p2beta1.Tex" - + "tAnnotation.TextProperty\022A\n\014bounding_box" - + "\030\002 \001(\0132+.google.cloud.vision.v1p2beta1.B" - + "oundingPoly\0226\n\007symbols\030\003 \003(\0132%.google.cl" - + "oud.vision.v1p2beta1.Symbol\022\022\n\nconfidenc" - + "e\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property\030\001 \001(\0132:.g" - + "oogle.cloud.vision.v1p2beta1.TextAnnotat" - + "ion.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+" - + ".google.cloud.vision.v1p2beta1.BoundingP" - + "oly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002B\202\001" - + "\n!com.google.cloud.vision.v1p2beta1B\023Tex" - + "tAnnotationProtoP\001ZCgoogle.golang.org/ge" - + "nproto/googleapis/cloud/vision/v1p2beta1" - + ";vision\370\001\001b\006proto3" + + "eta1\032,google/cloud/vision/v1p2beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p2beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p2beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p2beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p2beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p2beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p2beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p2beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p2beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p2beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p2beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p2beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p2beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p2bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "2beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p2beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p2beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p2beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p2beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p2" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p2beta1;vision\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(), }); internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor = @@ -211,7 +209,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(); } diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java index e45a62d88e0a..1c939d37fd39 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java @@ -58,41 +58,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/vision/v1p2beta1/web_dete" + "ction.proto\022\035google.cloud.vision.v1p2bet" - + "a1\032\034google/api/annotations.proto\"\214\007\n\014Web" - + "Detection\022K\n\014web_entities\030\001 \003(\01325.google" - + ".cloud.vision.v1p2beta1.WebDetection.Web" - + "Entity\022R\n\024full_matching_images\030\002 \003(\01324.g" - + "oogle.cloud.vision.v1p2beta1.WebDetectio" - + "n.WebImage\022U\n\027partial_matching_images\030\003 " - + "\003(\01324.google.cloud.vision.v1p2beta1.WebD" - + "etection.WebImage\022W\n\032pages_with_matching" - + "_images\030\004 \003(\01323.google.cloud.vision.v1p2" - + "beta1.WebDetection.WebPage\022U\n\027visually_s" - + "imilar_images\030\006 \003(\01324.google.cloud.visio" - + "n.v1p2beta1.WebDetection.WebImage\022O\n\021bes" - + "t_guess_labels\030\010 \003(\01324.google.cloud.visi" - + "on.v1p2beta1.WebDetection.WebLabel\032B\n\tWe" - + "bEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(" - + "\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebImage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007WebPage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001" - + "(\t\022R\n\024full_matching_images\030\004 \003(\01324.googl" - + "e.cloud.vision.v1p2beta1.WebDetection.We" - + "bImage\022U\n\027partial_matching_images\030\005 \003(\0132" - + "4.google.cloud.vision.v1p2beta1.WebDetec" - + "tion.WebImage\0320\n\010WebLabel\022\r\n\005label\030\001 \001(\t" - + "\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!com.google.c" - + "loud.vision.v1p2beta1B\021WebDetectionProto" - + "P\001ZCgoogle.golang.org/genproto/googleapi" - + "s/cloud/vision/v1p2beta1;vision\370\001\001b\006prot" - + "o3" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p2beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p2beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p2" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p2beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p2beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p2beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p2beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p2beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p2beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p2beta1;visio" + + "n\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable = @@ -146,7 +142,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Label", "LanguageCode", }); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto index 5fc3163c75d6..264462d48438 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto @@ -126,7 +126,8 @@ message Feature { // Model to use for the feature. // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. string model = 3; } diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto index b35eb47e8e45..af568194aa8d 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p2beta1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1p2beta1/geometry.proto"; option cc_enable_arenas = true; diff --git a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto index f2b9dfef00dc..2decb8596ef2 100644 --- a/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto +++ b/java-vision/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p2beta1; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java index bdd7408b0beb..919d397b89f7 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java @@ -578,7 +578,8 @@ public int getMaxResults() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -603,7 +604,8 @@ public java.lang.String getModel() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -1124,7 +1126,8 @@ public Builder clearMaxResults() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1148,7 +1151,8 @@ public java.lang.String getModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1172,7 +1176,8 @@ public com.google.protobuf.ByteString getModelBytes() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1195,7 +1200,8 @@ public Builder setModel(java.lang.String value) { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1214,7 +1220,8 @@ public Builder clearModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java index 47fdca977086..42976996936a 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java @@ -68,7 +68,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -82,7 +83,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java index 91d00243af18..878ecb4e4152 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java @@ -74,63 +74,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/vision/v1p3beta1/text_ann" + "otation.proto\022\035google.cloud.vision.v1p3b" - + "eta1\032\034google/api/annotations.proto\032,goog" - + "le/cloud/vision/v1p3beta1/geometry.proto" - + "\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001 \003(\0132#.goo" - + "gle.cloud.vision.v1p3beta1.Page\022\014\n\004text\030" - + "\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_co" - + "de\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334\001\n\rDetecte" - + "dBreak\022S\n\004type\030\001 \001(\0162E.google.cloud.visi" - + "on.v1p3beta1.TextAnnotation.DetectedBrea" - + "k.BreakType\022\021\n\tis_prefix\030\002 \001(\010\"c\n\tBreakT" - + "ype\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n\nSURE_SPAC" - + "E\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYPHEN\020\004\022\016\n\nL" - + "INE_BREAK\020\005\032\277\001\n\014TextProperty\022Z\n\022detected" - + "_languages\030\001 \003(\0132>.google.cloud.vision.v" - + "1p3beta1.TextAnnotation.DetectedLanguage" - + "\022S\n\016detected_break\030\002 \001(\0132;.google.cloud." - + "vision.v1p3beta1.TextAnnotation.Detected" - + "Break\"\275\001\n\004Page\022L\n\010property\030\001 \001(\0132:.googl" - + "e.cloud.vision.v1p3beta1.TextAnnotation." - + "TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 " - + "\001(\005\0224\n\006blocks\030\004 \003(\0132$.google.cloud.visio" - + "n.v1p3beta1.Block\022\022\n\nconfidence\030\005 \001(\002\"\202\003" - + "\n\005Block\022L\n\010property\030\001 \001(\0132:.google.cloud" - + ".vision.v1p3beta1.TextAnnotation.TextPro" - + "perty\022A\n\014bounding_box\030\002 \001(\0132+.google.clo" - + "ud.vision.v1p3beta1.BoundingPoly\022<\n\npara" - + "graphs\030\003 \003(\0132(.google.cloud.vision.v1p3b" - + "eta1.Paragraph\022B\n\nblock_type\030\004 \001(\0162..goo" - + "gle.cloud.vision.v1p3beta1.Block.BlockTy" - + "pe\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007U" - + "NKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE" - + "\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n\tParagraph" - + "\022L\n\010property\030\001 \001(\0132:.google.cloud.vision" - + ".v1p3beta1.TextAnnotation.TextProperty\022A" - + "\n\014bounding_box\030\002 \001(\0132+.google.cloud.visi" - + "on.v1p3beta1.BoundingPoly\0222\n\005words\030\003 \003(\013" - + "2#.google.cloud.vision.v1p3beta1.Word\022\022\n" - + "\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010property\030\001" - + " \001(\0132:.google.cloud.vision.v1p3beta1.Tex" - + "tAnnotation.TextProperty\022A\n\014bounding_box" - + "\030\002 \001(\0132+.google.cloud.vision.v1p3beta1.B" - + "oundingPoly\0226\n\007symbols\030\003 \003(\0132%.google.cl" - + "oud.vision.v1p3beta1.Symbol\022\022\n\nconfidenc" - + "e\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property\030\001 \001(\0132:.g" - + "oogle.cloud.vision.v1p3beta1.TextAnnotat" - + "ion.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+" - + ".google.cloud.vision.v1p3beta1.BoundingP" - + "oly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002B\202\001" - + "\n!com.google.cloud.vision.v1p3beta1B\023Tex" - + "tAnnotationProtoP\001ZCgoogle.golang.org/ge" - + "nproto/googleapis/cloud/vision/v1p3beta1" - + ";vision\370\001\001b\006proto3" + + "eta1\032,google/cloud/vision/v1p3beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p3beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p3beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p3beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p3beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p3beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p3beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p3beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p3beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p3beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p3beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p3beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p3beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p3bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "3beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p3beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p3beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p3beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p3beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p3" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p3beta1;vision\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), }); internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor = @@ -211,7 +209,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); } diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java index 9c6f536250e8..d2ab1d7c80ba 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java @@ -58,41 +58,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/vision/v1p3beta1/web_dete" + "ction.proto\022\035google.cloud.vision.v1p3bet" - + "a1\032\034google/api/annotations.proto\"\214\007\n\014Web" - + "Detection\022K\n\014web_entities\030\001 \003(\01325.google" - + ".cloud.vision.v1p3beta1.WebDetection.Web" - + "Entity\022R\n\024full_matching_images\030\002 \003(\01324.g" - + "oogle.cloud.vision.v1p3beta1.WebDetectio" - + "n.WebImage\022U\n\027partial_matching_images\030\003 " - + "\003(\01324.google.cloud.vision.v1p3beta1.WebD" - + "etection.WebImage\022W\n\032pages_with_matching" - + "_images\030\004 \003(\01323.google.cloud.vision.v1p3" - + "beta1.WebDetection.WebPage\022U\n\027visually_s" - + "imilar_images\030\006 \003(\01324.google.cloud.visio" - + "n.v1p3beta1.WebDetection.WebImage\022O\n\021bes" - + "t_guess_labels\030\010 \003(\01324.google.cloud.visi" - + "on.v1p3beta1.WebDetection.WebLabel\032B\n\tWe" - + "bEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(" - + "\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebImage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007WebPage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001" - + "(\t\022R\n\024full_matching_images\030\004 \003(\01324.googl" - + "e.cloud.vision.v1p3beta1.WebDetection.We" - + "bImage\022U\n\027partial_matching_images\030\005 \003(\0132" - + "4.google.cloud.vision.v1p3beta1.WebDetec" - + "tion.WebImage\0320\n\010WebLabel\022\r\n\005label\030\001 \001(\t" - + "\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!com.google.c" - + "loud.vision.v1p3beta1B\021WebDetectionProto" - + "P\001ZCgoogle.golang.org/genproto/googleapi" - + "s/cloud/vision/v1p3beta1;vision\370\001\001b\006prot" - + "o3" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p3beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p3beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p3" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p3beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p3beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p3beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p3beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p3beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + + "m.google.cloud.vision.v1p3beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p3beta1;visio" + + "n\370\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable = @@ -146,7 +142,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Label", "LanguageCode", }); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto index ca0b4e86d5b9..ebab14a6b115 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto @@ -134,7 +134,8 @@ message Feature { // Model to use for the feature. // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. string model = 3; } diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto index 3c256c5773c9..633e404ed097 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p3beta1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; option cc_enable_arenas = true; diff --git a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto index cf9a22612a74..205dfe656d1f 100644 --- a/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto +++ b/java-vision/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.vision.v1p3beta1; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java index e391d726a739..d7626dd3b673 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java @@ -49,24 +49,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n(google/cloud/vision/v1p4beta1/face.pro" - + "to\022\035google.cloud.vision.v1p4beta1\032\034googl" - + "e/api/annotations.proto\032,google/cloud/vi" - + "sion/v1p4beta1/geometry.proto\".\n\025FaceRec" - + "ognitionParams\022\025\n\rcelebrity_set\030\001 \003(\t\"D\n" - + "\tCelebrity\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name" - + "\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\"h\n\025FaceRecog" - + "nitionResult\022;\n\tcelebrity\030\001 \001(\0132(.google" - + ".cloud.vision.v1p4beta1.Celebrity\022\022\n\ncon" - + "fidence\030\002 \001(\002B\204\001\n!com.google.cloud.visio" - + "n.v1p4beta1B\016CelebrityProtoP\001ZCgoogle.go" - + "lang.org/genproto/googleapis/cloud/visio" - + "n/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + + "to\022\035google.cloud.vision.v1p4beta1\032,googl" + + "e/cloud/vision/v1p4beta1/geometry.proto\"" + + ".\n\025FaceRecognitionParams\022\025\n\rcelebrity_se" + + "t\030\001 \003(\t\"D\n\tCelebrity\022\014\n\004name\030\001 \001(\t\022\024\n\014di" + + "splay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\"h\n" + + "\025FaceRecognitionResult\022;\n\tcelebrity\030\001 \001(" + + "\0132(.google.cloud.vision.v1p4beta1.Celebr" + + "ity\022\022\n\nconfidence\030\002 \001(\002B\204\001\n!com.google.c" + + "loud.vision.v1p4beta1B\016CelebrityProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), }); internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor = @@ -93,7 +92,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Celebrity", "Confidence", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); } diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java index da9ca19fc76b..7856600c65cc 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java @@ -578,7 +578,8 @@ public int getMaxResults() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -603,7 +604,8 @@ public java.lang.String getModel() { *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -1124,7 +1126,8 @@ public Builder clearMaxResults() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1148,7 +1151,8 @@ public java.lang.String getModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1172,7 +1176,8 @@ public com.google.protobuf.ByteString getModelBytes() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1195,7 +1200,8 @@ public Builder setModel(java.lang.String value) { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; @@ -1214,7 +1220,8 @@ public Builder clearModel() { *
      * Model to use for the feature.
      * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest".
+     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+     * support "builtin/weekly" for the bleeding edge release updated weekly.
      * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java index 34a23fcc17f4..c70ce4c52dee 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java @@ -68,7 +68,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; @@ -82,7 +83,8 @@ public interface FeatureOrBuilder *
    * Model to use for the feature.
    * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest".
+   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
+   * support "builtin/weekly" for the bleeding edge release updated weekly.
    * 
* * string model = 3; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java index 59f72a416091..9beb15f16182 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java @@ -53,25 +53,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n,google/cloud/vision/v1p4beta1/geometry" - + ".proto\022\035google.cloud.vision.v1p4beta1\032\034g" - + "oogle/api/annotations.proto\"\036\n\006Vertex\022\t\n" - + "\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020NormalizedVertex\022" - + "\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014BoundingPoly\0227" - + "\n\010vertices\030\001 \003(\0132%.google.cloud.vision.v" - + "1p4beta1.Vertex\022L\n\023normalized_vertices\030\002" - + " \003(\0132/.google.cloud.vision.v1p4beta1.Nor" - + "malizedVertex\"+\n\010Position\022\t\n\001x\030\001 \001(\002\022\t\n\001" - + "y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.google.cloud." - + "vision.v1p4beta1B\rGeometryProtoP\001ZCgoogl" - + "e.golang.org/genproto/googleapis/cloud/v" - + "ision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + + ".proto\022\035google.cloud.vision.v1p4beta1\"\036\n" + + "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + + "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + + "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + + "d.vision.v1p4beta1.Vertex\022L\n\023normalized_" + + "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + + "4beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.goo" + + "gle.cloud.vision.v1p4beta1B\rGeometryProt" + + "oP\001ZCgoogle.golang.org/genproto/googleap" + + "is/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GC" + + "VNb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable = @@ -104,7 +101,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "X", "Y", "Z", }); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java index 5ca697736e98..ff78024be0a7 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java @@ -207,250 +207,250 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/cloud/vision/v1p4beta1/text_annotation." + "proto\0321google/cloud/vision/v1p4beta1/web" + "_detection.proto\032#google/longrunning/ope" - + "rations.proto\032 google/protobuf/field_mas" - + "k.proto\032\037google/protobuf/timestamp.proto" - + "\032\027google/rpc/status.proto\032\027google/type/c" - + "olor.proto\032\030google/type/latlng.proto\"\216\003\n" - + "\007Feature\0229\n\004type\030\001 \001(\0162+.google.cloud.vi" - + "sion.v1p4beta1.Feature.Type\022\023\n\013max_resul" - + "ts\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022LA" - + "NDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003\022\023" - + "\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECTION\020\005\022" - + "\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_SEA" - + "RCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022\016\n" - + "\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022\n\016PROD" - + "UCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATION\020\023\"7\n" - + "\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\ti" - + "mage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content\030\001 \001(\014" - + "\022:\n\006source\030\002 \001(\0132*.google.cloud.vision.v" - + "1p4beta1.ImageSource\"\355\016\n\016FaceAnnotation\022" - + "B\n\rbounding_poly\030\001 \001(\0132+.google.cloud.vi" - + "sion.v1p4beta1.BoundingPoly\022E\n\020fd_boundi" - + "ng_poly\030\002 \001(\0132+.google.cloud.vision.v1p4" - + "beta1.BoundingPoly\022I\n\tlandmarks\030\003 \003(\01326." - + "google.cloud.vision.v1p4beta1.FaceAnnota" - + "tion.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022\021\n\tpan" - + "_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024dete" - + "ction_confidence\030\007 \001(\002\022\036\n\026landmarking_co" - + "nfidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t \001(\0162)" - + ".google.cloud.vision.v1p4beta1.Likelihoo" - + "d\022D\n\021sorrow_likelihood\030\n \001(\0162).google.cl" - + "oud.vision.v1p4beta1.Likelihood\022C\n\020anger" - + "_likelihood\030\013 \001(\0162).google.cloud.vision." - + "v1p4beta1.Likelihood\022F\n\023surprise_likelih" - + "ood\030\014 \001(\0162).google.cloud.vision.v1p4beta" - + "1.Likelihood\022K\n\030under_exposed_likelihood" - + "\030\r \001(\0162).google.cloud.vision.v1p4beta1.L" - + "ikelihood\022E\n\022blurred_likelihood\030\016 \001(\0162)." - + "google.cloud.vision.v1p4beta1.Likelihood" - + "\022F\n\023headwear_likelihood\030\017 \001(\0162).google.c" - + "loud.vision.v1p4beta1.Likelihood\022P\n\022reco" - + "gnition_result\030\020 \003(\01324.google.cloud.visi" - + "on.v1p4beta1.FaceRecognitionResult\032\307\007\n\010L" - + "andmark\022I\n\004type\030\003 \001(\0162;.google.cloud.vis" - + "ion.v1p4beta1.FaceAnnotation.Landmark.Ty" - + "pe\0229\n\010position\030\004 \001(\0132\'.google.cloud.visi" - + "on.v1p4beta1.Position\"\264\006\n\004Type\022\024\n\020UNKNOW" - + "N_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGHT_EYE\020" - + "\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIGHT_OF_" - + "LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EYEBROW\020" - + "\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025MIDPOIN" - + "T_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPER_" - + "LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013" - + "MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n\021NOSE_" - + "BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026\n\022" - + "NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_TOP_BOU" - + "NDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022\022\034\n\030LE" - + "FT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_EYE_LEF" - + "T_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDARY\020\025\022\032" - + "\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGHT_EYE_" - + "BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEFT_CORN" - + "ER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOINT\020\031\022 \n" - + "\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n\020LEFT_" - + "EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION\020\034\022\022\n\016" - + "LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022\025\n" - + "\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATHION\020 \022" - + "\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGHT_GONI" - + "ON\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 \001(\0132\023." - + "google.type.LatLng\"=\n\010Property\022\014\n\004name\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_value\030\003 \001(" - + "\004\"\300\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n\006l" - + "ocale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r\n\005scor" - + "e\030\004 \001(\002\022\026\n\nconfidence\030\005 \001(\002B\002\030\001\022\022\n\ntopic" - + "ality\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\0132+.goo" - + "gle.cloud.vision.v1p4beta1.BoundingPoly\022" - + ">\n\tlocations\030\010 \003(\0132+.google.cloud.vision" - + ".v1p4beta1.LocationInfo\022;\n\nproperties\030\t " - + "\003(\0132\'.google.cloud.vision.v1p4beta1.Prop" - + "erty\"\240\001\n\031LocalizedObjectAnnotation\022\013\n\003mi" - + "d\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004name\030\003" - + " \001(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_poly\030\005 \001" - + "(\0132+.google.cloud.vision.v1p4beta1.Bound" - + "ingPoly\"\274\002\n\024SafeSearchAnnotation\0228\n\005adul" - + "t\030\001 \001(\0162).google.cloud.vision.v1p4beta1." - + "Likelihood\0228\n\005spoof\030\002 \001(\0162).google.cloud" - + ".vision.v1p4beta1.Likelihood\022:\n\007medical\030" - + "\003 \001(\0162).google.cloud.vision.v1p4beta1.Li" - + "kelihood\022;\n\010violence\030\004 \001(\0162).google.clou" - + "d.vision.v1p4beta1.Likelihood\0227\n\004racy\030\t " + + "rations.proto\032\037google/protobuf/timestamp" + + ".proto\032\027google/rpc/status.proto\032\027google/" + + "type/color.proto\032\030google/type/latlng.pro" + + "to\"\216\003\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.cl" + + "oud.vision.v1p4beta1.Feature.Type\022\023\n\013max" + + "_results\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001" + + "\022\026\n\022LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTI" + + "ON\020\003\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECT" + + "ION\020\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SA" + + "FE_SEARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIE" + + "S\020\007\022\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022" + + "\n\016PRODUCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATIO" + + "N\020\023\"7\n\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(" + + "\t\022\021\n\timage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content" + + "\030\001 \001(\014\022:\n\006source\030\002 \001(\0132*.google.cloud.vi" + + "sion.v1p4beta1.ImageSource\"\355\016\n\016FaceAnnot" + + "ation\022B\n\rbounding_poly\030\001 \001(\0132+.google.cl" + + "oud.vision.v1p4beta1.BoundingPoly\022E\n\020fd_" + + "bounding_poly\030\002 \001(\0132+.google.cloud.visio" + + "n.v1p4beta1.BoundingPoly\022I\n\tlandmarks\030\003 " + + "\003(\01326.google.cloud.vision.v1p4beta1.Face" + + "Annotation.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022" + + "\021\n\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034" + + "\n\024detection_confidence\030\007 \001(\002\022\036\n\026landmark" + + "ing_confidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t" + + " \001(\0162).google.cloud.vision.v1p4beta1.Lik" + + "elihood\022D\n\021sorrow_likelihood\030\n \001(\0162).goo" + + "gle.cloud.vision.v1p4beta1.Likelihood\022C\n" + + "\020anger_likelihood\030\013 \001(\0162).google.cloud.v" + + "ision.v1p4beta1.Likelihood\022F\n\023surprise_l" + + "ikelihood\030\014 \001(\0162).google.cloud.vision.v1" + + "p4beta1.Likelihood\022K\n\030under_exposed_like" + + "lihood\030\r \001(\0162).google.cloud.vision.v1p4b" + + "eta1.Likelihood\022E\n\022blurred_likelihood\030\016 " + "\001(\0162).google.cloud.vision.v1p4beta1.Like" - + "lihood\"a\n\013LatLongRect\022(\n\013min_lat_lng\030\001 \001" - + "(\0132\023.google.type.LatLng\022(\n\013max_lat_lng\030\002" - + " \001(\0132\023.google.type.LatLng\"U\n\tColorInfo\022!" - + "\n\005color\030\001 \001(\0132\022.google.type.Color\022\r\n\005sco" - + "re\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T\n\030Domi" - + "nantColorsAnnotation\0228\n\006colors\030\001 \003(\0132(.g" - + "oogle.cloud.vision.v1p4beta1.ColorInfo\"c" - + "\n\017ImageProperties\022P\n\017dominant_colors\030\001 \001" - + "(\01327.google.cloud.vision.v1p4beta1.Domin" - + "antColorsAnnotation\"\177\n\010CropHint\022B\n\rbound" - + "ing_poly\030\001 \001(\0132+.google.cloud.vision.v1p" - + "4beta1.BoundingPoly\022\022\n\nconfidence\030\002 \001(\002\022" - + "\033\n\023importance_fraction\030\003 \001(\002\"R\n\023CropHint" - + "sAnnotation\022;\n\ncrop_hints\030\001 \003(\0132\'.google" - + ".cloud.vision.v1p4beta1.CropHint\"(\n\017Crop" - + "HintsParams\022\025\n\raspect_ratios\030\001 \003(\002\"1\n\022We" - + "bDetectionParams\022\033\n\023include_geo_results\030" - + "\002 \001(\010\"c\n\023TextDetectionParams\022.\n&enable_t" - + "ext_detection_confidence_score\030\t \001(\010\022\034\n\024" - + "advanced_ocr_options\030\013 \003(\t\"\202\004\n\014ImageCont" - + "ext\022A\n\rlat_long_rect\030\001 \001(\0132*.google.clou" - + "d.vision.v1p4beta1.LatLongRect\022\026\n\016langua" - + "ge_hints\030\002 \003(\t\022I\n\021crop_hints_params\030\004 \001(" - + "\0132..google.cloud.vision.v1p4beta1.CropHi" - + "ntsParams\022U\n\027face_recognition_params\030\n \001" - + "(\01324.google.cloud.vision.v1p4beta1.FaceR" - + "ecognitionParams\022Q\n\025product_search_param" - + "s\030\005 \001(\01322.google.cloud.vision.v1p4beta1." - + "ProductSearchParams\022O\n\024web_detection_par" - + "ams\030\006 \001(\01321.google.cloud.vision.v1p4beta" - + "1.WebDetectionParams\022Q\n\025text_detection_p" - + "arams\030\014 \001(\01322.google.cloud.vision.v1p4be" - + "ta1.TextDetectionParams\"\311\001\n\024AnnotateImag" - + "eRequest\0223\n\005image\030\001 \001(\0132$.google.cloud.v" - + "ision.v1p4beta1.Image\0228\n\010features\030\002 \003(\0132" - + "&.google.cloud.vision.v1p4beta1.Feature\022" - + "B\n\rimage_context\030\003 \001(\0132+.google.cloud.vi" - + "sion.v1p4beta1.ImageContext\":\n\026ImageAnno" - + "tationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page_numbe" - + "r\030\002 \001(\005\"\277\010\n\025AnnotateImageResponse\022G\n\020fac" - + "e_annotations\030\001 \003(\0132-.google.cloud.visio" - + "n.v1p4beta1.FaceAnnotation\022M\n\024landmark_a" - + "nnotations\030\002 \003(\0132/.google.cloud.vision.v" - + "1p4beta1.EntityAnnotation\022I\n\020logo_annota" - + "tions\030\003 \003(\0132/.google.cloud.vision.v1p4be" - + "ta1.EntityAnnotation\022J\n\021label_annotation" - + "s\030\004 \003(\0132/.google.cloud.vision.v1p4beta1." - + "EntityAnnotation\022^\n\034localized_object_ann" - + "otations\030\026 \003(\01328.google.cloud.vision.v1p" - + "4beta1.LocalizedObjectAnnotation\022I\n\020text" - + "_annotations\030\005 \003(\0132/.google.cloud.vision" - + ".v1p4beta1.EntityAnnotation\022K\n\024full_text" - + "_annotation\030\014 \001(\0132-.google.cloud.vision." - + "v1p4beta1.TextAnnotation\022S\n\026safe_search_" - + "annotation\030\006 \001(\01323.google.cloud.vision.v" - + "1p4beta1.SafeSearchAnnotation\022S\n\033image_p" - + "roperties_annotation\030\010 \001(\0132..google.clou" - + "d.vision.v1p4beta1.ImageProperties\022Q\n\025cr" - + "op_hints_annotation\030\013 \001(\01322.google.cloud" - + ".vision.v1p4beta1.CropHintsAnnotation\022B\n" - + "\rweb_detection\030\r \001(\0132+.google.cloud.visi" - + "on.v1p4beta1.WebDetection\022S\n\026product_sea" - + "rch_results\030\016 \001(\01323.google.cloud.vision." - + "v1p4beta1.ProductSearchResults\022!\n\005error\030" - + "\t \001(\0132\022.google.rpc.Status\022F\n\007context\030\025 \001" - + "(\01325.google.cloud.vision.v1p4beta1.Image" - + "AnnotationContext\"h\n\032BatchAnnotateImages" - + "Request\022J\n\010requests\030\001 \003(\01323.google.cloud" - + ".vision.v1p4beta1.AnnotateImageRequestB\003" - + "\340A\002\"f\n\033BatchAnnotateImagesResponse\022G\n\tre" - + "sponses\030\001 \003(\01324.google.cloud.vision.v1p4" - + "beta1.AnnotateImageResponse\"\344\001\n\023Annotate" - + "FileRequest\022@\n\014input_config\030\001 \001(\0132*.goog" - + "le.cloud.vision.v1p4beta1.InputConfig\0228\n" - + "\010features\030\002 \003(\0132&.google.cloud.vision.v1" - + "p4beta1.Feature\022B\n\rimage_context\030\003 \001(\0132+" - + ".google.cloud.vision.v1p4beta1.ImageCont" - + "ext\022\r\n\005pages\030\004 \003(\005\"\331\001\n\024AnnotateFileRespo" - + "nse\022@\n\014input_config\030\001 \001(\0132*.google.cloud" - + ".vision.v1p4beta1.InputConfig\022G\n\trespons" - + "es\030\002 \003(\01324.google.cloud.vision.v1p4beta1" - + ".AnnotateImageResponse\022\023\n\013total_pages\030\003 " - + "\001(\005\022!\n\005error\030\004 \001(\0132\022.google.rpc.Status\"f" - + "\n\031BatchAnnotateFilesRequest\022I\n\010requests\030" - + "\001 \003(\01322.google.cloud.vision.v1p4beta1.An" - + "notateFileRequestB\003\340A\002\"d\n\032BatchAnnotateF" - + "ilesResponse\022F\n\tresponses\030\001 \003(\01323.google" - + ".cloud.vision.v1p4beta1.AnnotateFileResp" - + "onse\"\236\002\n\030AsyncAnnotateFileRequest\022@\n\014inp" - + "ut_config\030\001 \001(\0132*.google.cloud.vision.v1" - + "p4beta1.InputConfig\0228\n\010features\030\002 \003(\0132&." - + "google.cloud.vision.v1p4beta1.Feature\022B\n" - + "\rimage_context\030\003 \001(\0132+.google.cloud.visi" - + "on.v1p4beta1.ImageContext\022B\n\routput_conf" - + "ig\030\004 \001(\0132+.google.cloud.vision.v1p4beta1" - + ".OutputConfig\"_\n\031AsyncAnnotateFileRespon" - + "se\022B\n\routput_config\030\001 \001(\0132+.google.cloud" - + ".vision.v1p4beta1.OutputConfig\"\266\001\n\037Async" - + "BatchAnnotateImagesRequest\022J\n\010requests\030\001" - + " \003(\01323.google.cloud.vision.v1p4beta1.Ann" - + "otateImageRequestB\003\340A\002\022G\n\routput_config\030" - + "\002 \001(\0132+.google.cloud.vision.v1p4beta1.Ou" - + "tputConfigB\003\340A\002\"f\n AsyncBatchAnnotateIma" - + "gesResponse\022B\n\routput_config\030\001 \001(\0132+.goo" - + "gle.cloud.vision.v1p4beta1.OutputConfig\"" - + "p\n\036AsyncBatchAnnotateFilesRequest\022N\n\010req" - + "uests\030\001 \003(\01327.google.cloud.vision.v1p4be" - + "ta1.AsyncAnnotateFileRequestB\003\340A\002\"n\n\037Asy" - + "ncBatchAnnotateFilesResponse\022K\n\tresponse" - + "s\030\001 \003(\01328.google.cloud.vision.v1p4beta1." - + "AsyncAnnotateFileResponse\"o\n\013InputConfig" - + "\022<\n\ngcs_source\030\001 \001(\0132(.google.cloud.visi" - + "on.v1p4beta1.GcsSource\022\017\n\007content\030\003 \001(\014\022" - + "\021\n\tmime_type\030\002 \001(\t\"j\n\014OutputConfig\022F\n\017gc" - + "s_destination\030\001 \001(\0132-.google.cloud.visio" - + "n.v1p4beta1.GcsDestination\022\022\n\nbatch_size" - + "\030\002 \001(\005\"\030\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsD" - + "estination\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021OperationMet" - + "adata\022E\n\005state\030\001 \001(\01626.google.cloud.visi" - + "on.v1p4beta1.OperationMetadata.State\022/\n\013" - + "create_time\030\005 \001(\0132\032.google.protobuf.Time" - + "stamp\022/\n\013update_time\030\006 \001(\0132\032.google.prot" - + "obuf.Timestamp\"Q\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE" - + "\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikelihood\022\013\n\007UNKNO" - + "WN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n" - + "\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\005" - + "2\361\007\n\016ImageAnnotator\022\276\001\n\023BatchAnnotateIma" - + "ges\0229.google.cloud.vision.v1p4beta1.Batc" - + "hAnnotateImagesRequest\032:.google.cloud.vi" - + "sion.v1p4beta1.BatchAnnotateImagesRespon" - + "se\"0\202\323\344\223\002\037\"\032/v1p4beta1/images:annotate:\001" - + "*\332A\010requests\022\272\001\n\022BatchAnnotateFiles\0228.go" - + "ogle.cloud.vision.v1p4beta1.BatchAnnotat" - + "eFilesRequest\0329.google.cloud.vision.v1p4" - + "beta1.BatchAnnotateFilesResponse\"/\202\323\344\223\002\036" - + "\"\031/v1p4beta1/files:annotate:\001*\332A\010request" - + "s\022\374\001\n\030AsyncBatchAnnotateImages\022>.google." - + "cloud.vision.v1p4beta1.AsyncBatchAnnotat" - + "eImagesRequest\032\035.google.longrunning.Oper" - + "ation\"\200\001\202\323\344\223\002)\"$/v1p4beta1/images:asyncB" - + "atchAnnotate:\001*\332A\026requests,output_config" - + "\312A5\n AsyncBatchAnnotateImagesResponse\022\021O" - + "perationMetadata\022\351\001\n\027AsyncBatchAnnotateF" - + "iles\022=.google.cloud.vision.v1p4beta1.Asy" - + "ncBatchAnnotateFilesRequest\032\035.google.lon" - + "grunning.Operation\"p\202\323\344\223\002(\"#/v1p4beta1/f" - + "iles:asyncBatchAnnotate:\001*\332A\010requests\312A4" - + "\n\037AsyncBatchAnnotateFilesResponse\022\021Opera" - + "tionMetadata\032v\312A\025vision.googleapis.com\322A" - + "[https://www.googleapis.com/auth/cloud-p" - + "latform,https://www.googleapis.com/auth/" - + "cloud-visionB\211\001\n!com.google.cloud.vision" - + ".v1p4beta1B\023ImageAnnotatorProtoP\001ZCgoogl" - + "e.golang.org/genproto/googleapis/cloud/v" - + "ision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + + "lihood\022F\n\023headwear_likelihood\030\017 \001(\0162).go" + + "ogle.cloud.vision.v1p4beta1.Likelihood\022P" + + "\n\022recognition_result\030\020 \003(\01324.google.clou" + + "d.vision.v1p4beta1.FaceRecognitionResult" + + "\032\307\007\n\010Landmark\022I\n\004type\030\003 \001(\0162;.google.clo" + + "ud.vision.v1p4beta1.FaceAnnotation.Landm" + + "ark.Type\0229\n\010position\030\004 \001(\0132\'.google.clou" + + "d.vision.v1p4beta1.Position\"\264\006\n\004Type\022\024\n\020" + + "UNKNOWN_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGH" + + "T_EYE\020\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIG" + + "HT_OF_LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EY" + + "EBROW\020\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025M" + + "IDPOINT_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\t" + + "UPPER_LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT" + + "\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n" + + "\021NOSE_BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT" + + "\020\017\022\026\n\022NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_T" + + "OP_BOUNDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022" + + "\022\034\n\030LEFT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_E" + + "YE_LEFT_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDA" + + "RY\020\025\022\032\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGH" + + "T_EYE_BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEF" + + "T_CORNER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOIN" + + "T\020\031\022 \n\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n" + + "\020LEFT_EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION" + + "\020\034\022\022\n\016LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPI" + + "L\020\036\022\025\n\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATH" + + "ION\020 \022\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGH" + + "T_GONION\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 " + + "\001(\0132\023.google.type.LatLng\"=\n\010Property\022\014\n\004" + + "name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_valu" + + "e\030\003 \001(\004\"\300\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(" + + "\t\022\016\n\006locale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r" + + "\n\005score\030\004 \001(\002\022\026\n\nconfidence\030\005 \001(\002B\002\030\001\022\022\n" + + "\ntopicality\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\013" + + "2+.google.cloud.vision.v1p4beta1.Boundin" + + "gPoly\022>\n\tlocations\030\010 \003(\0132+.google.cloud." + + "vision.v1p4beta1.LocationInfo\022;\n\npropert" + + "ies\030\t \003(\0132\'.google.cloud.vision.v1p4beta" + + "1.Property\"\240\001\n\031LocalizedObjectAnnotation" + + "\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004" + + "name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_po" + + "ly\030\005 \001(\0132+.google.cloud.vision.v1p4beta1" + + ".BoundingPoly\"\274\002\n\024SafeSearchAnnotation\0228" + + "\n\005adult\030\001 \001(\0162).google.cloud.vision.v1p4" + + "beta1.Likelihood\0228\n\005spoof\030\002 \001(\0162).google" + + ".cloud.vision.v1p4beta1.Likelihood\022:\n\007me" + + "dical\030\003 \001(\0162).google.cloud.vision.v1p4be" + + "ta1.Likelihood\022;\n\010violence\030\004 \001(\0162).googl" + + "e.cloud.vision.v1p4beta1.Likelihood\0227\n\004r" + + "acy\030\t \001(\0162).google.cloud.vision.v1p4beta" + + "1.Likelihood\"a\n\013LatLongRect\022(\n\013min_lat_l" + + "ng\030\001 \001(\0132\023.google.type.LatLng\022(\n\013max_lat" + + "_lng\030\002 \001(\0132\023.google.type.LatLng\"U\n\tColor" + + "Info\022!\n\005color\030\001 \001(\0132\022.google.type.Color\022" + + "\r\n\005score\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T" + + "\n\030DominantColorsAnnotation\0228\n\006colors\030\001 \003" + + "(\0132(.google.cloud.vision.v1p4beta1.Color" + + "Info\"c\n\017ImageProperties\022P\n\017dominant_colo" + + "rs\030\001 \001(\01327.google.cloud.vision.v1p4beta1" + + ".DominantColorsAnnotation\"\177\n\010CropHint\022B\n" + + "\rbounding_poly\030\001 \001(\0132+.google.cloud.visi" + + "on.v1p4beta1.BoundingPoly\022\022\n\nconfidence\030" + + "\002 \001(\002\022\033\n\023importance_fraction\030\003 \001(\002\"R\n\023Cr" + + "opHintsAnnotation\022;\n\ncrop_hints\030\001 \003(\0132\'." + + "google.cloud.vision.v1p4beta1.CropHint\"(" + + "\n\017CropHintsParams\022\025\n\raspect_ratios\030\001 \003(\002" + + "\"1\n\022WebDetectionParams\022\033\n\023include_geo_re" + + "sults\030\002 \001(\010\"c\n\023TextDetectionParams\022.\n&en" + + "able_text_detection_confidence_score\030\t \001" + + "(\010\022\034\n\024advanced_ocr_options\030\013 \003(\t\"\202\004\n\014Ima" + + "geContext\022A\n\rlat_long_rect\030\001 \001(\0132*.googl" + + "e.cloud.vision.v1p4beta1.LatLongRect\022\026\n\016" + + "language_hints\030\002 \003(\t\022I\n\021crop_hints_param" + + "s\030\004 \001(\0132..google.cloud.vision.v1p4beta1." + + "CropHintsParams\022U\n\027face_recognition_para" + + "ms\030\n \001(\01324.google.cloud.vision.v1p4beta1" + + ".FaceRecognitionParams\022Q\n\025product_search" + + "_params\030\005 \001(\01322.google.cloud.vision.v1p4" + + "beta1.ProductSearchParams\022O\n\024web_detecti" + + "on_params\030\006 \001(\01321.google.cloud.vision.v1" + + "p4beta1.WebDetectionParams\022Q\n\025text_detec" + + "tion_params\030\014 \001(\01322.google.cloud.vision." + + "v1p4beta1.TextDetectionParams\"\311\001\n\024Annota" + + "teImageRequest\0223\n\005image\030\001 \001(\0132$.google.c" + + "loud.vision.v1p4beta1.Image\0228\n\010features\030" + + "\002 \003(\0132&.google.cloud.vision.v1p4beta1.Fe" + + "ature\022B\n\rimage_context\030\003 \001(\0132+.google.cl" + + "oud.vision.v1p4beta1.ImageContext\":\n\026Ima" + + "geAnnotationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page" + + "_number\030\002 \001(\005\"\277\010\n\025AnnotateImageResponse\022" + + "G\n\020face_annotations\030\001 \003(\0132-.google.cloud" + + ".vision.v1p4beta1.FaceAnnotation\022M\n\024land" + + "mark_annotations\030\002 \003(\0132/.google.cloud.vi" + + "sion.v1p4beta1.EntityAnnotation\022I\n\020logo_" + + "annotations\030\003 \003(\0132/.google.cloud.vision." + + "v1p4beta1.EntityAnnotation\022J\n\021label_anno" + + "tations\030\004 \003(\0132/.google.cloud.vision.v1p4" + + "beta1.EntityAnnotation\022^\n\034localized_obje" + + "ct_annotations\030\026 \003(\01328.google.cloud.visi" + + "on.v1p4beta1.LocalizedObjectAnnotation\022I" + + "\n\020text_annotations\030\005 \003(\0132/.google.cloud." + + "vision.v1p4beta1.EntityAnnotation\022K\n\024ful" + + "l_text_annotation\030\014 \001(\0132-.google.cloud.v" + + "ision.v1p4beta1.TextAnnotation\022S\n\026safe_s" + + "earch_annotation\030\006 \001(\01323.google.cloud.vi" + + "sion.v1p4beta1.SafeSearchAnnotation\022S\n\033i" + + "mage_properties_annotation\030\010 \001(\0132..googl" + + "e.cloud.vision.v1p4beta1.ImageProperties" + + "\022Q\n\025crop_hints_annotation\030\013 \001(\01322.google" + + ".cloud.vision.v1p4beta1.CropHintsAnnotat" + + "ion\022B\n\rweb_detection\030\r \001(\0132+.google.clou" + + "d.vision.v1p4beta1.WebDetection\022S\n\026produ" + + "ct_search_results\030\016 \001(\01323.google.cloud.v" + + "ision.v1p4beta1.ProductSearchResults\022!\n\005" + + "error\030\t \001(\0132\022.google.rpc.Status\022F\n\007conte" + + "xt\030\025 \001(\01325.google.cloud.vision.v1p4beta1" + + ".ImageAnnotationContext\"h\n\032BatchAnnotate" + + "ImagesRequest\022J\n\010requests\030\001 \003(\01323.google" + + ".cloud.vision.v1p4beta1.AnnotateImageReq" + + "uestB\003\340A\002\"f\n\033BatchAnnotateImagesResponse" + + "\022G\n\tresponses\030\001 \003(\01324.google.cloud.visio" + + "n.v1p4beta1.AnnotateImageResponse\"\344\001\n\023An" + + "notateFileRequest\022@\n\014input_config\030\001 \001(\0132" + + "*.google.cloud.vision.v1p4beta1.InputCon" + + "fig\0228\n\010features\030\002 \003(\0132&.google.cloud.vis" + + "ion.v1p4beta1.Feature\022B\n\rimage_context\030\003" + + " \001(\0132+.google.cloud.vision.v1p4beta1.Ima" + + "geContext\022\r\n\005pages\030\004 \003(\005\"\331\001\n\024AnnotateFil" + + "eResponse\022@\n\014input_config\030\001 \001(\0132*.google" + + ".cloud.vision.v1p4beta1.InputConfig\022G\n\tr" + + "esponses\030\002 \003(\01324.google.cloud.vision.v1p" + + "4beta1.AnnotateImageResponse\022\023\n\013total_pa" + + "ges\030\003 \001(\005\022!\n\005error\030\004 \001(\0132\022.google.rpc.St" + + "atus\"f\n\031BatchAnnotateFilesRequest\022I\n\010req" + + "uests\030\001 \003(\01322.google.cloud.vision.v1p4be" + + "ta1.AnnotateFileRequestB\003\340A\002\"d\n\032BatchAnn" + + "otateFilesResponse\022F\n\tresponses\030\001 \003(\01323." + + "google.cloud.vision.v1p4beta1.AnnotateFi" + + "leResponse\"\236\002\n\030AsyncAnnotateFileRequest\022" + + "@\n\014input_config\030\001 \001(\0132*.google.cloud.vis" + + "ion.v1p4beta1.InputConfig\0228\n\010features\030\002 " + + "\003(\0132&.google.cloud.vision.v1p4beta1.Feat" + + "ure\022B\n\rimage_context\030\003 \001(\0132+.google.clou" + + "d.vision.v1p4beta1.ImageContext\022B\n\routpu" + + "t_config\030\004 \001(\0132+.google.cloud.vision.v1p" + + "4beta1.OutputConfig\"_\n\031AsyncAnnotateFile" + + "Response\022B\n\routput_config\030\001 \001(\0132+.google" + + ".cloud.vision.v1p4beta1.OutputConfig\"\266\001\n" + + "\037AsyncBatchAnnotateImagesRequest\022J\n\010requ" + + "ests\030\001 \003(\01323.google.cloud.vision.v1p4bet" + + "a1.AnnotateImageRequestB\003\340A\002\022G\n\routput_c" + + "onfig\030\002 \001(\0132+.google.cloud.vision.v1p4be" + + "ta1.OutputConfigB\003\340A\002\"f\n AsyncBatchAnnot" + + "ateImagesResponse\022B\n\routput_config\030\001 \001(\013" + + "2+.google.cloud.vision.v1p4beta1.OutputC" + + "onfig\"p\n\036AsyncBatchAnnotateFilesRequest\022" + + "N\n\010requests\030\001 \003(\01327.google.cloud.vision." + + "v1p4beta1.AsyncAnnotateFileRequestB\003\340A\002\"" + + "n\n\037AsyncBatchAnnotateFilesResponse\022K\n\tre" + + "sponses\030\001 \003(\01328.google.cloud.vision.v1p4" + + "beta1.AsyncAnnotateFileResponse\"o\n\013Input" + + "Config\022<\n\ngcs_source\030\001 \001(\0132(.google.clou" + + "d.vision.v1p4beta1.GcsSource\022\017\n\007content\030" + + "\003 \001(\014\022\021\n\tmime_type\030\002 \001(\t\"j\n\014OutputConfig" + + "\022F\n\017gcs_destination\030\001 \001(\0132-.google.cloud" + + ".vision.v1p4beta1.GcsDestination\022\022\n\nbatc" + + "h_size\030\002 \001(\005\"\030\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035" + + "\n\016GcsDestination\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021Operat" + + "ionMetadata\022E\n\005state\030\001 \001(\01626.google.clou" + + "d.vision.v1p4beta1.OperationMetadata.Sta" + + "te\022/\n\013create_time\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp\022/\n\013update_time\030\006 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"Q\n\005State\022\025\n\021STATE_U" + + "NSPECIFIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010" + + "\n\004DONE\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikelihood\022\013\n" + + "\007UNKNOWN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKEL" + + "Y\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LI" + + "KELY\020\0052\361\007\n\016ImageAnnotator\022\276\001\n\023BatchAnnot" + + "ateImages\0229.google.cloud.vision.v1p4beta" + + "1.BatchAnnotateImagesRequest\032:.google.cl" + + "oud.vision.v1p4beta1.BatchAnnotateImages" + + "Response\"0\202\323\344\223\002\037\"\032/v1p4beta1/images:anno" + + "tate:\001*\332A\010requests\022\272\001\n\022BatchAnnotateFile" + + "s\0228.google.cloud.vision.v1p4beta1.BatchA" + + "nnotateFilesRequest\0329.google.cloud.visio" + + "n.v1p4beta1.BatchAnnotateFilesResponse\"/" + + "\202\323\344\223\002\036\"\031/v1p4beta1/files:annotate:\001*\332A\010r" + + "equests\022\374\001\n\030AsyncBatchAnnotateImages\022>.g" + + "oogle.cloud.vision.v1p4beta1.AsyncBatchA" + + "nnotateImagesRequest\032\035.google.longrunnin" + + "g.Operation\"\200\001\202\323\344\223\002)\"$/v1p4beta1/images:" + + "asyncBatchAnnotate:\001*\332A\026requests,output_" + + "config\312A5\n AsyncBatchAnnotateImagesRespo" + + "nse\022\021OperationMetadata\022\351\001\n\027AsyncBatchAnn" + + "otateFiles\022=.google.cloud.vision.v1p4bet" + + "a1.AsyncBatchAnnotateFilesRequest\032\035.goog" + + "le.longrunning.Operation\"p\202\323\344\223\002(\"#/v1p4b" + + "eta1/files:asyncBatchAnnotate:\001*\332A\010reque" + + "sts\312A4\n\037AsyncBatchAnnotateFilesResponse\022" + + "\021OperationMetadata\032v\312A\025vision.googleapis" + + ".com\322A[https://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/cloud-visionB\211\001\n!com.google.cloud." + + "vision.v1p4beta1B\023ImageAnnotatorProtoP\001Z" + + "Cgoogle.golang.org/genproto/googleapis/c" + + "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -465,7 +465,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(), com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), com.google.type.ColorProto.getDescriptor(), @@ -854,7 +853,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(); com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); com.google.type.ColorProto.getDescriptor(); diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java index d3f4b5c7cf4b..37a8754cb83a 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java @@ -58,43 +58,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n2google/cloud/vision/v1p4beta1/product_" + "search.proto\022\035google.cloud.vision.v1p4be" - + "ta1\032\034google/api/annotations.proto\032\031googl" - + "e/api/resource.proto\032,google/cloud/visio" - + "n/v1p4beta1/geometry.proto\032:google/cloud" - + "/vision/v1p4beta1/product_search_service" - + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\301\001\n\023ProductSearchParams\022B\n\rbounding_poly" - + "\030\t \001(\0132+.google.cloud.vision.v1p4beta1.B" - + "oundingPoly\022:\n\013product_set\030\006 \001(\tB%\372A\"\n v" - + "ision.googleapis.com/ProductSet\022\032\n\022produ" - + "ct_categories\030\007 \003(\t\022\016\n\006filter\030\010 \001(\t\"\262\005\n\024" - + "ProductSearchResults\022.\n\nindex_time\030\002 \001(\013" - + "2\032.google.protobuf.Timestamp\022K\n\007results\030" - + "\005 \003(\0132:.google.cloud.vision.v1p4beta1.Pr" - + "oductSearchResults.Result\022b\n\027product_gro" - + "uped_results\030\006 \003(\0132A.google.cloud.vision" - + ".v1p4beta1.ProductSearchResults.GroupedR" - + "esult\032_\n\006Result\0227\n\007product\030\001 \001(\0132&.googl" - + "e.cloud.vision.v1p4beta1.Product\022\r\n\005scor" - + "e\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020ObjectAnnotati" - + "on\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014" - + "\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002\n\rGroupedR" - + "esult\022B\n\rbounding_poly\030\001 \001(\0132+.google.cl" - + "oud.vision.v1p4beta1.BoundingPoly\022K\n\007res" - + "ults\030\002 \003(\0132:.google.cloud.vision.v1p4bet" - + "a1.ProductSearchResults.Result\022`\n\022object" - + "_annotations\030\003 \003(\0132D.google.cloud.vision" - + ".v1p4beta1.ProductSearchResults.ObjectAn" - + "notationB\210\001\n!com.google.cloud.vision.v1p" - + "4beta1B\022ProductSearchProtoP\001ZCgoogle.gol" - + "ang.org/genproto/googleapis/cloud/vision" - + "/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" + + "ta1\032\031google/api/resource.proto\032,google/c" + + "loud/vision/v1p4beta1/geometry.proto\032:go" + + "ogle/cloud/vision/v1p4beta1/product_sear" + + "ch_service.proto\032\037google/protobuf/timest" + + "amp.proto\"\301\001\n\023ProductSearchParams\022B\n\rbou" + + "nding_poly\030\t \001(\0132+.google.cloud.vision.v" + + "1p4beta1.BoundingPoly\022:\n\013product_set\030\006 \001" + + "(\tB%\372A\"\n vision.googleapis.com/ProductSe" + + "t\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006filter\030" + + "\010 \001(\t\"\262\005\n\024ProductSearchResults\022.\n\nindex_" + + "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022K" + + "\n\007results\030\005 \003(\0132:.google.cloud.vision.v1" + + "p4beta1.ProductSearchResults.Result\022b\n\027p" + + "roduct_grouped_results\030\006 \003(\0132A.google.cl" + + "oud.vision.v1p4beta1.ProductSearchResult" + + "s.GroupedResult\032_\n\006Result\0227\n\007product\030\001 \001" + + "(\0132&.google.cloud.vision.v1p4beta1.Produ" + + "ct\022\r\n\005score\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020Obje" + + "ctAnnotation\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_co" + + "de\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002" + + "\n\rGroupedResult\022B\n\rbounding_poly\030\001 \001(\0132+" + + ".google.cloud.vision.v1p4beta1.BoundingP" + + "oly\022K\n\007results\030\002 \003(\0132:.google.cloud.visi" + + "on.v1p4beta1.ProductSearchResults.Result" + + "\022`\n\022object_annotations\030\003 \003(\0132D.google.cl" + + "oud.vision.v1p4beta1.ProductSearchResult" + + "s.ObjectAnnotationB\210\001\n!com.google.cloud." + + "vision.v1p4beta1B\022ProductSearchProtoP\001ZC" + + "google.golang.org/genproto/googleapis/cl" + + "oud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(), @@ -151,7 +150,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(); diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java index d163ca670c64..580b7dde94b3 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java @@ -74,63 +74,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n3google/cloud/vision/v1p4beta1/text_ann" + "otation.proto\022\035google.cloud.vision.v1p4b" - + "eta1\032\034google/api/annotations.proto\032,goog" - + "le/cloud/vision/v1p4beta1/geometry.proto" - + "\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001 \003(\0132#.goo" - + "gle.cloud.vision.v1p4beta1.Page\022\014\n\004text\030" - + "\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rlanguage_co" - + "de\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334\001\n\rDetecte" - + "dBreak\022S\n\004type\030\001 \001(\0162E.google.cloud.visi" - + "on.v1p4beta1.TextAnnotation.DetectedBrea" - + "k.BreakType\022\021\n\tis_prefix\030\002 \001(\010\"c\n\tBreakT" - + "ype\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n\nSURE_SPAC" - + "E\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYPHEN\020\004\022\016\n\nL" - + "INE_BREAK\020\005\032\277\001\n\014TextProperty\022Z\n\022detected" - + "_languages\030\001 \003(\0132>.google.cloud.vision.v" - + "1p4beta1.TextAnnotation.DetectedLanguage" - + "\022S\n\016detected_break\030\002 \001(\0132;.google.cloud." - + "vision.v1p4beta1.TextAnnotation.Detected" - + "Break\"\275\001\n\004Page\022L\n\010property\030\001 \001(\0132:.googl" - + "e.cloud.vision.v1p4beta1.TextAnnotation." - + "TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 " - + "\001(\005\0224\n\006blocks\030\004 \003(\0132$.google.cloud.visio" - + "n.v1p4beta1.Block\022\022\n\nconfidence\030\005 \001(\002\"\202\003" - + "\n\005Block\022L\n\010property\030\001 \001(\0132:.google.cloud" - + ".vision.v1p4beta1.TextAnnotation.TextPro" - + "perty\022A\n\014bounding_box\030\002 \001(\0132+.google.clo" - + "ud.vision.v1p4beta1.BoundingPoly\022<\n\npara" - + "graphs\030\003 \003(\0132(.google.cloud.vision.v1p4b" - + "eta1.Paragraph\022B\n\nblock_type\030\004 \001(\0162..goo" - + "gle.cloud.vision.v1p4beta1.Block.BlockTy" - + "pe\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007U" - + "NKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE" - + "\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n\tParagraph" - + "\022L\n\010property\030\001 \001(\0132:.google.cloud.vision" - + ".v1p4beta1.TextAnnotation.TextProperty\022A" - + "\n\014bounding_box\030\002 \001(\0132+.google.cloud.visi" - + "on.v1p4beta1.BoundingPoly\0222\n\005words\030\003 \003(\013" - + "2#.google.cloud.vision.v1p4beta1.Word\022\022\n" - + "\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010property\030\001" - + " \001(\0132:.google.cloud.vision.v1p4beta1.Tex" - + "tAnnotation.TextProperty\022A\n\014bounding_box" - + "\030\002 \001(\0132+.google.cloud.vision.v1p4beta1.B" - + "oundingPoly\0226\n\007symbols\030\003 \003(\0132%.google.cl" - + "oud.vision.v1p4beta1.Symbol\022\022\n\nconfidenc" - + "e\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property\030\001 \001(\0132:.g" - + "oogle.cloud.vision.v1p4beta1.TextAnnotat" - + "ion.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+" - + ".google.cloud.vision.v1p4beta1.BoundingP" - + "oly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002B\211\001" - + "\n!com.google.cloud.vision.v1p4beta1B\023Tex" - + "tAnnotationProtoP\001ZCgoogle.golang.org/ge" - + "nproto/googleapis/cloud/vision/v1p4beta1" - + ";vision\370\001\001\242\002\004GCVNb\006proto3" + + "eta1\032,google/cloud/vision/v1p4beta1/geom" + + "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + + " \003(\0132#.google.cloud.vision.v1p4beta1.Pag" + + "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + + "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + + "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + + "cloud.vision.v1p4beta1.TextAnnotation.De" + + "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + + "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + + "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + + "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + + "\n\022detected_languages\030\001 \003(\0132>.google.clou" + + "d.vision.v1p4beta1.TextAnnotation.Detect" + + "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + + "gle.cloud.vision.v1p4beta1.TextAnnotatio" + + "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + + "(\0132:.google.cloud.vision.v1p4beta1.TextA" + + "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + + "loud.vision.v1p4beta1.Block\022\022\n\nconfidenc" + + "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + + "ogle.cloud.vision.v1p4beta1.TextAnnotati" + + "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + + "google.cloud.vision.v1p4beta1.BoundingPo" + + "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + + "sion.v1p4beta1.Paragraph\022B\n\nblock_type\030\004" + + " \001(\0162..google.cloud.vision.v1p4beta1.Blo" + + "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + + "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + + "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + + "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + + "oud.vision.v1p4beta1.TextAnnotation.Text" + + "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + + "cloud.vision.v1p4beta1.BoundingPoly\0222\n\005w" + + "ords\030\003 \003(\0132#.google.cloud.vision.v1p4bet" + + "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + + "property\030\001 \001(\0132:.google.cloud.vision.v1p" + + "4beta1.TextAnnotation.TextProperty\022A\n\014bo" + + "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + + "1p4beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + + ".google.cloud.vision.v1p4beta1.Symbol\022\022\n" + + "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + + "\030\001 \001(\0132:.google.cloud.vision.v1p4beta1.T" + + "extAnnotation.TextProperty\022A\n\014bounding_b" + + "ox\030\002 \001(\0132+.google.cloud.vision.v1p4beta1" + + ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + + "e\030\004 \001(\002B\211\001\n!com.google.cloud.vision.v1p4" + + "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + + "ang.org/genproto/googleapis/cloud/vision" + + "/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), }); internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor = @@ -211,7 +209,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.api.AnnotationsProto.getDescriptor(); com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); } diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java index 04f25e33d1d1..0e0dd53408cb 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java @@ -58,41 +58,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/cloud/vision/v1p4beta1/web_dete" + "ction.proto\022\035google.cloud.vision.v1p4bet" - + "a1\032\034google/api/annotations.proto\"\214\007\n\014Web" - + "Detection\022K\n\014web_entities\030\001 \003(\01325.google" - + ".cloud.vision.v1p4beta1.WebDetection.Web" - + "Entity\022R\n\024full_matching_images\030\002 \003(\01324.g" - + "oogle.cloud.vision.v1p4beta1.WebDetectio" - + "n.WebImage\022U\n\027partial_matching_images\030\003 " - + "\003(\01324.google.cloud.vision.v1p4beta1.WebD" - + "etection.WebImage\022W\n\032pages_with_matching" - + "_images\030\004 \003(\01323.google.cloud.vision.v1p4" - + "beta1.WebDetection.WebPage\022U\n\027visually_s" - + "imilar_images\030\006 \003(\01324.google.cloud.visio" - + "n.v1p4beta1.WebDetection.WebImage\022O\n\021bes" - + "t_guess_labels\030\010 \003(\01324.google.cloud.visi" - + "on.v1p4beta1.WebDetection.WebLabel\032B\n\tWe" - + "bEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(" - + "\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebImage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007WebPage\022\013\n\003ur" - + "l\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001" - + "(\t\022R\n\024full_matching_images\030\004 \003(\01324.googl" - + "e.cloud.vision.v1p4beta1.WebDetection.We" - + "bImage\022U\n\027partial_matching_images\030\005 \003(\0132" - + "4.google.cloud.vision.v1p4beta1.WebDetec" - + "tion.WebImage\0320\n\010WebLabel\022\r\n\005label\030\001 \001(\t" - + "\022\025\n\rlanguage_code\030\002 \001(\tB\207\001\n!com.google.c" - + "loud.vision.v1p4beta1B\021WebDetectionProto" - + "P\001ZCgoogle.golang.org/genproto/googleapi" - + "s/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCV" - + "Nb\006proto3" + + "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + + "\01325.google.cloud.vision.v1p4beta1.WebDet" + + "ection.WebEntity\022R\n\024full_matching_images" + + "\030\002 \003(\01324.google.cloud.vision.v1p4beta1.W" + + "ebDetection.WebImage\022U\n\027partial_matching" + + "_images\030\003 \003(\01324.google.cloud.vision.v1p4" + + "beta1.WebDetection.WebImage\022W\n\032pages_wit" + + "h_matching_images\030\004 \003(\01323.google.cloud.v" + + "ision.v1p4beta1.WebDetection.WebPage\022U\n\027" + + "visually_similar_images\030\006 \003(\01324.google.c" + + "loud.vision.v1p4beta1.WebDetection.WebIm" + + "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + + "cloud.vision.v1p4beta1.WebDetection.WebL" + + "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + + "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + + "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + + "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + + "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + + "(\01324.google.cloud.vision.v1p4beta1.WebDe" + + "tection.WebImage\022U\n\027partial_matching_ima" + + "ges\030\005 \003(\01324.google.cloud.vision.v1p4beta" + + "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + + "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\207\001\n!co" + + "m.google.cloud.vision.v1p4beta1B\021WebDete" + + "ctionProtoP\001ZCgoogle.golang.org/genproto" + + "/googleapis/cloud/vision/v1p4beta1;visio" + + "n\370\001\001\242\002\004GCVNb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable = @@ -146,7 +142,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Label", "LanguageCode", }); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto index 1786f26f0655..d2ab72f0cded 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; option cc_enable_arenas = true; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto index 18877188faea..877fd8972dfe 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto index 6d7f3dd1f621..cc7836974588 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto @@ -26,7 +26,6 @@ import "google/cloud/vision/v1p4beta1/product_search.proto"; import "google/cloud/vision/v1p4beta1/text_annotation.proto"; import "google/cloud/vision/v1p4beta1/web_detection.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/type/color.proto"; @@ -176,7 +175,8 @@ message Feature { // Model to use for the feature. // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". + // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + // support "builtin/weekly" for the bleeding edge release updated weekly. string model = 3; } diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto index 15baed1fd27c..ebb428acc800 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; -import "google/api/annotations.proto"; import "google/api/resource.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/cloud/vision/v1p4beta1/product_search_service.proto"; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto index fbc35bb5458f..233c4c689e4f 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; -import "google/api/annotations.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; option cc_enable_arenas = true; diff --git a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto index 446a937f1c8e..7d716570f45d 100644 --- a/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto +++ b/java-vision/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto @@ -17,7 +17,6 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java index a4aef8ae74a8..407a0e08113b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java index 52d1aacd6ccb..81966ec0a228 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java index de69fa9ebfef..bab83fd45aa6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java index c565722ffce2..dd2f19273455 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); AsyncBatchAnnotateFilesResponse response = diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java index a45c8455c96d..fd4daac8174c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java index 9511ad288bc2..d70f74735aad 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java @@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java index 7c049a7654a7..3549656d6e8c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java index 849827c96aec..9c176e661922 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); OutputConfig outputConfig = OutputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java index df52d7f45429..6c883b8837bf 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateFilesRequest request = BatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java index 9a0e8719f937..844e709a2891 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateFilesRequest request = BatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java index 9348eb2d01be..f924b8679def 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java index 8978b510db69..21abc33d3bec 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java index 293db9dd5d24..2b85b47fdf9e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java index 47a349f16db5..bce8ba646b2d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java index a31661de4f6c..c42fa0d1f913 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java index 5a455ad1f4a6..ee7d1e93e5c4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java index e62f89156b14..a797d91056cb 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java index 21c2183f429e..fae2c28c273c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java index 512c59685d3c..bb216d3cbbc2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java index d044d5d658e1..b7854e68ba8a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java index f8b06b4b3a96..7fcf26218819 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java index 0a9b8168a472..15b3dec173a0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java index ba221201103e..c828036193da 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java index be1bb73c28b8..19acbd7d333e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java index 8c58a07b85ef..58ee9ce5ba26 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java index dfc5e5475cfd..6909f84839a1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java index b92eefe90fe8..a21ddb568b2a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java index 67d691713858..965d12a07bf5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java index 5687fb2e5cce..657f205da15e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java index d94cf72831a1..9940be3768fd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java index e7ea74db27e0..5c761a24ad63 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java index cf7cb3657186..78c5c6f68fd1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java index 3820e6eb0eea..1c21416a188e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java index a276381ff4ea..9af78ce034a6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java index 8562337d64cd..eb4eb7041b95 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java index a46507f3836a..009d254512ed 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java index e00d8582d32a..252d3d8efab9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java index 37a524e0282b..0353a7bacb91 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java index f939351db8e9..8d0cf94e9c67 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java index 2d34960e9be5..835c1a5467db 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java index 5bedcf38ff6f..99b9976cad81 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java index 6b83ae61fd4f..2b61e965260e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java index 079adb14826c..5d894b0247e8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java index 6e8c0d0a562e..d9200e0d95b9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java index 583a7278a274..efa36c27487b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java index 9af4eeb6a956..df03f2d90350 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java index 2256acace3d7..2ea900242ca9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java index 4fee52749968..19bfa911bfea 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java index 9d8b7ea02940..a77173f14d50 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java index 1bc875eb98fc..b6350460a8e0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java index d077d2c7f8ff..1e1afa25b8de 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java index ee1a6875aee2..c1887ad1f2b0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java index 7233cf1000e0..a7c67d8cdddd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java index 0c5fad9de310..0cd545c6d15f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java index 129cabcdc6dc..a5fff300c5ae 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java index ef7ecb8db404..fedd368f0b9a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java index 05794be71066..62662fae065c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java index f2454728e0da..dc83c167595f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java index 908b3d5eb404..bef47bc37bd0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java index 2b8e4d952d0c..5dcfbd9e934c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java index 27ff47128f9f..d11afa0d584f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java index 90845e0ad481..5173516b1e3a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java index 0d25acb0bd7d..fdf311488bd2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java index d3deb4993272..18e9ff5c2827 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java index 8c831ec57fb8..4de907415c16 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java index eb9fcafef0f0..71f4fe016382 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java index 6972901a8801..28713098bc0d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java index 9d55154a48b6..de3a679ccb18 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java index a4427b4f2059..602d49902116 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java index 6eb2e35c8a32..b3da88b93663 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java index 45f89f53e5a7..1eb469ac4749 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java index b0392dc72fea..eb2a071ffda7 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java index 0b8b39de1e50..93e2384a4624 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java index 70d845ba4693..0e2297fea556 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java index 6dd46a906a68..15dad8ec89e0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java index 088a0417cbb8..3c85346fad3a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java index c0157b379cb1..13340af5f61e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java index 829544fbf92d..5462cffe9676 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java index efddae86add7..bca01700804f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java index dffd39c0bfa4..42b373fcbcc1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java index 8e16c45bc556..fbed3686e817 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java index 1a612f1d7699..aacfe68e0c15 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java index 2976a0d190c0..465ef4f4b156 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java index 38a18d0987c7..bb444a7a3477 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java index 47ae86633aa5..5b5fbeac144f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java index 3ce717e67ce8..3ad85e5d4226 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java index e16bc90d07ce..af20db290a29 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java index 81d179eb99f2..0200dfb0e566 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java index 7b37a7cd204f..d358df187e6f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java index 169569b37983..fa20abafc66c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeProductsLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java index 3cf5383d2921..ce75436790d3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java index e49b08797fe9..e4dd9b43b2df 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProductsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); productSearchClient.purgeProductsAsync(parent).get(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java index a7d58c00700f..5a7bd9a54047 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProductsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); productSearchClient.purgeProductsAsync(parent).get(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java index c4ea922f62db..12bb178479bd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java index 170dfa48467d..2c1d2565a2b1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java index 32ba1933971f..a85d93527f17 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java index 4a02869c37bb..d14baff1cf16 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java index e8133031c73e..0295bd233b64 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java index 76eead3e51eb..ce1888b572bf 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java index d15be7863729..1704b63bc084 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java index 560011b9f31b..ad06e2b0b6a8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java index d3837c0ed7d5..220acd7f3289 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { Product product = Product.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java index 2188ed961752..c40d55a7ea7e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java index 880b87773308..100bcf3c7d2a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java index 9b037115d67f..9727c5ca520f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSet productSet = ProductSet.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java index 2646a317605a..7a737a0d8f59 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java index 11b42f80e157..76e7ff91795d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorStubSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java index 962dd0776c1e..5396f00848cf 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchStubSettings.Builder productSearchSettingsBuilder = ProductSearchStubSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java index 0b2d54aabf39..1d51e8ec2f76 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java index c6d0162458dc..7135c01739b3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java index b9d1538f7e49..fd295212a666 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java index dac7410b7a61..fd559b5be3db 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java index ca296f724da5..d4a8a48d420b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java index a69bba54e138..4506072cbb00 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java index 4ebc3aad2176..1221c05f23a4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java index 6b518f507071..963d6f74191a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorStubSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java index 990994c7faf0..05d786512262 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java index 9368a01543bd..bb6cf7b6b4e9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java index f3b39a9cc9d4..2c2a830b9139 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java index c2608974e214..4dcfe27f26d2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); AsyncBatchAnnotateFilesResponse response = diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java index 7742309180b5..645d8703aa05 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java index 1429e9739ea7..d5a912c6e10c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java index 26672a50b15a..d0c92735b810 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java index 18fcda6f513e..c9da22a74b4f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java index 1c9fc45c5464..f53a19c572ce 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java index b138695882eb..7cca27fe6e9d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java index 53c4164dc59a..3d4ab2bbf979 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java index 964c75726931..e5e0fd50fdb9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorStubSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java index 27e557a9c5db..09cb3693af8c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java index e8d9caf7b879..6d588b9982e2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java index ba04c42a0088..e2b0d8974492 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java index 782ce13559ec..77154aa7d802 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); AsyncBatchAnnotateFilesResponse response = diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java index ea639bc9c34c..282718c23f81 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java index c923a152b4b6..e24118ffc722 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java index 1dc8a01baeaf..e17a7845dde6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java index 6bda10d01a5c..81d36792636e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java index 22dfe1eaa55c..e61ffe63b65a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java index dbed04152b14..5c81a10f70ca 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java index fc827245d405..e9e89467203a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java index 533054cc52a4..cefc670f91d5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java index 46d06174e548..81188b7017b1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java index 3972539cffe4..3b650f90729e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java index 0069a8cd7dbf..e5315729bef2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java index b4433e81d9ca..e807d05b1d15 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java index 04c8e04f35ba..141cdd0fc76e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java index 5d7bf9758537..a67860361f29 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java index fb4fcbe6354d..93e867cda918 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java index edc3f344cc04..f69dafc186e0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java index 9af3a914aeb7..08c25eb500a1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java index 195336f2abe1..06f1144b6239 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java index ef1be004338d..30a8e2fbaecf 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java index 12602bc3b6b4..d5da324cd1e8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java index 9697cc6e3883..7282006d3dc0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java index b47e1f9a6cce..e6a9cebd0d30 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java index bb8181b352d3..5b3719f16d89 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java index 72cc3acec7b5..3dafc768a4ef 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java index bf5e24b8e73d..a1099b9c970e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java index ce024e0e2986..8de6d52d7b31 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java index 15c9e6114dae..ab15f1cc3d59 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java index 5e27f661815c..d96b857d1538 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java index ed6b85b19096..e7bc0611ca0b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java index 9229c99f6ea0..58fc0f3064c4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java index 652a91f438b4..00b977f57be4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java index fccc0253d36b..f9e364931413 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java index af2404334759..a0b3481ed35c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java index 2c9d2ac08a02..47f05b8ab936 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java index 54de01dea835..c7a9a8219f9c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java index 2245897cca4c..ab5f22cf9ae4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java index 1030ec55a06c..107f9b0ea93c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java index fc75058db7a8..7e13278940d2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java index 4c4fc0eba8ff..774bfcd8a883 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java index e7c9525e7b6c..6580c333b742 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java index 4ba33ac3687a..dec67e615f74 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java index b4633b14e141..172b278b9773 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java index 0b4047436847..7e52c7e1a832 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java index d4dbb777981f..77e33f15a908 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java index 00ffb6bc4d3a..084e9c991d63 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java index 4a12adbd30da..94f59279ccc9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java index f7c71eeff8e1..ac6317c45149 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java index 2a467baca2cd..9b547f4b67a9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java index a7f07b5d1647..e8d72c529e4f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java index ddf93eebf99d..39fd456a8b5e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java index fc4d1adc1dc0..2c258155c522 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java index f8b0246a78ed..a677430297f7 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java index 8b543a0cca47..940862b3d0bc 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java index ccb149c8e485..f52024c60ab9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java index 0be377eca30f..eb629deacef9 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java index 0cc58433dccc..b1c76f40a289 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java index 08b200f9c699..0ddbf0325743 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java index e0c8e47f2cd3..22e018b7db0a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java index f1a5d4aa27d5..602d5aab443c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java index 37e8dfd7b326..26e13ed07293 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java index 083c86797521..51be97599542 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java index f156d4354eb5..014807bf18fc 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java index 165f0b245adb..731003110144 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java index 5e454493f1de..3f30b5d46786 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java index 463615a4b672..29035c5e5b34 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java index 2cfa1086aeaf..1a9e639500a3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java index 79f0475a121c..46bd837a6bd6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java index 2b5e3fb3f6a2..4068d1bc27e2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java index e0409004a151..e9a497d98998 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java index 8fcb98ff60bb..9609d21d1ac3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java index de62fbffeec7..4afae165a370 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java index 40338a07241d..adcc4acc5e6d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java index 0586619cb326..f5aa8c6fff5c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java index 82f1f7677ed9..44d598fc4010 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java index 5796846735d4..a507902f8c58 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java index 9c08e2d7389a..79e99528cb88 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java index 619aaee78844..7105d84e326b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java index 264f773fbe2e..4156a31363c1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java index 30adc33a9256..b8d204b00561 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java index f7e9c8fc8eb5..a39b39523015 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java index 79de6ae33f41..045c962e40cd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java index 96caddba0c84..510dea6b38e1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java index aa8f842a2e4c..f21bf3b9adc2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java index 882ebf46fedd..4f39f4e62285 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java index 7e4f49afcad2..5d8577e13df6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java index bb05b2037c01..aab6300ab184 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { Product product = Product.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java index a015b0dea680..b74fd146cdea 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java index a2f8abbcd789..9cdc578b07de 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java index d391e356eb01..b0abad28e48e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSet productSet = ProductSet.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java index 4ff45436e518..f4f7d368ff02 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java index 6644fa4c3b13..b00bf50eb263 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorStubSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java index 0f3638abce58..2854e5a26fe6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchStubSettings.Builder productSearchSettingsBuilder = ProductSearchStubSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java index 2596b80d1ff5..3560b383184f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java index b10c0539f086..fe9f4bcd280d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java index 283f71504e10..a7f94cf4cf38 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java index ce6f0bb1c0b0..cca207531cdc 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); AsyncBatchAnnotateFilesResponse response = diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java index d6c129ea3945..f0b8de781153 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java index b2a404c11032..8b8c67b8d86b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java @@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java index be053e027de7..9e5abd57b143 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { AsyncBatchAnnotateImagesRequest request = AsyncBatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java index b38e2f97c703..ac9ad1dff5ee 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); OutputConfig outputConfig = OutputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java index d713be7a80be..dcbc6b6d15ea 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateFilesRequest request = BatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java index 81ffcfe75728..36ebcb7fd2ea 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateFilesRequest request = BatchAnnotateFilesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java index 90b61dbea682..6d2cb3d4faef 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java index 689119130f3f..d3be582406ed 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java index 54928522389f..77c4afa9fb95 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java index df9efcea8541..a68569dbd06e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { List requests = new ArrayList<>(); BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java index 02ea14b4acda..81361ed4fc17 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java index a0443d02b1e5..76b3f9bd4ab0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java index 01cd71f84a04..ebf53528ca10 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings imageAnnotatorSettings = ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java index f46a1dedceb0..76f5c4e198ac 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java index 838d54f95e96..826b621f04a2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java index 7f44c8995c9a..73fa23f52b2b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java index adfd6e5379c6..8b5f8d7c5023 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java index c24381de8cd7..1afa9bb839cc 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java index aaf5dd6c4902..1fe7ef4254f0 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java index 58213b2d866d..61a46026adee 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java index a2701e5bd00c..c95d346c734c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java index 109564889dc0..3a95805781f5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java index c165ae58d0a2..3f394b403dd7 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings productSearchSettings = ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java index 85344e60b23f..07650db00def 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java index 533161528a02..84bd73a29378 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductRequest request = CreateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java index bf3b5ba22e9c..15d8dc4c863c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java index a8999f14bb9e..f7fad35f7074 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Product product = Product.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java index f4da457f035c..b128072caf92 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java index c6535de6ba9c..dd81ded3f2c2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateProductSetRequest request = CreateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java index 5d89b0d0b0d7..fc9ca3591107 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java index c134ebbd3f0a..d4a7ec2fde40 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ProductSet productSet = ProductSet.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java index a9364a5f95a7..3172b3b3f90d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java index b99ed9a5d2cf..533d6344ab01 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { CreateReferenceImageRequest request = CreateReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java index 41d8c405c6e2..f5f00ef3a16f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java index afab3ec05393..5882fd385d67 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java index bae78e4831fe..f1b9e84c8b7c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java index cb5c9473cf07..4812dd1df924 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductRequest request = DeleteProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java index 52253ab39be2..ad0bae7d6672 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java index 4b419219bb15..10cd71d23b80 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); productSearchClient.deleteProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java index 5ffb39fda4b0..efe3a25c5858 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java index fac3b9c74612..e44c89e7db0c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java index 6f4688505c98..e582d2735c93 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java index 6005f2d7e47f..ad1e731dc973 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); productSearchClient.deleteProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java index f417327c0ca5..f1aecab1b8d6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java index 96a3109a597f..6395f93a0b5a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java index 6a2d1a0b3daf..46352b0a6f2d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java index 68221d8fedc4..b917ac1570fd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java index 0d121f430a05..fe223c94d35c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java index dcea1eff676c..d882ff04c1aa 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductRequest request = GetProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java index 130ff7a417e9..b2d76a567e04 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java index b706b29bd9ab..bb02aba4f7d8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); Product response = productSearchClient.getProduct(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java index 130745414372..85f4202dcc99 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java index b065d9e4404c..538605a99b1c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetProductSetRequest request = GetProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java index 7f66c992452f..4555b7710b05 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java index 4e19e808dcd6..0ce7f569f705 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductSet response = productSearchClient.getProductSet(name); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java index 65201b35c298..14bd71a62a72 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java index f7542243380c..3ad5a3db5f20 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java index e8acc4896cbd..15738a52dbb4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ReferenceImageName name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java index 2376fe134e03..b4f16dc3601c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java index 6d0572e5fc91..3c466d78b02d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java index e661950aa570..e69236bd1210 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java index 84ab57aafa4d..98d8717a5618 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ImportProductSetsRequest request = ImportProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java index 8de0043223c7..06350d69882d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java index 39df9f024ee1..d61be7abb0c2 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java index 6f2e1d85f57b..530baf6cf05a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java index 5acf5b3ffdda..4a10769b4e03 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java index 7b25981bfaaa..f8803d503432 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsRequest request = ListProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java index 5a402b10595a..6403e8c13eaf 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java index cc09a44b0d5a..606953592de3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Product element : productSearchClient.listProducts(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java index 172d2b21ae42..f2c73fed2e06 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java index 09b0aee98647..05ef50702322 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java index 6f932ba1f59a..d2866996e864 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductSetsRequest request = ListProductSetsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java index 2508f3fe0ca9..01f5b5a7ffa1 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java index 7232271a90e3..2be635726289 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java index 98128e62655e..00a1e318e919 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java index c91fe9d489f2..7b5f873cb776 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java index d13a297e4291..97832d7cbe38 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListProductsInProductSetRequest request = ListProductsInProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java index 8a3a1ef797c3..0c656c2ed6f5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java index 6e5e6a229a25..7febaade01d8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java index d61caad108df..b54425a43cdd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java index b15ff7d57efc..53b128c781b6 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java index 3cf83c28292d..8b6e2f9b7fcd 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ListReferenceImagesRequest request = ListReferenceImagesRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java index 299de511505e..e307423e9801 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java index d4d9145d8600..0e5dbc6f2b0b 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java index cdbb5087cb21..f573a4788e3a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java index 5ff40627662d..ec01509dcd3f 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncPurgeProductsLRO() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java index b404c5f8a50e..91ae2175daf7 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProducts() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { PurgeProductsRequest request = PurgeProductsRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java index 8fe93c5a722a..990682c1ef37 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProductsLocationname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); productSearchClient.purgeProductsAsync(parent).get(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java index 4f0c6ab9d984..d2b09229c08e 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncPurgeProductsString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); productSearchClient.purgeProductsAsync(parent).get(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java index 15664749d8b3..90a8d41259b5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java index 994dec221b4b..6b9a54798872 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java index 83ab46025a02..804f5772d2d8 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java index 970b71c10704..2943c3dba374 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java index 0bbd161d395f..50201fa1e716 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java index 29cd6ee1efaa..2acbf86656d5 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java index 2f30feee937b..d868c9b5d1a4 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java index d3c9c1c63452..103e182d4272 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductRequest request = UpdateProductRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java index d8de09474926..14ed817ce21d 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { Product product = Product.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java index ed2ebd5e8e83..f075fe2694e3 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java index 62fcb9362b58..1f5f451318be 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { UpdateProductSetRequest request = UpdateProductSetRequest.newBuilder() diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java index f363755ca9be..9ae891af3586 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSet productSet = ProductSet.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java index 1abe83dff6ad..1434aed48845 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java index 8d3d27807cfd..d1c22650ed1a 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = ImageAnnotatorStubSettings.newBuilder(); imageAnnotatorSettingsBuilder diff --git a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java index 35837206fe7a..f47575caf07c 100644 --- a/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ b/java-vision/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated for illustrative purposes only. - // It may require modifications to work in your environment. + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ProductSearchStubSettings.Builder productSearchSettingsBuilder = ProductSearchStubSettings.newBuilder(); productSearchSettingsBuilder .createProductSetSettings() .setRetrySettings( - productSearchSettingsBuilder - .createProductSetSettings() - .getRetrySettings() - .toBuilder() + productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java deleted file mode 100644 index e4052e59e0cc..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java +++ /dev/null @@ -1,715 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.stub.ImageAnnotatorStub; -import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ImageAnnotatorClient implements BackgroundResource { - private final ImageAnnotatorSettings settings; - private final ImageAnnotatorStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ImageAnnotatorClient with default settings. */ - public static final ImageAnnotatorClient create() throws IOException { - return create(ImageAnnotatorSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) - throws IOException { - return new ImageAnnotatorClient(settings); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ImageAnnotatorSettings). - */ - public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { - return new ImageAnnotatorClient(stub); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ImageAnnotatorClient(ImageAnnotatorStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ImageAnnotatorSettings getSettings() { - return settings; - } - - public ImageAnnotatorStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages( - List requests) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { - return batchAnnotateImagesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateImagesCallable() { - return stub.batchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
-   * }
-   * }
- * - * @param requests Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateFilesResponse batchAnnotateFiles(List requests) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateFiles(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateFilesRequest request =
-   *       BatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesRequest request) { - return batchAnnotateFilesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateFilesRequest request =
-   *       BatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateFilesCallable() { - return stub.batchAnnotateFilesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   AsyncBatchAnnotateImagesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get();
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @param outputConfig Required. The desired output location and metadata (e.g. format). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateImagesAsync( - List requests, OutputConfig outputConfig) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(requests) - .setOutputConfig(outputConfig) - .build(); - return asyncBatchAnnotateImagesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   AsyncBatchAnnotateImagesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest request) { - return asyncBatchAnnotateImagesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return stub.asyncBatchAnnotateImagesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateImagesCallable() { - return stub.asyncBatchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
-   * }
-   * }
- * - * @param requests Required. Individual async file annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(List requests) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return asyncBatchAnnotateFilesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { - return asyncBatchAnnotateFilesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return stub.asyncBatchAnnotateFilesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setParent("parent-995424086")
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateFilesCallable() { - return stub.asyncBatchAnnotateFilesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java deleted file mode 100644 index 1ca38b946c39..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ImageAnnotatorSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings - batchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings - asyncBatchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateImagesOperationSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateFilesOperationSettings(); - } - - public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) - throws IOException { - return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ImageAnnotatorStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ImageAnnotatorStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ImageAnnotatorSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ImageAnnotatorStubSettings.newBuilder(clientContext)); - } - - protected Builder(ImageAnnotatorSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ImageAnnotatorStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); - } - - public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { - return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return getStubSettingsBuilder().batchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings.Builder - batchAnnotateFilesSettings() { - return getStubSettingsBuilder().batchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateImagesOperationSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); - } - - @Override - public ImageAnnotatorSettings build() throws IOException { - return new ImageAnnotatorSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java deleted file mode 100644 index 07e14db991a5..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java +++ /dev/null @@ -1,3873 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.stub.ProductSearchStub; -import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named - * `projects/*/locations/*/productSets/*`, which acts as a way to put different products - * into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named - * `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- * - *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ProductSearchSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ProductSearchClient implements BackgroundResource { - private final ProductSearchSettings settings; - private final ProductSearchStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ProductSearchClient with default settings. */ - public static final ProductSearchClient create() throws IOException { - return create(ProductSearchSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ProductSearchClient create(ProductSearchSettings settings) - throws IOException { - return new ProductSearchClient(settings); - } - - /** - * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ProductSearchSettings). - */ - public static final ProductSearchClient create(ProductSearchStub stub) { - return new ProductSearchClient(stub); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ProductSearchClient(ProductSearchSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ProductSearchClient(ProductSearchStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ProductSearchSettings getSettings() { - return settings; - } - - public ProductSearchStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - LocationName parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - String parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ProductSet response = productSearchClient.createProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet(CreateProductSetRequest request) { - return createProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductSetCallable() { - return stub.createProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(LocationName parent) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(String parent) { - ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { - return listProductSetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ProductSet element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsPagedCallable() { - return stub.listProductSetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductSetsResponse response =
-   *         productSearchClient.listProductSetsCallable().call(request);
-   *     for (ProductSet element : response.getProductSetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsCallable() { - return stub.listProductSetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(ProductSetName name) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(String name) { - GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ProductSet response = productSearchClient.getProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(GetProductSetRequest request) { - return getProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductSetCallable() { - return stub.getProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
-   * }
-   * }
- * - * @param productSet Required. The ProductSet resource which replaces the one on the server. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * path is `display_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(productSet) - .setUpdateMask(updateMask) - .build(); - return updateProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ProductSet response = productSearchClient.updateProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(UpdateProductSetRequest request) { - return updateProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.updateProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductSetCallable() { - return stub.updateProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(ProductSetName name) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(String name) { - DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   productSearchClient.deleteProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(DeleteProductSetRequest request) { - deleteProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductSetCallable() { - return stub.deleteProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(LocationName parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(String parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   Product response = productSearchClient.createProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(CreateProductRequest request) { - return createProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductCallable() { - return stub.createProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(LocationName parent) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(String parent) { - ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(ListProductsRequest request) { - return listProductsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsPagedCallable() { - return stub.listProductsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listProductsCallable() { - return stub.listProductsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(ProductName name) { - GetProductRequest request = - GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(String name) { - GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   Product response = productSearchClient.getProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(GetProductRequest request) { - return getProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductCallable() { - return stub.getProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   Product product = Product.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Product response = productSearchClient.updateProduct(product, updateMask);
-   * }
-   * }
- * - * @param product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * paths include `product_labels`, `display_name`, and `description`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(Product product, FieldMask updateMask) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); - return updateProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Product response = productSearchClient.updateProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(UpdateProductRequest request) { - return updateProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductCallable() { - return stub.updateProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(ProductName name) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(String name) { - DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.deleteProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(DeleteProductRequest request) { - deleteProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductCallable() { - return stub.deleteProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - ProductName parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - String parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { - return createReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createReferenceImageCallable() { - return stub.createReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(ReferenceImageName name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(String name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder().setName(name).build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   productSearchClient.deleteReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(DeleteReferenceImageRequest request) { - deleteReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteReferenceImageCallable() { - return stub.deleteReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder().setParent(parent).build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages( - ListReferenceImagesRequest request) { - return listReferenceImagesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ReferenceImage element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesPagedCallable() { - return stub.listReferenceImagesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListReferenceImagesResponse response =
-   *         productSearchClient.listReferenceImagesCallable().call(request);
-   *     for (ReferenceImage element : response.getReferenceImagesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesCallable() { - return stub.listReferenceImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(ReferenceImageName name) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(String name) { - GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { - return getReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getReferenceImageCallable() { - return stub.getReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.addProductToProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(AddProductToProductSetRequest request) { - addProductToProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - addProductToProductSetCallable() { - return stub.addProductToProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.removeProductFromProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { - removeProductFromProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - removeProductFromProductSetCallable() { - return stub.removeProductFromProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder().setName(name).build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet( - ListProductsInProductSetRequest request) { - return listProductsInProductSetPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetPagedCallable() { - return stub.listProductsInProductSetPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsInProductSetResponse response =
-   *         productSearchClient.listProductsInProductSetCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetCallable() { - return stub.listProductsInProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInputConfig(inputConfig) - .build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(ImportProductSetsRequest request) { - return importProductSetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   ImportProductSetsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return stub.importProductSetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.importProductSetsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable importProductSetsCallable() { - return stub.importProductSetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   productSearchClient.purgeProductsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The project and location in which the Products should be deleted. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync( - LocationName parent) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return purgeProductsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   productSearchClient.purgeProductsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The project and location in which the Products should be deleted. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync(String parent) { - PurgeProductsRequest request = PurgeProductsRequest.newBuilder().setParent(parent).build(); - return purgeProductsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   productSearchClient.purgeProductsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync( - PurgeProductsRequest request) { - return purgeProductsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   OperationFuture future =
-   *       productSearchClient.purgeProductsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - purgeProductsOperationCallable() { - return stub.purgeProductsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable purgeProductsCallable() { - return stub.purgeProductsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListProductSetsPagedResponse - extends AbstractPagedListResponse< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductSetsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductSetsPagedResponse(ListProductSetsPage page) { - super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductSetsPage - extends AbstractPage< - ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { - - private ListProductSetsPage( - PageContext context, - ListProductSetsResponse response) { - super(context, response); - } - - private static ListProductSetsPage createEmptyPage() { - return new ListProductSetsPage(null, null); - } - - @Override - protected ListProductSetsPage createPage( - PageContext context, - ListProductSetsResponse response) { - return new ListProductSetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductSetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - private ListProductSetsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductSetsFixedSizeCollection createEmptyCollection() { - return new ListProductSetsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductSetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductSetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsPagedResponse - extends AbstractPagedListResponse< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsPagedResponse(ListProductsPage page) { - super(page, ListProductsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsPage - extends AbstractPage { - - private ListProductsPage( - PageContext context, - ListProductsResponse response) { - super(context, response); - } - - private static ListProductsPage createEmptyPage() { - return new ListProductsPage(null, null); - } - - @Override - protected ListProductsPage createPage( - PageContext context, - ListProductsResponse response) { - return new ListProductsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - private ListProductsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsFixedSizeCollection createEmptyCollection() { - return new ListProductsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListReferenceImagesPagedResponse - extends AbstractPagedListResponse< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListReferenceImagesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { - super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListReferenceImagesPage - extends AbstractPage< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage> { - - private ListReferenceImagesPage( - PageContext - context, - ListReferenceImagesResponse response) { - super(context, response); - } - - private static ListReferenceImagesPage createEmptyPage() { - return new ListReferenceImagesPage(null, null); - } - - @Override - protected ListReferenceImagesPage createPage( - PageContext - context, - ListReferenceImagesResponse response) { - return new ListReferenceImagesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListReferenceImagesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - private ListReferenceImagesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { - return new ListReferenceImagesFixedSizeCollection(null, 0); - } - - @Override - protected ListReferenceImagesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsInProductSetPagedResponse - extends AbstractPagedListResponse< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsInProductSetPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { - super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsInProductSetPage - extends AbstractPage< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage> { - - private ListProductsInProductSetPage( - PageContext - context, - ListProductsInProductSetResponse response) { - super(context, response); - } - - private static ListProductsInProductSetPage createEmptyPage() { - return new ListProductsInProductSetPage(null, null); - } - - @Override - protected ListProductsInProductSetPage createPage( - PageContext - context, - ListProductsInProductSetResponse response) { - return new ListProductsInProductSetPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsInProductSetFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - private ListProductsInProductSetFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { - return new ListProductsInProductSetFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsInProductSetFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java deleted file mode 100644 index 2ba924221d31..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ProductSearchSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public UnaryCallSettings purgeProductsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).purgeProductsSettings(); - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public OperationCallSettings - purgeProductsOperationSettings() { - return ((ProductSearchStubSettings) getStubSettings()).purgeProductsOperationSettings(); - } - - public static final ProductSearchSettings create(ProductSearchStubSettings stub) - throws IOException { - return new ProductSearchSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ProductSearchStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ProductSearchStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ProductSearchStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ProductSearchStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ProductSearchSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ProductSearchStubSettings.newBuilder(clientContext)); - } - - protected Builder(ProductSearchSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ProductSearchStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ProductSearchStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); - } - - public ProductSearchStubSettings.Builder getStubSettingsBuilder() { - return ((ProductSearchStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return getStubSettingsBuilder().createProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return getStubSettingsBuilder().listProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getStubSettingsBuilder().getProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return getStubSettingsBuilder().updateProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return getStubSettingsBuilder().deleteProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return getStubSettingsBuilder().createProductSettings(); - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return getStubSettingsBuilder().listProductsSettings(); - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getStubSettingsBuilder().getProductSettings(); - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return getStubSettingsBuilder().updateProductSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return getStubSettingsBuilder().deleteProductSettings(); - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return getStubSettingsBuilder().createReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return getStubSettingsBuilder().deleteReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return getStubSettingsBuilder().listReferenceImagesSettings(); - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getStubSettingsBuilder().getReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return getStubSettingsBuilder().addProductToProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return getStubSettingsBuilder().removeProductFromProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return getStubSettingsBuilder().listProductsInProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return getStubSettingsBuilder().importProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return getStubSettingsBuilder().importProductSetsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public UnaryCallSettings.Builder purgeProductsSettings() { - return getStubSettingsBuilder().purgeProductsSettings(); - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public OperationCallSettings.Builder - purgeProductsOperationSettings() { - return getStubSettingsBuilder().purgeProductsOperationSettings(); - } - - @Override - public ProductSearchSettings build() throws IOException { - return new ProductSearchSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json deleted file mode 100644 index 1c4e22191430..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/gapic_metadata.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vision.v1", - "libraryPackage": "com.google.cloud.vision.v1", - "services": { - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "ImageAnnotatorClient", - "rpcs": { - "AsyncBatchAnnotateFiles": { - "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] - }, - "AsyncBatchAnnotateImages": { - "methods": ["asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesOperationCallable", "asyncBatchAnnotateImagesCallable"] - }, - "BatchAnnotateFiles": { - "methods": ["batchAnnotateFiles", "batchAnnotateFiles", "batchAnnotateFilesCallable"] - }, - "BatchAnnotateImages": { - "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] - } - } - } - } - }, - "ProductSearch": { - "clients": { - "grpc": { - "libraryClient": "ProductSearchClient", - "rpcs": { - "AddProductToProductSet": { - "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] - }, - "CreateProduct": { - "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] - }, - "CreateProductSet": { - "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] - }, - "CreateReferenceImage": { - "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] - }, - "DeleteProduct": { - "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] - }, - "DeleteProductSet": { - "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] - }, - "DeleteReferenceImage": { - "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] - }, - "GetProduct": { - "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] - }, - "GetProductSet": { - "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] - }, - "GetReferenceImage": { - "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] - }, - "ImportProductSets": { - "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] - }, - "ListProductSets": { - "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] - }, - "ListProducts": { - "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] - }, - "ListProductsInProductSet": { - "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] - }, - "ListReferenceImages": { - "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] - }, - "PurgeProducts": { - "methods": ["purgeProductsAsync", "purgeProductsAsync", "purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] - }, - "RemoveProductFromProductSet": { - "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] - }, - "UpdateProduct": { - "methods": ["updateProduct", "updateProduct", "updateProductCallable"] - }, - "UpdateProductSet": { - "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java deleted file mode 100644 index 4604adec721f..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Cloud Vision API - * - *

The interfaces provided are listed below, along with usage samples. - * - *

======================= ImageAnnotatorClient ======================= - * - *

Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

Sample for ImageAnnotatorClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

======================= ProductSearchClient ======================= - * - *

Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named - * `projects/*/locations/*/productSets/*`, which acts as a way to put different products - * into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named - * `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

Sample for ProductSearchClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vision.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java deleted file mode 100644 index 48312a70ec58..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java deleted file mode 100644 index da274e8e871c..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcImageAnnotatorStub.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.OperationMetadata; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { - private static final MethodDescriptor - batchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateFilesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - batchAnnotateFilesCallable; - private final UnaryCallable - asyncBatchAnnotateImagesCallable; - private final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final GrpcImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcImageAnnotatorStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - batchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - asyncBatchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - asyncBatchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.batchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - batchAnnotateFilesTransportSettings, - settings.batchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateImagesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesOperationSettings(), - clientContext, - operationsStub); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - batchAnnotateFilesCallable() { - return batchAnnotateFilesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - return asyncBatchAnnotateImagesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return asyncBatchAnnotateImagesOperationCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java deleted file mode 100644 index 85024d906c6e..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java deleted file mode 100644 index 03a93cca4b21..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/GrpcProductSearchStub.java +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.ListProductSetsResponse; -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.ListProductsResponse; -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcProductSearchStub extends ProductSearchStub { - private static final MethodDescriptor - createProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProducts") - .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProduct") - .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProduct") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listReferenceImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListReferenceImages") - .setRequestMarshaller( - ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - addProductToProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/AddProductToProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - removeProductFromProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductsInProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - importProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ImportProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - purgeProductsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1.ProductSearch/PurgeProducts") - .setRequestMarshaller( - ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - private final UnaryCallable purgeProductsCallable; - private final OperationCallable - purgeProductsOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new GrpcProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { - return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcProductSearchStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcProductSearchStub( - ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcProductSearchCallableFactory()); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product_set.name", String.valueOf(request.getProductSet().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listProductsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product.name", String.valueOf(request.getProduct().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listReferenceImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings addProductToProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - removeProductFromProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductsInProductSetTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings importProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings purgeProductsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(purgeProductsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - operationsStub); - this.purgeProductsCallable = - callableFactory.createUnaryCallable( - purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); - this.purgeProductsOperationCallable = - callableFactory.createOperationCallable( - purgeProductsTransportSettings, - settings.purgeProductsOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public UnaryCallable purgeProductsCallable() { - return purgeProductsCallable; - } - - @Override - public OperationCallable - purgeProductsOperationCallable() { - return purgeProductsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java deleted file mode 100644 index 7c06329ac3b2..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonImageAnnotatorCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java deleted file mode 100644 index da9cad9772af..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) - .add(AsyncBatchAnnotateImagesResponse.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/images:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*}/images:annotate", - "/v1/{parent=projects/*}/images:annotate") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/files:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*}/files:annotate", - "/v1/{parent=projects/*}/files:annotate") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateFilesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/images:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate", - "/v1/{parent=projects/*}/images:asyncBatchAnnotate") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateImagesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/files:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate", - "/v1/{parent=projects/*}/files:asyncBatchAnnotate") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateFilesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - batchAnnotateFilesCallable; - private final UnaryCallable - asyncBatchAnnotateImagesCallable; - private final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonImageAnnotatorStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - batchAnnotateImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - batchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateImagesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.batchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - batchAnnotateFilesTransportSettings, - settings.batchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateImagesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(batchAnnotateImagesMethodDescriptor); - methodDescriptors.add(batchAnnotateFilesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateImagesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - batchAnnotateFilesCallable() { - return batchAnnotateFilesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - return asyncBatchAnnotateImagesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return asyncBatchAnnotateImagesOperationCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java deleted file mode 100644 index c7f302eca00f..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonProductSearchCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java deleted file mode 100644 index 89744b525d7f..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java +++ /dev/null @@ -1,1266 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.ListProductSetsResponse; -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.ListProductsResponse; -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonProductSearchStub extends ProductSearchStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(ImportProductSetsResponse.getDescriptor()) - .add(BatchOperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - createProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "productSetId", request.getProductSetId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductSets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProductSet") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{productSet.name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "productSet.name", request.getProductSet().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProductSet") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateProduct") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "productId", request.getProductId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProducts") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetProduct") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/UpdateProduct") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{product.name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "product.name", request.getProduct().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteProduct") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/CreateReferenceImage") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "referenceImageId", request.getReferenceImageId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("referenceImage", request.getReferenceImage(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/DeleteReferenceImage") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listReferenceImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListReferenceImages") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/GetReferenceImage") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - addProductToProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/AddProductToProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/productSets/*}:addProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - removeProductFromProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ListProductsInProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/productSets/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - importProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/ImportProductSets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/productSets:import", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ImportProductSetsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - purgeProductsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1.ProductSearch/PurgeProducts") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/products:purge", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (PurgeProductsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - private final UnaryCallable purgeProductsCallable; - private final OperationCallable - purgeProductsOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonProductSearchStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonProductSearchStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings createProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listProductsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listReferenceImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - addProductToProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - removeProductFromProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductsInProductSetTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings importProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings purgeProductsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(purgeProductsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.purgeProductsCallable = - callableFactory.createUnaryCallable( - purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); - this.purgeProductsOperationCallable = - callableFactory.createOperationCallable( - purgeProductsTransportSettings, - settings.purgeProductsOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createProductSetMethodDescriptor); - methodDescriptors.add(listProductSetsMethodDescriptor); - methodDescriptors.add(getProductSetMethodDescriptor); - methodDescriptors.add(updateProductSetMethodDescriptor); - methodDescriptors.add(deleteProductSetMethodDescriptor); - methodDescriptors.add(createProductMethodDescriptor); - methodDescriptors.add(listProductsMethodDescriptor); - methodDescriptors.add(getProductMethodDescriptor); - methodDescriptors.add(updateProductMethodDescriptor); - methodDescriptors.add(deleteProductMethodDescriptor); - methodDescriptors.add(createReferenceImageMethodDescriptor); - methodDescriptors.add(deleteReferenceImageMethodDescriptor); - methodDescriptors.add(listReferenceImagesMethodDescriptor); - methodDescriptors.add(getReferenceImageMethodDescriptor); - methodDescriptors.add(addProductToProductSetMethodDescriptor); - methodDescriptors.add(removeProductFromProductSetMethodDescriptor); - methodDescriptors.add(listProductsInProductSetMethodDescriptor); - methodDescriptors.add(importProductSetsMethodDescriptor); - methodDescriptors.add(purgeProductsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public UnaryCallable purgeProductsCallable() { - return purgeProductsCallable; - } - - @Override - public OperationCallable - purgeProductsOperationCallable() { - return purgeProductsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java deleted file mode 100644 index dad41a2aa111..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStub.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ImageAnnotatorStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - batchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); - } - - public UnaryCallable - batchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateFilesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateImagesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateImagesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java deleted file mode 100644 index 86400478a0a2..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.OperationMetadata; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorStubSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ImageAnnotatorStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings - batchAnnotateImagesSettings; - private final UnaryCallSettings - batchAnnotateFilesSettings; - private final UnaryCallSettings - asyncBatchAnnotateImagesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings; - private final UnaryCallSettings - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings - batchAnnotateFilesSettings() { - return batchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings - asyncBatchAnnotateImagesSettings() { - return asyncBatchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return asyncBatchAnnotateImagesOperationSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - public ImageAnnotatorStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcImageAnnotatorStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonImageAnnotatorStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); - batchAnnotateFilesSettings = settingsBuilder.batchAnnotateFilesSettings().build(); - asyncBatchAnnotateImagesSettings = settingsBuilder.asyncBatchAnnotateImagesSettings().build(); - asyncBatchAnnotateImagesOperationSettings = - settingsBuilder.asyncBatchAnnotateImagesOperationSettings().build(); - asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); - asyncBatchAnnotateFilesOperationSettings = - settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); - } - - /** Builder for ImageAnnotatorStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - batchAnnotateImagesSettings; - private final UnaryCallSettings.Builder - batchAnnotateFilesSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateImagesOperationSettings = OperationCallSettings.newBuilder(); - asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, - batchAnnotateFilesSettings, - asyncBatchAnnotateImagesSettings, - asyncBatchAnnotateFilesSettings); - initDefaults(this); - } - - protected Builder(ImageAnnotatorStubSettings settings) { - super(settings); - - batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); - batchAnnotateFilesSettings = settings.batchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateImagesSettings = settings.asyncBatchAnnotateImagesSettings.toBuilder(); - asyncBatchAnnotateImagesOperationSettings = - settings.asyncBatchAnnotateImagesOperationSettings.toBuilder(); - asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateFilesOperationSettings = - settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, - batchAnnotateFilesSettings, - asyncBatchAnnotateImagesSettings, - asyncBatchAnnotateFilesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .batchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .batchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateImagesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateImagesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - builder - .asyncBatchAnnotateFilesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateFilesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings.Builder - batchAnnotateFilesSettings() { - return batchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings() { - return asyncBatchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return asyncBatchAnnotateImagesOperationSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - @Override - public ImageAnnotatorStubSettings build() throws IOException { - return new ImageAnnotatorStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java deleted file mode 100644 index c05b0f6c0f3a..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStub.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.ListProductSetsResponse; -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.ListProductsResponse; -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ProductSearchStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable createProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); - } - - public UnaryCallable - listProductSetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); - } - - public UnaryCallable listProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); - } - - public UnaryCallable getProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); - } - - public UnaryCallable updateProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); - } - - public UnaryCallable deleteProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); - } - - public UnaryCallable createProductCallable() { - throw new UnsupportedOperationException("Not implemented: createProductCallable()"); - } - - public UnaryCallable listProductsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); - } - - public UnaryCallable listProductsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); - } - - public UnaryCallable getProductCallable() { - throw new UnsupportedOperationException("Not implemented: getProductCallable()"); - } - - public UnaryCallable updateProductCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); - } - - public UnaryCallable deleteProductCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); - } - - public UnaryCallable createReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); - } - - public UnaryCallable deleteReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); - } - - public UnaryCallable - listReferenceImagesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); - } - - public UnaryCallable - listReferenceImagesCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); - } - - public UnaryCallable getReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); - } - - public UnaryCallable addProductToProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); - } - - public UnaryCallable - removeProductFromProductSetCallable() { - throw new UnsupportedOperationException( - "Not implemented: removeProductFromProductSetCallable()"); - } - - public UnaryCallable - listProductsInProductSetPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listProductsInProductSetPagedCallable()"); - } - - public UnaryCallable - listProductsInProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); - } - - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: importProductSetsOperationCallable()"); - } - - public UnaryCallable importProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); - } - - public OperationCallable - purgeProductsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); - } - - public UnaryCallable purgeProductsCallable() { - throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java deleted file mode 100644 index c5399f28adf5..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java +++ /dev/null @@ -1,1187 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.ListProductSetsResponse; -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.ListProductsResponse; -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
- *     ProductSearchStubSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ProductSearchStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings createProductSetSettings; - private final PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings getProductSetSettings; - private final UnaryCallSettings updateProductSetSettings; - private final UnaryCallSettings deleteProductSetSettings; - private final UnaryCallSettings createProductSettings; - private final PagedCallSettings< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings getProductSettings; - private final UnaryCallSettings updateProductSettings; - private final UnaryCallSettings deleteProductSettings; - private final UnaryCallSettings - createReferenceImageSettings; - private final UnaryCallSettings deleteReferenceImageSettings; - private final PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings - getReferenceImageSettings; - private final UnaryCallSettings - addProductToProductSetSettings; - private final UnaryCallSettings - removeProductFromProductSetSettings; - private final PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings importProductSetsSettings; - private final OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - private final UnaryCallSettings purgeProductsSettings; - private final OperationCallSettings - purgeProductsOperationSettings; - - private static final PagedListDescriptor< - ListProductSetsRequest, ListProductSetsResponse, ProductSet> - LIST_PRODUCT_SETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductSetsRequest injectToken( - ListProductSetsRequest payload, String token) { - return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductSetsRequest injectPageSize( - ListProductSetsRequest payload, int pageSize) { - return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductSetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductSetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductSetsResponse payload) { - return payload.getProductSetsList() == null - ? ImmutableList.of() - : payload.getProductSetsList(); - } - }; - - private static final PagedListDescriptor - LIST_PRODUCTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsRequest injectToken(ListProductsRequest payload, String token) { - return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { - return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> - LIST_REFERENCE_IMAGES_PAGE_STR_DESC = - new PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListReferenceImagesRequest injectToken( - ListReferenceImagesRequest payload, String token) { - return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListReferenceImagesRequest injectPageSize( - ListReferenceImagesRequest payload, int pageSize) { - return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListReferenceImagesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListReferenceImagesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListReferenceImagesResponse payload) { - return payload.getReferenceImagesList() == null - ? ImmutableList.of() - : payload.getReferenceImagesList(); - } - }; - - private static final PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = - new PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsInProductSetRequest injectToken( - ListProductsInProductSetRequest payload, String token) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } - - @Override - public ListProductsInProductSetRequest injectPageSize( - ListProductsInProductSetRequest payload, int pageSize) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListProductsInProductSetRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsInProductSetResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsInProductSetResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - LIST_PRODUCT_SETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductSetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); - return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - LIST_PRODUCTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); - return ListProductsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - LIST_REFERENCE_IMAGES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListReferenceImagesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); - return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListProductsInProductSetRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - pageContext = - PageContext.create( - callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); - return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return createProductSettings; - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return getProductSettings; - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return updateProductSettings; - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public UnaryCallSettings purgeProductsSettings() { - return purgeProductsSettings; - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public OperationCallSettings - purgeProductsOperationSettings() { - return purgeProductsOperationSettings; - } - - public ProductSearchStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcProductSearchStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonProductSearchStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createProductSetSettings = settingsBuilder.createProductSetSettings().build(); - listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); - getProductSetSettings = settingsBuilder.getProductSetSettings().build(); - updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); - deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); - createProductSettings = settingsBuilder.createProductSettings().build(); - listProductsSettings = settingsBuilder.listProductsSettings().build(); - getProductSettings = settingsBuilder.getProductSettings().build(); - updateProductSettings = settingsBuilder.updateProductSettings().build(); - deleteProductSettings = settingsBuilder.deleteProductSettings().build(); - createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); - deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); - listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); - getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); - addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); - removeProductFromProductSetSettings = - settingsBuilder.removeProductFromProductSetSettings().build(); - listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); - importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); - importProductSetsOperationSettings = - settingsBuilder.importProductSetsOperationSettings().build(); - purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); - purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); - } - - /** Builder for ProductSearchStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createProductSetSettings; - private final PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings.Builder getProductSetSettings; - private final UnaryCallSettings.Builder - updateProductSetSettings; - private final UnaryCallSettings.Builder - deleteProductSetSettings; - private final UnaryCallSettings.Builder createProductSettings; - private final PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings.Builder getProductSettings; - private final UnaryCallSettings.Builder updateProductSettings; - private final UnaryCallSettings.Builder deleteProductSettings; - private final UnaryCallSettings.Builder - createReferenceImageSettings; - private final UnaryCallSettings.Builder - deleteReferenceImageSettings; - private final PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings.Builder - getReferenceImageSettings; - private final UnaryCallSettings.Builder - addProductToProductSetSettings; - private final UnaryCallSettings.Builder - removeProductFromProductSetSettings; - private final PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings.Builder - importProductSetsSettings; - private final OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - private final UnaryCallSettings.Builder purgeProductsSettings; - private final OperationCallSettings.Builder - purgeProductsOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_2_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); - getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); - getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listReferenceImagesSettings = - PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); - getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsInProductSetSettings = - PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); - importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - importProductSetsOperationSettings = OperationCallSettings.newBuilder(); - purgeProductsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - purgeProductsOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings, - purgeProductsSettings); - initDefaults(this); - } - - protected Builder(ProductSearchStubSettings settings) { - super(settings); - - createProductSetSettings = settings.createProductSetSettings.toBuilder(); - listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); - getProductSetSettings = settings.getProductSetSettings.toBuilder(); - updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); - deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); - createProductSettings = settings.createProductSettings.toBuilder(); - listProductsSettings = settings.listProductsSettings.toBuilder(); - getProductSettings = settings.getProductSettings.toBuilder(); - updateProductSettings = settings.updateProductSettings.toBuilder(); - deleteProductSettings = settings.deleteProductSettings.toBuilder(); - createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); - deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); - listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); - getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); - addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); - removeProductFromProductSetSettings = - settings.removeProductFromProductSetSettings.toBuilder(); - listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); - importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); - importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); - purgeProductsSettings = settings.purgeProductsSettings.toBuilder(); - purgeProductsOperationSettings = settings.purgeProductsOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings, - purgeProductsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .deleteProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .deleteProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .listReferenceImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .addProductToProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .removeProductFromProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .listProductsInProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .importProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .purgeProductsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .importProductSetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - ImportProductSetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - builder - .purgeProductsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return createProductSettings; - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getProductSettings; - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return updateProductSettings; - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public UnaryCallSettings.Builder purgeProductsSettings() { - return purgeProductsSettings; - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - purgeProductsOperationSettings() { - return purgeProductsOperationSettings; - } - - @Override - public ProductSearchStubSettings build() throws IOException { - return new ProductSearchStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java deleted file mode 100644 index 2abdc0914849..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientHttpJsonTest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1.stub.HttpJsonImageAnnotatorStub; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientHttpJsonTest { - private static MockHttpService mockService; - private static ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonImageAnnotatorStub.getMethodDescriptors(), - ImageAnnotatorSettings.getDefaultEndpoint()); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchAnnotateFilesTest() throws Exception { - BatchAnnotateFilesResponse expectedResponse = - BatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateFiles(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateImagesTest() throws Exception { - AsyncBatchAnnotateImagesResponse expectedResponse = - AsyncBatchAnnotateImagesResponse.newBuilder() - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateImagesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - AsyncBatchAnnotateImagesResponse actualResponse = - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java deleted file mode 100644 index 717684683b5b..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ImageAnnotatorClientTest.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientTest { - private static MockImageAnnotator mockImageAnnotator; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() { - mockImageAnnotator = new MockImageAnnotator(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchAnnotateFilesTest() throws Exception { - BatchAnnotateFilesResponse expectedResponse = - BatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateFilesRequest actualRequest = ((BatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateFiles(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateImagesTest() throws Exception { - AsyncBatchAnnotateImagesResponse expectedResponse = - AsyncBatchAnnotateImagesResponse.newBuilder() - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateImagesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - AsyncBatchAnnotateImagesResponse actualResponse = - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateImagesRequest actualRequest = - ((AsyncBatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateFilesRequest actualRequest = - ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java deleted file mode 100644 index 2d54e6ee4686..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotator implements MockGrpcService { - private final MockImageAnnotatorImpl serviceImpl; - - public MockImageAnnotator() { - serviceImpl = new MockImageAnnotatorImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java deleted file mode 100644 index 5499e101268f..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockImageAnnotatorImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { - private List requests; - private Queue responses; - - public MockImageAnnotatorImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void batchAnnotateImages( - BatchAnnotateImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateImagesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchAnnotateFiles( - BatchAnnotateFilesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateFilesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateFilesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateFilesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateImages( - AsyncBatchAnnotateImagesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateFiles( - AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java deleted file mode 100644 index 2afc19424292..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearch.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearch implements MockGrpcService { - private final MockProductSearchImpl serviceImpl; - - public MockProductSearch() { - serviceImpl = new MockProductSearchImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java deleted file mode 100644 index 671446dafe57..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/MockProductSearchImpl.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1.ProductSearchGrpc.ProductSearchImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearchImpl extends ProductSearchImplBase { - private List requests; - private Queue responses; - - public MockProductSearchImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void createProductSet( - CreateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductSets( - ListProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductSetsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductSetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductSetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProductSet( - GetProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProductSet( - UpdateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProductSet( - DeleteProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createProduct( - CreateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProducts( - ListProductsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProducts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProduct(GetProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProduct( - UpdateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createReferenceImage( - CreateReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteReferenceImage( - DeleteReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listReferenceImages( - ListReferenceImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListReferenceImagesResponse) { - requests.add(request); - responseObserver.onNext(((ListReferenceImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListReferenceImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getReferenceImage( - GetReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void addProductToProductSet( - AddProductToProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void removeProductFromProductSet( - RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductsInProductSet( - ListProductsInProductSetRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsInProductSetResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsInProductSetResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsInProductSetResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void importProductSets( - ImportProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ImportProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void purgeProducts( - PurgeProductsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method PurgeProducts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java deleted file mode 100644 index e28a2d68914e..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientHttpJsonTest.java +++ /dev/null @@ -1,1991 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1.stub.HttpJsonProductSearchStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientHttpJsonTest { - private static MockHttpService mockService; - private static ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonProductSearchStub.getMethodDescriptors(), - ProductSearchSettings.getDefaultEndpoint()); - ProductSearchSettings settings = - ProductSearchSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void purgeProductsTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void purgeProductsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void purgeProductsTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void purgeProductsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java deleted file mode 100644 index aa5c5ef77e9a..000000000000 --- a/owl-bot-staging/java-vision/v1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1/ProductSearchClientTest.java +++ /dev/null @@ -1,1775 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientTest { - private static MockProductSearch mockProductSearch; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() { - mockProductSearch = new MockProductSearch(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ProductSearchSettings settings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void purgeProductsTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void purgeProductsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void purgeProductsTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - String parent = "parent-995424086"; - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void purgeProductsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java deleted file mode 100644 index 4ed54f5f8c89..000000000000 --- a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorGrpc.java +++ /dev/null @@ -1,635 +0,0 @@ -package com.google.cloud.vision.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Service that performs Google Cloud Vision API detection tasks over client
- * images, such as face, landmark, logo, label, and text detection. The
- * ImageAnnotator service returns detected entities from the images.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1/image_annotator.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ImageAnnotatorGrpc { - - private ImageAnnotatorGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1.ImageAnnotator"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", - requestType = com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, - responseType = com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) - .build(); - } - } - } - return getBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateFiles", - requestType = com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, - responseType = com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; - if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateFilesMethod = getBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateFiles")) - .build(); - } - } - } - return getBatchAnnotateFilesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateImages", - requestType = com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; - if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod = getAsyncBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateImages")) - .build(); - } - } - } - return getAsyncBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", - requestType = com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) - .build(); - } - } - } - return getAsyncBatchAnnotateFilesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - }; - return ImageAnnotatorStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ImageAnnotatorBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - }; - return ImageAnnotatorBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ImageAnnotatorFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - }; - return ImageAnnotatorFutureStub.newStub(factory, channel); - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public void batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateFilesMethod(), responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public void asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.BatchAnnotateImagesRequest, - com.google.cloud.vision.v1.BatchAnnotateImagesResponse>( - this, METHODID_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.BatchAnnotateFilesRequest, - com.google.cloud.vision.v1.BatchAnnotateFilesResponse>( - this, METHODID_BATCH_ANNOTATE_FILES))) - .addMethod( - getAsyncBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getAsyncBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) - .build(); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { - private ImageAnnotatorStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public void batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public void asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ImageAnnotatorBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.cloud.vision.v1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public com.google.cloud.vision.v1.BatchAnnotateFilesResponse batchAnnotateFiles(com.google.cloud.vision.v1.BatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateFilesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateImages(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { - private ImageAnnotatorFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( - com.google.cloud.vision.v1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateFiles( - com.google.cloud.vision.v1.BatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateImages( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; - private static final int METHODID_BATCH_ANNOTATE_FILES = 1; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_IMAGES = 2; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 3; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ImageAnnotatorImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BATCH_ANNOTATE_IMAGES: - serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1.BatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_ANNOTATE_FILES: - serviceImpl.batchAnnotateFiles((com.google.cloud.vision.v1.BatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_IMAGES: - serviceImpl.asyncBatchAnnotateImages((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_FILES: - serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ImageAnnotatorBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ImageAnnotator"); - } - } - - private static final class ImageAnnotatorFileDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier { - ImageAnnotatorFileDescriptorSupplier() {} - } - - private static final class ImageAnnotatorMethodDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ImageAnnotatorMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ImageAnnotatorGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) - .addMethod(getBatchAnnotateImagesMethod()) - .addMethod(getBatchAnnotateFilesMethod()) - .addMethod(getAsyncBatchAnnotateImagesMethod()) - .addMethod(getAsyncBatchAnnotateFilesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java deleted file mode 100644 index 313f6ffa7ead..000000000000 --- a/owl-bot-staging/java-vision/v1/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java +++ /dev/null @@ -1,2280 +0,0 @@ -package com.google.cloud.vision.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Manages Products and ProductSets of reference images for use in product
- * search. It uses the following resource model:
- * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
- * `projects/*/locations/*/productSets/*`, which acts as a way to put different
- * products into groups to limit identification.
- * In parallel,
- * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
- *   `projects/*/locations/*/products/*`
- * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
- *   `projects/*/locations/*/products/*/referenceImages/*`
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1/product_search_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ProductSearchGrpc { - - private ProductSearchGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1.ProductSearch"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", - requestType = com.google.cloud.vision.v1.CreateProductSetRequest.class, - responseType = com.google.cloud.vision.v1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductSetMethod() { - io.grpc.MethodDescriptor getCreateProductSetMethod; - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) - .build(); - } - } - } - return getCreateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductSets", - requestType = com.google.cloud.vision.v1.ListProductSetsRequest.class, - responseType = com.google.cloud.vision.v1.ListProductSetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductSetsMethod() { - io.grpc.MethodDescriptor getListProductSetsMethod; - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) - .build(); - } - } - } - return getListProductSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProductSet", - requestType = com.google.cloud.vision.v1.GetProductSetRequest.class, - responseType = com.google.cloud.vision.v1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductSetMethod() { - io.grpc.MethodDescriptor getGetProductSetMethod; - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) - .build(); - } - } - } - return getGetProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", - requestType = com.google.cloud.vision.v1.UpdateProductSetRequest.class, - responseType = com.google.cloud.vision.v1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { - io.grpc.MethodDescriptor getUpdateProductSetMethod; - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) - .build(); - } - } - } - return getUpdateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", - requestType = com.google.cloud.vision.v1.DeleteProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { - io.grpc.MethodDescriptor getDeleteProductSetMethod; - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) - .build(); - } - } - } - return getDeleteProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProduct", - requestType = com.google.cloud.vision.v1.CreateProductRequest.class, - responseType = com.google.cloud.vision.v1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductMethod() { - io.grpc.MethodDescriptor getCreateProductMethod; - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) - .build(); - } - } - } - return getCreateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProducts", - requestType = com.google.cloud.vision.v1.ListProductsRequest.class, - responseType = com.google.cloud.vision.v1.ListProductsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsMethod() { - io.grpc.MethodDescriptor getListProductsMethod; - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - ProductSearchGrpc.getListProductsMethod = getListProductsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) - .build(); - } - } - } - return getListProductsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProduct", - requestType = com.google.cloud.vision.v1.GetProductRequest.class, - responseType = com.google.cloud.vision.v1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductMethod() { - io.grpc.MethodDescriptor getGetProductMethod; - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - ProductSearchGrpc.getGetProductMethod = getGetProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) - .build(); - } - } - } - return getGetProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", - requestType = com.google.cloud.vision.v1.UpdateProductRequest.class, - responseType = com.google.cloud.vision.v1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductMethod() { - io.grpc.MethodDescriptor getUpdateProductMethod; - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) - .build(); - } - } - } - return getUpdateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", - requestType = com.google.cloud.vision.v1.DeleteProductRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductMethod() { - io.grpc.MethodDescriptor getDeleteProductMethod; - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) - .build(); - } - } - } - return getDeleteProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", - requestType = com.google.cloud.vision.v1.CreateReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { - io.grpc.MethodDescriptor getCreateReferenceImageMethod; - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) - .build(); - } - } - } - return getCreateReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", - requestType = com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { - io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) - .build(); - } - } - } - return getDeleteReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", - requestType = com.google.cloud.vision.v1.ListReferenceImagesRequest.class, - responseType = com.google.cloud.vision.v1.ListReferenceImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { - io.grpc.MethodDescriptor getListReferenceImagesMethod; - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) - .build(); - } - } - } - return getListReferenceImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", - requestType = com.google.cloud.vision.v1.GetReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { - io.grpc.MethodDescriptor getGetReferenceImageMethod; - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) - .build(); - } - } - } - return getGetReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", - requestType = com.google.cloud.vision.v1.AddProductToProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { - io.grpc.MethodDescriptor getAddProductToProductSetMethod; - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) - .build(); - } - } - } - return getAddProductToProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", - requestType = com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { - io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) - .build(); - } - } - } - return getRemoveProductFromProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", - requestType = com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, - responseType = com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { - io.grpc.MethodDescriptor getListProductsInProductSetMethod; - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) - .build(); - } - } - } - return getListProductsInProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", - requestType = com.google.cloud.vision.v1.ImportProductSetsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getImportProductSetsMethod() { - io.grpc.MethodDescriptor getImportProductSetsMethod; - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) - .build(); - } - } - } - return getImportProductSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getPurgeProductsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", - requestType = com.google.cloud.vision.v1.PurgeProductsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPurgeProductsMethod() { - io.grpc.MethodDescriptor getPurgeProductsMethod; - if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { - ProductSearchGrpc.getPurgeProductsMethod = getPurgeProductsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("PurgeProducts")) - .build(); - } - } - } - return getPurgeProductsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ProductSearchStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - }; - return ProductSearchStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ProductSearchBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - }; - return ProductSearchBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ProductSearchFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - }; - return ProductSearchFutureStub.newStub(factory, channel); - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static abstract class ProductSearchImplBase implements io.grpc.BindableService { - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public void purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPurgeProductsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.CreateProductSetRequest, - com.google.cloud.vision.v1.ProductSet>( - this, METHODID_CREATE_PRODUCT_SET))) - .addMethod( - getListProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.ListProductSetsRequest, - com.google.cloud.vision.v1.ListProductSetsResponse>( - this, METHODID_LIST_PRODUCT_SETS))) - .addMethod( - getGetProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.GetProductSetRequest, - com.google.cloud.vision.v1.ProductSet>( - this, METHODID_GET_PRODUCT_SET))) - .addMethod( - getUpdateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.UpdateProductSetRequest, - com.google.cloud.vision.v1.ProductSet>( - this, METHODID_UPDATE_PRODUCT_SET))) - .addMethod( - getDeleteProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.DeleteProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT_SET))) - .addMethod( - getCreateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.CreateProductRequest, - com.google.cloud.vision.v1.Product>( - this, METHODID_CREATE_PRODUCT))) - .addMethod( - getListProductsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.ListProductsRequest, - com.google.cloud.vision.v1.ListProductsResponse>( - this, METHODID_LIST_PRODUCTS))) - .addMethod( - getGetProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.GetProductRequest, - com.google.cloud.vision.v1.Product>( - this, METHODID_GET_PRODUCT))) - .addMethod( - getUpdateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.UpdateProductRequest, - com.google.cloud.vision.v1.Product>( - this, METHODID_UPDATE_PRODUCT))) - .addMethod( - getDeleteProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.DeleteProductRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT))) - .addMethod( - getCreateReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.CreateReferenceImageRequest, - com.google.cloud.vision.v1.ReferenceImage>( - this, METHODID_CREATE_REFERENCE_IMAGE))) - .addMethod( - getDeleteReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.DeleteReferenceImageRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_REFERENCE_IMAGE))) - .addMethod( - getListReferenceImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.ListReferenceImagesRequest, - com.google.cloud.vision.v1.ListReferenceImagesResponse>( - this, METHODID_LIST_REFERENCE_IMAGES))) - .addMethod( - getGetReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.GetReferenceImageRequest, - com.google.cloud.vision.v1.ReferenceImage>( - this, METHODID_GET_REFERENCE_IMAGE))) - .addMethod( - getAddProductToProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.AddProductToProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) - .addMethod( - getRemoveProductFromProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) - .addMethod( - getListProductsInProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.ListProductsInProductSetRequest, - com.google.cloud.vision.v1.ListProductsInProductSetResponse>( - this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) - .addMethod( - getImportProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.ImportProductSetsRequest, - com.google.longrunning.Operation>( - this, METHODID_IMPORT_PRODUCT_SETS))) - .addMethod( - getPurgeProductsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1.PurgeProductsRequest, - com.google.longrunning.Operation>( - this, METHODID_PURGE_PRODUCTS))) - .build(); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { - private ProductSearchStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public void purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ProductSearchBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1.ProductSet createProductSet(com.google.cloud.vision.v1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductSetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.cloud.vision.v1.ProductSet getProductSet(com.google.cloud.vision.v1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1.ProductSet updateProductSet(com.google.cloud.vision.v1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.cloud.vision.v1.Product createProduct(com.google.cloud.vision.v1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1.ListProductsResponse listProducts(com.google.cloud.vision.v1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.cloud.vision.v1.Product getProduct(com.google.cloud.vision.v1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.cloud.vision.v1.Product updateProduct(com.google.cloud.vision.v1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.cloud.vision.v1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.cloud.vision.v1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getImportProductSetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1.PurgeProductsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPurgeProductsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { - private ProductSearchFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProductSet( - com.google.cloud.vision.v1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductSets( - com.google.cloud.vision.v1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProductSet( - com.google.cloud.vision.v1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProductSet( - com.google.cloud.vision.v1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProductSet( - com.google.cloud.vision.v1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProduct( - com.google.cloud.vision.v1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProducts( - com.google.cloud.vision.v1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProduct( - com.google.cloud.vision.v1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProduct( - com.google.cloud.vision.v1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProduct( - com.google.cloud.vision.v1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createReferenceImage( - com.google.cloud.vision.v1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( - com.google.cloud.vision.v1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listReferenceImages( - com.google.cloud.vision.v1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getReferenceImage( - com.google.cloud.vision.v1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( - com.google.cloud.vision.v1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( - com.google.cloud.vision.v1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture importProductSets( - com.google.cloud.vision.v1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the
-     * progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture purgeProducts( - com.google.cloud.vision.v1.PurgeProductsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_PRODUCT_SET = 0; - private static final int METHODID_LIST_PRODUCT_SETS = 1; - private static final int METHODID_GET_PRODUCT_SET = 2; - private static final int METHODID_UPDATE_PRODUCT_SET = 3; - private static final int METHODID_DELETE_PRODUCT_SET = 4; - private static final int METHODID_CREATE_PRODUCT = 5; - private static final int METHODID_LIST_PRODUCTS = 6; - private static final int METHODID_GET_PRODUCT = 7; - private static final int METHODID_UPDATE_PRODUCT = 8; - private static final int METHODID_DELETE_PRODUCT = 9; - private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; - private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; - private static final int METHODID_LIST_REFERENCE_IMAGES = 12; - private static final int METHODID_GET_REFERENCE_IMAGE = 13; - private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; - private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; - private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; - private static final int METHODID_IMPORT_PRODUCT_SETS = 17; - private static final int METHODID_PURGE_PRODUCTS = 18; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ProductSearchImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_PRODUCT_SET: - serviceImpl.createProductSet((com.google.cloud.vision.v1.CreateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCT_SETS: - serviceImpl.listProductSets((com.google.cloud.vision.v1.ListProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT_SET: - serviceImpl.getProductSet((com.google.cloud.vision.v1.GetProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT_SET: - serviceImpl.updateProductSet((com.google.cloud.vision.v1.UpdateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT_SET: - serviceImpl.deleteProductSet((com.google.cloud.vision.v1.DeleteProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_PRODUCT: - serviceImpl.createProduct((com.google.cloud.vision.v1.CreateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS: - serviceImpl.listProducts((com.google.cloud.vision.v1.ListProductsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT: - serviceImpl.getProduct((com.google.cloud.vision.v1.GetProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT: - serviceImpl.updateProduct((com.google.cloud.vision.v1.UpdateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT: - serviceImpl.deleteProduct((com.google.cloud.vision.v1.DeleteProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_REFERENCE_IMAGE: - serviceImpl.createReferenceImage((com.google.cloud.vision.v1.CreateReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_REFERENCE_IMAGE: - serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1.DeleteReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_REFERENCE_IMAGES: - serviceImpl.listReferenceImages((com.google.cloud.vision.v1.ListReferenceImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_REFERENCE_IMAGE: - serviceImpl.getReferenceImage((com.google.cloud.vision.v1.GetReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: - serviceImpl.addProductToProductSet((com.google.cloud.vision.v1.AddProductToProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: - serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: - serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1.ListProductsInProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_IMPORT_PRODUCT_SETS: - serviceImpl.importProductSets((com.google.cloud.vision.v1.ImportProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_PURGE_PRODUCTS: - serviceImpl.purgeProducts((com.google.cloud.vision.v1.PurgeProductsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ProductSearchBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ProductSearch"); - } - } - - private static final class ProductSearchFileDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier { - ProductSearchFileDescriptorSupplier() {} - } - - private static final class ProductSearchMethodDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ProductSearchMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ProductSearchGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) - .addMethod(getCreateProductSetMethod()) - .addMethod(getListProductSetsMethod()) - .addMethod(getGetProductSetMethod()) - .addMethod(getUpdateProductSetMethod()) - .addMethod(getDeleteProductSetMethod()) - .addMethod(getCreateProductMethod()) - .addMethod(getListProductsMethod()) - .addMethod(getGetProductMethod()) - .addMethod(getUpdateProductMethod()) - .addMethod(getDeleteProductMethod()) - .addMethod(getCreateReferenceImageMethod()) - .addMethod(getDeleteReferenceImageMethod()) - .addMethod(getListReferenceImagesMethod()) - .addMethod(getGetReferenceImageMethod()) - .addMethod(getAddProductToProductSetMethod()) - .addMethod(getRemoveProductFromProductSetMethod()) - .addMethod(getListProductsInProductSetMethod()) - .addMethod(getImportProductSetsMethod()) - .addMethod(getPurgeProductsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java deleted file mode 100644 index a8a51a48fabd..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `AddProductToProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AddProductToProductSetRequest} - */ -public final class AddProductToProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AddProductToProductSetRequest) - AddProductToProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AddProductToProductSetRequest.newBuilder() to construct. - private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AddProductToProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AddProductToProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AddProductToProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1.AddProductToProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AddProductToProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1.AddProductToProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AddProductToProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `AddProductToProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AddProductToProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AddProductToProductSetRequest) - com.google.cloud.vision.v1.AddProductToProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1.AddProductToProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AddProductToProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AddProductToProductSetRequest build() { - com.google.cloud.vision.v1.AddProductToProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AddProductToProductSetRequest buildPartial() { - com.google.cloud.vision.v1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1.AddProductToProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AddProductToProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.AddProductToProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AddProductToProductSetRequest other) { - if (other == com.google.cloud.vision.v1.AddProductToProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AddProductToProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AddProductToProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AddProductToProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AddProductToProductSetRequest) - private static final com.google.cloud.vision.v1.AddProductToProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AddProductToProductSetRequest(); - } - - public static com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AddProductToProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AddProductToProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AddProductToProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java deleted file mode 100644 index 3ccc82663e49..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface AddProductToProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AddProductToProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java deleted file mode 100644 index 82f59e618332..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequest.java +++ /dev/null @@ -1,1651 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateFileRequest} - */ -public final class AnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateFileRequest) - AnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileRequest.newBuilder() to construct. - private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - pages_ = emptyIntList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pages_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - pages_.addInt(input.readInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - pages_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - pages_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pages_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateFileRequest.class, com.google.cloud.vision.v1.AnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int PAGES_FIELD_NUMBER = 4; - private com.google.protobuf.Internal.IntList pages_; - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - @java.lang.Override - public java.util.List - getPagesList() { - return pages_; - } - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - public int getPages(int index) { - return pages_.getInt(index); - } - private int pagesMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (getPagesList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(pagesMemoizedSerializedSize); - } - for (int i = 0; i < pages_.size(); i++) { - output.writeInt32NoTag(pages_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - { - int dataSize = 0; - for (int i = 0; i < pages_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(pages_.getInt(i)); - } - size += dataSize; - if (!getPagesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - pagesMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AnnotateFileRequest other = (com.google.cloud.vision.v1.AnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateFileRequest) - com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateFileRequest.class, com.google.cloud.vision.v1.AnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - pages_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequest build() { - com.google.cloud.vision.v1.AnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1.AnnotateFileRequest result = new com.google.cloud.vision.v1.AnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - pages_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pages_ = pages_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1.AnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.protobuf.Internal.IntList pages_ = emptyIntList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - pages_ = mutableCopy(pages_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - public java.util.List - getPagesList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(pages_) : pages_; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - public int getPagesCount() { - return pages_.size(); - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - public int getPages(int index) { - return pages_.getInt(index); - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param index The index to set the value at. - * @param value The pages to set. - * @return This builder for chaining. - */ - public Builder setPages( - int index, int value) { - ensurePagesIsMutable(); - pages_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param value The pages to add. - * @return This builder for chaining. - */ - public Builder addPages(int value) { - ensurePagesIsMutable(); - pages_.addInt(value); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param values The pages to add. - * @return This builder for chaining. - */ - public Builder addAllPages( - java.lang.Iterable values) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return This builder for chaining. - */ - public Builder clearPages() { - pages_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileRequest) - private static final com.google.cloud.vision.v1.AnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java deleted file mode 100644 index f327adc50195..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - java.util.List getPagesList(); - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - int getPagesCount(); - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - int getPages(int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java deleted file mode 100644 index 72ca9f8c8e26..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java +++ /dev/null @@ -1,1461 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response to a single file annotation request. A file may contain one or more
- * images, which individually have their own responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateFileResponse} - */ -public final class AnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateFileResponse) - AnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileResponse.newBuilder() to construct. - private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - case 24: { - - totalPages_ = input.readInt32(); - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateFileResponse.class, com.google.cloud.vision.v1.AnnotateFileResponse.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.InputConfig inputConfig_; - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int RESPONSES_FIELD_NUMBER = 2; - private java.util.List responses_; - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - public static final int TOTAL_PAGES_FIELD_NUMBER = 3; - private int totalPages_; - /** - *
-   * This field gives the total number of pages in the file.
-   * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - @java.lang.Override - public int getTotalPages() { - return totalPages_; - } - - public static final int ERROR_FIELD_NUMBER = 4; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(2, responses_.get(i)); - } - if (totalPages_ != 0) { - output.writeInt32(3, totalPages_); - } - if (error_ != null) { - output.writeMessage(4, getError()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, responses_.get(i)); - } - if (totalPages_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, totalPages_); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getError()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AnnotateFileResponse other = (com.google.cloud.vision.v1.AnnotateFileResponse) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (getTotalPages() - != other.getTotalPages()) return false; - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER; - hash = (53 * hash) + getTotalPages(); - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a single file annotation request. A file may contain one or more
-   * images, which individually have their own responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateFileResponse) - com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateFileResponse.class, com.google.cloud.vision.v1.AnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - totalPages_ = 0; - - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponse build() { - com.google.cloud.vision.v1.AnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1.AnnotateFileResponse result = new com.google.cloud.vision.v1.AnnotateFileResponse(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - result.totalPages_ = totalPages_; - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1.AnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - if (other.getTotalPages() != 0) { - setTotalPages(other.getTotalPages()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses(com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - - private int totalPages_ ; - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - @java.lang.Override - public int getTotalPages() { - return totalPages_; - } - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @param value The totalPages to set. - * @return This builder for chaining. - */ - public Builder setTotalPages(int value) { - - totalPages_ = value; - onChanged(); - return this; - } - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @return This builder for chaining. - */ - public Builder clearTotalPages() { - - totalPages_ = 0; - onChanged(); - return this; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileResponse) - private static final com.google.cloud.vision.v1.AnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java deleted file mode 100644 index 1ddb75d724bf..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,125 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1.InputConfig getInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); - - /** - *
-   * This field gives the total number of pages in the file.
-   * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - int getTotalPages(); - - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java deleted file mode 100644 index ea56a6e5930c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java +++ /dev/null @@ -1,1346 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request for performing Google Cloud Vision API tasks over a user-provided
- * image, with user-requested features, and with context information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateImageRequest} - */ -public final class AnnotateImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageRequest) - AnnotateImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageRequest.newBuilder() to construct. - private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.Image.Builder subBuilder = null; - if (image_ != null) { - subBuilder = image_.toBuilder(); - } - image_ = input.readMessage(com.google.cloud.vision.v1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateImageRequest.class, com.google.cloud.vision.v1.AnnotateImageRequest.Builder.class); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.Image image_; - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return image_ != null; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return The image. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Image getImage() { - return image_ == null ? com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder() { - return getImage(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (image_ != null) { - output.writeMessage(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (image_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AnnotateImageRequest other = (com.google.cloud.vision.v1.AnnotateImageRequest) obj; - - if (hasImage() != other.hasImage()) return false; - if (hasImage()) { - if (!getImage() - .equals(other.getImage())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasImage()) { - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for performing Google Cloud Vision API tasks over a user-provided
-   * image, with user-requested features, and with context information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageRequest) - com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateImageRequest.class, com.google.cloud.vision.v1.AnnotateImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AnnotateImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (imageBuilder_ == null) { - image_ = null; - } else { - image_ = null; - imageBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest build() { - com.google.cloud.vision.v1.AnnotateImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest buildPartial() { - com.google.cloud.vision.v1.AnnotateImageRequest result = new com.google.cloud.vision.v1.AnnotateImageRequest(this); - int from_bitField0_ = bitField0_; - if (imageBuilder_ == null) { - result.image_ = image_; - } else { - result.image_ = imageBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AnnotateImageRequest) { - return mergeFrom((com.google.cloud.vision.v1.AnnotateImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageRequest other) { - if (other == com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()) return this; - if (other.hasImage()) { - mergeImage(other.getImage()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AnnotateImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AnnotateImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.Image image_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder> imageBuilder_; - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return Whether the image field is set. - */ - public boolean hasImage() { - return imageBuilder_ != null || image_ != null; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return The image. - */ - public com.google.cloud.vision.v1.Image getImage() { - if (imageBuilder_ == null) { - return image_ == null ? com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; - } else { - return imageBuilder_.getMessage(); - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public Builder setImage(com.google.cloud.vision.v1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - image_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public Builder setImage( - com.google.cloud.vision.v1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - image_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.vision.v1.Image value) { - if (imageBuilder_ == null) { - if (image_ != null) { - image_ = - com.google.cloud.vision.v1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); - } else { - image_ = value; - } - onChanged(); - } else { - imageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - image_ = null; - onChanged(); - } else { - image_ = null; - imageBuilder_ = null; - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public com.google.cloud.vision.v1.Image.Builder getImageBuilder() { - - onChanged(); - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - public com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder() { - if (imageBuilder_ != null) { - return imageBuilder_.getMessageOrBuilder(); - } else { - return image_ == null ? - com.google.cloud.vision.v1.Image.getDefaultInstance() : image_; - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, com.google.cloud.vision.v1.ImageOrBuilder>( - getImage(), - getParentForChildren(), - isClean()); - image_ = null; - } - return imageBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageRequest) - private static final com.google.cloud.vision.v1.AnnotateImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageRequest(); - } - - public static com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java deleted file mode 100644 index 7b911ccf595a..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AnnotateImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - * @return The image. - */ - com.google.cloud.vision.v1.Image getImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1.Image image = 1; - */ - com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder(); - - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.Feature getFeatures(int index); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java deleted file mode 100644 index 4a705032fadb..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java +++ /dev/null @@ -1,5055 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response to an image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse} - */ -public final class AnnotateImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageResponse) - AnnotateImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageResponse.newBuilder() to construct. - private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageResponse() { - faceAnnotations_ = java.util.Collections.emptyList(); - landmarkAnnotations_ = java.util.Collections.emptyList(); - logoAnnotations_ = java.util.Collections.emptyList(); - labelAnnotations_ = java.util.Collections.emptyList(); - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - textAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - faceAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.FaceAnnotation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - landmarkAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - logoAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labelAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - textAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.cloud.vision.v1.SafeSearchAnnotation.Builder subBuilder = null; - if (safeSearchAnnotation_ != null) { - subBuilder = safeSearchAnnotation_.toBuilder(); - } - safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1.SafeSearchAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(safeSearchAnnotation_); - safeSearchAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.cloud.vision.v1.ImageProperties.Builder subBuilder = null; - if (imagePropertiesAnnotation_ != null) { - subBuilder = imagePropertiesAnnotation_.toBuilder(); - } - imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1.ImageProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imagePropertiesAnnotation_); - imagePropertiesAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.vision.v1.CropHintsAnnotation.Builder subBuilder = null; - if (cropHintsAnnotation_ != null) { - subBuilder = cropHintsAnnotation_.toBuilder(); - } - cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1.CropHintsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsAnnotation_); - cropHintsAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1.TextAnnotation.Builder subBuilder = null; - if (fullTextAnnotation_ != null) { - subBuilder = fullTextAnnotation_.toBuilder(); - } - fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fullTextAnnotation_); - fullTextAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.vision.v1.WebDetection.Builder subBuilder = null; - if (webDetection_ != null) { - subBuilder = webDetection_.toBuilder(); - } - webDetection_ = input.readMessage(com.google.cloud.vision.v1.WebDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetection_); - webDetection_ = subBuilder.buildPartial(); - } - - break; - } - case 114: { - com.google.cloud.vision.v1.ProductSearchResults.Builder subBuilder = null; - if (productSearchResults_ != null) { - subBuilder = productSearchResults_.toBuilder(); - } - productSearchResults_ = input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchResults_); - productSearchResults_ = subBuilder.buildPartial(); - } - - break; - } - case 170: { - com.google.cloud.vision.v1.ImageAnnotationContext.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.cloud.vision.v1.ImageAnnotationContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - localizedObjectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.LocalizedObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class); - } - - public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; - private java.util.List faceAnnotations_; - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List getFaceAnnotationsList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List - getFaceAnnotationsOrBuilderList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public int getFaceAnnotationsCount() { - return faceAnnotations_.size(); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) { - return faceAnnotations_.get(index); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - return faceAnnotations_.get(index); - } - - public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; - private java.util.List landmarkAnnotations_; - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List getLandmarkAnnotationsList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public int getLandmarkAnnotationsCount() { - return landmarkAnnotations_.size(); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) { - return landmarkAnnotations_.get(index); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - return landmarkAnnotations_.get(index); - } - - public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List logoAnnotations_; - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List getLogoAnnotationsList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List - getLogoAnnotationsOrBuilderList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public int getLogoAnnotationsCount() { - return logoAnnotations_.size(); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) { - return logoAnnotations_.get(index); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - return logoAnnotations_.get(index); - } - - public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; - private java.util.List labelAnnotations_; - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List getLabelAnnotationsList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List - getLabelAnnotationsOrBuilderList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public int getLabelAnnotationsCount() { - return labelAnnotations_.size(); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) { - return labelAnnotations_.get(index); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - return labelAnnotations_.get(index); - } - - public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; - private java.util.List localizedObjectAnnotations_; - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List getLocalizedObjectAnnotationsList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public int getLocalizedObjectAnnotationsCount() { - return localizedObjectAnnotations_.size(); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - return localizedObjectAnnotations_.get(index); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - return localizedObjectAnnotations_.get(index); - } - - public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; - private java.util.List textAnnotations_; - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List getTextAnnotationsList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List - getTextAnnotationsOrBuilderList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public int getTextAnnotationsCount() { - return textAnnotations_.size(); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) { - return textAnnotations_.get(index); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - return textAnnotations_.get(index); - } - - public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_; - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - @java.lang.Override - public boolean hasFullTextAnnotation() { - return fullTextAnnotation_ != null; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - return getFullTextAnnotation(); - } - - public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_; - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - @java.lang.Override - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotation_ != null; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - return getSafeSearchAnnotation(); - } - - public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; - private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_; - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - @java.lang.Override - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ != null; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - return getImagePropertiesAnnotation(); - } - - public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; - private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_; - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - @java.lang.Override - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotation_ != null; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - return getCropHintsAnnotation(); - } - - public static final int WEB_DETECTION_FIELD_NUMBER = 13; - private com.google.cloud.vision.v1.WebDetection webDetection_; - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - @java.lang.Override - public boolean hasWebDetection() { - return webDetection_ != null; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return The webDetection. - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection getWebDetection() { - return webDetection_ == null ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - return getWebDetection(); - } - - public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; - private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_; - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - @java.lang.Override - public boolean hasProductSearchResults() { - return productSearchResults_ != null; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() { - return productSearchResults_ == null ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - return getProductSearchResults(); - } - - public static final int ERROR_FIELD_NUMBER = 9; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - public static final int CONTEXT_FIELD_NUMBER = 21; - private com.google.cloud.vision.v1.ImageAnnotationContext context_; - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return The context. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContext getContext() { - return context_ == null ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - return getContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < faceAnnotations_.size(); i++) { - output.writeMessage(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - output.writeMessage(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - output.writeMessage(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - output.writeMessage(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - output.writeMessage(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - output.writeMessage(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - output.writeMessage(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - output.writeMessage(9, getError()); - } - if (cropHintsAnnotation_ != null) { - output.writeMessage(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - output.writeMessage(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - output.writeMessage(13, getWebDetection()); - } - if (productSearchResults_ != null) { - output.writeMessage(14, getProductSearchResults()); - } - if (context_ != null) { - output.writeMessage(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - output.writeMessage(22, localizedObjectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < faceAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getError()); - } - if (cropHintsAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getWebDetection()); - } - if (productSearchResults_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getProductSearchResults()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, localizedObjectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AnnotateImageResponse other = (com.google.cloud.vision.v1.AnnotateImageResponse) obj; - - if (!getFaceAnnotationsList() - .equals(other.getFaceAnnotationsList())) return false; - if (!getLandmarkAnnotationsList() - .equals(other.getLandmarkAnnotationsList())) return false; - if (!getLogoAnnotationsList() - .equals(other.getLogoAnnotationsList())) return false; - if (!getLabelAnnotationsList() - .equals(other.getLabelAnnotationsList())) return false; - if (!getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList())) return false; - if (!getTextAnnotationsList() - .equals(other.getTextAnnotationsList())) return false; - if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; - if (hasFullTextAnnotation()) { - if (!getFullTextAnnotation() - .equals(other.getFullTextAnnotation())) return false; - } - if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; - if (hasSafeSearchAnnotation()) { - if (!getSafeSearchAnnotation() - .equals(other.getSafeSearchAnnotation())) return false; - } - if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; - if (hasImagePropertiesAnnotation()) { - if (!getImagePropertiesAnnotation() - .equals(other.getImagePropertiesAnnotation())) return false; - } - if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; - if (hasCropHintsAnnotation()) { - if (!getCropHintsAnnotation() - .equals(other.getCropHintsAnnotation())) return false; - } - if (hasWebDetection() != other.hasWebDetection()) return false; - if (hasWebDetection()) { - if (!getWebDetection() - .equals(other.getWebDetection())) return false; - } - if (hasProductSearchResults() != other.hasProductSearchResults()) return false; - if (hasProductSearchResults()) { - if (!getProductSearchResults() - .equals(other.getProductSearchResults())) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFaceAnnotationsCount() > 0) { - hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFaceAnnotationsList().hashCode(); - } - if (getLandmarkAnnotationsCount() > 0) { - hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); - } - if (getLogoAnnotationsCount() > 0) { - hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLogoAnnotationsList().hashCode(); - } - if (getLabelAnnotationsCount() > 0) { - hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLabelAnnotationsList().hashCode(); - } - if (getLocalizedObjectAnnotationsCount() > 0) { - hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); - } - if (getTextAnnotationsCount() > 0) { - hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTextAnnotationsList().hashCode(); - } - if (hasFullTextAnnotation()) { - hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getFullTextAnnotation().hashCode(); - } - if (hasSafeSearchAnnotation()) { - hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); - } - if (hasImagePropertiesAnnotation()) { - hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); - } - if (hasCropHintsAnnotation()) { - hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsAnnotation().hashCode(); - } - if (hasWebDetection()) { - hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getWebDetection().hashCode(); - } - if (hasProductSearchResults()) { - hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchResults().hashCode(); - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageResponse) - com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AnnotateImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFaceAnnotationsFieldBuilder(); - getLandmarkAnnotationsFieldBuilder(); - getLogoAnnotationsFieldBuilder(); - getLabelAnnotationsFieldBuilder(); - getLocalizedObjectAnnotationsFieldBuilder(); - getTextAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - faceAnnotationsBuilder_.clear(); - } - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - landmarkAnnotationsBuilder_.clear(); - } - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - logoAnnotationsBuilder_.clear(); - } - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelAnnotationsBuilder_.clear(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - textAnnotationsBuilder_.clear(); - } - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - if (webDetectionBuilder_ == null) { - webDetection_ = null; - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse build() { - com.google.cloud.vision.v1.AnnotateImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { - com.google.cloud.vision.v1.AnnotateImageResponse result = new com.google.cloud.vision.v1.AnnotateImageResponse(this); - int from_bitField0_ = bitField0_; - if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.faceAnnotations_ = faceAnnotations_; - } else { - result.faceAnnotations_ = faceAnnotationsBuilder_.build(); - } - if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.landmarkAnnotations_ = landmarkAnnotations_; - } else { - result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); - } - if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.logoAnnotations_ = logoAnnotations_; - } else { - result.logoAnnotations_ = logoAnnotationsBuilder_.build(); - } - if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labelAnnotations_ = labelAnnotations_; - } else { - result.labelAnnotations_ = labelAnnotationsBuilder_.build(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.localizedObjectAnnotations_ = localizedObjectAnnotations_; - } else { - result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); - } - if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.textAnnotations_ = textAnnotations_; - } else { - result.textAnnotations_ = textAnnotationsBuilder_.build(); - } - if (fullTextAnnotationBuilder_ == null) { - result.fullTextAnnotation_ = fullTextAnnotation_; - } else { - result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); - } - if (safeSearchAnnotationBuilder_ == null) { - result.safeSearchAnnotation_ = safeSearchAnnotation_; - } else { - result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); - } - if (imagePropertiesAnnotationBuilder_ == null) { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; - } else { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); - } - if (cropHintsAnnotationBuilder_ == null) { - result.cropHintsAnnotation_ = cropHintsAnnotation_; - } else { - result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); - } - if (webDetectionBuilder_ == null) { - result.webDetection_ = webDetection_; - } else { - result.webDetection_ = webDetectionBuilder_.build(); - } - if (productSearchResultsBuilder_ == null) { - result.productSearchResults_ = productSearchResults_; - } else { - result.productSearchResults_ = productSearchResultsBuilder_.build(); - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AnnotateImageResponse) { - return mergeFrom((com.google.cloud.vision.v1.AnnotateImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageResponse other) { - if (other == com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()) return this; - if (faceAnnotationsBuilder_ == null) { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotations_.isEmpty()) { - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.addAll(other.faceAnnotations_); - } - onChanged(); - } - } else { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotationsBuilder_.isEmpty()) { - faceAnnotationsBuilder_.dispose(); - faceAnnotationsBuilder_ = null; - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - faceAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFaceAnnotationsFieldBuilder() : null; - } else { - faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); - } - } - } - if (landmarkAnnotationsBuilder_ == null) { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotations_.isEmpty()) { - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.addAll(other.landmarkAnnotations_); - } - onChanged(); - } - } else { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotationsBuilder_.isEmpty()) { - landmarkAnnotationsBuilder_.dispose(); - landmarkAnnotationsBuilder_ = null; - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - landmarkAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarkAnnotationsFieldBuilder() : null; - } else { - landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); - } - } - } - if (logoAnnotationsBuilder_ == null) { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotations_.isEmpty()) { - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.addAll(other.logoAnnotations_); - } - onChanged(); - } - } else { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotationsBuilder_.isEmpty()) { - logoAnnotationsBuilder_.dispose(); - logoAnnotationsBuilder_ = null; - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - logoAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLogoAnnotationsFieldBuilder() : null; - } else { - logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); - } - } - } - if (labelAnnotationsBuilder_ == null) { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotations_.isEmpty()) { - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.addAll(other.labelAnnotations_); - } - onChanged(); - } - } else { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotationsBuilder_.isEmpty()) { - labelAnnotationsBuilder_.dispose(); - labelAnnotationsBuilder_ = null; - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - labelAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelAnnotationsFieldBuilder() : null; - } else { - labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); - } - } - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotations_.isEmpty()) { - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); - } - onChanged(); - } - } else { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotationsBuilder_.isEmpty()) { - localizedObjectAnnotationsBuilder_.dispose(); - localizedObjectAnnotationsBuilder_ = null; - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - localizedObjectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocalizedObjectAnnotationsFieldBuilder() : null; - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); - } - } - } - if (textAnnotationsBuilder_ == null) { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotations_.isEmpty()) { - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTextAnnotationsIsMutable(); - textAnnotations_.addAll(other.textAnnotations_); - } - onChanged(); - } - } else { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotationsBuilder_.isEmpty()) { - textAnnotationsBuilder_.dispose(); - textAnnotationsBuilder_ = null; - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - textAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTextAnnotationsFieldBuilder() : null; - } else { - textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); - } - } - } - if (other.hasFullTextAnnotation()) { - mergeFullTextAnnotation(other.getFullTextAnnotation()); - } - if (other.hasSafeSearchAnnotation()) { - mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); - } - if (other.hasImagePropertiesAnnotation()) { - mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); - } - if (other.hasCropHintsAnnotation()) { - mergeCropHintsAnnotation(other.getCropHintsAnnotation()); - } - if (other.hasWebDetection()) { - mergeWebDetection(other.getWebDetection()); - } - if (other.hasProductSearchResults()) { - mergeProductSearchResults(other.getProductSearchResults()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AnnotateImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AnnotateImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List faceAnnotations_ = - java.util.Collections.emptyList(); - private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; - - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public java.util.List getFaceAnnotationsList() { - if (faceAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } else { - return faceAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public int getFaceAnnotationsCount() { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.size(); - } else { - return faceAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); - } else { - return faceAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations(com.google.cloud.vision.v1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder addAllFaceAnnotations( - java.lang.Iterable values) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, faceAnnotations_); - onChanged(); - } else { - faceAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder clearFaceAnnotations() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - faceAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public Builder removeFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.remove(index); - onChanged(); - } else { - faceAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Builder getFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); } else { - return faceAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsOrBuilderList() { - if (faceAnnotationsBuilder_ != null) { - return faceAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { - return getFaceAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsBuilderList() { - return getFaceAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder> - getFaceAnnotationsFieldBuilder() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder>( - faceAnnotations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - faceAnnotations_ = null; - } - return faceAnnotationsBuilder_; - } - - private java.util.List landmarkAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; - - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List getLandmarkAnnotationsList() { - if (landmarkAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } else { - return landmarkAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public int getLandmarkAnnotationsCount() { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.size(); - } else { - return landmarkAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); - } else { - return landmarkAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addAllLandmarkAnnotations( - java.lang.Iterable values) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarkAnnotations_); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder clearLandmarkAnnotations() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - landmarkAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public Builder removeLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.remove(index); - onChanged(); - } else { - landmarkAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); } else { - return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - if (landmarkAnnotationsBuilder_ != null) { - return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsBuilderList() { - return getLandmarkAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> - getLandmarkAnnotationsFieldBuilder() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( - landmarkAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - landmarkAnnotations_ = null; - } - return landmarkAnnotationsBuilder_; - } - - private java.util.List logoAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; - - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List getLogoAnnotationsList() { - if (logoAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } else { - return logoAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public int getLogoAnnotationsCount() { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.size(); - } else { - return logoAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); - } else { - return logoAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder addAllLogoAnnotations( - java.lang.Iterable values) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logoAnnotations_); - onChanged(); - } else { - logoAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder clearLogoAnnotations() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - logoAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public Builder removeLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.remove(index); - onChanged(); - } else { - logoAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder getLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); } else { - return logoAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsOrBuilderList() { - if (logoAnnotationsBuilder_ != null) { - return logoAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { - return getLogoAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsBuilderList() { - return getLogoAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> - getLogoAnnotationsFieldBuilder() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( - logoAnnotations_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - logoAnnotations_ = null; - } - return logoAnnotationsBuilder_; - } - - private java.util.List labelAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; - - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public java.util.List getLabelAnnotationsList() { - if (labelAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } else { - return labelAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public int getLabelAnnotationsCount() { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.size(); - } else { - return labelAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); - } else { - return labelAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder addAllLabelAnnotations( - java.lang.Iterable values) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelAnnotations_); - onChanged(); - } else { - labelAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder clearLabelAnnotations() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public Builder removeLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.remove(index); - onChanged(); - } else { - labelAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder getLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); } else { - return labelAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsOrBuilderList() { - if (labelAnnotationsBuilder_ != null) { - return labelAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { - return getLabelAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsBuilderList() { - return getLabelAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> - getLabelAnnotationsFieldBuilder() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( - labelAnnotations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - labelAnnotations_ = null; - } - return labelAnnotationsBuilder_; - } - - private java.util.List localizedObjectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; - - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List getLocalizedObjectAnnotationsList() { - if (localizedObjectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } else { - return localizedObjectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public int getLocalizedObjectAnnotationsCount() { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.size(); - } else { - return localizedObjectAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); - } else { - return localizedObjectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addAllLocalizedObjectAnnotations( - java.lang.Iterable values) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, localizedObjectAnnotations_); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder clearLocalizedObjectAnnotations() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder removeLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.remove(index); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); } else { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - if (localizedObjectAnnotationsBuilder_ != null) { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsBuilderList() { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder> - getLocalizedObjectAnnotationsFieldBuilder() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocalizedObjectAnnotation, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>( - localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - localizedObjectAnnotations_ = null; - } - return localizedObjectAnnotationsBuilder_; - } - - private java.util.List textAnnotations_ = - java.util.Collections.emptyList(); - private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(textAnnotations_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; - - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public java.util.List getTextAnnotationsList() { - if (textAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textAnnotations_); - } else { - return textAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public int getTextAnnotationsCount() { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.size(); - } else { - return textAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); - } else { - return textAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder addAllTextAnnotations( - java.lang.Iterable values) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, textAnnotations_); - onChanged(); - } else { - textAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder clearTextAnnotations() { - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - textAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public Builder removeTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.remove(index); - onChanged(); - } else { - textAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder getTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); } else { - return textAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsOrBuilderList() { - if (textAnnotationsBuilder_ != null) { - return textAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textAnnotations_); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder() { - return getTextAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsBuilderList() { - return getTextAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> - getTextAnnotationsFieldBuilder() { - if (textAnnotationsBuilder_ == null) { - textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( - textAnnotations_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - textAnnotations_ = null; - } - return textAnnotationsBuilder_; - } - - private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - public boolean hasFullTextAnnotation() { - return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } else { - return fullTextAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fullTextAnnotation_ = value; - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation( - com.google.cloud.vision.v1.TextAnnotation.Builder builderForValue) { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = builderForValue.build(); - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (fullTextAnnotation_ != null) { - fullTextAnnotation_ = - com.google.cloud.vision.v1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); - } else { - fullTextAnnotation_ = value; - } - onChanged(); - } else { - fullTextAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public Builder clearFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - onChanged(); - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1.TextAnnotation.Builder getFullTextAnnotationBuilder() { - - onChanged(); - return getFullTextAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - if (fullTextAnnotationBuilder_ != null) { - return fullTextAnnotationBuilder_.getMessageOrBuilder(); - } else { - return fullTextAnnotation_ == null ? - com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder> - getFullTextAnnotationFieldBuilder() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, com.google.cloud.vision.v1.TextAnnotationOrBuilder>( - getFullTextAnnotation(), - getParentForChildren(), - isClean()); - fullTextAnnotation_ = null; - } - return fullTextAnnotationBuilder_; - } - - private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } else { - return safeSearchAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - safeSearchAnnotation_ = value; - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation( - com.google.cloud.vision.v1.SafeSearchAnnotation.Builder builderForValue) { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = builderForValue.build(); - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (safeSearchAnnotation_ != null) { - safeSearchAnnotation_ = - com.google.cloud.vision.v1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); - } else { - safeSearchAnnotation_ = value; - } - onChanged(); - } else { - safeSearchAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder clearSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - onChanged(); - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { - - onChanged(); - return getSafeSearchAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - if (safeSearchAnnotationBuilder_ != null) { - return safeSearchAnnotationBuilder_.getMessageOrBuilder(); - } else { - return safeSearchAnnotation_ == null ? - com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder> - getSafeSearchAnnotationFieldBuilder() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>( - getSafeSearchAnnotation(), - getParentForChildren(), - isClean()); - safeSearchAnnotation_ = null; - } - return safeSearchAnnotationBuilder_; - } - - private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } else { - return imagePropertiesAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imagePropertiesAnnotation_ = value; - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation( - com.google.cloud.vision.v1.ImageProperties.Builder builderForValue) { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = builderForValue.build(); - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (imagePropertiesAnnotation_ != null) { - imagePropertiesAnnotation_ = - com.google.cloud.vision.v1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); - } else { - imagePropertiesAnnotation_ = value; - } - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public Builder clearImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - onChanged(); - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { - - onChanged(); - return getImagePropertiesAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - if (imagePropertiesAnnotationBuilder_ != null) { - return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); - } else { - return imagePropertiesAnnotation_ == null ? - com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder> - getImagePropertiesAnnotationFieldBuilder() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder>( - getImagePropertiesAnnotation(), - getParentForChildren(), - isClean()); - imagePropertiesAnnotation_ = null; - } - return imagePropertiesAnnotationBuilder_; - } - - private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } else { - return cropHintsAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsAnnotation_ = value; - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation( - com.google.cloud.vision.v1.CropHintsAnnotation.Builder builderForValue) { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = builderForValue.build(); - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (cropHintsAnnotation_ != null) { - cropHintsAnnotation_ = - com.google.cloud.vision.v1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); - } else { - cropHintsAnnotation_ = value; - } - onChanged(); - } else { - cropHintsAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder clearCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - onChanged(); - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { - - onChanged(); - return getCropHintsAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - if (cropHintsAnnotationBuilder_ != null) { - return cropHintsAnnotationBuilder_.getMessageOrBuilder(); - } else { - return cropHintsAnnotation_ == null ? - com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder> - getCropHintsAnnotationFieldBuilder() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder>( - getCropHintsAnnotation(), - getParentForChildren(), - isClean()); - cropHintsAnnotation_ = null; - } - return cropHintsAnnotationBuilder_; - } - - private com.google.cloud.vision.v1.WebDetection webDetection_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder> webDetectionBuilder_; - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - public boolean hasWebDetection() { - return webDetectionBuilder_ != null || webDetection_ != null; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return The webDetection. - */ - public com.google.cloud.vision.v1.WebDetection getWebDetection() { - if (webDetectionBuilder_ == null) { - return webDetection_ == null ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; - } else { - return webDetectionBuilder_.getMessage(); - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public Builder setWebDetection(com.google.cloud.vision.v1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetection_ = value; - onChanged(); - } else { - webDetectionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public Builder setWebDetection( - com.google.cloud.vision.v1.WebDetection.Builder builderForValue) { - if (webDetectionBuilder_ == null) { - webDetection_ = builderForValue.build(); - onChanged(); - } else { - webDetectionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public Builder mergeWebDetection(com.google.cloud.vision.v1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (webDetection_ != null) { - webDetection_ = - com.google.cloud.vision.v1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); - } else { - webDetection_ = value; - } - onChanged(); - } else { - webDetectionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public Builder clearWebDetection() { - if (webDetectionBuilder_ == null) { - webDetection_ = null; - onChanged(); - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1.WebDetection.Builder getWebDetectionBuilder() { - - onChanged(); - return getWebDetectionFieldBuilder().getBuilder(); - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - if (webDetectionBuilder_ != null) { - return webDetectionBuilder_.getMessageOrBuilder(); - } else { - return webDetection_ == null ? - com.google.cloud.vision.v1.WebDetection.getDefaultInstance() : webDetection_; - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder> - getWebDetectionFieldBuilder() { - if (webDetectionBuilder_ == null) { - webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, com.google.cloud.vision.v1.WebDetectionOrBuilder>( - getWebDetection(), - getParentForChildren(), - isClean()); - webDetection_ = null; - } - return webDetectionBuilder_; - } - - private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - public boolean hasProductSearchResults() { - return productSearchResultsBuilder_ != null || productSearchResults_ != null; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - return productSearchResults_ == null ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } else { - return productSearchResultsBuilder_.getMessage(); - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchResults_ = value; - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults( - com.google.cloud.vision.v1.ProductSearchResults.Builder builderForValue) { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = builderForValue.build(); - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public Builder mergeProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (productSearchResults_ != null) { - productSearchResults_ = - com.google.cloud.vision.v1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); - } else { - productSearchResults_ = value; - } - onChanged(); - } else { - productSearchResultsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public Builder clearProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - onChanged(); - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Builder getProductSearchResultsBuilder() { - - onChanged(); - return getProductSearchResultsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - if (productSearchResultsBuilder_ != null) { - return productSearchResultsBuilder_.getMessageOrBuilder(); - } else { - return productSearchResults_ == null ? - com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder> - getProductSearchResultsFieldBuilder() { - if (productSearchResultsBuilder_ == null) { - productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, com.google.cloud.vision.v1.ProductSearchResultsOrBuilder>( - getProductSearchResults(), - getParentForChildren(), - isClean()); - productSearchResults_ = null; - } - return productSearchResultsBuilder_; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - private com.google.cloud.vision.v1.ImageAnnotationContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder> contextBuilder_; - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return The context. - */ - public com.google.cloud.vision.v1.ImageAnnotationContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public Builder setContext(com.google.cloud.vision.v1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public Builder setContext( - com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public Builder mergeContext(com.google.cloud.vision.v1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.cloud.vision.v1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1.ImageAnnotationContext.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageResponse) - private static final com.google.cloud.vision.v1.AnnotateImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageResponse(); - } - - public static com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java deleted file mode 100644 index bb7b499d15fd..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponseOrBuilder.java +++ /dev/null @@ -1,512 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AnnotateImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AnnotateImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - int getFaceAnnotationsCount(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsOrBuilderList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - int getLandmarkAnnotationsCount(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsOrBuilderList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - int getLogoAnnotationsCount(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsOrBuilderList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - int getLabelAnnotationsCount(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsOrBuilderList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - int getLocalizedObjectAnnotationsCount(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsOrBuilderList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - int getTextAnnotationsCount(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsOrBuilderList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - boolean hasFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); - - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - boolean hasSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); - - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - boolean hasImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); - - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - boolean hasCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); - - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - boolean hasWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return The webDetection. - */ - com.google.cloud.vision.v1.WebDetection getWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder(); - - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - boolean hasProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - com.google.cloud.vision.v1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); - - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return The context. - */ - com.google.cloud.vision.v1.ImageAnnotationContext getContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java deleted file mode 100644 index 56dd08ed0a71..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java +++ /dev/null @@ -1,1580 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * An offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileRequest} - */ -public final class AsyncAnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncAnnotateFileRequest) - AsyncAnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileRequest.newBuilder() to construct. - private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (outputConfig_ != null) { - output.writeMessage(4, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncAnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1.AsyncAnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncAnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncAnnotateFileRequest) - com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncAnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest build() { - com.google.cloud.vision.v1.AsyncAnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1.AsyncAnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncAnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1.AsyncAnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncAnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncAnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, com.google.cloud.vision.v1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public com.google.cloud.vision.v1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, com.google.cloud.vision.v1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncAnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileRequest) - private static final com.google.cloud.vision.v1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncAnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java deleted file mode 100644 index ef0dcf234962..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncAnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncAnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1.Feature features = 2; - */ - com.google.cloud.vision.v1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - com.google.cloud.vision.v1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java deleted file mode 100644 index 012a4e6bf3a7..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The response for a single offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileResponse} - */ -public final class AsyncAnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncAnnotateFileResponse) - AsyncAnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileResponse.newBuilder() to construct. - private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncAnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1.AsyncAnnotateFileResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncAnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response for a single offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncAnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncAnnotateFileResponse) - com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncAnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse build() { - com.google.cloud.vision.v1.AsyncAnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1.AsyncAnnotateFileResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncAnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1.AsyncAnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncAnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncAnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncAnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileResponse) - private static final com.google.cloud.vision.v1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncAnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java deleted file mode 100644 index 4fd2be4908db..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncAnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncAnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java deleted file mode 100644 index c4b7a415f794..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java +++ /dev/null @@ -1,1089 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Multiple async file annotation requests are batched into a single service
- * call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} - */ -public final class AsyncBatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - AsyncBatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. - private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - public static final int PARENT_FIELD_NUMBER = 4; - private volatile java.lang.Object parent_; - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple async file annotation requests are batched into a single service
-   * call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index 983e9da91490..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncBatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AsyncAnnotateFileRequest getRequests(int index); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); - - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java deleted file mode 100644 index 4ec8298c6aad..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response to an async batch file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} - */ -public final class AsyncBatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - AsyncBatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. - private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index 29a29014543a..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncBatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1.AsyncAnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java deleted file mode 100644 index f72dad167b9f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequest.java +++ /dev/null @@ -1,1323 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request for async image annotation for a list of images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} - */ -public final class AsyncBatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - AsyncBatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateImagesRequest.newBuilder() to construct. - private AsyncBatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int PARENT_FIELD_NUMBER = 4; - private volatile java.lang.Object parent_; - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOutputConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for async image annotation for a list of images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest result = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index 0fa4ae93f847..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncBatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - com.google.cloud.vision.v1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java deleted file mode 100644 index 68726c318726..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response to an async batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} - */ -public final class AsyncBatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - AsyncBatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateImagesResponse.newBuilder() to construct. - private AsyncBatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateImagesResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse other = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse result = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, com.google.cloud.vision.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index 7398872f2e8f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface AsyncBatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java deleted file mode 100644 index 6d3f945fc7a5..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequest.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A list of requests to annotate files using the BatchAnnotateFiles API.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesRequest} - */ -public final class BatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateFilesRequest) - BatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateFilesRequest.newBuilder() to construct. - private BatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateFileRequest.parser(), extensionRegistry)); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.BatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - public static final int PARENT_FIELD_NUMBER = 3; - private volatile java.lang.Object parent_; - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 3; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 3; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.BatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A list of requests to annotate files using the BatchAnnotateFiles API.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateFilesRequest) - com.google.cloud.vision.v1.BatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1.BatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1.BatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1.BatchAnnotateFilesRequest result = new com.google.cloud.vision.v1.BatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1.BatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only one
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileRequest, com.google.cloud.vision.v1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 3; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 3; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 3; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 3; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 3; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1.BatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index 9d124d4cc779..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface BatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateFileRequest getRequests(int index); - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only one
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); - - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 3; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 3; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java deleted file mode 100644 index 3a17d52d3c00..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A list of file annotation responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesResponse} - */ -public final class BatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateFilesResponse) - BatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateFilesResponse.newBuilder() to construct. - private BatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.BatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BatchAnnotateFilesResponse other = (com.google.cloud.vision.v1.BatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A list of file annotation responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateFilesResponse) - com.google.cloud.vision.v1.BatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1.BatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1.BatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1.BatchAnnotateFilesResponse result = new com.google.cloud.vision.v1.BatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1.BatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateFileResponse, com.google.cloud.vision.v1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1.BatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index e83b9af3a077..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface BatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1.AnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java deleted file mode 100644 index 8716b59a3e4f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java +++ /dev/null @@ -1,1087 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Multiple image annotation requests are batched into a single service call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesRequest} - */ -public final class BatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateImagesRequest) - BatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesRequest.newBuilder() to construct. - private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.BatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - public static final int PARENT_FIELD_NUMBER = 4; - private volatile java.lang.Object parent_; - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1.BatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple image annotation requests are batched into a single service call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateImagesRequest) - com.google.cloud.vision.v1.BatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1.BatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1.BatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1.BatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Optional. Target project and location to make a call.
-     * Format: `projects/{project-id}/locations/{location-id}`.
-     * If no parent is specified, a region will be chosen automatically.
-     * Supported location-ids:
-     *     `us`: USA country only,
-     *     `asia`: East asia areas, like Japan, Taiwan,
-     *     `eu`: The European Union.
-     * Example: `projects/project-A/locations/eu`.
-     * 
- * - * string parent = 4; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index 0ccea96477e9..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface BatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); - - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Optional. Target project and location to make a call.
-   * Format: `projects/{project-id}/locations/{location-id}`.
-   * If no parent is specified, a region will be chosen automatically.
-   * Supported location-ids:
-   *     `us`: USA country only,
-   *     `asia`: East asia areas, like Japan, Taiwan,
-   *     `eu`: The European Union.
-   * Example: `projects/project-A/locations/eu`.
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java deleted file mode 100644 index c161fe3259fe..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response to a batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesResponse} - */ -public final class BatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchAnnotateImagesResponse) - BatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesResponse.newBuilder() to construct. - private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.BatchAnnotateImagesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1.BatchAnnotateImagesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchAnnotateImagesResponse) - com.google.cloud.vision.v1.BatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1.BatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1.BatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1.BatchAnnotateImagesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1.BatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index fc2c037c264f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface BatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java deleted file mode 100644 index 4eda62dc0277..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java +++ /dev/null @@ -1,1226 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Metadata for the batch operations such as the current state.
- * This is included in the `metadata` field of the `Operation` returned by the
- * `GetOperation` call of the `google::longrunning::Operations` service.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchOperationMetadata} - */ -public final class BatchOperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BatchOperationMetadata) - BatchOperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchOperationMetadata.newBuilder() to construct. - private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchOperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (submitTime_ != null) { - subBuilder = submitTime_.toBuilder(); - } - submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(submitTime_); - submitTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchOperationMetadata.class, com.google.cloud.vision.v1.BatchOperationMetadata.Builder.class); - } - - /** - *
-   * Enumerates the possible states that the batch request can be in.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1.BatchOperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - PROCESSING(1), - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - SUCCESSFUL(2), - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - public static final int PROCESSING_VALUE = 1; - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - public static final int SUCCESSFUL_VALUE = 2; - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return PROCESSING; - case 2: return SUCCESSFUL; - case 3: return FAILED; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.BatchOperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.BatchOperationMetadata.State result = com.google.cloud.vision.v1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int SUBMIT_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp submitTime_; - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - @java.lang.Override - public boolean hasSubmitTime() { - return submitTime_ != null; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSubmitTime() { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - return getSubmitTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (submitTime_ != null) { - output.writeMessage(2, getSubmitTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (submitTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubmitTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEndTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BatchOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BatchOperationMetadata other = (com.google.cloud.vision.v1.BatchOperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasSubmitTime() != other.hasSubmitTime()) return false; - if (hasSubmitTime()) { - if (!getSubmitTime() - .equals(other.getSubmitTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasSubmitTime()) { - hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSubmitTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BatchOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata for the batch operations such as the current state.
-   * This is included in the `metadata` field of the `Operation` returned by the
-   * `GetOperation` call of the `google::longrunning::Operations` service.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BatchOperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BatchOperationMetadata) - com.google.cloud.vision.v1.BatchOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BatchOperationMetadata.class, com.google.cloud.vision.v1.BatchOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BatchOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (submitTimeBuilder_ == null) { - submitTime_ = null; - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BatchOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchOperationMetadata build() { - com.google.cloud.vision.v1.BatchOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchOperationMetadata buildPartial() { - com.google.cloud.vision.v1.BatchOperationMetadata result = new com.google.cloud.vision.v1.BatchOperationMetadata(this); - result.state_ = state_; - if (submitTimeBuilder_ == null) { - result.submitTime_ = submitTime_; - } else { - result.submitTime_ = submitTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BatchOperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1.BatchOperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BatchOperationMetadata other) { - if (other == com.google.cloud.vision.v1.BatchOperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasSubmitTime()) { - mergeSubmitTime(other.getSubmitTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BatchOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BatchOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.BatchOperationMetadata.State result = com.google.cloud.vision.v1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1.BatchOperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp submitTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - public boolean hasSubmitTime() { - return submitTimeBuilder_ != null || submitTime_ != null; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - public com.google.protobuf.Timestamp getSubmitTime() { - if (submitTimeBuilder_ == null) { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } else { - return submitTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - submitTime_ = value; - onChanged(); - } else { - submitTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (submitTimeBuilder_ == null) { - submitTime_ = builderForValue.build(); - onChanged(); - } else { - submitTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (submitTime_ != null) { - submitTime_ = - com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); - } else { - submitTime_ = value; - } - onChanged(); - } else { - submitTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder clearSubmitTime() { - if (submitTimeBuilder_ == null) { - submitTime_ = null; - onChanged(); - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { - - onChanged(); - return getSubmitTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - if (submitTimeBuilder_ != null) { - return submitTimeBuilder_.getMessageOrBuilder(); - } else { - return submitTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSubmitTimeFieldBuilder() { - if (submitTimeBuilder_ == null) { - submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSubmitTime(), - getParentForChildren(), - isClean()); - submitTime_ = null; - } - return submitTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BatchOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchOperationMetadata) - private static final com.google.cloud.vision.v1.BatchOperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BatchOperationMetadata(); - } - - public static com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BatchOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java deleted file mode 100644 index 9b32e315c648..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadataOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface BatchOperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BatchOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1.BatchOperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - boolean hasSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - com.google.protobuf.Timestamp getSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); - - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java deleted file mode 100644 index cf6fccb4ad72..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java +++ /dev/null @@ -1,1914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Logical element on the page.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Block} - */ -public final class Block extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Block) - BlockOrBuilder { -private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Block() { - paragraphs_ = java.util.Collections.emptyList(); - blockType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Block(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Block( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paragraphs_.add( - input.readMessage(com.google.cloud.vision.v1.Paragraph.parser(), extensionRegistry)); - break; - } - case 32: { - int rawValue = input.readEnum(); - - blockType_ = rawValue; - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Block.class, com.google.cloud.vision.v1.Block.Builder.class); - } - - /** - *
-   * Type of a block (text, image etc) as identified by OCR.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1.Block.BlockType} - */ - public enum BlockType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - TABLE(2), - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - PICTURE(3), - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - RULER(4), - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - BARCODE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - public static final int TABLE_VALUE = 2; - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - public static final int PICTURE_VALUE = 3; - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - public static final int RULER_VALUE = 4; - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - public static final int BARCODE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TEXT; - case 2: return TABLE; - case 3: return PICTURE; - case 4: return RULER; - case 5: return BARCODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockType findValueByNumber(int number) { - return BlockType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.Block.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockType[] VALUES = values(); - - public static BlockType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Block.BlockType) - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int PARAGRAPHS_FIELD_NUMBER = 3; - private java.util.List paragraphs_; - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List getParagraphsList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - return paragraphs_.get(index); - } - - public static final int BLOCK_TYPE_FIELD_NUMBER = 4; - private int blockType_; - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override public com.google.cloud.vision.v1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Block.BlockType result = com.google.cloud.vision.v1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1.Block.BlockType.UNRECOGNIZED : result; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1.Block.BlockType.UNKNOWN.getNumber()) { - output.writeEnum(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1.Block.BlockType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Block)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Block other = (com.google.cloud.vision.v1.Block) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getParagraphsList() - .equals(other.getParagraphsList())) return false; - if (blockType_ != other.blockType_) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + blockType_; - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Block parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Block parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Block parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Block parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Block parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Block parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Block parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Block parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Block parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Block parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Block parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Block parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Block prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Logical element on the page.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Block} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Block) - com.google.cloud.vision.v1.BlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Block.class, com.google.cloud.vision.v1.Block.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Block.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParagraphsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - paragraphsBuilder_.clear(); - } - blockType_ = 0; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Block_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Block getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Block.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Block build() { - com.google.cloud.vision.v1.Block result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Block buildPartial() { - com.google.cloud.vision.v1.Block result = new com.google.cloud.vision.v1.Block(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - result.blockType_ = blockType_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Block) { - return mergeFrom((com.google.cloud.vision.v1.Block)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Block other) { - if (other == com.google.cloud.vision.v1.Block.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParagraphsFieldBuilder() : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (other.blockType_ != 0) { - setBlockTypeValue(other.getBlockTypeValue()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Block parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Block) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List paragraphs_ = - java.util.Collections.emptyList(); - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(paragraphs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder> paragraphsBuilder_; - - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public java.util.List getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); - } else { - return paragraphsBuilder_.getMessageList(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs(com.google.cloud.vision.v1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder addAllParagraphs( - java.lang.Iterable values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1.Paragraph.Builder getParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(paragraphs_); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1.Paragraph.Builder addParagraphsBuilder() { - return getParagraphsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1.Paragraph.Builder addParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - paragraphs_ = null; - } - return paragraphsBuilder_; - } - - private int blockType_ = 0; - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @param value The enum numeric value on the wire for blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockTypeValue(int value) { - - blockType_ = value; - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Block.BlockType result = com.google.cloud.vision.v1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1.Block.BlockType.UNRECOGNIZED : result; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @param value The blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockType(com.google.cloud.vision.v1.Block.BlockType value) { - if (value == null) { - throw new NullPointerException(); - } - - blockType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return This builder for chaining. - */ - public Builder clearBlockType() { - - blockType_ = 0; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Block) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Block) - private static final com.google.cloud.vision.v1.Block DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Block(); - } - - public static com.google.cloud.vision.v1.Block getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Block parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Block(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Block getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java deleted file mode 100644 index 69204f1d91d6..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BlockOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Block) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1.Paragraph getParagraphs(int index); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - int getParagraphsCount(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsOrBuilderList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1.ParagraphOrBuilder getParagraphsOrBuilder( - int index); - - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - int getBlockTypeValue(); - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return The blockType. - */ - com.google.cloud.vision.v1.Block.BlockType getBlockType(); - - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java deleted file mode 100644 index bec9a6aca21d..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java +++ /dev/null @@ -1,1312 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A bounding polygon for the detected image annotation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.BoundingPoly} - */ -public final class BoundingPoly extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.BoundingPoly) - BoundingPolyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingPoly() { - vertices_ = java.util.Collections.emptyList(); - normalizedVertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vertices_.add( - input.readMessage(com.google.cloud.vision.v1.Vertex.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - normalizedVertices_.add( - input.readMessage(com.google.cloud.vision.v1.NormalizedVertex.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BoundingPoly.class, com.google.cloud.vision.v1.BoundingPoly.Builder.class); - } - - public static final int VERTICES_FIELD_NUMBER = 1; - private java.util.List vertices_; - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List getVerticesList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List - getVerticesOrBuilderList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - @java.lang.Override - public int getVerticesCount() { - return vertices_.size(); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Vertex getVertices(int index) { - return vertices_.get(index); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( - int index) { - return vertices_.get(index); - } - - public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; - private java.util.List normalizedVertices_; - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List getNormalizedVerticesList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List - getNormalizedVerticesOrBuilderList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public int getNormalizedVerticesCount() { - return normalizedVertices_.size(); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index) { - return normalizedVertices_.get(index); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - return normalizedVertices_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < vertices_.size(); i++) { - output.writeMessage(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - output.writeMessage(2, normalizedVertices_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < vertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, normalizedVertices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.BoundingPoly other = (com.google.cloud.vision.v1.BoundingPoly) obj; - - if (!getVerticesList() - .equals(other.getVerticesList())) return false; - if (!getNormalizedVerticesList() - .equals(other.getNormalizedVerticesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVerticesCount() > 0) { - hash = (37 * hash) + VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getVerticesList().hashCode(); - } - if (getNormalizedVerticesCount() > 0) { - hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getNormalizedVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A bounding polygon for the detected image annotation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.BoundingPoly} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.BoundingPoly) - com.google.cloud.vision.v1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.BoundingPoly.class, com.google.cloud.vision.v1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVerticesFieldBuilder(); - getNormalizedVerticesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - verticesBuilder_.clear(); - } - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly build() { - com.google.cloud.vision.v1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly buildPartial() { - com.google.cloud.vision.v1.BoundingPoly result = new com.google.cloud.vision.v1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.vertices_ = vertices_; - } else { - result.vertices_ = verticesBuilder_.build(); - } - if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.normalizedVertices_ = normalizedVertices_; - } else { - result.normalizedVertices_ = normalizedVerticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.BoundingPoly) { - return mergeFrom((com.google.cloud.vision.v1.BoundingPoly)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.BoundingPoly other) { - if (other == com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()) return this; - if (verticesBuilder_ == null) { - if (!other.vertices_.isEmpty()) { - if (vertices_.isEmpty()) { - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVerticesIsMutable(); - vertices_.addAll(other.vertices_); - } - onChanged(); - } - } else { - if (!other.vertices_.isEmpty()) { - if (verticesBuilder_.isEmpty()) { - verticesBuilder_.dispose(); - verticesBuilder_ = null; - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - verticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVerticesFieldBuilder() : null; - } else { - verticesBuilder_.addAllMessages(other.vertices_); - } - } - } - if (normalizedVerticesBuilder_ == null) { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVertices_.isEmpty()) { - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.addAll(other.normalizedVertices_); - } - onChanged(); - } - } else { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVerticesBuilder_.isEmpty()) { - normalizedVerticesBuilder_.dispose(); - normalizedVerticesBuilder_ = null; - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - normalizedVerticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNormalizedVerticesFieldBuilder() : null; - } else { - normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List vertices_ = - java.util.Collections.emptyList(); - private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(vertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder> verticesBuilder_; - - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public java.util.List getVerticesList() { - if (verticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(vertices_); - } else { - return verticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public int getVerticesCount() { - if (verticesBuilder_ == null) { - return vertices_.size(); - } else { - return verticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1.Vertex getVertices(int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); - } else { - return verticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.set(index, value); - onChanged(); - } else { - verticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.set(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder addVertices(com.google.cloud.vision.v1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(value); - onChanged(); - } else { - verticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(index, value); - onChanged(); - } else { - verticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder addVertices( - com.google.cloud.vision.v1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder addAllVertices( - java.lang.Iterable values) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vertices_); - onChanged(); - } else { - verticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder clearVertices() { - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - verticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public Builder removeVertices(int index) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.remove(index); - onChanged(); - } else { - verticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1.Vertex.Builder getVerticesBuilder( - int index) { - return getVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( - int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); } else { - return verticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public java.util.List - getVerticesOrBuilderList() { - if (verticesBuilder_ != null) { - return verticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(vertices_); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1.Vertex.Builder addVerticesBuilder() { - return getVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1.Vertex.Builder addVerticesBuilder( - int index) { - return getVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - public java.util.List - getVerticesBuilderList() { - return getVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder> - getVerticesFieldBuilder() { - if (verticesBuilder_ == null) { - verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - vertices_ = null; - } - return verticesBuilder_; - } - - private java.util.List normalizedVertices_ = - java.util.Collections.emptyList(); - private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; - - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List getNormalizedVerticesList() { - if (normalizedVerticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } else { - return normalizedVerticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.size(); - } else { - return normalizedVerticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices(com.google.cloud.vision.v1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addAllNormalizedVertices( - java.lang.Iterable values) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, normalizedVertices_); - onChanged(); - } else { - normalizedVerticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder clearNormalizedVertices() { - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public Builder removeNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.remove(index); - onChanged(); - } else { - normalizedVerticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1.NormalizedVertex.Builder getNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); } else { - return normalizedVerticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - if (normalizedVerticesBuilder_ != null) { - return normalizedVerticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { - return getNormalizedVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesBuilderList() { - return getNormalizedVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder> - getNormalizedVerticesFieldBuilder() { - if (normalizedVerticesBuilder_ == null) { - normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.NormalizedVertex, com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder>( - normalizedVertices_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - normalizedVertices_ = null; - } - return normalizedVerticesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BoundingPoly) - private static final com.google.cloud.vision.v1.BoundingPoly DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.BoundingPoly(); - } - - public static com.google.cloud.vision.v1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java deleted file mode 100644 index ddae3582c7f2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -public interface BoundingPolyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - java.util.List - getVerticesList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1.Vertex getVertices(int index); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - int getVerticesCount(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - java.util.List - getVerticesOrBuilderList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1.VertexOrBuilder getVerticesOrBuilder( - int index); - - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1.NormalizedVertex getNormalizedVertices(int index); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - int getNormalizedVerticesCount(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesOrBuilderList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java deleted file mode 100644 index 87f32f0b4e5f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Color information consists of RGB channels, score, and the fraction of
- * the image that the color occupies in the image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ColorInfo} - */ -public final class ColorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ColorInfo) - ColorInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use ColorInfo.newBuilder() to construct. - private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ColorInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ColorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Color.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 29: { - - pixelFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ColorInfo.class, com.google.cloud.vision.v1.ColorInfo.Builder.class); - } - - public static final int COLOR_FIELD_NUMBER = 1; - private com.google.type.Color color_; - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return color_ != null; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return getColor(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; - private float pixelFraction_; - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (color_ != null) { - output.writeMessage(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - output.writeFloat(3, pixelFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, pixelFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ColorInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ColorInfo other = (com.google.cloud.vision.v1.ColorInfo) obj; - - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor() - .equals(other.getColor())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getPixelFraction()) - != java.lang.Float.floatToIntBits( - other.getPixelFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPixelFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ColorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ColorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ColorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Color information consists of RGB channels, score, and the fraction of
-   * the image that the color occupies in the image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ColorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ColorInfo) - com.google.cloud.vision.v1.ColorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ColorInfo.class, com.google.cloud.vision.v1.ColorInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - score_ = 0F; - - pixelFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ColorInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ColorInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfo build() { - com.google.cloud.vision.v1.ColorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfo buildPartial() { - com.google.cloud.vision.v1.ColorInfo result = new com.google.cloud.vision.v1.ColorInfo(this); - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - result.score_ = score_; - result.pixelFraction_ = pixelFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ColorInfo) { - return mergeFrom((com.google.cloud.vision.v1.ColorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ColorInfo other) { - if (other == com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()) return this; - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getPixelFraction() != 0F) { - setPixelFraction(other.getPixelFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ColorInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ColorInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor( - com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.Color.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - - private float score_ ; - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float pixelFraction_ ; - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @param value The pixelFraction to set. - * @return This builder for chaining. - */ - public Builder setPixelFraction(float value) { - - pixelFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearPixelFraction() { - - pixelFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ColorInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ColorInfo) - private static final com.google.cloud.vision.v1.ColorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ColorInfo(); - } - - public static com.google.cloud.vision.v1.ColorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java deleted file mode 100644 index 307618578447..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfoOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ColorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ColorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - boolean hasColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - com.google.type.Color getColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - com.google.type.ColorOrBuilder getColorOrBuilder(); - - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - float getPixelFraction(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java deleted file mode 100644 index 200a6be7bfb0..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `CreateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateProductRequest} - */ -public final class CreateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateProductRequest) - CreateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductRequest.newBuilder() to construct. - private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductRequest() { - parent_ = ""; - productId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateProductRequest.class, com.google.cloud.vision.v1.CreateProductRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.Product product_; - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int PRODUCT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productId_; - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - @java.lang.Override - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (product_ != null) { - output.writeMessage(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CreateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CreateProductRequest other = (com.google.cloud.vision.v1.CreateProductRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (!getProductId() - .equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CreateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateProductRequest) - com.google.cloud.vision.v1.CreateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateProductRequest.class, com.google.cloud.vision.v1.CreateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - productId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductRequest build() { - com.google.cloud.vision.v1.CreateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductRequest buildPartial() { - com.google.cloud.vision.v1.CreateProductRequest result = new com.google.cloud.vision.v1.CreateProductRequest(this); - result.parent_ = parent_; - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.productId_ = productId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CreateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1.CreateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductRequest other) { - if (other == com.google.cloud.vision.v1.CreateProductRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (!other.getProductId().isEmpty()) { - productId_ = other.productId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CreateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CreateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private java.lang.Object productId_ = ""; - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The productId. - */ - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The productId to set. - * @return This builder for chaining. - */ - public Builder setProductId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductId() { - - productId_ = getDefaultInstance().getProductId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The bytes for productId to set. - * @return This builder for chaining. - */ - public Builder setProductIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateProductRequest) - private static final com.google.cloud.vision.v1.CreateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateProductRequest(); - } - - public static com.google.cloud.vision.v1.CreateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java deleted file mode 100644 index 3b68aa72eb73..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface CreateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1.Product getProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - java.lang.String getProductId(); - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - com.google.protobuf.ByteString - getProductIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java deleted file mode 100644 index 64fffbb889f9..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java +++ /dev/null @@ -1,1025 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `CreateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateProductSetRequest} - */ -public final class CreateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateProductSetRequest) - CreateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductSetRequest.newBuilder() to construct. - private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductSetRequest() { - parent_ = ""; - productSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productSetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateProductSetRequest.class, com.google.cloud.vision.v1.CreateProductSetRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productSetId_; - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - @java.lang.Override - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (productSet_ != null) { - output.writeMessage(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CreateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CreateProductSetRequest other = (com.google.cloud.vision.v1.CreateProductSetRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (!getProductSetId() - .equals(other.getProductSetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductSetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CreateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateProductSetRequest) - com.google.cloud.vision.v1.CreateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateProductSetRequest.class, com.google.cloud.vision.v1.CreateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CreateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - productSetId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductSetRequest build() { - com.google.cloud.vision.v1.CreateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductSetRequest buildPartial() { - com.google.cloud.vision.v1.CreateProductSetRequest result = new com.google.cloud.vision.v1.CreateProductSetRequest(this); - result.parent_ = parent_; - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - result.productSetId_ = productSetId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CreateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.CreateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CreateProductSetRequest other) { - if (other == com.google.cloud.vision.v1.CreateProductSetRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (!other.getProductSetId().isEmpty()) { - productSetId_ = other.productSetId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CreateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CreateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private java.lang.Object productSetId_ = ""; - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSetId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductSetId() { - - productSetId_ = getDefaultInstance().getProductSetId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The bytes for productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSetId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateProductSetRequest) - private static final com.google.cloud.vision.v1.CreateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateProductSetRequest(); - } - - public static com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java deleted file mode 100644 index ecea0a627053..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface CreateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - java.lang.String getProductSetId(); - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - com.google.protobuf.ByteString - getProductSetIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java deleted file mode 100644 index 4f1050b14454..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java +++ /dev/null @@ -1,1044 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `CreateReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateReferenceImageRequest} - */ -public final class CreateReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CreateReferenceImageRequest) - CreateReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateReferenceImageRequest.newBuilder() to construct. - private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateReferenceImageRequest() { - parent_ = ""; - referenceImageId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1.ReferenceImage.Builder subBuilder = null; - if (referenceImage_ != null) { - subBuilder = referenceImage_.toBuilder(); - } - referenceImage_ = input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(referenceImage_); - referenceImage_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - referenceImageId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1.CreateReferenceImageRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.ReferenceImage referenceImage_; - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - @java.lang.Override - public boolean hasReferenceImage() { - return referenceImage_ != null; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage getReferenceImage() { - return referenceImage_ == null ? com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - return getReferenceImage(); - } - - public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object referenceImageId_; - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - @java.lang.Override - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (referenceImage_ != null) { - output.writeMessage(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (referenceImage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CreateReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1.CreateReferenceImageRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReferenceImage() != other.hasReferenceImage()) return false; - if (hasReferenceImage()) { - if (!getReferenceImage() - .equals(other.getReferenceImage())) return false; - } - if (!getReferenceImageId() - .equals(other.getReferenceImageId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReferenceImage()) { - hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImage().hashCode(); - } - hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImageId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CreateReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CreateReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CreateReferenceImageRequest) - com.google.cloud.vision.v1.CreateReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1.CreateReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CreateReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - referenceImageId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateReferenceImageRequest build() { - com.google.cloud.vision.v1.CreateReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1.CreateReferenceImageRequest(this); - result.parent_ = parent_; - if (referenceImageBuilder_ == null) { - result.referenceImage_ = referenceImage_; - } else { - result.referenceImage_ = referenceImageBuilder_.build(); - } - result.referenceImageId_ = referenceImageId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CreateReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1.CreateReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CreateReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1.CreateReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReferenceImage()) { - mergeReferenceImage(other.getReferenceImage()); - } - if (!other.getReferenceImageId().isEmpty()) { - referenceImageId_ = other.referenceImageId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CreateReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CreateReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.ReferenceImage referenceImage_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImageBuilder_; - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - public boolean hasReferenceImage() { - return referenceImageBuilder_ != null || referenceImage_ != null; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - public com.google.cloud.vision.v1.ReferenceImage getReferenceImage() { - if (referenceImageBuilder_ == null) { - return referenceImage_ == null ? com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; - } else { - return referenceImageBuilder_.getMessage(); - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage(com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - referenceImage_ = value; - onChanged(); - } else { - referenceImageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage( - com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImageBuilder_ == null) { - referenceImage_ = builderForValue.build(); - onChanged(); - } else { - referenceImageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeReferenceImage(com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (referenceImage_ != null) { - referenceImage_ = - com.google.cloud.vision.v1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); - } else { - referenceImage_ = value; - } - onChanged(); - } else { - referenceImageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearReferenceImage() { - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - onChanged(); - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImageBuilder() { - - onChanged(); - return getReferenceImageFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - if (referenceImageBuilder_ != null) { - return referenceImageBuilder_.getMessageOrBuilder(); - } else { - return referenceImage_ == null ? - com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> - getReferenceImageFieldBuilder() { - if (referenceImageBuilder_ == null) { - referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( - getReferenceImage(), - getParentForChildren(), - isClean()); - referenceImage_ = null; - } - return referenceImageBuilder_; - } - - private java.lang.Object referenceImageId_ = ""; - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - referenceImageId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return This builder for chaining. - */ - public Builder clearReferenceImageId() { - - referenceImageId_ = getDefaultInstance().getReferenceImageId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The bytes for referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - referenceImageId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CreateReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CreateReferenceImageRequest) - private static final com.google.cloud.vision.v1.CreateReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CreateReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CreateReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java deleted file mode 100644 index 89ce28a96300..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface CreateReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CreateReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - boolean hasReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - com.google.cloud.vision.v1.ReferenceImage getReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); - - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - java.lang.String getReferenceImageId(); - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - com.google.protobuf.ByteString - getReferenceImageIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java deleted file mode 100644 index 1be5f6fa8eb5..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java +++ /dev/null @@ -1,845 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Single crop hint that is used to generate a new crop when serving an image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHint} - */ -public final class CropHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHint) - CropHintOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHint.newBuilder() to construct. - private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHint() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - case 29: { - - importanceFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHint.class, com.google.cloud.vision.v1.CropHint.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; - private float importanceFraction_; - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - output.writeFloat(3, importanceFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, importanceFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CropHint)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CropHint other = (com.google.cloud.vision.v1.CropHint) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getImportanceFraction()) - != java.lang.Float.floatToIntBits( - other.getImportanceFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImportanceFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CropHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CropHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Single crop hint that is used to generate a new crop when serving an image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHint) - com.google.cloud.vision.v1.CropHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHint.class, com.google.cloud.vision.v1.CropHint.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CropHint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - confidence_ = 0F; - - importanceFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHint getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CropHint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHint build() { - com.google.cloud.vision.v1.CropHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHint buildPartial() { - com.google.cloud.vision.v1.CropHint result = new com.google.cloud.vision.v1.CropHint(this); - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.confidence_ = confidence_; - result.importanceFraction_ = importanceFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CropHint) { - return mergeFrom((com.google.cloud.vision.v1.CropHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CropHint other) { - if (other == com.google.cloud.vision.v1.CropHint.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getImportanceFraction() != 0F) { - setImportanceFraction(other.getImportanceFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CropHint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CropHint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float importanceFraction_ ; - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @param value The importanceFraction to set. - * @return This builder for chaining. - */ - public Builder setImportanceFraction(float value) { - - importanceFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearImportanceFraction() { - - importanceFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHint) - private static final com.google.cloud.vision.v1.CropHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHint(); - } - - public static com.google.cloud.vision.v1.CropHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java deleted file mode 100644 index 7498b0f960f2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface CropHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - float getImportanceFraction(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java deleted file mode 100644 index 8cad055c6127..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Set of crop hints that are used to generate new crops when serving images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHintsAnnotation} - */ -public final class CropHintsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHintsAnnotation) - CropHintsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsAnnotation.newBuilder() to construct. - private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsAnnotation() { - cropHints_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cropHints_.add( - input.readMessage(com.google.cloud.vision.v1.CropHint.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHintsAnnotation.class, com.google.cloud.vision.v1.CropHintsAnnotation.Builder.class); - } - - public static final int CROP_HINTS_FIELD_NUMBER = 1; - private java.util.List cropHints_; - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List getCropHintsList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List - getCropHintsOrBuilderList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - @java.lang.Override - public int getCropHintsCount() { - return cropHints_.size(); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHint getCropHints(int index) { - return cropHints_.get(index); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - return cropHints_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < cropHints_.size(); i++) { - output.writeMessage(1, cropHints_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < cropHints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cropHints_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CropHintsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CropHintsAnnotation other = (com.google.cloud.vision.v1.CropHintsAnnotation) obj; - - if (!getCropHintsList() - .equals(other.getCropHintsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCropHintsCount() > 0) { - hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CropHintsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of crop hints that are used to generate new crops when serving images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHintsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHintsAnnotation) - com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHintsAnnotation.class, com.google.cloud.vision.v1.CropHintsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CropHintsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCropHintsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotation build() { - com.google.cloud.vision.v1.CropHintsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotation buildPartial() { - com.google.cloud.vision.v1.CropHintsAnnotation result = new com.google.cloud.vision.v1.CropHintsAnnotation(this); - int from_bitField0_ = bitField0_; - if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cropHints_ = cropHints_; - } else { - result.cropHints_ = cropHintsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CropHintsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.CropHintsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CropHintsAnnotation other) { - if (other == com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()) return this; - if (cropHintsBuilder_ == null) { - if (!other.cropHints_.isEmpty()) { - if (cropHints_.isEmpty()) { - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCropHintsIsMutable(); - cropHints_.addAll(other.cropHints_); - } - onChanged(); - } - } else { - if (!other.cropHints_.isEmpty()) { - if (cropHintsBuilder_.isEmpty()) { - cropHintsBuilder_.dispose(); - cropHintsBuilder_ = null; - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - cropHintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCropHintsFieldBuilder() : null; - } else { - cropHintsBuilder_.addAllMessages(other.cropHints_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CropHintsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CropHintsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List cropHints_ = - java.util.Collections.emptyList(); - private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(cropHints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder> cropHintsBuilder_; - - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public java.util.List getCropHintsList() { - if (cropHintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cropHints_); - } else { - return cropHintsBuilder_.getMessageList(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public int getCropHintsCount() { - if (cropHintsBuilder_ == null) { - return cropHints_.size(); - } else { - return cropHintsBuilder_.getCount(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1.CropHint getCropHints(int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); - } else { - return cropHintsBuilder_.getMessage(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.set(index, value); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.set(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder addCropHints(com.google.cloud.vision.v1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(index, value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - com.google.cloud.vision.v1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder addAllCropHints( - java.lang.Iterable values) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cropHints_); - onChanged(); - } else { - cropHintsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder clearCropHints() { - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public Builder removeCropHints(int index) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.remove(index); - onChanged(); - } else { - cropHintsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1.CropHint.Builder getCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().getBuilder(index); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); } else { - return cropHintsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsOrBuilderList() { - if (cropHintsBuilder_ != null) { - return cropHintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cropHints_); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1.CropHint.Builder addCropHintsBuilder() { - return getCropHintsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1.CropHint.Builder addCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsBuilderList() { - return getCropHintsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder> - getCropHintsFieldBuilder() { - if (cropHintsBuilder_ == null) { - cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cropHints_ = null; - } - return cropHintsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHintsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHintsAnnotation) - private static final com.google.cloud.vision.v1.CropHintsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHintsAnnotation(); - } - - public static com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java deleted file mode 100644 index 68a189369f5f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface CropHintsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHintsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1.CropHint getCropHints(int index); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - int getCropHintsCount(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsOrBuilderList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1.CropHintOrBuilder getCropHintsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java deleted file mode 100644 index cbfd884f6e69..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Parameters for crop hints annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHintsParams} - */ -public final class CropHintsParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.CropHintsParams) - CropHintsParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsParams.newBuilder() to construct. - private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsParams() { - aspectRatios_ = emptyFloatList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - aspectRatios_.addFloat(input.readFloat()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - aspectRatios_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHintsParams.class, com.google.cloud.vision.v1.CropHintsParams.Builder.class); - } - - public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList aspectRatios_; - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - @java.lang.Override - public java.util.List - getAspectRatiosList() { - return aspectRatios_; - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - private int aspectRatiosMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getAspectRatiosList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); - } - for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.getFloat(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getAspectRatiosList().size(); - size += dataSize; - if (!getAspectRatiosList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - aspectRatiosMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.CropHintsParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.CropHintsParams other = (com.google.cloud.vision.v1.CropHintsParams) obj; - - if (!getAspectRatiosList() - .equals(other.getAspectRatiosList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAspectRatiosCount() > 0) { - hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatiosList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.CropHintsParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.CropHintsParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.CropHintsParams) - com.google.cloud.vision.v1.CropHintsParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.CropHintsParams.class, com.google.cloud.vision.v1.CropHintsParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.CropHintsParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParams build() { - com.google.cloud.vision.v1.CropHintsParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParams buildPartial() { - com.google.cloud.vision.v1.CropHintsParams result = new com.google.cloud.vision.v1.CropHintsParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aspectRatios_ = aspectRatios_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.CropHintsParams) { - return mergeFrom((com.google.cloud.vision.v1.CropHintsParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.CropHintsParams other) { - if (other == com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance()) return this; - if (!other.aspectRatios_.isEmpty()) { - if (aspectRatios_.isEmpty()) { - aspectRatios_ = other.aspectRatios_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAspectRatiosIsMutable(); - aspectRatios_.addAll(other.aspectRatios_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.CropHintsParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.CropHintsParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); - private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = mutableCopy(aspectRatios_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - public java.util.List - getAspectRatiosList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index to set the value at. - * @param value The aspectRatios to set. - * @return This builder for chaining. - */ - public Builder setAspectRatios( - int index, float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.setFloat(index, value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param value The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAspectRatios(float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.addFloat(value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param values The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAllAspectRatios( - java.lang.Iterable values) { - ensureAspectRatiosIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aspectRatios_); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return This builder for chaining. - */ - public Builder clearAspectRatios() { - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.CropHintsParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.CropHintsParams) - private static final com.google.cloud.vision.v1.CropHintsParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.CropHintsParams(); - } - - public static com.google.cloud.vision.v1.CropHintsParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java deleted file mode 100644 index 0ca2ba5cd680..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParamsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface CropHintsParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.CropHintsParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - java.util.List getAspectRatiosList(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - int getAspectRatiosCount(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - float getAspectRatios(int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java deleted file mode 100644 index 477067b58043..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `DeleteProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteProductRequest} - */ -public final class DeleteProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteProductRequest) - DeleteProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductRequest.newBuilder() to construct. - private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteProductRequest.class, com.google.cloud.vision.v1.DeleteProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.DeleteProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.DeleteProductRequest other = (com.google.cloud.vision.v1.DeleteProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.DeleteProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteProductRequest) - com.google.cloud.vision.v1.DeleteProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteProductRequest.class, com.google.cloud.vision.v1.DeleteProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductRequest build() { - com.google.cloud.vision.v1.DeleteProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductRequest buildPartial() { - com.google.cloud.vision.v1.DeleteProductRequest result = new com.google.cloud.vision.v1.DeleteProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.DeleteProductRequest) { - return mergeFrom((com.google.cloud.vision.v1.DeleteProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.DeleteProductRequest other) { - if (other == com.google.cloud.vision.v1.DeleteProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.DeleteProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.DeleteProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteProductRequest) - private static final com.google.cloud.vision.v1.DeleteProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteProductRequest(); - } - - public static com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java deleted file mode 100644 index 852ae7f4f3a3..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface DeleteProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java deleted file mode 100644 index 6afc08ad89d3..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `DeleteProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteProductSetRequest} - */ -public final class DeleteProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteProductSetRequest) - DeleteProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductSetRequest.newBuilder() to construct. - private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteProductSetRequest.class, com.google.cloud.vision.v1.DeleteProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.DeleteProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.DeleteProductSetRequest other = (com.google.cloud.vision.v1.DeleteProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.DeleteProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteProductSetRequest) - com.google.cloud.vision.v1.DeleteProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteProductSetRequest.class, com.google.cloud.vision.v1.DeleteProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.DeleteProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductSetRequest build() { - com.google.cloud.vision.v1.DeleteProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductSetRequest buildPartial() { - com.google.cloud.vision.v1.DeleteProductSetRequest result = new com.google.cloud.vision.v1.DeleteProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.DeleteProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.DeleteProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.DeleteProductSetRequest other) { - if (other == com.google.cloud.vision.v1.DeleteProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.DeleteProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.DeleteProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteProductSetRequest) - private static final com.google.cloud.vision.v1.DeleteProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteProductSetRequest(); - } - - public static com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java deleted file mode 100644 index 92d118085e94..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface DeleteProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java deleted file mode 100644 index 81bd8ca3e3f0..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `DeleteReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteReferenceImageRequest} - */ -public final class DeleteReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DeleteReferenceImageRequest) - DeleteReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteReferenceImageRequest.newBuilder() to construct. - private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1.DeleteReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.DeleteReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1.DeleteReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.DeleteReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.DeleteReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DeleteReferenceImageRequest) - com.google.cloud.vision.v1.DeleteReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1.DeleteReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.DeleteReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteReferenceImageRequest build() { - com.google.cloud.vision.v1.DeleteReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1.DeleteReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.DeleteReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1.DeleteReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.DeleteReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1.DeleteReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.DeleteReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DeleteReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DeleteReferenceImageRequest) - private static final com.google.cloud.vision.v1.DeleteReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DeleteReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java deleted file mode 100644 index 4c96122eaa08..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface DeleteReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DeleteReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java deleted file mode 100644 index 8e7857644e26..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Set of dominant colors and their corresponding scores.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.DominantColorsAnnotation} - */ -public final class DominantColorsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.DominantColorsAnnotation) - DominantColorsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DominantColorsAnnotation.newBuilder() to construct. - private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DominantColorsAnnotation() { - colors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DominantColorsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DominantColorsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colors_.add( - input.readMessage(com.google.cloud.vision.v1.ColorInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DominantColorsAnnotation.class, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder.class); - } - - public static final int COLORS_FIELD_NUMBER = 1; - private java.util.List colors_; - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List getColorsList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List - getColorsOrBuilderList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - @java.lang.Override - public int getColorsCount() { - return colors_.size(); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfo getColors(int index) { - return colors_.get(index); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - return colors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < colors_.size(); i++) { - output.writeMessage(1, colors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < colors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, colors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.DominantColorsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.DominantColorsAnnotation other = (com.google.cloud.vision.v1.DominantColorsAnnotation) obj; - - if (!getColorsList() - .equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getColorsCount() > 0) { - hash = (37 * hash) + COLORS_FIELD_NUMBER; - hash = (53 * hash) + getColorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.DominantColorsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of dominant colors and their corresponding scores.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.DominantColorsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.DominantColorsAnnotation) - com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.DominantColorsAnnotation.class, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.DominantColorsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getColorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - colorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotation build() { - com.google.cloud.vision.v1.DominantColorsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotation buildPartial() { - com.google.cloud.vision.v1.DominantColorsAnnotation result = new com.google.cloud.vision.v1.DominantColorsAnnotation(this); - int from_bitField0_ = bitField0_; - if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.colors_ = colors_; - } else { - result.colors_ = colorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.DominantColorsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.DominantColorsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.DominantColorsAnnotation other) { - if (other == com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance()) return this; - if (colorsBuilder_ == null) { - if (!other.colors_.isEmpty()) { - if (colors_.isEmpty()) { - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColorsIsMutable(); - colors_.addAll(other.colors_); - } - onChanged(); - } - } else { - if (!other.colors_.isEmpty()) { - if (colorsBuilder_.isEmpty()) { - colorsBuilder_.dispose(); - colorsBuilder_ = null; - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - colorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getColorsFieldBuilder() : null; - } else { - colorsBuilder_.addAllMessages(other.colors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.DominantColorsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.DominantColorsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List colors_ = - java.util.Collections.emptyList(); - private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(colors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder> colorsBuilder_; - - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public java.util.List getColorsList() { - if (colorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(colors_); - } else { - return colorsBuilder_.getMessageList(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public int getColorsCount() { - if (colorsBuilder_ == null) { - return colors_.size(); - } else { - return colorsBuilder_.getCount(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1.ColorInfo getColors(int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); - } else { - return colorsBuilder_.getMessage(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.set(index, value); - onChanged(); - } else { - colorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.set(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder addColors(com.google.cloud.vision.v1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(value); - onChanged(); - } else { - colorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(index, value); - onChanged(); - } else { - colorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder addColors( - com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder addAllColors( - java.lang.Iterable values) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, colors_); - onChanged(); - } else { - colorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder clearColors() { - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - colorsBuilder_.clear(); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public Builder removeColors(int index) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.remove(index); - onChanged(); - } else { - colorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1.ColorInfo.Builder getColorsBuilder( - int index) { - return getColorsFieldBuilder().getBuilder(index); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); } else { - return colorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public java.util.List - getColorsOrBuilderList() { - if (colorsBuilder_ != null) { - return colorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(colors_); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1.ColorInfo.Builder addColorsBuilder() { - return getColorsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1.ColorInfo.Builder addColorsBuilder( - int index) { - return getColorsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - public java.util.List - getColorsBuilderList() { - return getColorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder> - getColorsFieldBuilder() { - if (colorsBuilder_ == null) { - colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - colors_ = null; - } - return colorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.DominantColorsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.DominantColorsAnnotation) - private static final com.google.cloud.vision.v1.DominantColorsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.DominantColorsAnnotation(); - } - - public static com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DominantColorsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DominantColorsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java deleted file mode 100644 index 751580bfc993..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface DominantColorsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.DominantColorsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - java.util.List - getColorsList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1.ColorInfo getColors(int index); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - int getColorsCount(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - java.util.List - getColorsOrBuilderList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1.ColorInfoOrBuilder getColorsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java deleted file mode 100644 index 611df5324033..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java +++ /dev/null @@ -1,2480 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Set of detected entity features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.EntityAnnotation} - */ -public final class EntityAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.EntityAnnotation) - EntityAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityAnnotation.newBuilder() to construct. - private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityAnnotation() { - mid_ = ""; - locale_ = ""; - description_ = ""; - locations_ = java.util.Collections.emptyList(); - properties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - locale_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - case 53: { - - topicality_ = input.readFloat(); - break; - } - case 58: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage(com.google.cloud.vision.v1.LocationInfo.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - properties_.add( - input.readMessage(com.google.cloud.vision.v1.Property.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.EntityAnnotation.class, com.google.cloud.vision.v1.EntityAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCALE_FIELD_NUMBER = 2; - private volatile java.lang.Object locale_; - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - @java.lang.Override - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } - } - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1/image_annotator.proto;l=506 - * @return The confidence. - */ - @java.lang.Override - @java.lang.Deprecated public float getConfidence() { - return confidence_; - } - - public static final int TOPICALITY_FIELD_NUMBER = 6; - private float topicality_; - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 7; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 8; - private java.util.List locations_; - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfo getLocations(int index) { - return locations_.get(index); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 9; - private java.util.List properties_; - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - @java.lang.Override - public java.util.List getPropertiesList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - @java.lang.Override - public java.util.List - getPropertiesOrBuilderList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - @java.lang.Override - public int getPropertiesCount() { - return properties_.size(); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Property getProperties(int index) { - return properties_.get(index); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - return properties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - output.writeFloat(6, topicality_); - } - if (boundingPoly_ != null) { - output.writeMessage(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - output.writeMessage(9, properties_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, topicality_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, properties_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.EntityAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.EntityAnnotation other = (com.google.cloud.vision.v1.EntityAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLocale() - .equals(other.getLocale())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getTopicality()) - != java.lang.Float.floatToIntBits( - other.getTopicality())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getLocationsList() - .equals(other.getLocationsList())) return false; - if (!getPropertiesList() - .equals(other.getPropertiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LOCALE_FIELD_NUMBER; - hash = (53 * hash) + getLocale().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTopicality()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (getPropertiesCount() > 0) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getPropertiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.EntityAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected entity features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.EntityAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.EntityAnnotation) - com.google.cloud.vision.v1.EntityAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.EntityAnnotation.class, com.google.cloud.vision.v1.EntityAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.EntityAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - getPropertiesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - locale_ = ""; - - description_ = ""; - - score_ = 0F; - - confidence_ = 0F; - - topicality_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - propertiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation build() { - com.google.cloud.vision.v1.EntityAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation buildPartial() { - com.google.cloud.vision.v1.EntityAnnotation result = new com.google.cloud.vision.v1.EntityAnnotation(this); - int from_bitField0_ = bitField0_; - result.mid_ = mid_; - result.locale_ = locale_; - result.description_ = description_; - result.score_ = score_; - result.confidence_ = confidence_; - result.topicality_ = topicality_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.properties_ = properties_; - } else { - result.properties_ = propertiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.EntityAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.EntityAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.EntityAnnotation other) { - if (other == com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLocale().isEmpty()) { - locale_ = other.locale_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getTopicality() != 0F) { - setTopicality(other.getTopicality()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (propertiesBuilder_ == null) { - if (!other.properties_.isEmpty()) { - if (properties_.isEmpty()) { - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePropertiesIsMutable(); - properties_.addAll(other.properties_); - } - onChanged(); - } - } else { - if (!other.properties_.isEmpty()) { - if (propertiesBuilder_.isEmpty()) { - propertiesBuilder_.dispose(); - propertiesBuilder_ = null; - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - propertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPropertiesFieldBuilder() : null; - } else { - propertiesBuilder_.addAllMessages(other.properties_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.EntityAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.EntityAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object mid_ = ""; - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object locale_ = ""; - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The locale. - */ - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The locale to set. - * @return This builder for chaining. - */ - public Builder setLocale( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locale_ = value; - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return This builder for chaining. - */ - public Builder clearLocale() { - - locale_ = getDefaultInstance().getLocale(); - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The bytes for locale to set. - * @return This builder for chaining. - */ - public Builder setLocaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locale_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1/image_annotator.proto;l=506 - * @return The confidence. - */ - @java.lang.Override - @java.lang.Deprecated public float getConfidence() { - return confidence_; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1/image_annotator.proto;l=506 - * @param value The confidence to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1/image_annotator.proto;l=506 - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float topicality_ ; - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @param value The topicality to set. - * @return This builder for chaining. - */ - public Builder setTopicality(float value) { - - topicality_ = value; - onChanged(); - return this; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return This builder for chaining. - */ - public Builder clearTopicality() { - - topicality_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder> locationsBuilder_; - - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1.LocationInfo getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder addLocations(com.google.cloud.vision.v1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder addLocations( - com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1.LocationInfo.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.util.List properties_ = - java.util.Collections.emptyList(); - private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(properties_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder> propertiesBuilder_; - - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public java.util.List getPropertiesList() { - if (propertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(properties_); - } else { - return propertiesBuilder_.getMessageList(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public int getPropertiesCount() { - if (propertiesBuilder_ == null) { - return properties_.size(); - } else { - return propertiesBuilder_.getCount(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public com.google.cloud.vision.v1.Property getProperties(int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); - } else { - return propertiesBuilder_.getMessage(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.set(index, value); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.set(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder addProperties(com.google.cloud.vision.v1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(value); - onChanged(); - } else { - propertiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(index, value); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder addProperties( - com.google.cloud.vision.v1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder addAllProperties( - java.lang.Iterable values) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, properties_); - onChanged(); - } else { - propertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder clearProperties() { - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - propertiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public Builder removeProperties(int index) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.remove(index); - onChanged(); - } else { - propertiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public com.google.cloud.vision.v1.Property.Builder getPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); } else { - return propertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public java.util.List - getPropertiesOrBuilderList() { - if (propertiesBuilder_ != null) { - return propertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(properties_); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public com.google.cloud.vision.v1.Property.Builder addPropertiesBuilder() { - return getPropertiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public com.google.cloud.vision.v1.Property.Builder addPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - public java.util.List - getPropertiesBuilderList() { - return getPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder> - getPropertiesFieldBuilder() { - if (propertiesBuilder_ == null) { - propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - properties_ = null; - } - return propertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.EntityAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.EntityAnnotation) - private static final com.google.cloud.vision.v1.EntityAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.EntityAnnotation(); - } - - public static com.google.cloud.vision.v1.EntityAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.EntityAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java deleted file mode 100644 index 0b2f042a7b76..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotationOrBuilder.java +++ /dev/null @@ -1,258 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface EntityAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.EntityAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - java.lang.String getLocale(); - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - com.google.protobuf.ByteString - getLocaleBytes(); - - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1/image_annotator.proto;l=506 - * @return The confidence. - */ - @java.lang.Deprecated float getConfidence(); - - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - float getTopicality(); - - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - java.util.List - getLocationsList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1.LocationInfo getLocations(int index); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - int getLocationsCount(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - java.util.List - getLocationsOrBuilderList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1.LocationInfoOrBuilder getLocationsOrBuilder( - int index); - - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - java.util.List - getPropertiesList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - com.google.cloud.vision.v1.Property getProperties(int index); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - int getPropertiesCount(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - java.util.List - getPropertiesOrBuilderList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1.Property properties = 9; - */ - com.google.cloud.vision.v1.PropertyOrBuilder getPropertiesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java deleted file mode 100644 index 2781f2b24a2f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java +++ /dev/null @@ -1,4334 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A face annotation object contains the results of face detection.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation} - */ -public final class FaceAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation) - FaceAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceAnnotation.newBuilder() to construct. - private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceAnnotation() { - landmarks_ = java.util.Collections.emptyList(); - joyLikelihood_ = 0; - sorrowLikelihood_ = 0; - angerLikelihood_ = 0; - surpriseLikelihood_ = 0; - underExposedLikelihood_ = 0; - blurredLikelihood_ = 0; - headwearLikelihood_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (fdBoundingPoly_ != null) { - subBuilder = fdBoundingPoly_.toBuilder(); - } - fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fdBoundingPoly_); - fdBoundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - landmarks_.add( - input.readMessage(com.google.cloud.vision.v1.FaceAnnotation.Landmark.parser(), extensionRegistry)); - break; - } - case 37: { - - rollAngle_ = input.readFloat(); - break; - } - case 45: { - - panAngle_ = input.readFloat(); - break; - } - case 53: { - - tiltAngle_ = input.readFloat(); - break; - } - case 61: { - - detectionConfidence_ = input.readFloat(); - break; - } - case 69: { - - landmarkingConfidence_ = input.readFloat(); - break; - } - case 72: { - int rawValue = input.readEnum(); - - joyLikelihood_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sorrowLikelihood_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - angerLikelihood_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - surpriseLikelihood_ = rawValue; - break; - } - case 104: { - int rawValue = input.readEnum(); - - underExposedLikelihood_ = rawValue; - break; - } - case 112: { - int rawValue = input.readEnum(); - - blurredLikelihood_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - headwearLikelihood_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.FaceAnnotation.class, com.google.cloud.vision.v1.FaceAnnotation.Builder.class); - } - - public interface LandmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.FaceAnnotation.Landmark) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType(); - - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return Whether the position field is set. - */ - boolean hasPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return The position. - */ - com.google.cloud.vision.v1.Position getPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder(); - } - /** - *
-   * A face-specific landmark (for example, a face feature).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark} - */ - public static final class Landmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation.Landmark) - LandmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Landmark.newBuilder() to construct. - private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Landmark() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Landmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Landmark( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - com.google.cloud.vision.v1.Position.Builder subBuilder = null; - if (position_ != null) { - subBuilder = position_.toBuilder(); - } - position_ = input.readMessage(com.google.cloud.vision.v1.Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(position_); - position_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class); - } - - /** - *
-     * Face landmark (feature) type.
-     * Left and right are defined from the vantage of the viewer of the image
-     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
-     * typically, is the person's right eye.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1.FaceAnnotation.Landmark.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - UNKNOWN_LANDMARK(0), - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - LEFT_EYE(1), - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - RIGHT_EYE(2), - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - LEFT_OF_LEFT_EYEBROW(3), - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - RIGHT_OF_LEFT_EYEBROW(4), - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - LEFT_OF_RIGHT_EYEBROW(5), - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - RIGHT_OF_RIGHT_EYEBROW(6), - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - MIDPOINT_BETWEEN_EYES(7), - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - NOSE_TIP(8), - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - UPPER_LIP(9), - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - LOWER_LIP(10), - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - MOUTH_LEFT(11), - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - MOUTH_RIGHT(12), - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - MOUTH_CENTER(13), - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - NOSE_BOTTOM_RIGHT(14), - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - NOSE_BOTTOM_LEFT(15), - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - NOSE_BOTTOM_CENTER(16), - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - LEFT_EYE_TOP_BOUNDARY(17), - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - LEFT_EYE_RIGHT_CORNER(18), - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - LEFT_EYE_BOTTOM_BOUNDARY(19), - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - LEFT_EYE_LEFT_CORNER(20), - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - RIGHT_EYE_TOP_BOUNDARY(21), - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - RIGHT_EYE_RIGHT_CORNER(22), - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - RIGHT_EYE_BOTTOM_BOUNDARY(23), - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - RIGHT_EYE_LEFT_CORNER(24), - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - LEFT_EYEBROW_UPPER_MIDPOINT(25), - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - RIGHT_EYEBROW_UPPER_MIDPOINT(26), - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - LEFT_EAR_TRAGION(27), - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - RIGHT_EAR_TRAGION(28), - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - LEFT_EYE_PUPIL(29), - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - RIGHT_EYE_PUPIL(30), - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - FOREHEAD_GLABELLA(31), - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - CHIN_GNATHION(32), - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - CHIN_LEFT_GONION(33), - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - CHIN_RIGHT_GONION(34), - /** - *
-       * Left cheek center.
-       * 
- * - * LEFT_CHEEK_CENTER = 35; - */ - LEFT_CHEEK_CENTER(35), - /** - *
-       * Right cheek center.
-       * 
- * - * RIGHT_CHEEK_CENTER = 36; - */ - RIGHT_CHEEK_CENTER(36), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - public static final int UNKNOWN_LANDMARK_VALUE = 0; - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - public static final int LEFT_EYE_VALUE = 1; - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - public static final int RIGHT_EYE_VALUE = 2; - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - public static final int NOSE_TIP_VALUE = 8; - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - public static final int UPPER_LIP_VALUE = 9; - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - public static final int LOWER_LIP_VALUE = 10; - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - public static final int MOUTH_LEFT_VALUE = 11; - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - public static final int MOUTH_RIGHT_VALUE = 12; - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - public static final int MOUTH_CENTER_VALUE = 13; - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - public static final int NOSE_BOTTOM_LEFT_VALUE = 15; - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - public static final int NOSE_BOTTOM_CENTER_VALUE = 16; - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - public static final int LEFT_EAR_TRAGION_VALUE = 27; - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - public static final int RIGHT_EAR_TRAGION_VALUE = 28; - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - public static final int LEFT_EYE_PUPIL_VALUE = 29; - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - public static final int RIGHT_EYE_PUPIL_VALUE = 30; - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - public static final int FOREHEAD_GLABELLA_VALUE = 31; - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - public static final int CHIN_GNATHION_VALUE = 32; - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - public static final int CHIN_LEFT_GONION_VALUE = 33; - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - public static final int CHIN_RIGHT_GONION_VALUE = 34; - /** - *
-       * Left cheek center.
-       * 
- * - * LEFT_CHEEK_CENTER = 35; - */ - public static final int LEFT_CHEEK_CENTER_VALUE = 35; - /** - *
-       * Right cheek center.
-       * 
- * - * RIGHT_CHEEK_CENTER = 36; - */ - public static final int RIGHT_CHEEK_CENTER_VALUE = 36; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN_LANDMARK; - case 1: return LEFT_EYE; - case 2: return RIGHT_EYE; - case 3: return LEFT_OF_LEFT_EYEBROW; - case 4: return RIGHT_OF_LEFT_EYEBROW; - case 5: return LEFT_OF_RIGHT_EYEBROW; - case 6: return RIGHT_OF_RIGHT_EYEBROW; - case 7: return MIDPOINT_BETWEEN_EYES; - case 8: return NOSE_TIP; - case 9: return UPPER_LIP; - case 10: return LOWER_LIP; - case 11: return MOUTH_LEFT; - case 12: return MOUTH_RIGHT; - case 13: return MOUTH_CENTER; - case 14: return NOSE_BOTTOM_RIGHT; - case 15: return NOSE_BOTTOM_LEFT; - case 16: return NOSE_BOTTOM_CENTER; - case 17: return LEFT_EYE_TOP_BOUNDARY; - case 18: return LEFT_EYE_RIGHT_CORNER; - case 19: return LEFT_EYE_BOTTOM_BOUNDARY; - case 20: return LEFT_EYE_LEFT_CORNER; - case 21: return RIGHT_EYE_TOP_BOUNDARY; - case 22: return RIGHT_EYE_RIGHT_CORNER; - case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; - case 24: return RIGHT_EYE_LEFT_CORNER; - case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; - case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; - case 27: return LEFT_EAR_TRAGION; - case 28: return RIGHT_EAR_TRAGION; - case 29: return LEFT_EYE_PUPIL; - case 30: return RIGHT_EYE_PUPIL; - case 31: return FOREHEAD_GLABELLA; - case 32: return CHIN_GNATHION; - case 33: return CHIN_LEFT_GONION; - case 34: return CHIN_RIGHT_GONION; - case 35: return LEFT_CHEEK_CENTER; - case 36: return RIGHT_CHEEK_CENTER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.FaceAnnotation.Landmark.Type) - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - - public static final int POSITION_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1.Position position_; - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return Whether the position field is set. - */ - @java.lang.Override - public boolean hasPosition() { - return position_ != null; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return The position. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Position getPosition() { - return position_ == null ? com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() { - return getPosition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - output.writeEnum(3, type_); - } - if (position_ != null) { - output.writeMessage(4, getPosition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (position_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPosition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1.FaceAnnotation.Landmark) obj; - - if (type_ != other.type_) return false; - if (hasPosition() != other.hasPosition()) return false; - if (hasPosition()) { - if (!getPosition() - .equals(other.getPosition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasPosition()) { - hash = (37 * hash) + POSITION_FIELD_NUMBER; - hash = (53 * hash) + getPosition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation.Landmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A face-specific landmark (for example, a face feature).
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation.Landmark) - com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.FaceAnnotation.Landmark.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (positionBuilder_ == null) { - position_ = null; - } else { - position_ = null; - positionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark build() { - com.google.cloud.vision.v1.FaceAnnotation.Landmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark buildPartial() { - com.google.cloud.vision.v1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1.FaceAnnotation.Landmark(this); - result.type_ = type_; - if (positionBuilder_ == null) { - result.position_ = position_; - } else { - result.position_ = positionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark) { - return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation.Landmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation.Landmark other) { - if (other == com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasPosition()) { - mergePosition(other.getPosition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.FaceAnnotation.Landmark parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.Position position_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder> positionBuilder_; - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return Whether the position field is set. - */ - public boolean hasPosition() { - return positionBuilder_ != null || position_ != null; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - * @return The position. - */ - public com.google.cloud.vision.v1.Position getPosition() { - if (positionBuilder_ == null) { - return position_ == null ? com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; - } else { - return positionBuilder_.getMessage(); - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public Builder setPosition(com.google.cloud.vision.v1.Position value) { - if (positionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - position_ = value; - onChanged(); - } else { - positionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public Builder setPosition( - com.google.cloud.vision.v1.Position.Builder builderForValue) { - if (positionBuilder_ == null) { - position_ = builderForValue.build(); - onChanged(); - } else { - positionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public Builder mergePosition(com.google.cloud.vision.v1.Position value) { - if (positionBuilder_ == null) { - if (position_ != null) { - position_ = - com.google.cloud.vision.v1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); - } else { - position_ = value; - } - onChanged(); - } else { - positionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public Builder clearPosition() { - if (positionBuilder_ == null) { - position_ = null; - onChanged(); - } else { - position_ = null; - positionBuilder_ = null; - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public com.google.cloud.vision.v1.Position.Builder getPositionBuilder() { - - onChanged(); - return getPositionFieldBuilder().getBuilder(); - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() { - if (positionBuilder_ != null) { - return positionBuilder_.getMessageOrBuilder(); - } else { - return position_ == null ? - com.google.cloud.vision.v1.Position.getDefaultInstance() : position_; - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1.Position position = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder> - getPositionFieldBuilder() { - if (positionBuilder_ == null) { - positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, com.google.cloud.vision.v1.PositionOrBuilder>( - getPosition(), - getParentForChildren(), - isClean()); - position_ = null; - } - return positionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation.Landmark) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation.Landmark) - private static final com.google.cloud.vision.v1.FaceAnnotation.Landmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation.Landmark(); - } - - public static com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Landmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Landmark(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_; - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - @java.lang.Override - public boolean hasFdBoundingPoly() { - return fdBoundingPoly_ != null; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - return getFdBoundingPoly(); - } - - public static final int LANDMARKS_FIELD_NUMBER = 3; - private java.util.List landmarks_; - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List getLandmarksList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List - getLandmarksOrBuilderList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public int getLandmarksCount() { - return landmarks_.size(); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) { - return landmarks_.get(index); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - return landmarks_.get(index); - } - - public static final int ROLL_ANGLE_FIELD_NUMBER = 4; - private float rollAngle_; - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - - public static final int PAN_ANGLE_FIELD_NUMBER = 5; - private float panAngle_; - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - - public static final int TILT_ANGLE_FIELD_NUMBER = 6; - private float tiltAngle_; - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - - public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; - private float detectionConfidence_; - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - - public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; - private float landmarkingConfidence_; - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - - public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; - private int joyLikelihood_; - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; - private int sorrowLikelihood_; - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; - private int angerLikelihood_; - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; - private int surpriseLikelihood_; - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; - private int underExposedLikelihood_; - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; - private int blurredLikelihood_; - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; - private int headwearLikelihood_; - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - output.writeMessage(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - output.writeMessage(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - output.writeFloat(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - output.writeFloat(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - output.writeFloat(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - output.writeFloat(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - output.writeFloat(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(15, headwearLikelihood_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, headwearLikelihood_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.FaceAnnotation other = (com.google.cloud.vision.v1.FaceAnnotation) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; - if (hasFdBoundingPoly()) { - if (!getFdBoundingPoly() - .equals(other.getFdBoundingPoly())) return false; - } - if (!getLandmarksList() - .equals(other.getLandmarksList())) return false; - if (java.lang.Float.floatToIntBits(getRollAngle()) - != java.lang.Float.floatToIntBits( - other.getRollAngle())) return false; - if (java.lang.Float.floatToIntBits(getPanAngle()) - != java.lang.Float.floatToIntBits( - other.getPanAngle())) return false; - if (java.lang.Float.floatToIntBits(getTiltAngle()) - != java.lang.Float.floatToIntBits( - other.getTiltAngle())) return false; - if (java.lang.Float.floatToIntBits(getDetectionConfidence()) - != java.lang.Float.floatToIntBits( - other.getDetectionConfidence())) return false; - if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - != java.lang.Float.floatToIntBits( - other.getLandmarkingConfidence())) return false; - if (joyLikelihood_ != other.joyLikelihood_) return false; - if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; - if (angerLikelihood_ != other.angerLikelihood_) return false; - if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; - if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; - if (blurredLikelihood_ != other.blurredLikelihood_) return false; - if (headwearLikelihood_ != other.headwearLikelihood_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (hasFdBoundingPoly()) { - hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getFdBoundingPoly().hashCode(); - } - if (getLandmarksCount() > 0) { - hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarksList().hashCode(); - } - hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRollAngle()); - hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPanAngle()); - hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTiltAngle()); - hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getDetectionConfidence()); - hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLandmarkingConfidence()); - hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + joyLikelihood_; - hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + sorrowLikelihood_; - hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + angerLikelihood_; - hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + surpriseLikelihood_; - hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + underExposedLikelihood_; - hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + blurredLikelihood_; - hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + headwearLikelihood_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A face annotation object contains the results of face detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation) - com.google.cloud.vision.v1.FaceAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.FaceAnnotation.class, com.google.cloud.vision.v1.FaceAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.FaceAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLandmarksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - landmarksBuilder_.clear(); - } - rollAngle_ = 0F; - - panAngle_ = 0F; - - tiltAngle_ = 0F; - - detectionConfidence_ = 0F; - - landmarkingConfidence_ = 0F; - - joyLikelihood_ = 0; - - sorrowLikelihood_ = 0; - - angerLikelihood_ = 0; - - surpriseLikelihood_ = 0; - - underExposedLikelihood_ = 0; - - blurredLikelihood_ = 0; - - headwearLikelihood_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation build() { - com.google.cloud.vision.v1.FaceAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation buildPartial() { - com.google.cloud.vision.v1.FaceAnnotation result = new com.google.cloud.vision.v1.FaceAnnotation(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (fdBoundingPolyBuilder_ == null) { - result.fdBoundingPoly_ = fdBoundingPoly_; - } else { - result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); - } - if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.landmarks_ = landmarks_; - } else { - result.landmarks_ = landmarksBuilder_.build(); - } - result.rollAngle_ = rollAngle_; - result.panAngle_ = panAngle_; - result.tiltAngle_ = tiltAngle_; - result.detectionConfidence_ = detectionConfidence_; - result.landmarkingConfidence_ = landmarkingConfidence_; - result.joyLikelihood_ = joyLikelihood_; - result.sorrowLikelihood_ = sorrowLikelihood_; - result.angerLikelihood_ = angerLikelihood_; - result.surpriseLikelihood_ = surpriseLikelihood_; - result.underExposedLikelihood_ = underExposedLikelihood_; - result.blurredLikelihood_ = blurredLikelihood_; - result.headwearLikelihood_ = headwearLikelihood_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.FaceAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation other) { - if (other == com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.hasFdBoundingPoly()) { - mergeFdBoundingPoly(other.getFdBoundingPoly()); - } - if (landmarksBuilder_ == null) { - if (!other.landmarks_.isEmpty()) { - if (landmarks_.isEmpty()) { - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLandmarksIsMutable(); - landmarks_.addAll(other.landmarks_); - } - onChanged(); - } - } else { - if (!other.landmarks_.isEmpty()) { - if (landmarksBuilder_.isEmpty()) { - landmarksBuilder_.dispose(); - landmarksBuilder_ = null; - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - landmarksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarksFieldBuilder() : null; - } else { - landmarksBuilder_.addAllMessages(other.landmarks_); - } - } - } - if (other.getRollAngle() != 0F) { - setRollAngle(other.getRollAngle()); - } - if (other.getPanAngle() != 0F) { - setPanAngle(other.getPanAngle()); - } - if (other.getTiltAngle() != 0F) { - setTiltAngle(other.getTiltAngle()); - } - if (other.getDetectionConfidence() != 0F) { - setDetectionConfidence(other.getDetectionConfidence()); - } - if (other.getLandmarkingConfidence() != 0F) { - setLandmarkingConfidence(other.getLandmarkingConfidence()); - } - if (other.joyLikelihood_ != 0) { - setJoyLikelihoodValue(other.getJoyLikelihoodValue()); - } - if (other.sorrowLikelihood_ != 0) { - setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); - } - if (other.angerLikelihood_ != 0) { - setAngerLikelihoodValue(other.getAngerLikelihoodValue()); - } - if (other.surpriseLikelihood_ != 0) { - setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); - } - if (other.underExposedLikelihood_ != 0) { - setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); - } - if (other.blurredLikelihood_ != 0) { - setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); - } - if (other.headwearLikelihood_ != 0) { - setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.FaceAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.FaceAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - public boolean hasFdBoundingPoly() { - return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } else { - return fdBoundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdBoundingPoly_ = value; - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = builderForValue.build(); - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (fdBoundingPoly_ != null) { - fdBoundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); - } else { - fdBoundingPoly_ = value; - } - onChanged(); - } else { - fdBoundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder clearFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - onChanged(); - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getFdBoundingPolyBuilder() { - - onChanged(); - return getFdBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - if (fdBoundingPolyBuilder_ != null) { - return fdBoundingPolyBuilder_.getMessageOrBuilder(); - } else { - return fdBoundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getFdBoundingPolyFieldBuilder() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getFdBoundingPoly(), - getParentForChildren(), - isClean()); - fdBoundingPoly_ = null; - } - return fdBoundingPolyBuilder_; - } - - private java.util.List landmarks_ = - java.util.Collections.emptyList(); - private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(landmarks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; - - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List getLandmarksList() { - if (landmarksBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarks_); - } else { - return landmarksBuilder_.getMessageList(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public int getLandmarksCount() { - if (landmarksBuilder_ == null) { - return landmarks_.size(); - } else { - return landmarksBuilder_.getCount(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); - } else { - return landmarksBuilder_.getMessage(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.set(index, value); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks(com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(value); - onChanged(); - } else { - landmarksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(index, value); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addAllLandmarks( - java.lang.Iterable values) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarks_); - onChanged(); - } else { - landmarksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder clearLandmarks() { - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - landmarksBuilder_.clear(); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder removeLandmarks(int index) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.remove(index); - onChanged(); - } else { - landmarksBuilder_.remove(index); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().getBuilder(index); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); } else { - return landmarksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksOrBuilderList() { - if (landmarksBuilder_ != null) { - return landmarksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarks_); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { - return getLandmarksFieldBuilder().addBuilder( - com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksBuilderList() { - return getLandmarksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder> - getLandmarksFieldBuilder() { - if (landmarksBuilder_ == null) { - landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - landmarks_ = null; - } - return landmarksBuilder_; - } - - private float rollAngle_ ; - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @param value The rollAngle to set. - * @return This builder for chaining. - */ - public Builder setRollAngle(float value) { - - rollAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return This builder for chaining. - */ - public Builder clearRollAngle() { - - rollAngle_ = 0F; - onChanged(); - return this; - } - - private float panAngle_ ; - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @param value The panAngle to set. - * @return This builder for chaining. - */ - public Builder setPanAngle(float value) { - - panAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return This builder for chaining. - */ - public Builder clearPanAngle() { - - panAngle_ = 0F; - onChanged(); - return this; - } - - private float tiltAngle_ ; - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @param value The tiltAngle to set. - * @return This builder for chaining. - */ - public Builder setTiltAngle(float value) { - - tiltAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return This builder for chaining. - */ - public Builder clearTiltAngle() { - - tiltAngle_ = 0F; - onChanged(); - return this; - } - - private float detectionConfidence_ ; - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @param value The detectionConfidence to set. - * @return This builder for chaining. - */ - public Builder setDetectionConfidence(float value) { - - detectionConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return This builder for chaining. - */ - public Builder clearDetectionConfidence() { - - detectionConfidence_ = 0F; - onChanged(); - return this; - } - - private float landmarkingConfidence_ ; - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @param value The landmarkingConfidence to set. - * @return This builder for chaining. - */ - public Builder setLandmarkingConfidence(float value) { - - landmarkingConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return This builder for chaining. - */ - public Builder clearLandmarkingConfidence() { - - landmarkingConfidence_ = 0F; - onChanged(); - return this; - } - - private int joyLikelihood_ = 0; - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @param value The enum numeric value on the wire for joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihoodValue(int value) { - - joyLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @param value The joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - joyLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return This builder for chaining. - */ - public Builder clearJoyLikelihood() { - - joyLikelihood_ = 0; - onChanged(); - return this; - } - - private int sorrowLikelihood_ = 0; - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @param value The enum numeric value on the wire for sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihoodValue(int value) { - - sorrowLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @param value The sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - sorrowLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return This builder for chaining. - */ - public Builder clearSorrowLikelihood() { - - sorrowLikelihood_ = 0; - onChanged(); - return this; - } - - private int angerLikelihood_ = 0; - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @param value The enum numeric value on the wire for angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihoodValue(int value) { - - angerLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @param value The angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - angerLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return This builder for chaining. - */ - public Builder clearAngerLikelihood() { - - angerLikelihood_ = 0; - onChanged(); - return this; - } - - private int surpriseLikelihood_ = 0; - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @param value The enum numeric value on the wire for surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihoodValue(int value) { - - surpriseLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @param value The surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - surpriseLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return This builder for chaining. - */ - public Builder clearSurpriseLikelihood() { - - surpriseLikelihood_ = 0; - onChanged(); - return this; - } - - private int underExposedLikelihood_ = 0; - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @param value The enum numeric value on the wire for underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihoodValue(int value) { - - underExposedLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @param value The underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - underExposedLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return This builder for chaining. - */ - public Builder clearUnderExposedLikelihood() { - - underExposedLikelihood_ = 0; - onChanged(); - return this; - } - - private int blurredLikelihood_ = 0; - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @param value The enum numeric value on the wire for blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihoodValue(int value) { - - blurredLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @param value The blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - blurredLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return This builder for chaining. - */ - public Builder clearBlurredLikelihood() { - - blurredLikelihood_ = 0; - onChanged(); - return this; - } - - private int headwearLikelihood_ = 0; - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @param value The enum numeric value on the wire for headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihoodValue(int value) { - - headwearLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @param value The headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihood(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - headwearLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return This builder for chaining. - */ - public Builder clearHeadwearLikelihood() { - - headwearLikelihood_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation) - private static final com.google.cloud.vision.v1.FaceAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation(); - } - - public static com.google.cloud.vision.v1.FaceAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java deleted file mode 100644 index dc8aa6f0a99a..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotationOrBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface FaceAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.FaceAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - boolean hasFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); - - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - int getLandmarksCount(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksOrBuilderList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index); - - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - float getRollAngle(); - - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - float getPanAngle(); - - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - float getTiltAngle(); - - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - float getDetectionConfidence(); - - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - float getLandmarkingConfidence(); - - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - int getJoyLikelihoodValue(); - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getJoyLikelihood(); - - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - int getSorrowLikelihoodValue(); - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getSorrowLikelihood(); - - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - int getAngerLikelihoodValue(); - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getAngerLikelihood(); - - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - int getSurpriseLikelihoodValue(); - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood(); - - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - int getUnderExposedLikelihoodValue(); - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood(); - - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - int getBlurredLikelihoodValue(); - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getBlurredLikelihood(); - - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - int getHeadwearLikelihoodValue(); - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java deleted file mode 100644 index 1d4b2ce3ea69..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java +++ /dev/null @@ -1,1153 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The type of Google Cloud Vision API detection to perform, and the maximum
- * number of results to return for that type. Multiple `Feature` objects can
- * be specified in the `features` list.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Feature} - */ -public final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Feature) - FeatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feature.newBuilder() to construct. - private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feature() { - type_ = 0; - model_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - maxResults_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - model_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Feature.class, com.google.cloud.vision.v1.Feature.Builder.class); - } - - /** - *
-   * Type of Google Cloud Vision API feature to be extracted.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1.Feature.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - FACE_DETECTION(1), - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - LANDMARK_DETECTION(2), - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - LOGO_DETECTION(3), - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - LABEL_DETECTION(4), - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - TEXT_DETECTION(5), - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - DOCUMENT_TEXT_DETECTION(11), - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - SAFE_SEARCH_DETECTION(6), - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - IMAGE_PROPERTIES(7), - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - CROP_HINTS(9), - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - WEB_DETECTION(10), - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - PRODUCT_SEARCH(12), - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - OBJECT_LOCALIZATION(19), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - public static final int FACE_DETECTION_VALUE = 1; - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - public static final int LANDMARK_DETECTION_VALUE = 2; - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - public static final int LOGO_DETECTION_VALUE = 3; - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - public static final int LABEL_DETECTION_VALUE = 4; - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - public static final int TEXT_DETECTION_VALUE = 5; - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - public static final int SAFE_SEARCH_DETECTION_VALUE = 6; - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - public static final int IMAGE_PROPERTIES_VALUE = 7; - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - public static final int CROP_HINTS_VALUE = 9; - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - public static final int WEB_DETECTION_VALUE = 10; - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - public static final int PRODUCT_SEARCH_VALUE = 12; - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - public static final int OBJECT_LOCALIZATION_VALUE = 19; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return FACE_DETECTION; - case 2: return LANDMARK_DETECTION; - case 3: return LOGO_DETECTION; - case 4: return LABEL_DETECTION; - case 5: return TEXT_DETECTION; - case 11: return DOCUMENT_TEXT_DETECTION; - case 6: return SAFE_SEARCH_DETECTION; - case 7: return IMAGE_PROPERTIES; - case 9: return CROP_HINTS; - case 10: return WEB_DETECTION; - case 12: return PRODUCT_SEARCH; - case 19: return OBJECT_LOCALIZATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.Feature.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Feature.Type) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Feature.Type result = com.google.cloud.vision.v1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.Feature.Type.UNRECOGNIZED : result; - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 2; - private int maxResults_; - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int MODEL_FIELD_NUMBER = 3; - private volatile java.lang.Object model_; - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } - } - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (maxResults_ != 0) { - output.writeInt32(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Feature)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Feature other = (com.google.cloud.vision.v1.Feature) obj; - - if (type_ != other.type_) return false; - if (getMaxResults() - != other.getMaxResults()) return false; - if (!getModel() - .equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Feature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The type of Google Cloud Vision API detection to perform, and the maximum
-   * number of results to return for that type. Multiple `Feature` objects can
-   * be specified in the `features` list.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Feature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Feature) - com.google.cloud.vision.v1.FeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Feature.class, com.google.cloud.vision.v1.Feature.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Feature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - maxResults_ = 0; - - model_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Feature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Feature getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Feature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Feature build() { - com.google.cloud.vision.v1.Feature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Feature buildPartial() { - com.google.cloud.vision.v1.Feature result = new com.google.cloud.vision.v1.Feature(this); - result.type_ = type_; - result.maxResults_ = maxResults_; - result.model_ = model_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Feature) { - return mergeFrom((com.google.cloud.vision.v1.Feature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Feature other) { - if (other == com.google.cloud.vision.v1.Feature.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Feature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Feature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Feature.Type result = com.google.cloud.vision.v1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.Feature.Type.UNRECOGNIZED : result; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1.Feature.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int maxResults_ ; - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The bytes for model. - */ - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - model_ = value; - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return This builder for chaining. - */ - public Builder clearModel() { - - model_ = getDefaultInstance().getModel(); - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - model_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Feature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Feature) - private static final com.google.cloud.vision.v1.Feature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Feature(); - } - - public static com.google.cloud.vision.v1.Feature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Feature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java deleted file mode 100644 index 29ffa6b3370f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FeatureOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Feature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1.Feature.Type type = 1; - * @return The type. - */ - com.google.cloud.vision.v1.Feature.Type getType(); - - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - int getMaxResults(); - - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - java.lang.String getModel(); - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - com.google.protobuf.ByteString - getModelBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java deleted file mode 100644 index 7cf322ab8ca2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java +++ /dev/null @@ -1,714 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The Google Cloud Storage location where the output will be written to.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GcsDestination.class, com.google.cloud.vision.v1.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.GcsDestination other = (com.google.cloud.vision.v1.GcsDestination) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the output will be written to.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GcsDestination) - com.google.cloud.vision.v1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GcsDestination.class, com.google.cloud.vision.v1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.vision.v1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestination build() { - com.google.cloud.vision.v1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestination buildPartial() { - com.google.cloud.vision.v1.GcsDestination result = new com.google.cloud.vision.v1.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.GcsDestination) { - return mergeFrom((com.google.cloud.vision.v1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.GcsDestination other) { - if (other == com.google.cloud.vision.v1.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsDestination) - private static final com.google.cloud.vision.v1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GcsDestination(); - } - - public static com.google.cloud.vision.v1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java deleted file mode 100644 index 014e9c47dd94..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java deleted file mode 100644 index 25d804034de3..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The Google Cloud Storage location where the input will be read from.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.GcsSource} - */ -public final class GcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GcsSource) - GcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsSource() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GcsSource.class, com.google.cloud.vision.v1.GcsSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.GcsSource other = (com.google.cloud.vision.v1.GcsSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.GcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the input will be read from.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.GcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GcsSource) - com.google.cloud.vision.v1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GcsSource.class, com.google.cloud.vision.v1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsSource build() { - com.google.cloud.vision.v1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsSource buildPartial() { - com.google.cloud.vision.v1.GcsSource result = new com.google.cloud.vision.v1.GcsSource(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.GcsSource) { - return mergeFrom((com.google.cloud.vision.v1.GcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.GcsSource other) { - if (other == com.google.cloud.vision.v1.GcsSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsSource) - private static final com.google.cloud.vision.v1.GcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GcsSource(); - } - - public static com.google.cloud.vision.v1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java deleted file mode 100644 index 9fa8a6cfbb14..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface GcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java deleted file mode 100644 index 9e1474097342..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -public final class GeometryProto { - private GeometryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Vertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BoundingPoly_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BoundingPoly_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Position_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Position_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n%google/cloud/vision/v1/geometry.proto\022" + - "\026google.cloud.vision.v1\"\036\n\006Vertex\022\t\n\001x\030\001" + - " \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020NormalizedVertex\022\t\n\001x" + - "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\207\001\n\014BoundingPoly\0220\n\010ve" + - "rtices\030\001 \003(\0132\036.google.cloud.vision.v1.Ve" + - "rtex\022E\n\023normalized_vertices\030\002 \003(\0132(.goog" + - "le.cloud.vision.v1.NormalizedVertex\"+\n\010P" + - "osition\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002" + - "Bu\n\032com.google.cloud.vision.v1B\rGeometry" + - "ProtoP\001Z - * Request message for the `GetProduct` method. - * - * - * Protobuf type {@code google.cloud.vision.v1.GetProductRequest} - */ -public final class GetProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetProductRequest) - GetProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductRequest.newBuilder() to construct. - private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetProductRequest.class, com.google.cloud.vision.v1.GetProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.GetProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.GetProductRequest other = (com.google.cloud.vision.v1.GetProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.GetProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.GetProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetProductRequest) - com.google.cloud.vision.v1.GetProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetProductRequest.class, com.google.cloud.vision.v1.GetProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductRequest build() { - com.google.cloud.vision.v1.GetProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductRequest buildPartial() { - com.google.cloud.vision.v1.GetProductRequest result = new com.google.cloud.vision.v1.GetProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.GetProductRequest) { - return mergeFrom((com.google.cloud.vision.v1.GetProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.GetProductRequest other) { - if (other == com.google.cloud.vision.v1.GetProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.GetProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.GetProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetProductRequest) - private static final com.google.cloud.vision.v1.GetProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetProductRequest(); - } - - public static com.google.cloud.vision.v1.GetProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java deleted file mode 100644 index 349b4cc4527c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface GetProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java deleted file mode 100644 index 3445cda98cb3..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `GetProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.GetProductSetRequest} - */ -public final class GetProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetProductSetRequest) - GetProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductSetRequest.newBuilder() to construct. - private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetProductSetRequest.class, com.google.cloud.vision.v1.GetProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.GetProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.GetProductSetRequest other = (com.google.cloud.vision.v1.GetProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.GetProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.GetProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetProductSetRequest) - com.google.cloud.vision.v1.GetProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetProductSetRequest.class, com.google.cloud.vision.v1.GetProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.GetProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductSetRequest build() { - com.google.cloud.vision.v1.GetProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductSetRequest buildPartial() { - com.google.cloud.vision.v1.GetProductSetRequest result = new com.google.cloud.vision.v1.GetProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.GetProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.GetProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.GetProductSetRequest other) { - if (other == com.google.cloud.vision.v1.GetProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.GetProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.GetProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetProductSetRequest) - private static final com.google.cloud.vision.v1.GetProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetProductSetRequest(); - } - - public static com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java deleted file mode 100644 index ed3fd80de169..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface GetProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java deleted file mode 100644 index ef3a3907efdc..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `GetReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.GetReferenceImageRequest} - */ -public final class GetReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.GetReferenceImageRequest) - GetReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetReferenceImageRequest.newBuilder() to construct. - private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetReferenceImageRequest.class, com.google.cloud.vision.v1.GetReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.GetReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.GetReferenceImageRequest other = (com.google.cloud.vision.v1.GetReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.GetReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.GetReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.GetReferenceImageRequest) - com.google.cloud.vision.v1.GetReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.GetReferenceImageRequest.class, com.google.cloud.vision.v1.GetReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.GetReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetReferenceImageRequest build() { - com.google.cloud.vision.v1.GetReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1.GetReferenceImageRequest result = new com.google.cloud.vision.v1.GetReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.GetReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1.GetReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.GetReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1.GetReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.GetReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.GetReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.GetReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GetReferenceImageRequest) - private static final com.google.cloud.vision.v1.GetReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.GetReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.GetReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java deleted file mode 100644 index 6773f291faca..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface GetReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.GetReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java deleted file mode 100644 index 15e4d6653b5f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Client image to perform Google Cloud Vision API tasks over.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Image} - */ -public final class Image extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Image) - ImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Image() { - content_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - content_ = input.readBytes(); - break; - } - case 18: { - com.google.cloud.vision.v1.ImageSource.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.vision.v1.ImageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Image.class, com.google.cloud.vision.v1.Image.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString content_; - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateImages requests. It does
-   * not work for AsyncBatchAnnotateImages requests.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.ImageSource source_; - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageSource getSource() { - return source_ == null ? com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!content_.isEmpty()) { - output.writeBytes(1, content_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, content_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Image)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Image other = (com.google.cloud.vision.v1.Image) obj; - - if (!getContent() - .equals(other.getContent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Image parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Image parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Client image to perform Google Cloud Vision API tasks over.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Image) - com.google.cloud.vision.v1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Image.class, com.google.cloud.vision.v1.Image.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = com.google.protobuf.ByteString.EMPTY; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Image getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Image build() { - com.google.cloud.vision.v1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Image buildPartial() { - com.google.cloud.vision.v1.Image result = new com.google.cloud.vision.v1.Image(this); - result.content_ = content_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Image) { - return mergeFrom((com.google.cloud.vision.v1.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Image other) { - if (other == com.google.cloud.vision.v1.Image.getDefaultInstance()) return this; - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateImages requests. It does
-     * not work for AsyncBatchAnnotateImages requests.
-     * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateImages requests. It does
-     * not work for AsyncBatchAnnotateImages requests.
-     * 
- * - * bytes content = 1; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateImages requests. It does
-     * not work for AsyncBatchAnnotateImages requests.
-     * 
- * - * bytes content = 1; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.ImageSource source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder> sourceBuilder_; - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return The source. - */ - public com.google.cloud.vision.v1.ImageSource getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public Builder setSource(com.google.cloud.vision.v1.ImageSource value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public Builder setSource( - com.google.cloud.vision.v1.ImageSource.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public Builder mergeSource(com.google.cloud.vision.v1.ImageSource value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.vision.v1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1.ImageSource.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.vision.v1.ImageSource.getDefaultInstance() : source_; - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, com.google.cloud.vision.v1.ImageSourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Image) - private static final com.google.cloud.vision.v1.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Image(); - } - - public static com.google.cloud.vision.v1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java deleted file mode 100644 index 9dafb6aeaf65..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java +++ /dev/null @@ -1,681 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * If an image was produced from a file (e.g. a PDF), this message gives
- * information about the source of that image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageAnnotationContext} - */ -public final class ImageAnnotationContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageAnnotationContext) - ImageAnnotationContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageAnnotationContext.newBuilder() to construct. - private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageAnnotationContext() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageAnnotationContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageAnnotationContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 16: { - - pageNumber_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageAnnotationContext.class, com.google.cloud.vision.v1.ImageAnnotationContext.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 2; - private int pageNumber_; - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - if (pageNumber_ != 0) { - output.writeInt32(2, pageNumber_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageNumber_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImageAnnotationContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImageAnnotationContext other = (com.google.cloud.vision.v1.ImageAnnotationContext) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (getPageNumber() - != other.getPageNumber()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImageAnnotationContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * If an image was produced from a file (e.g. a PDF), this message gives
-   * information about the source of that image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageAnnotationContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageAnnotationContext) - com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageAnnotationContext.class, com.google.cloud.vision.v1.ImageAnnotationContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImageAnnotationContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - pageNumber_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContext build() { - com.google.cloud.vision.v1.ImageAnnotationContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContext buildPartial() { - com.google.cloud.vision.v1.ImageAnnotationContext result = new com.google.cloud.vision.v1.ImageAnnotationContext(this); - result.uri_ = uri_; - result.pageNumber_ = pageNumber_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImageAnnotationContext) { - return mergeFrom((com.google.cloud.vision.v1.ImageAnnotationContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImageAnnotationContext other) { - if (other == com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImageAnnotationContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImageAnnotationContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private int pageNumber_ ; - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - - pageNumber_ = value; - onChanged(); - return this; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - - pageNumber_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageAnnotationContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageAnnotationContext) - private static final com.google.cloud.vision.v1.ImageAnnotationContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageAnnotationContext(); - } - - public static com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageAnnotationContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageAnnotationContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageAnnotationContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java deleted file mode 100644 index b078271c669b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContextOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ImageAnnotationContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageAnnotationContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - int getPageNumber(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java deleted file mode 100644 index 9656bcb1ec9b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorProto.java +++ /dev/null @@ -1,756 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public final class ImageAnnotatorProto { - private ImageAnnotatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Feature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Feature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImageSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Image_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_LocationInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Property_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Property_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_EntityAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_EntityAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_LatLongRect_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ColorInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ColorInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_DominantColorsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_DominantColorsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImageProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CropHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CropHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CropHintsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CropHintsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CropHintsParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CropHintsParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImageContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AnnotateImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AnnotateImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImageAnnotationContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImageAnnotationContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncAnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncAnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_InputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_GcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1/image_annotator" + - ".proto\022\026google.cloud.vision.v1\032\034google/a" + - "pi/annotations.proto\032\027google/api/client." + - "proto\032\037google/api/field_behavior.proto\032%" + - "google/cloud/vision/v1/geometry.proto\032+g" + - "oogle/cloud/vision/v1/product_search.pro" + - "to\032,google/cloud/vision/v1/text_annotati" + - "on.proto\032*google/cloud/vision/v1/web_det" + - "ection.proto\032#google/longrunning/operati" + - "ons.proto\032\037google/protobuf/timestamp.pro" + - "to\032\027google/rpc/status.proto\032\027google/type" + - "/color.proto\032\030google/type/latlng.proto\"\207" + - "\003\n\007Feature\0222\n\004type\030\001 \001(\0162$.google.cloud." + - "vision.v1.Feature.Type\022\023\n\013max_results\030\002 " + - "\001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024\n\020TYPE_UNSP" + - "ECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022LANDMAR" + - "K_DETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003\022\023\n\017LAB" + - "EL_DETECTION\020\004\022\022\n\016TEXT_DETECTION\020\005\022\033\n\027DO" + - "CUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_SEARCH_D" + - "ETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022\016\n\nCROP" + - "_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022\n\016PRODUCT_S" + - "EARCH\020\014\022\027\n\023OBJECT_LOCALIZATION\020\023\"7\n\013Imag" + - "eSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timage_" + - "uri\030\002 \001(\t\"M\n\005Image\022\017\n\007content\030\001 \001(\014\0223\n\006s" + - "ource\030\002 \001(\0132#.google.cloud.vision.v1.Ima" + - "geSource\"\366\r\n\016FaceAnnotation\022;\n\rbounding_" + - "poly\030\001 \001(\0132$.google.cloud.vision.v1.Boun" + - "dingPoly\022>\n\020fd_bounding_poly\030\002 \001(\0132$.goo" + - "gle.cloud.vision.v1.BoundingPoly\022B\n\tland" + - "marks\030\003 \003(\0132/.google.cloud.vision.v1.Fac" + - "eAnnotation.Landmark\022\022\n\nroll_angle\030\004 \001(\002" + - "\022\021\n\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022" + - "\034\n\024detection_confidence\030\007 \001(\002\022\036\n\026landmar" + - "king_confidence\030\010 \001(\002\022:\n\016joy_likelihood\030" + - "\t \001(\0162\".google.cloud.vision.v1.Likelihoo" + - "d\022=\n\021sorrow_likelihood\030\n \001(\0162\".google.cl" + - "oud.vision.v1.Likelihood\022<\n\020anger_likeli" + - "hood\030\013 \001(\0162\".google.cloud.vision.v1.Like" + - "lihood\022?\n\023surprise_likelihood\030\014 \001(\0162\".go" + - "ogle.cloud.vision.v1.Likelihood\022D\n\030under" + - "_exposed_likelihood\030\r \001(\0162\".google.cloud" + - ".vision.v1.Likelihood\022>\n\022blurred_likelih" + - "ood\030\016 \001(\0162\".google.cloud.vision.v1.Likel" + - "ihood\022?\n\023headwear_likelihood\030\017 \001(\0162\".goo" + - "gle.cloud.vision.v1.Likelihood\032\350\007\n\010Landm" + - "ark\022B\n\004type\030\003 \001(\01624.google.cloud.vision." + - "v1.FaceAnnotation.Landmark.Type\0222\n\010posit" + - "ion\030\004 \001(\0132 .google.cloud.vision.v1.Posit" + - "ion\"\343\006\n\004Type\022\024\n\020UNKNOWN_LANDMARK\020\000\022\014\n\010LE" + - "FT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024LEFT_OF_LEFT_" + - "EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_EYEBROW\020\004\022\031\n\025" + - "LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026RIGHT_OF_RIGH" + - "T_EYEBROW\020\006\022\031\n\025MIDPOINT_BETWEEN_EYES\020\007\022\014" + - "\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t\022\r\n\tLOWER_LIP" + - "\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020\n\014M" + - "OUTH_CENTER\020\r\022\025\n\021NOSE_BOTTOM_RIGHT\020\016\022\024\n\020" + - "NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_BOTTOM_CENTER" + - "\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY\020\021\022\031\n\025LEFT_EY" + - "E_RIGHT_CORNER\020\022\022\034\n\030LEFT_EYE_BOTTOM_BOUN" + - "DARY\020\023\022\030\n\024LEFT_EYE_LEFT_CORNER\020\024\022\032\n\026RIGH" + - "T_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIGHT_EYE_RIGHT_" + - "CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTOM_BOUNDARY\020\027\022" + - "\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022\037\n\033LEFT_EYEBR" + - "OW_UPPER_MIDPOINT\020\031\022 \n\034RIGHT_EYEBROW_UPP" + - "ER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_TRAGION\020\033\022\025\n\021R" + - "IGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_EYE_PUPIL\020\035\022\023" + - "\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FOREHEAD_GLABELLA" + - "\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CHIN_LEFT_GONIO" + - "N\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\022\025\n\021LEFT_CHEEK" + - "_CENTER\020#\022\026\n\022RIGHT_CHEEK_CENTER\020$\"4\n\014Loc" + - "ationInfo\022$\n\007lat_lng\030\001 \001(\0132\023.google.type" + - ".LatLng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022\r\n\005val" + - "ue\030\002 \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\253\002\n\020Entit" + - "yAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale\030\002 \001(\t" + - "\022\023\n\013description\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022\026\n\n" + - "confidence\030\005 \001(\002B\002\030\001\022\022\n\ntopicality\030\006 \001(\002" + - "\022;\n\rbounding_poly\030\007 \001(\0132$.google.cloud.v" + - "ision.v1.BoundingPoly\0227\n\tlocations\030\010 \003(\013" + - "2$.google.cloud.vision.v1.LocationInfo\0224" + - "\n\nproperties\030\t \003(\0132 .google.cloud.vision" + - ".v1.Property\"\231\001\n\031LocalizedObjectAnnotati" + - "on\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014" + - "\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022;\n\rbounding_" + - "poly\030\005 \001(\0132$.google.cloud.vision.v1.Boun" + - "dingPoly\"\231\002\n\024SafeSearchAnnotation\0221\n\005adu" + - "lt\030\001 \001(\0162\".google.cloud.vision.v1.Likeli" + - "hood\0221\n\005spoof\030\002 \001(\0162\".google.cloud.visio" + - "n.v1.Likelihood\0223\n\007medical\030\003 \001(\0162\".googl" + - "e.cloud.vision.v1.Likelihood\0224\n\010violence" + - "\030\004 \001(\0162\".google.cloud.vision.v1.Likeliho" + - "od\0220\n\004racy\030\t \001(\0162\".google.cloud.vision.v" + - "1.Likelihood\"a\n\013LatLongRect\022(\n\013min_lat_l" + - "ng\030\001 \001(\0132\023.google.type.LatLng\022(\n\013max_lat" + - "_lng\030\002 \001(\0132\023.google.type.LatLng\"U\n\tColor" + - "Info\022!\n\005color\030\001 \001(\0132\022.google.type.Color\022" + - "\r\n\005score\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"M" + - "\n\030DominantColorsAnnotation\0221\n\006colors\030\001 \003" + - "(\0132!.google.cloud.vision.v1.ColorInfo\"\\\n" + - "\017ImageProperties\022I\n\017dominant_colors\030\001 \001(" + - "\01320.google.cloud.vision.v1.DominantColor" + - "sAnnotation\"x\n\010CropHint\022;\n\rbounding_poly" + - "\030\001 \001(\0132$.google.cloud.vision.v1.Bounding" + - "Poly\022\022\n\nconfidence\030\002 \001(\002\022\033\n\023importance_f" + - "raction\030\003 \001(\002\"K\n\023CropHintsAnnotation\0224\n\n" + - "crop_hints\030\001 \003(\0132 .google.cloud.vision.v" + - "1.CropHint\"(\n\017CropHintsParams\022\025\n\raspect_" + - "ratios\030\001 \003(\002\"1\n\022WebDetectionParams\022\033\n\023in" + - "clude_geo_results\030\002 \001(\010\"c\n\023TextDetection" + - "Params\022.\n&enable_text_detection_confiden" + - "ce_score\030\t \001(\010\022\034\n\024advanced_ocr_options\030\013" + - " \003(\t\"\210\003\n\014ImageContext\022:\n\rlat_long_rect\030\001" + - " \001(\0132#.google.cloud.vision.v1.LatLongRec" + - "t\022\026\n\016language_hints\030\002 \003(\t\022B\n\021crop_hints_" + - "params\030\004 \001(\0132\'.google.cloud.vision.v1.Cr" + - "opHintsParams\022J\n\025product_search_params\030\005" + - " \001(\0132+.google.cloud.vision.v1.ProductSea" + - "rchParams\022H\n\024web_detection_params\030\006 \001(\0132" + - "*.google.cloud.vision.v1.WebDetectionPar" + - "ams\022J\n\025text_detection_params\030\014 \001(\0132+.goo" + - "gle.cloud.vision.v1.TextDetectionParams\"" + - "\264\001\n\024AnnotateImageRequest\022,\n\005image\030\001 \001(\0132" + - "\035.google.cloud.vision.v1.Image\0221\n\010featur" + - "es\030\002 \003(\0132\037.google.cloud.vision.v1.Featur" + - "e\022;\n\rimage_context\030\003 \001(\0132$.google.cloud." + - "vision.v1.ImageContext\":\n\026ImageAnnotatio" + - "nContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page_number\030\002 \001" + - "(\005\"\344\007\n\025AnnotateImageResponse\022@\n\020face_ann" + - "otations\030\001 \003(\0132&.google.cloud.vision.v1." + - "FaceAnnotation\022F\n\024landmark_annotations\030\002" + - " \003(\0132(.google.cloud.vision.v1.EntityAnno" + - "tation\022B\n\020logo_annotations\030\003 \003(\0132(.googl" + - "e.cloud.vision.v1.EntityAnnotation\022C\n\021la" + - "bel_annotations\030\004 \003(\0132(.google.cloud.vis" + - "ion.v1.EntityAnnotation\022W\n\034localized_obj" + - "ect_annotations\030\026 \003(\01321.google.cloud.vis" + - "ion.v1.LocalizedObjectAnnotation\022B\n\020text" + - "_annotations\030\005 \003(\0132(.google.cloud.vision" + - ".v1.EntityAnnotation\022D\n\024full_text_annota" + - "tion\030\014 \001(\0132&.google.cloud.vision.v1.Text" + - "Annotation\022L\n\026safe_search_annotation\030\006 \001" + - "(\0132,.google.cloud.vision.v1.SafeSearchAn" + - "notation\022L\n\033image_properties_annotation\030" + - "\010 \001(\0132\'.google.cloud.vision.v1.ImageProp" + - "erties\022J\n\025crop_hints_annotation\030\013 \001(\0132+." + - "google.cloud.vision.v1.CropHintsAnnotati" + - "on\022;\n\rweb_detection\030\r \001(\0132$.google.cloud" + - ".vision.v1.WebDetection\022L\n\026product_searc" + - "h_results\030\016 \001(\0132,.google.cloud.vision.v1" + - ".ProductSearchResults\022!\n\005error\030\t \001(\0132\022.g" + - "oogle.rpc.Status\022?\n\007context\030\025 \001(\0132..goog" + - "le.cloud.vision.v1.ImageAnnotationContex" + - "t\"q\n\032BatchAnnotateImagesRequest\022C\n\010reque" + - "sts\030\001 \003(\0132,.google.cloud.vision.v1.Annot" + - "ateImageRequestB\003\340A\002\022\016\n\006parent\030\004 \001(\t\"_\n\033" + - "BatchAnnotateImagesResponse\022@\n\tresponses" + - "\030\001 \003(\0132-.google.cloud.vision.v1.Annotate" + - "ImageResponse\"\317\001\n\023AnnotateFileRequest\0229\n" + - "\014input_config\030\001 \001(\0132#.google.cloud.visio" + - "n.v1.InputConfig\0221\n\010features\030\002 \003(\0132\037.goo" + - "gle.cloud.vision.v1.Feature\022;\n\rimage_con" + - "text\030\003 \001(\0132$.google.cloud.vision.v1.Imag" + - "eContext\022\r\n\005pages\030\004 \003(\005\"\313\001\n\024AnnotateFile" + - "Response\0229\n\014input_config\030\001 \001(\0132#.google." + - "cloud.vision.v1.InputConfig\022@\n\tresponses" + - "\030\002 \003(\0132-.google.cloud.vision.v1.Annotate" + - "ImageResponse\022\023\n\013total_pages\030\003 \001(\005\022!\n\005er" + - "ror\030\004 \001(\0132\022.google.rpc.Status\"o\n\031BatchAn" + - "notateFilesRequest\022B\n\010requests\030\001 \003(\0132+.g" + - "oogle.cloud.vision.v1.AnnotateFileReques" + - "tB\003\340A\002\022\016\n\006parent\030\003 \001(\t\"]\n\032BatchAnnotateF" + - "ilesResponse\022?\n\tresponses\030\001 \003(\0132,.google" + - ".cloud.vision.v1.AnnotateFileResponse\"\202\002" + - "\n\030AsyncAnnotateFileRequest\0229\n\014input_conf" + - "ig\030\001 \001(\0132#.google.cloud.vision.v1.InputC" + - "onfig\0221\n\010features\030\002 \003(\0132\037.google.cloud.v" + - "ision.v1.Feature\022;\n\rimage_context\030\003 \001(\0132" + - "$.google.cloud.vision.v1.ImageContext\022;\n" + - "\routput_config\030\004 \001(\0132$.google.cloud.visi" + - "on.v1.OutputConfig\"X\n\031AsyncAnnotateFileR" + - "esponse\022;\n\routput_config\030\001 \001(\0132$.google." + - "cloud.vision.v1.OutputConfig\"\270\001\n\037AsyncBa" + - "tchAnnotateImagesRequest\022C\n\010requests\030\001 \003" + - "(\0132,.google.cloud.vision.v1.AnnotateImag" + - "eRequestB\003\340A\002\022@\n\routput_config\030\002 \001(\0132$.g" + - "oogle.cloud.vision.v1.OutputConfigB\003\340A\002\022" + - "\016\n\006parent\030\004 \001(\t\"_\n AsyncBatchAnnotateIma" + - "gesResponse\022;\n\routput_config\030\001 \001(\0132$.goo" + - "gle.cloud.vision.v1.OutputConfig\"y\n\036Asyn" + - "cBatchAnnotateFilesRequest\022G\n\010requests\030\001" + - " \003(\01320.google.cloud.vision.v1.AsyncAnnot" + - "ateFileRequestB\003\340A\002\022\016\n\006parent\030\004 \001(\t\"g\n\037A" + - "syncBatchAnnotateFilesResponse\022D\n\trespon" + - "ses\030\001 \003(\01321.google.cloud.vision.v1.Async" + - "AnnotateFileResponse\"h\n\013InputConfig\0225\n\ng" + - "cs_source\030\001 \001(\0132!.google.cloud.vision.v1" + - ".GcsSource\022\017\n\007content\030\003 \001(\014\022\021\n\tmime_type" + - "\030\002 \001(\t\"c\n\014OutputConfig\022?\n\017gcs_destinatio" + - "n\030\001 \001(\0132&.google.cloud.vision.v1.GcsDest" + - "ination\022\022\n\nbatch_size\030\002 \001(\005\"\030\n\tGcsSource" + - "\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestination\022\013\n\003uri\030\001" + - " \001(\t\"\210\002\n\021OperationMetadata\022>\n\005state\030\001 \001(" + - "\0162/.google.cloud.vision.v1.OperationMeta" + - "data.State\022/\n\013create_time\030\005 \001(\0132\032.google" + - ".protobuf.Timestamp\022/\n\013update_time\030\006 \001(\013" + - "2\032.google.protobuf.Timestamp\"Q\n\005State\022\025\n" + - "\021STATE_UNSPECIFIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUN" + - "NING\020\002\022\010\n\004DONE\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikel" + - "ihood\022\013\n\007UNKNOWN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n" + - "\010UNLIKELY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n" + - "\013VERY_LIKELY\020\0052\365\n\n\016ImageAnnotator\022\223\002\n\023Ba" + - "tchAnnotateImages\0222.google.cloud.vision." + - "v1.BatchAnnotateImagesRequest\0323.google.c" + - "loud.vision.v1.BatchAnnotateImagesRespon" + - "se\"\222\001\202\323\344\223\002\200\001\"\023/v1/images:annotate:\001*Z8\"3" + - "/v1/{parent=projects/*/locations/*}/imag" + - "es:annotate:\001*Z,\"\'/v1/{parent=projects/*" + - "}/images:annotate:\001*\332A\010requests\022\214\002\n\022Batc" + - "hAnnotateFiles\0221.google.cloud.vision.v1." + - "BatchAnnotateFilesRequest\0322.google.cloud" + - ".vision.v1.BatchAnnotateFilesResponse\"\216\001" + - "\202\323\344\223\002}\"\022/v1/files:annotate:\001*Z7\"2/v1/{pa" + - "rent=projects/*/locations/*}/files:annot" + - "ate:\001*Z+\"&/v1/{parent=projects/*}/files:" + - "annotate:\001*\332A\010requests\022\353\002\n\030AsyncBatchAnn" + - "otateImages\0227.google.cloud.vision.v1.Asy" + - "ncBatchAnnotateImagesRequest\032\035.google.lo" + - "ngrunning.Operation\"\366\001\202\323\344\223\002\236\001\"\035/v1/image" + - "s:asyncBatchAnnotate:\001*ZB\"=/v1/{parent=p" + - "rojects/*/locations/*}/images:asyncBatch" + - "Annotate:\001*Z6\"1/v1/{parent=projects/*}/i" + - "mages:asyncBatchAnnotate:\001*\332A\026requests,o" + - "utput_config\312A5\n AsyncBatchAnnotateImage" + - "sResponse\022\021OperationMetadata\022\327\002\n\027AsyncBa" + - "tchAnnotateFiles\0226.google.cloud.vision.v" + - "1.AsyncBatchAnnotateFilesRequest\032\035.googl" + - "e.longrunning.Operation\"\344\001\202\323\344\223\002\233\001\"\034/v1/f" + - "iles:asyncBatchAnnotate:\001*ZA\" - * Image context and/or feature-specific parameters. - * - * - * Protobuf type {@code google.cloud.vision.v1.ImageContext} - */ -public final class ImageContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageContext) - ImageContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageContext.newBuilder() to construct. - private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageContext() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.LatLongRect.Builder subBuilder = null; - if (latLongRect_ != null) { - subBuilder = latLongRect_.toBuilder(); - } - latLongRect_ = input.readMessage(com.google.cloud.vision.v1.LatLongRect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLongRect_); - latLongRect_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageHints_.add(s); - break; - } - case 34: { - com.google.cloud.vision.v1.CropHintsParams.Builder subBuilder = null; - if (cropHintsParams_ != null) { - subBuilder = cropHintsParams_.toBuilder(); - } - cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1.CropHintsParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsParams_); - cropHintsParams_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.cloud.vision.v1.ProductSearchParams.Builder subBuilder = null; - if (productSearchParams_ != null) { - subBuilder = productSearchParams_.toBuilder(); - } - productSearchParams_ = input.readMessage(com.google.cloud.vision.v1.ProductSearchParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchParams_); - productSearchParams_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.vision.v1.WebDetectionParams.Builder subBuilder = null; - if (webDetectionParams_ != null) { - subBuilder = webDetectionParams_.toBuilder(); - } - webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1.WebDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetectionParams_); - webDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1.TextDetectionParams.Builder subBuilder = null; - if (textDetectionParams_ != null) { - subBuilder = textDetectionParams_.toBuilder(); - } - textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1.TextDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textDetectionParams_); - textDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageContext.class, com.google.cloud.vision.v1.ImageContext.Builder.class); - } - - public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.LatLongRect latLongRect_; - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - @java.lang.Override - public boolean hasLatLongRect() { - return latLongRect_ != null; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRect getLatLongRect() { - return latLongRect_ == null ? com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - return getLatLongRect(); - } - - public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList languageHints_; - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_; - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - - public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_; - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - @java.lang.Override - public boolean hasCropHintsParams() { - return cropHintsParams_ != null; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParams getCropHintsParams() { - return cropHintsParams_ == null ? com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - return getCropHintsParams(); - } - - public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_; - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - @java.lang.Override - public boolean hasProductSearchParams() { - return productSearchParams_ != null; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams() { - return productSearchParams_ == null ? com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - return getProductSearchParams(); - } - - public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_; - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - @java.lang.Override - public boolean hasWebDetectionParams() { - return webDetectionParams_ != null; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams() { - return webDetectionParams_ == null ? com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - return getWebDetectionParams(); - } - - public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1.TextDetectionParams textDetectionParams_; - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - @java.lang.Override - public boolean hasTextDetectionParams() { - return textDetectionParams_ != null; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams() { - return textDetectionParams_ == null ? com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - return getTextDetectionParams(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLongRect_ != null) { - output.writeMessage(1, getLatLongRect()); - } - for (int i = 0; i < languageHints_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); - } - if (cropHintsParams_ != null) { - output.writeMessage(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - output.writeMessage(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - output.writeMessage(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - output.writeMessage(12, getTextDetectionParams()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLongRect_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLongRect()); - } - { - int dataSize = 0; - for (int i = 0; i < languageHints_.size(); i++) { - dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); - } - size += dataSize; - size += 1 * getLanguageHintsList().size(); - } - if (cropHintsParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getTextDetectionParams()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImageContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImageContext other = (com.google.cloud.vision.v1.ImageContext) obj; - - if (hasLatLongRect() != other.hasLatLongRect()) return false; - if (hasLatLongRect()) { - if (!getLatLongRect() - .equals(other.getLatLongRect())) return false; - } - if (!getLanguageHintsList() - .equals(other.getLanguageHintsList())) return false; - if (hasCropHintsParams() != other.hasCropHintsParams()) return false; - if (hasCropHintsParams()) { - if (!getCropHintsParams() - .equals(other.getCropHintsParams())) return false; - } - if (hasProductSearchParams() != other.hasProductSearchParams()) return false; - if (hasProductSearchParams()) { - if (!getProductSearchParams() - .equals(other.getProductSearchParams())) return false; - } - if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; - if (hasWebDetectionParams()) { - if (!getWebDetectionParams() - .equals(other.getWebDetectionParams())) return false; - } - if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; - if (hasTextDetectionParams()) { - if (!getTextDetectionParams() - .equals(other.getTextDetectionParams())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLongRect()) { - hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; - hash = (53 * hash) + getLatLongRect().hashCode(); - } - if (getLanguageHintsCount() > 0) { - hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getLanguageHintsList().hashCode(); - } - if (hasCropHintsParams()) { - hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsParams().hashCode(); - } - if (hasProductSearchParams()) { - hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchParams().hashCode(); - } - if (hasWebDetectionParams()) { - hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getWebDetectionParams().hashCode(); - } - if (hasTextDetectionParams()) { - hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getTextDetectionParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImageContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImageContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Image context and/or feature-specific parameters.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageContext) - com.google.cloud.vision.v1.ImageContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageContext.class, com.google.cloud.vision.v1.ImageContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImageContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImageContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext build() { - com.google.cloud.vision.v1.ImageContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext buildPartial() { - com.google.cloud.vision.v1.ImageContext result = new com.google.cloud.vision.v1.ImageContext(this); - int from_bitField0_ = bitField0_; - if (latLongRectBuilder_ == null) { - result.latLongRect_ = latLongRect_; - } else { - result.latLongRect_ = latLongRectBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.languageHints_ = languageHints_; - if (cropHintsParamsBuilder_ == null) { - result.cropHintsParams_ = cropHintsParams_; - } else { - result.cropHintsParams_ = cropHintsParamsBuilder_.build(); - } - if (productSearchParamsBuilder_ == null) { - result.productSearchParams_ = productSearchParams_; - } else { - result.productSearchParams_ = productSearchParamsBuilder_.build(); - } - if (webDetectionParamsBuilder_ == null) { - result.webDetectionParams_ = webDetectionParams_; - } else { - result.webDetectionParams_ = webDetectionParamsBuilder_.build(); - } - if (textDetectionParamsBuilder_ == null) { - result.textDetectionParams_ = textDetectionParams_; - } else { - result.textDetectionParams_ = textDetectionParamsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImageContext) { - return mergeFrom((com.google.cloud.vision.v1.ImageContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImageContext other) { - if (other == com.google.cloud.vision.v1.ImageContext.getDefaultInstance()) return this; - if (other.hasLatLongRect()) { - mergeLatLongRect(other.getLatLongRect()); - } - if (!other.languageHints_.isEmpty()) { - if (languageHints_.isEmpty()) { - languageHints_ = other.languageHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLanguageHintsIsMutable(); - languageHints_.addAll(other.languageHints_); - } - onChanged(); - } - if (other.hasCropHintsParams()) { - mergeCropHintsParams(other.getCropHintsParams()); - } - if (other.hasProductSearchParams()) { - mergeProductSearchParams(other.getProductSearchParams()); - } - if (other.hasWebDetectionParams()) { - mergeWebDetectionParams(other.getWebDetectionParams()); - } - if (other.hasTextDetectionParams()) { - mergeTextDetectionParams(other.getTextDetectionParams()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImageContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImageContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.LatLongRect latLongRect_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder> latLongRectBuilder_; - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - public boolean hasLatLongRect() { - return latLongRectBuilder_ != null || latLongRect_ != null; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - public com.google.cloud.vision.v1.LatLongRect getLatLongRect() { - if (latLongRectBuilder_ == null) { - return latLongRect_ == null ? com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; - } else { - return latLongRectBuilder_.getMessage(); - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect(com.google.cloud.vision.v1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLongRect_ = value; - onChanged(); - } else { - latLongRectBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect( - com.google.cloud.vision.v1.LatLongRect.Builder builderForValue) { - if (latLongRectBuilder_ == null) { - latLongRect_ = builderForValue.build(); - onChanged(); - } else { - latLongRectBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public Builder mergeLatLongRect(com.google.cloud.vision.v1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (latLongRect_ != null) { - latLongRect_ = - com.google.cloud.vision.v1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); - } else { - latLongRect_ = value; - } - onChanged(); - } else { - latLongRectBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public Builder clearLatLongRect() { - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - onChanged(); - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1.LatLongRect.Builder getLatLongRectBuilder() { - - onChanged(); - return getLatLongRectFieldBuilder().getBuilder(); - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - if (latLongRectBuilder_ != null) { - return latLongRectBuilder_.getMessageOrBuilder(); - } else { - return latLongRect_ == null ? - com.google.cloud.vision.v1.LatLongRect.getDefaultInstance() : latLongRect_; - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder> - getLatLongRectFieldBuilder() { - if (latLongRectBuilder_ == null) { - latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, com.google.cloud.vision.v1.LatLongRectOrBuilder>( - getLatLongRect(), - getParentForChildren(), - isClean()); - latLongRect_ = null; - } - return latLongRectBuilder_; - } - - private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_.getUnmodifiableView(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index to set the value at. - * @param value The languageHints to set. - * @return This builder for chaining. - */ - public Builder setLanguageHints( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHints( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param values The languageHints to add. - * @return This builder for chaining. - */ - public Builder addAllLanguageHints( - java.lang.Iterable values) { - ensureLanguageHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, languageHints_); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageHints() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The bytes of the languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHintsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - public boolean hasCropHintsParams() { - return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - public com.google.cloud.vision.v1.CropHintsParams getCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - return cropHintsParams_ == null ? com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } else { - return cropHintsParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams(com.google.cloud.vision.v1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsParams_ = value; - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams( - com.google.cloud.vision.v1.CropHintsParams.Builder builderForValue) { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = builderForValue.build(); - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public Builder mergeCropHintsParams(com.google.cloud.vision.v1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (cropHintsParams_ != null) { - cropHintsParams_ = - com.google.cloud.vision.v1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); - } else { - cropHintsParams_ = value; - } - onChanged(); - } else { - cropHintsParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public Builder clearCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - onChanged(); - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1.CropHintsParams.Builder getCropHintsParamsBuilder() { - - onChanged(); - return getCropHintsParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - if (cropHintsParamsBuilder_ != null) { - return cropHintsParamsBuilder_.getMessageOrBuilder(); - } else { - return cropHintsParams_ == null ? - com.google.cloud.vision.v1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder> - getCropHintsParamsFieldBuilder() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, com.google.cloud.vision.v1.CropHintsParamsOrBuilder>( - getCropHintsParams(), - getParentForChildren(), - isClean()); - cropHintsParams_ = null; - } - return cropHintsParamsBuilder_; - } - - private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - public boolean hasProductSearchParams() { - return productSearchParamsBuilder_ != null || productSearchParams_ != null; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - public com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - return productSearchParams_ == null ? com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } else { - return productSearchParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams(com.google.cloud.vision.v1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchParams_ = value; - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams( - com.google.cloud.vision.v1.ProductSearchParams.Builder builderForValue) { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = builderForValue.build(); - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public Builder mergeProductSearchParams(com.google.cloud.vision.v1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (productSearchParams_ != null) { - productSearchParams_ = - com.google.cloud.vision.v1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); - } else { - productSearchParams_ = value; - } - onChanged(); - } else { - productSearchParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public Builder clearProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - onChanged(); - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1.ProductSearchParams.Builder getProductSearchParamsBuilder() { - - onChanged(); - return getProductSearchParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - if (productSearchParamsBuilder_ != null) { - return productSearchParamsBuilder_.getMessageOrBuilder(); - } else { - return productSearchParams_ == null ? - com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder> - getProductSearchParamsFieldBuilder() { - if (productSearchParamsBuilder_ == null) { - productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, com.google.cloud.vision.v1.ProductSearchParamsOrBuilder>( - getProductSearchParams(), - getParentForChildren(), - isClean()); - productSearchParams_ = null; - } - return productSearchParamsBuilder_; - } - - private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - public boolean hasWebDetectionParams() { - return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - public com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - return webDetectionParams_ == null ? com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } else { - return webDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams(com.google.cloud.vision.v1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetectionParams_ = value; - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams( - com.google.cloud.vision.v1.WebDetectionParams.Builder builderForValue) { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public Builder mergeWebDetectionParams(com.google.cloud.vision.v1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (webDetectionParams_ != null) { - webDetectionParams_ = - com.google.cloud.vision.v1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); - } else { - webDetectionParams_ = value; - } - onChanged(); - } else { - webDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public Builder clearWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - onChanged(); - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { - - onChanged(); - return getWebDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - if (webDetectionParamsBuilder_ != null) { - return webDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return webDetectionParams_ == null ? - com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder> - getWebDetectionParamsFieldBuilder() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, com.google.cloud.vision.v1.WebDetectionParamsOrBuilder>( - getWebDetectionParams(), - getParentForChildren(), - isClean()); - webDetectionParams_ = null; - } - return webDetectionParamsBuilder_; - } - - private com.google.cloud.vision.v1.TextDetectionParams textDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - public boolean hasTextDetectionParams() { - return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - public com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - return textDetectionParams_ == null ? com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } else { - return textDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams(com.google.cloud.vision.v1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textDetectionParams_ = value; - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams( - com.google.cloud.vision.v1.TextDetectionParams.Builder builderForValue) { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public Builder mergeTextDetectionParams(com.google.cloud.vision.v1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (textDetectionParams_ != null) { - textDetectionParams_ = - com.google.cloud.vision.v1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); - } else { - textDetectionParams_ = value; - } - onChanged(); - } else { - textDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public Builder clearTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - onChanged(); - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { - - onChanged(); - return getTextDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - if (textDetectionParamsBuilder_ != null) { - return textDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return textDetectionParams_ == null ? - com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder> - getTextDetectionParamsFieldBuilder() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextDetectionParams, com.google.cloud.vision.v1.TextDetectionParams.Builder, com.google.cloud.vision.v1.TextDetectionParamsOrBuilder>( - getTextDetectionParams(), - getParentForChildren(), - isClean()); - textDetectionParams_ = null; - } - return textDetectionParamsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageContext) - private static final com.google.cloud.vision.v1.ImageContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageContext(); - } - - public static com.google.cloud.vision.v1.ImageContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java deleted file mode 100644 index 239bae6176fc..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContextOrBuilder.java +++ /dev/null @@ -1,213 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ImageContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - boolean hasLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - com.google.cloud.vision.v1.LatLongRect getLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder(); - - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - java.util.List - getLanguageHintsList(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - int getLanguageHintsCount(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - java.lang.String getLanguageHints(int index); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - com.google.protobuf.ByteString - getLanguageHintsBytes(int index); - - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - boolean hasCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - com.google.cloud.vision.v1.CropHintsParams getCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); - - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - boolean hasProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - com.google.cloud.vision.v1.ProductSearchParams getProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - com.google.cloud.vision.v1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); - - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - boolean hasWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - com.google.cloud.vision.v1.WebDetectionParams getWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); - - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - boolean hasTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - com.google.cloud.vision.v1.TextDetectionParams getTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - com.google.cloud.vision.v1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java deleted file mode 100644 index 282193096be4..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateImages requests. It does
-   * not work for AsyncBatchAnnotateImages requests.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - * @return The source. - */ - com.google.cloud.vision.v1.ImageSource getSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1.ImageSource source = 2; - */ - com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java deleted file mode 100644 index bd3ff4ccd000..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Stores image properties, such as dominant colors.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageProperties} - */ -public final class ImageProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageProperties) - ImagePropertiesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageProperties.newBuilder() to construct. - private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageProperties() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.DominantColorsAnnotation.Builder subBuilder = null; - if (dominantColors_ != null) { - subBuilder = dominantColors_.toBuilder(); - } - dominantColors_ = input.readMessage(com.google.cloud.vision.v1.DominantColorsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dominantColors_); - dominantColors_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageProperties.class, com.google.cloud.vision.v1.ImageProperties.Builder.class); - } - - public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_; - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - @java.lang.Override - public boolean hasDominantColors() { - return dominantColors_ != null; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors() { - return dominantColors_ == null ? com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - return getDominantColors(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dominantColors_ != null) { - output.writeMessage(1, getDominantColors()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dominantColors_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDominantColors()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImageProperties)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImageProperties other = (com.google.cloud.vision.v1.ImageProperties) obj; - - if (hasDominantColors() != other.hasDominantColors()) return false; - if (hasDominantColors()) { - if (!getDominantColors() - .equals(other.getDominantColors())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDominantColors()) { - hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; - hash = (53 * hash) + getDominantColors().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImageProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Stores image properties, such as dominant colors.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageProperties) - com.google.cloud.vision.v1.ImagePropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageProperties.class, com.google.cloud.vision.v1.ImageProperties.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImageProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageProperties getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImageProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageProperties build() { - com.google.cloud.vision.v1.ImageProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageProperties buildPartial() { - com.google.cloud.vision.v1.ImageProperties result = new com.google.cloud.vision.v1.ImageProperties(this); - if (dominantColorsBuilder_ == null) { - result.dominantColors_ = dominantColors_; - } else { - result.dominantColors_ = dominantColorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImageProperties) { - return mergeFrom((com.google.cloud.vision.v1.ImageProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImageProperties other) { - if (other == com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()) return this; - if (other.hasDominantColors()) { - mergeDominantColors(other.getDominantColors()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImageProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImageProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - public boolean hasDominantColors() { - return dominantColorsBuilder_ != null || dominantColors_ != null; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - public com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors() { - if (dominantColorsBuilder_ == null) { - return dominantColors_ == null ? com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } else { - return dominantColorsBuilder_.getMessage(); - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors(com.google.cloud.vision.v1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dominantColors_ = value; - onChanged(); - } else { - dominantColorsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors( - com.google.cloud.vision.v1.DominantColorsAnnotation.Builder builderForValue) { - if (dominantColorsBuilder_ == null) { - dominantColors_ = builderForValue.build(); - onChanged(); - } else { - dominantColorsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder mergeDominantColors(com.google.cloud.vision.v1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (dominantColors_ != null) { - dominantColors_ = - com.google.cloud.vision.v1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); - } else { - dominantColors_ = value; - } - onChanged(); - } else { - dominantColorsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder clearDominantColors() { - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - onChanged(); - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { - - onChanged(); - return getDominantColorsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - if (dominantColorsBuilder_ != null) { - return dominantColorsBuilder_.getMessageOrBuilder(); - } else { - return dominantColors_ == null ? - com.google.cloud.vision.v1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder> - getDominantColorsFieldBuilder() { - if (dominantColorsBuilder_ == null) { - dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder>( - getDominantColors(), - getParentForChildren(), - isClean()); - dominantColors_ = null; - } - return dominantColorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageProperties) - private static final com.google.cloud.vision.v1.ImageProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageProperties(); - } - - public static com.google.cloud.vision.v1.ImageProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java deleted file mode 100644 index f12aab933d94..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImagePropertiesOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ImagePropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - boolean hasDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - com.google.cloud.vision.v1.DominantColorsAnnotation getDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - com.google.cloud.vision.v1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java deleted file mode 100644 index 6e281845eef1..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java +++ /dev/null @@ -1,880 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * External image source (Google Cloud Storage or web URL image location).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageSource} - */ -public final class ImageSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImageSource) - ImageSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageSource.newBuilder() to construct. - private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageSource() { - gcsImageUri_ = ""; - imageUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - gcsImageUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageSource.class, com.google.cloud.vision.v1.ImageSource.Builder.class); - } - - public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsImageUri_; - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - @java.lang.Override - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } - } - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object imageUri_; - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImageSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImageSource other = (com.google.cloud.vision.v1.ImageSource) obj; - - if (!getGcsImageUri() - .equals(other.getGcsImageUri())) return false; - if (!getImageUri() - .equals(other.getImageUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsImageUri().hashCode(); - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImageSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImageSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * External image source (Google Cloud Storage or web URL image location).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImageSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImageSource) - com.google.cloud.vision.v1.ImageSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImageSource.class, com.google.cloud.vision.v1.ImageSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - gcsImageUri_ = ""; - - imageUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_ImageSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImageSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageSource build() { - com.google.cloud.vision.v1.ImageSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageSource buildPartial() { - com.google.cloud.vision.v1.ImageSource result = new com.google.cloud.vision.v1.ImageSource(this); - result.gcsImageUri_ = gcsImageUri_; - result.imageUri_ = imageUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImageSource) { - return mergeFrom((com.google.cloud.vision.v1.ImageSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImageSource other) { - if (other == com.google.cloud.vision.v1.ImageSource.getDefaultInstance()) return this; - if (!other.getGcsImageUri().isEmpty()) { - gcsImageUri_ = other.gcsImageUri_; - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImageSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImageSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsImageUri_ = ""; - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcsImageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return This builder for chaining. - */ - public Builder clearGcsImageUri() { - - gcsImageUri_ = getDefaultInstance().getGcsImageUri(); - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The bytes for gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcsImageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImageSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageSource) - private static final com.google.cloud.vision.v1.ImageSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImageSource(); - } - - public static com.google.cloud.vision.v1.ImageSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImageSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java deleted file mode 100644 index 448e857e8b49..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSourceOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface ImageSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImageSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - java.lang.String getGcsImageUri(); - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - com.google.protobuf.ByteString - getGcsImageUriBytes(); - - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString - getImageUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java deleted file mode 100644 index 204c5af64820..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java +++ /dev/null @@ -1,919 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The Google Cloud Storage location for a csv file which preserves a list of
- * ImportProductSetRequests in each line.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsGcsSource} - */ -public final class ImportProductSetsGcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsGcsSource) - ImportProductSetsGcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsGcsSource.newBuilder() to construct. - private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsGcsSource() { - csvFileUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsGcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsGcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - csvFileUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder.class); - } - - public static final int CSV_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object csvFileUri_; - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1.Product.product_category], and the
-   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-   * space (" "). You can update the `display_name` later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - @java.lang.Override - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } - } - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1.Product.product_category], and the
-   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-   * space (" "). You can update the `display_name` later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsGcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1.ImportProductSetsGcsSource) obj; - - if (!getCsvFileUri() - .equals(other.getCsvFileUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCsvFileUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsGcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list of
-   * ImportProductSetRequests in each line.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsGcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsGcsSource) - com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImportProductSetsGcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - csvFileUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource build() { - com.google.cloud.vision.v1.ImportProductSetsGcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource buildPartial() { - com.google.cloud.vision.v1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1.ImportProductSetsGcsSource(this); - result.csvFileUri_ = csvFileUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImportProductSetsGcsSource) { - return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsGcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsGcsSource other) { - if (other == com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance()) return this; - if (!other.getCsvFileUri().isEmpty()) { - csvFileUri_ = other.csvFileUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImportProductSetsGcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object csvFileUri_ = ""; - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1.Product.product_category], and the
-     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-     * space (" "). You can update the `display_name` later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1.Product.product_category], and the
-     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-     * space (" "). You can update the `display_name` later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1.Product.product_category], and the
-     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-     * space (" "). You can update the `display_name` later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @param value The csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - csvFileUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1.Product.product_category], and the
-     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-     * space (" "). You can update the `display_name` later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCsvFileUri() { - - csvFileUri_ = getDefaultInstance().getCsvFileUri(); - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1.Product.product_category], and the
-     * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-     * space (" "). You can update the `display_name` later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @param value The bytes for csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - csvFileUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsGcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsGcsSource) - private static final com.google.cloud.vision.v1.ImportProductSetsGcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsGcsSource(); - } - - public static com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsGcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsGcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java deleted file mode 100644 index 18bba94c3c66..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSourceOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ImportProductSetsGcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsGcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1.Product.product_category], and the
-   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-   * space (" "). You can update the `display_name` later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - java.lang.String getCsvFileUri(); - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1.Product.product_category], and the
-   * `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a
-   * space (" "). You can update the `display_name` later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - com.google.protobuf.ByteString - getCsvFileUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java deleted file mode 100644 index 157735a09c98..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java +++ /dev/null @@ -1,773 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The input content for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsInputConfig} - */ -public final class ImportProductSetsInputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsInputConfig) - ImportProductSetsInputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsInputConfig.newBuilder() to construct. - private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsInputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsInputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.cloud.vision.v1.ImportProductSetsGcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_SOURCE(1), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: return GCS_SOURCE; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsInputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1.ImportProductSetsInputConfig) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsInputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The input content for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsInputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsInputConfig) - com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImportProductSetsInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfig build() { - com.google.cloud.vision.v1.ImportProductSetsInputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfig buildPartial() { - com.google.cloud.vision.v1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1.ImportProductSetsInputConfig(this); - if (sourceCase_ == 1) { - if (gcsSourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = gcsSourceBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImportProductSetsInputConfig) { - return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsInputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsInputConfig other) { - if (other == com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case GCS_SOURCE: { - mergeGcsSource(other.getGcsSource()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImportProductSetsInputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 && - source_ != com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance()) { - source_ = com.google.cloud.vision.v1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - gcsSourceBuilder_.mergeFrom(value); - } else { - gcsSourceBuilder_.setMessage(value); - } - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.vision.v1.ImportProductSetsGcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsGcsSource, com.google.cloud.vision.v1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder>( - (com.google.cloud.vision.v1.ImportProductSetsGcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged();; - return gcsSourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsInputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsInputConfig) - private static final com.google.cloud.vision.v1.ImportProductSetsInputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsInputConfig(); - } - - public static com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsInputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsInputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java deleted file mode 100644 index 7ef471af6068..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfigOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ImportProductSetsInputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsInputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1.ImportProductSetsGcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); - - public com.google.cloud.vision.v1.ImportProductSetsInputConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java deleted file mode 100644 index 360a45d3b62e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsRequest} - */ -public final class ImportProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsRequest) - ImportProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsRequest.newBuilder() to construct. - private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1.ImportProductSetsInputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsRequest.class, com.google.cloud.vision.v1.ImportProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_; - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inputConfig_ != null) { - output.writeMessage(2, getInputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImportProductSetsRequest other = (com.google.cloud.vision.v1.ImportProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsRequest) - com.google.cloud.vision.v1.ImportProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsRequest.class, com.google.cloud.vision.v1.ImportProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImportProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsRequest build() { - com.google.cloud.vision.v1.ImportProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsRequest buildPartial() { - com.google.cloud.vision.v1.ImportProductSetsRequest result = new com.google.cloud.vision.v1.ImportProductSetsRequest(this); - result.parent_ = parent_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImportProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsRequest other) { - if (other == com.google.cloud.vision.v1.ImportProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImportProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig(com.google.cloud.vision.v1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsRequest) - private static final com.google.cloud.vision.v1.ImportProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsRequest(); - } - - public static com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java deleted file mode 100644 index 9f1b2089d171..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ImportProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - com.google.cloud.vision.v1.ImportProductSetsInputConfig getInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java deleted file mode 100644 index 05d0ef3a950e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java +++ /dev/null @@ -1,1410 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response message for the `ImportProductSets` method.
- * This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsResponse} - */ -public final class ImportProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ImportProductSetsResponse) - ImportProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsResponse.newBuilder() to construct. - private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsResponse() { - referenceImages_ = java.util.Collections.emptyList(); - statuses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - statuses_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsResponse.class, com.google.cloud.vision.v1.ImportProductSetsResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int STATUSES_FIELD_NUMBER = 2; - private java.util.List statuses_; - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List getStatusesList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List - getStatusesOrBuilderList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public int getStatusesCount() { - return statuses_.size(); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.Status getStatuses(int index) { - return statuses_.get(index); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - return statuses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - output.writeMessage(2, statuses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, statuses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ImportProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ImportProductSetsResponse other = (com.google.cloud.vision.v1.ImportProductSetsResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (!getStatusesList() - .equals(other.getStatusesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - if (getStatusesCount() > 0) { - hash = (37 * hash) + STATUSES_FIELD_NUMBER; - hash = (53 * hash) + getStatusesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ImportProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ImportProductSets` method.
-   * This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ImportProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ImportProductSetsResponse) - com.google.cloud.vision.v1.ImportProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ImportProductSetsResponse.class, com.google.cloud.vision.v1.ImportProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ImportProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - getStatusesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - statusesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ImportProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsResponse build() { - com.google.cloud.vision.v1.ImportProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsResponse buildPartial() { - com.google.cloud.vision.v1.ImportProductSetsResponse result = new com.google.cloud.vision.v1.ImportProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.statuses_ = statuses_; - } else { - result.statuses_ = statusesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ImportProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1.ImportProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ImportProductSetsResponse other) { - if (other == com.google.cloud.vision.v1.ImportProductSetsResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (statusesBuilder_ == null) { - if (!other.statuses_.isEmpty()) { - if (statuses_.isEmpty()) { - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureStatusesIsMutable(); - statuses_.addAll(other.statuses_); - } - onChanged(); - } - } else { - if (!other.statuses_.isEmpty()) { - if (statusesBuilder_.isEmpty()) { - statusesBuilder_.dispose(); - statusesBuilder_ = null; - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - statusesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getStatusesFieldBuilder() : null; - } else { - statusesBuilder_.addAllMessages(other.statuses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ImportProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ImportProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private java.util.List statuses_ = - java.util.Collections.emptyList(); - private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(statuses_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; - - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List getStatusesList() { - if (statusesBuilder_ == null) { - return java.util.Collections.unmodifiableList(statuses_); - } else { - return statusesBuilder_.getMessageList(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public int getStatusesCount() { - if (statusesBuilder_ == null) { - return statuses_.size(); - } else { - return statusesBuilder_.getCount(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status getStatuses(int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); - } else { - return statusesBuilder_.getMessage(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.set(index, value); - onChanged(); - } else { - statusesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.set(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses(com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(value); - onChanged(); - } else { - statusesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(index, value); - onChanged(); - } else { - statusesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addAllStatuses( - java.lang.Iterable values) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, statuses_); - onChanged(); - } else { - statusesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder clearStatuses() { - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - statusesBuilder_.clear(); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder removeStatuses(int index) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.remove(index); - onChanged(); - } else { - statusesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder getStatusesBuilder( - int index) { - return getStatusesFieldBuilder().getBuilder(index); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); } else { - return statusesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesOrBuilderList() { - if (statusesBuilder_ != null) { - return statusesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statuses_); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder() { - return getStatusesFieldBuilder().addBuilder( - com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder( - int index) { - return getStatusesFieldBuilder().addBuilder( - index, com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesBuilderList() { - return getStatusesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusesFieldBuilder() { - if (statusesBuilder_ == null) { - statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - statuses_ = null; - } - return statusesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ImportProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImportProductSetsResponse) - private static final com.google.cloud.vision.v1.ImportProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ImportProductSetsResponse(); - } - - public static com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ImportProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java deleted file mode 100644 index 1a85174ad21d..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ImportProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ImportProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.Status getStatuses(int index); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - int getStatusesCount(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesOrBuilderList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java deleted file mode 100644 index 83a3d8017477..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java +++ /dev/null @@ -1,938 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The desired input location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.InputConfig} - */ -public final class InputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.InputConfig) - InputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InputConfig() { - content_ = com.google.protobuf.ByteString.EMPTY; - mimeType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.GcsSource.Builder subBuilder = null; - if (gcsSource_ != null) { - subBuilder = gcsSource_.toBuilder(); - } - gcsSource_ = input.readMessage(com.google.cloud.vision.v1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsSource_); - gcsSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 26: { - - content_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.InputConfig.class, com.google.cloud.vision.v1.InputConfig.Builder.class); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.GcsSource gcsSource_; - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return gcsSource_ != null; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1.GcsSource getGcsSource() { - return gcsSource_ == null ? com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return getGcsSource(); - } - - public static final int CONTENT_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString content_; - /** - *
-   * File content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateFiles requests. It does
-   * not work for AsyncBatchAnnotateFiles requests.
-   * 
- * - * bytes content = 3; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int MIME_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object mimeType_; - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } - } - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsSource_ != null) { - output.writeMessage(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); - } - if (!content_.isEmpty()) { - output.writeBytes(3, content_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); - } - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, content_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.InputConfig other = (com.google.cloud.vision.v1.InputConfig) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - } - if (!getContent() - .equals(other.getContent())) return false; - if (!getMimeType() - .equals(other.getMimeType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.InputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.InputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.InputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired input location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.InputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.InputConfig) - com.google.cloud.vision.v1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.InputConfig.class, com.google.cloud.vision.v1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - content_ = com.google.protobuf.ByteString.EMPTY; - - mimeType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig build() { - com.google.cloud.vision.v1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig buildPartial() { - com.google.cloud.vision.v1.InputConfig result = new com.google.cloud.vision.v1.InputConfig(this); - if (gcsSourceBuilder_ == null) { - result.gcsSource_ = gcsSource_; - } else { - result.gcsSource_ = gcsSourceBuilder_.build(); - } - result.content_ = content_; - result.mimeType_ = mimeType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.InputConfig) { - return mergeFrom((com.google.cloud.vision.v1.InputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.InputConfig other) { - if (other == com.google.cloud.vision.v1.InputConfig.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSourceBuilder_ != null || gcsSource_ != null; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - public com.google.cloud.vision.v1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null ? com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (gcsSource_ != null) { - gcsSource_ = - com.google.cloud.vision.v1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); - } else { - gcsSource_ = value; - } - onChanged(); - } else { - gcsSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - onChanged(); - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1.GcsSource.Builder getGcsSourceBuilder() { - - onChanged(); - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null ? - com.google.cloud.vision.v1.GcsSource.getDefaultInstance() : gcsSource_; - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, com.google.cloud.vision.v1.GcsSourceOrBuilder>( - getGcsSource(), - getParentForChildren(), - isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.InputConfig) - private static final com.google.cloud.vision.v1.InputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.InputConfig(); - } - - public static com.google.cloud.vision.v1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java deleted file mode 100644 index d3a2ff9c3c66..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfigOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface InputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1.GcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - *
-   * File content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateFiles requests. It does
-   * not work for AsyncBatchAnnotateFiles requests.
-   * 
- * - * bytes content = 3; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java deleted file mode 100644 index 27a3a58eb0b0..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Rectangle determined by min and max `LatLng` pairs.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.LatLongRect} - */ -public final class LatLongRect extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LatLongRect) - LatLongRectOrBuilder { -private static final long serialVersionUID = 0L; - // Use LatLongRect.newBuilder() to construct. - private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LatLongRect() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LatLongRect(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LatLongRect( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (minLatLng_ != null) { - subBuilder = minLatLng_.toBuilder(); - } - minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minLatLng_); - minLatLng_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.type.LatLng.Builder subBuilder = null; - if (maxLatLng_ != null) { - subBuilder = maxLatLng_.toBuilder(); - } - maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxLatLng_); - maxLatLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LatLongRect.class, com.google.cloud.vision.v1.LatLongRect.Builder.class); - } - - public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng minLatLng_; - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - @java.lang.Override - public boolean hasMinLatLng() { - return minLatLng_ != null; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMinLatLng() { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - return getMinLatLng(); - } - - public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; - private com.google.type.LatLng maxLatLng_; - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - @java.lang.Override - public boolean hasMaxLatLng() { - return maxLatLng_ != null; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMaxLatLng() { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - return getMaxLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minLatLng_ != null) { - output.writeMessage(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - output.writeMessage(2, getMaxLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.LatLongRect)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.LatLongRect other = (com.google.cloud.vision.v1.LatLongRect) obj; - - if (hasMinLatLng() != other.hasMinLatLng()) return false; - if (hasMinLatLng()) { - if (!getMinLatLng() - .equals(other.getMinLatLng())) return false; - } - if (hasMaxLatLng() != other.hasMaxLatLng()) return false; - if (hasMaxLatLng()) { - if (!getMaxLatLng() - .equals(other.getMaxLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinLatLng()) { - hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMinLatLng().hashCode(); - } - if (hasMaxLatLng()) { - hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMaxLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LatLongRect parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LatLongRect parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.LatLongRect prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rectangle determined by min and max `LatLng` pairs.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.LatLongRect} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LatLongRect) - com.google.cloud.vision.v1.LatLongRectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LatLongRect.class, com.google.cloud.vision.v1.LatLongRect.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.LatLongRect.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LatLongRect_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRect getDefaultInstanceForType() { - return com.google.cloud.vision.v1.LatLongRect.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRect build() { - com.google.cloud.vision.v1.LatLongRect result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRect buildPartial() { - com.google.cloud.vision.v1.LatLongRect result = new com.google.cloud.vision.v1.LatLongRect(this); - if (minLatLngBuilder_ == null) { - result.minLatLng_ = minLatLng_; - } else { - result.minLatLng_ = minLatLngBuilder_.build(); - } - if (maxLatLngBuilder_ == null) { - result.maxLatLng_ = maxLatLng_; - } else { - result.maxLatLng_ = maxLatLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.LatLongRect) { - return mergeFrom((com.google.cloud.vision.v1.LatLongRect)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.LatLongRect other) { - if (other == com.google.cloud.vision.v1.LatLongRect.getDefaultInstance()) return this; - if (other.hasMinLatLng()) { - mergeMinLatLng(other.getMinLatLng()); - } - if (other.hasMaxLatLng()) { - mergeMaxLatLng(other.getMaxLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.LatLongRect parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.LatLongRect) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng minLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - public boolean hasMinLatLng() { - return minLatLngBuilder_ != null || minLatLng_ != null; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - public com.google.type.LatLng getMinLatLng() { - if (minLatLngBuilder_ == null) { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } else { - return minLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minLatLng_ = value; - onChanged(); - } else { - minLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (minLatLngBuilder_ == null) { - minLatLng_ = builderForValue.build(); - onChanged(); - } else { - minLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder mergeMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (minLatLng_ != null) { - minLatLng_ = - com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); - } else { - minLatLng_ = value; - } - onChanged(); - } else { - minLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder clearMinLatLng() { - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - onChanged(); - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLng.Builder getMinLatLngBuilder() { - - onChanged(); - return getMinLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - if (minLatLngBuilder_ != null) { - return minLatLngBuilder_.getMessageOrBuilder(); - } else { - return minLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMinLatLngFieldBuilder() { - if (minLatLngBuilder_ == null) { - minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMinLatLng(), - getParentForChildren(), - isClean()); - minLatLng_ = null; - } - return minLatLngBuilder_; - } - - private com.google.type.LatLng maxLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - public boolean hasMaxLatLng() { - return maxLatLngBuilder_ != null || maxLatLng_ != null; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - public com.google.type.LatLng getMaxLatLng() { - if (maxLatLngBuilder_ == null) { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } else { - return maxLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxLatLng_ = value; - onChanged(); - } else { - maxLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = builderForValue.build(); - onChanged(); - } else { - maxLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder mergeMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (maxLatLng_ != null) { - maxLatLng_ = - com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); - } else { - maxLatLng_ = value; - } - onChanged(); - } else { - maxLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder clearMaxLatLng() { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - onChanged(); - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLng.Builder getMaxLatLngBuilder() { - - onChanged(); - return getMaxLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - if (maxLatLngBuilder_ != null) { - return maxLatLngBuilder_.getMessageOrBuilder(); - } else { - return maxLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMaxLatLngFieldBuilder() { - if (maxLatLngBuilder_ == null) { - maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMaxLatLng(), - getParentForChildren(), - isClean()); - maxLatLng_ = null; - } - return maxLatLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LatLongRect) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LatLongRect) - private static final com.google.cloud.vision.v1.LatLongRect DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LatLongRect(); - } - - public static com.google.cloud.vision.v1.LatLongRect getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LatLongRect parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LatLongRect(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LatLongRect getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java deleted file mode 100644 index 2ec9e67d4153..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRectOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface LatLongRectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LatLongRect) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - boolean hasMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - com.google.type.LatLng getMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); - - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - boolean hasMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - com.google.type.LatLng getMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java deleted file mode 100644 index 410f257d76f6..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Likelihood.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A bucketized representation of likelihood, which is intended to give clients
- * highly stable results across model upgrades.
- * 
- * - * Protobuf enum {@code google.cloud.vision.v1.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-   * It is very unlikely.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - *
-   * It is unlikely.
-   * 
- * - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * It is possible.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - *
-   * It is likely.
-   * 
- * - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * It is very likely.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-   * It is very unlikely.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - *
-   * It is unlikely.
-   * 
- * - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * It is possible.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - *
-   * It is likely.
-   * 
- * - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * It is very likely.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.Likelihood) -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java deleted file mode 100644 index 112401ca0773..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductSetsRequest} - */ -public final class ListProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductSetsRequest) - ListProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsRequest.newBuilder() to construct. - private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductSetsRequest.class, com.google.cloud.vision.v1.ListProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductSetsRequest other = (com.google.cloud.vision.v1.ListProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductSetsRequest) - com.google.cloud.vision.v1.ListProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductSetsRequest.class, com.google.cloud.vision.v1.ListProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsRequest build() { - com.google.cloud.vision.v1.ListProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsRequest buildPartial() { - com.google.cloud.vision.v1.ListProductSetsRequest result = new com.google.cloud.vision.v1.ListProductSetsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1.ListProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductSetsRequest other) { - if (other == com.google.cloud.vision.v1.ListProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductSetsRequest) - private static final com.google.cloud.vision.v1.ListProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductSetsRequest(); - } - - public static com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java deleted file mode 100644 index f4edd0a25663..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java deleted file mode 100644 index 109fba3047e7..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductSetsResponse} - */ -public final class ListProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductSetsResponse) - ListProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsResponse.newBuilder() to construct. - private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsResponse() { - productSets_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productSets_.add( - input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductSetsResponse.class, com.google.cloud.vision.v1.ListProductSetsResponse.Builder.class); - } - - public static final int PRODUCT_SETS_FIELD_NUMBER = 1; - private java.util.List productSets_; - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List getProductSetsList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List - getProductSetsOrBuilderList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - @java.lang.Override - public int getProductSetsCount() { - return productSets_.size(); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet getProductSets(int index) { - return productSets_.get(index); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - return productSets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < productSets_.size(); i++) { - output.writeMessage(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < productSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductSetsResponse other = (com.google.cloud.vision.v1.ListProductSetsResponse) obj; - - if (!getProductSetsList() - .equals(other.getProductSetsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductSetsCount() > 0) { - hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getProductSetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductSetsResponse) - com.google.cloud.vision.v1.ListProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductSetsResponse.class, com.google.cloud.vision.v1.ListProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductSetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productSetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsResponse build() { - com.google.cloud.vision.v1.ListProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsResponse buildPartial() { - com.google.cloud.vision.v1.ListProductSetsResponse result = new com.google.cloud.vision.v1.ListProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productSets_ = productSets_; - } else { - result.productSets_ = productSetsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1.ListProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductSetsResponse other) { - if (other == com.google.cloud.vision.v1.ListProductSetsResponse.getDefaultInstance()) return this; - if (productSetsBuilder_ == null) { - if (!other.productSets_.isEmpty()) { - if (productSets_.isEmpty()) { - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductSetsIsMutable(); - productSets_.addAll(other.productSets_); - } - onChanged(); - } - } else { - if (!other.productSets_.isEmpty()) { - if (productSetsBuilder_.isEmpty()) { - productSetsBuilder_.dispose(); - productSetsBuilder_ = null; - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - productSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductSetsFieldBuilder() : null; - } else { - productSetsBuilder_.addAllMessages(other.productSets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List productSets_ = - java.util.Collections.emptyList(); - private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(productSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetsBuilder_; - - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public java.util.List getProductSetsList() { - if (productSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productSets_); - } else { - return productSetsBuilder_.getMessageList(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public int getProductSetsCount() { - if (productSetsBuilder_ == null) { - return productSets_.size(); - } else { - return productSetsBuilder_.getCount(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1.ProductSet getProductSets(int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); - } else { - return productSetsBuilder_.getMessage(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.set(index, value); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.set(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder addProductSets(com.google.cloud.vision.v1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(value); - onChanged(); - } else { - productSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(index, value); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder addAllProductSets( - java.lang.Iterable values) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productSets_); - onChanged(); - } else { - productSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder clearProductSets() { - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productSetsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public Builder removeProductSets(int index) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.remove(index); - onChanged(); - } else { - productSetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1.ProductSet.Builder getProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); } else { - return productSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsOrBuilderList() { - if (productSetsBuilder_ != null) { - return productSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productSets_); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1.ProductSet.Builder addProductSetsBuilder() { - return getProductSetsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1.ProductSet.Builder addProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsBuilderList() { - return getProductSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> - getProductSetsFieldBuilder() { - if (productSetsBuilder_ == null) { - productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productSets_ = null; - } - return productSetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductSetsResponse) - private static final com.google.cloud.vision.v1.ListProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductSetsResponse(); - } - - public static com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java deleted file mode 100644 index 3b90ee5b051f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1.ProductSet getProductSets(int index); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - int getProductSetsCount(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsOrBuilderList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java deleted file mode 100644 index 30ed9b8d724f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetRequest} - */ -public final class ListProductsInProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsInProductSetRequest) - ListProductsInProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetRequest.newBuilder() to construct. - private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetRequest() { - name_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1.ListProductsInProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductsInProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1.ListProductsInProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsInProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsInProductSetRequest) - com.google.cloud.vision.v1.ListProductsInProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1.ListProductsInProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductsInProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetRequest build() { - com.google.cloud.vision.v1.ListProductsInProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetRequest buildPartial() { - com.google.cloud.vision.v1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1.ListProductsInProductSetRequest(this); - result.name_ = name_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductsInProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.ListProductsInProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsInProductSetRequest other) { - if (other == com.google.cloud.vision.v1.ListProductsInProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductsInProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsInProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsInProductSetRequest) - private static final com.google.cloud.vision.v1.ListProductsInProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsInProductSetRequest(); - } - - public static com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java deleted file mode 100644 index ce0af1091cbb..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductsInProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsInProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java deleted file mode 100644 index c334154d9681..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetResponse} - */ -public final class ListProductsInProductSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsInProductSetResponse) - ListProductsInProductSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetResponse.newBuilder() to construct. - private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1.ListProductsInProductSetResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductsInProductSetResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1.ListProductsInProductSetResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsInProductSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsInProductSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsInProductSetResponse) - com.google.cloud.vision.v1.ListProductsInProductSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1.ListProductsInProductSetResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductsInProductSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetResponse build() { - com.google.cloud.vision.v1.ListProductsInProductSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetResponse buildPartial() { - com.google.cloud.vision.v1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1.ListProductsInProductSetResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductsInProductSetResponse) { - return mergeFrom((com.google.cloud.vision.v1.ListProductsInProductSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsInProductSetResponse other) { - if (other == com.google.cloud.vision.v1.ListProductsInProductSetResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductsInProductSetResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsInProductSetResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsInProductSetResponse) - private static final com.google.cloud.vision.v1.ListProductsInProductSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsInProductSetResponse(); - } - - public static com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java deleted file mode 100644 index ca45fbda570f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductsInProductSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsInProductSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - com.google.cloud.vision.v1.Product getProducts(int index); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java deleted file mode 100644 index 9786c2fa4e3c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsRequest} - */ -public final class ListProductsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsRequest) - ListProductsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsRequest.newBuilder() to construct. - private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsRequest.class, com.google.cloud.vision.v1.ListProductsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductsRequest other = (com.google.cloud.vision.v1.ListProductsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsRequest) - com.google.cloud.vision.v1.ListProductsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsRequest.class, com.google.cloud.vision.v1.ListProductsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsRequest build() { - com.google.cloud.vision.v1.ListProductsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsRequest buildPartial() { - com.google.cloud.vision.v1.ListProductsRequest result = new com.google.cloud.vision.v1.ListProductsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductsRequest) { - return mergeFrom((com.google.cloud.vision.v1.ListProductsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsRequest other) { - if (other == com.google.cloud.vision.v1.ListProductsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsRequest) - private static final com.google.cloud.vision.v1.ListProductsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsRequest(); - } - - public static com.google.cloud.vision.v1.ListProductsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java deleted file mode 100644 index 92a3172ac13f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java deleted file mode 100644 index 7afa9a3edce8..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsResponse} - */ -public final class ListProductsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListProductsResponse) - ListProductsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsResponse.newBuilder() to construct. - private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsResponse.class, com.google.cloud.vision.v1.ListProductsResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListProductsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListProductsResponse other = (com.google.cloud.vision.v1.ListProductsResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListProductsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListProductsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListProductsResponse) - com.google.cloud.vision.v1.ListProductsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListProductsResponse.class, com.google.cloud.vision.v1.ListProductsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsResponse build() { - com.google.cloud.vision.v1.ListProductsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsResponse buildPartial() { - com.google.cloud.vision.v1.ListProductsResponse result = new com.google.cloud.vision.v1.ListProductsResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListProductsResponse) { - return mergeFrom((com.google.cloud.vision.v1.ListProductsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListProductsResponse other) { - if (other == com.google.cloud.vision.v1.ListProductsResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListProductsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListProductsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public com.google.cloud.vision.v1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListProductsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListProductsResponse) - private static final com.google.cloud.vision.v1.ListProductsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListProductsResponse(); - } - - public static com.google.cloud.vision.v1.ListProductsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListProductsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java deleted file mode 100644 index 74ad193bccce..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListProductsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListProductsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - com.google.cloud.vision.v1.Product getProducts(int index); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1.Product products = 1; - */ - com.google.cloud.vision.v1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java deleted file mode 100644 index dafe7e985707..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java +++ /dev/null @@ -1,869 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesRequest} - */ -public final class ListReferenceImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListReferenceImagesRequest) - ListReferenceImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesRequest.newBuilder() to construct. - private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1.ListReferenceImagesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListReferenceImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1.ListReferenceImagesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListReferenceImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListReferenceImagesRequest) - com.google.cloud.vision.v1.ListReferenceImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1.ListReferenceImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListReferenceImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesRequest build() { - com.google.cloud.vision.v1.ListReferenceImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesRequest buildPartial() { - com.google.cloud.vision.v1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1.ListReferenceImagesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListReferenceImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1.ListReferenceImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListReferenceImagesRequest other) { - if (other == com.google.cloud.vision.v1.ListReferenceImagesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListReferenceImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListReferenceImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListReferenceImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListReferenceImagesRequest) - private static final com.google.cloud.vision.v1.ListReferenceImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListReferenceImagesRequest(); - } - - public static com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java deleted file mode 100644 index ab5516738917..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequestOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListReferenceImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListReferenceImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java deleted file mode 100644 index 461df1425849..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java +++ /dev/null @@ -1,1118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Response message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesResponse} - */ -public final class ListReferenceImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ListReferenceImagesResponse) - ListReferenceImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesResponse.newBuilder() to construct. - private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesResponse() { - referenceImages_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1.ListReferenceImagesResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ListReferenceImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1.ListReferenceImagesResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ListReferenceImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ListReferenceImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ListReferenceImagesResponse) - com.google.cloud.vision.v1.ListReferenceImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1.ListReferenceImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ListReferenceImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - pageSize_ = 0; - - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesResponse build() { - com.google.cloud.vision.v1.ListReferenceImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesResponse buildPartial() { - com.google.cloud.vision.v1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1.ListReferenceImagesResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - result.pageSize_ = pageSize_; - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ListReferenceImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1.ListReferenceImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ListReferenceImagesResponse other) { - if (other == com.google.cloud.vision.v1.ListReferenceImagesResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ListReferenceImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ListReferenceImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ListReferenceImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ListReferenceImagesResponse) - private static final com.google.cloud.vision.v1.ListReferenceImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ListReferenceImagesResponse(); - } - - public static com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ListReferenceImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java deleted file mode 100644 index 12ca5efbf063..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponseOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ListReferenceImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ListReferenceImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java deleted file mode 100644 index 98b863d750cc..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java +++ /dev/null @@ -1,1259 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Set of detected objects with bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.LocalizedObjectAnnotation} - */ -public final class LocalizedObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LocalizedObjectAnnotation) - LocalizedObjectAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocalizedObjectAnnotation.newBuilder() to construct. - private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocalizedObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocalizedObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocalizedObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 42: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (boundingPoly_ != null) { - output.writeMessage(5, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.LocalizedObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1.LocalizedObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.LocalizedObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected objects with bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.LocalizedObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LocalizedObjectAnnotation) - com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.LocalizedObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotation build() { - com.google.cloud.vision.v1.LocalizedObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotation buildPartial() { - com.google.cloud.vision.v1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1.LocalizedObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.LocalizedObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.LocalizedObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.LocalizedObjectAnnotation other) { - if (other == com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.LocalizedObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LocalizedObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LocalizedObjectAnnotation) - private static final com.google.cloud.vision.v1.LocalizedObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LocalizedObjectAnnotation(); - } - - public static com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocalizedObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalizedObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java deleted file mode 100644 index b01ff6e37ecc..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotationOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface LocalizedObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LocalizedObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java deleted file mode 100644 index fd5f727d6923..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Detected entity location information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.LocationInfo} - */ -public final class LocationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.LocationInfo) - LocationInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocationInfo.newBuilder() to construct. - private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocationInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (latLng_ != null) { - subBuilder = latLng_.toBuilder(); - } - latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLng_); - latLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LocationInfo.class, com.google.cloud.vision.v1.LocationInfo.Builder.class); - } - - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return latLng_ != null; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return getLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLng_ != null) { - output.writeMessage(1, getLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.LocationInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.LocationInfo other = (com.google.cloud.vision.v1.LocationInfo) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng() - .equals(other.getLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.LocationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected entity location information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.LocationInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.LocationInfo) - com.google.cloud.vision.v1.LocationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.LocationInfo.class, com.google.cloud.vision.v1.LocationInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.LocationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLngBuilder_ == null) { - latLng_ = null; - } else { - latLng_ = null; - latLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_LocationInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1.LocationInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfo build() { - com.google.cloud.vision.v1.LocationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfo buildPartial() { - com.google.cloud.vision.v1.LocationInfo result = new com.google.cloud.vision.v1.LocationInfo(this); - if (latLngBuilder_ == null) { - result.latLng_ = latLng_; - } else { - result.latLng_ = latLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.LocationInfo) { - return mergeFrom((com.google.cloud.vision.v1.LocationInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.LocationInfo other) { - if (other == com.google.cloud.vision.v1.LocationInfo.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.LocationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.LocationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return latLngBuilder_ != null || latLng_ != null; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - onChanged(); - } else { - latLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - onChanged(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (latLng_ != null) { - latLng_ = - com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); - } else { - latLng_ = value; - } - onChanged(); - } else { - latLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - if (latLngBuilder_ == null) { - latLng_ = null; - onChanged(); - } else { - latLng_ = null; - latLngBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - - onChanged(); - return getLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getLatLng(), - getParentForChildren(), - isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.LocationInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.LocationInfo) - private static final com.google.cloud.vision.v1.LocationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.LocationInfo(); - } - - public static com.google.cloud.vision.v1.LocationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.LocationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java deleted file mode 100644 index 1bb6cce34be0..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface LocationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.LocationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java deleted file mode 100644 index 9cfc157d8e7b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java deleted file mode 100644 index 8d8fc876e16f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java +++ /dev/null @@ -1,597 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the normalized vertex coordinates are relative to the original image
- * and range from 0 to 1.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.NormalizedVertex} - */ -public final class NormalizedVertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.NormalizedVertex) - NormalizedVertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use NormalizedVertex.newBuilder() to construct. - private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NormalizedVertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NormalizedVertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedVertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.NormalizedVertex.class, com.google.cloud.vision.v1.NormalizedVertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.NormalizedVertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.NormalizedVertex other = (com.google.cloud.vision.v1.NormalizedVertex) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.NormalizedVertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the normalized vertex coordinates are relative to the original image
-   * and range from 0 to 1.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.NormalizedVertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.NormalizedVertex) - com.google.cloud.vision.v1.NormalizedVertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.NormalizedVertex.class, com.google.cloud.vision.v1.NormalizedVertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.NormalizedVertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_NormalizedVertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertex build() { - com.google.cloud.vision.v1.NormalizedVertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertex buildPartial() { - com.google.cloud.vision.v1.NormalizedVertex result = new com.google.cloud.vision.v1.NormalizedVertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.NormalizedVertex) { - return mergeFrom((com.google.cloud.vision.v1.NormalizedVertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.NormalizedVertex other) { - if (other == com.google.cloud.vision.v1.NormalizedVertex.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.NormalizedVertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.NormalizedVertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.NormalizedVertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.NormalizedVertex) - private static final com.google.cloud.vision.v1.NormalizedVertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.NormalizedVertex(); - } - - public static com.google.cloud.vision.v1.NormalizedVertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NormalizedVertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedVertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.NormalizedVertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java deleted file mode 100644 index 048d88048df5..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -public interface NormalizedVertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.NormalizedVertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java deleted file mode 100644 index 77182322e14e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java +++ /dev/null @@ -1,1204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Contains metadata for the BatchAnnotateImages operation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.OperationMetadata.class, com.google.cloud.vision.v1.OperationMetadata.Builder.class); - } - - /** - *
-   * Batch operation states.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1.OperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - CREATED(1), - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - public static final int CREATED_VALUE = 1; - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return CREATED; - case 2: return RUNNING; - case 3: return DONE; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.OperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.OperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.OperationMetadata.State result = com.google.cloud.vision.v1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1.OperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.OperationMetadata other = (com.google.cloud.vision.v1.OperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains metadata for the BatchAnnotateImages operation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.OperationMetadata) - com.google.cloud.vision.v1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.OperationMetadata.class, com.google.cloud.vision.v1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.OperationMetadata build() { - com.google.cloud.vision.v1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OperationMetadata buildPartial() { - com.google.cloud.vision.v1.OperationMetadata result = new com.google.cloud.vision.v1.OperationMetadata(this); - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.OperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.OperationMetadata other) { - if (other == com.google.cloud.vision.v1.OperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.OperationMetadata.State result = com.google.cloud.vision.v1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1.OperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1.OperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OperationMetadata) - private static final com.google.cloud.vision.v1.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.OperationMetadata(); - } - - public static com.google.cloud.vision.v1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java deleted file mode 100644 index 4073376e776e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1.OperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java deleted file mode 100644 index b3c1c9b95a78..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java +++ /dev/null @@ -1,777 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * The desired output location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.GcsDestination.Builder subBuilder = null; - if (gcsDestination_ != null) { - subBuilder = gcsDestination_.toBuilder(); - } - gcsDestination_ = input.readMessage(com.google.cloud.vision.v1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsDestination_); - gcsDestination_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - batchSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.OutputConfig.class, com.google.cloud.vision.v1.OutputConfig.Builder.class); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.GcsDestination gcsDestination_; - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return gcsDestination_ != null; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestination getGcsDestination() { - return gcsDestination_ == null ? com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return getGcsDestination(); - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 2; - private int batchSize_; - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsDestination_ != null) { - output.writeMessage(1, getGcsDestination()); - } - if (batchSize_ != 0) { - output.writeInt32(2, batchSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsDestination_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsDestination()); - } - if (batchSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, batchSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.OutputConfig other = (com.google.cloud.vision.v1.OutputConfig) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - } - if (getBatchSize() - != other.getBatchSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getBatchSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired output location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.OutputConfig) - com.google.cloud.vision.v1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.OutputConfig.class, com.google.cloud.vision.v1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - batchSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig build() { - com.google.cloud.vision.v1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig buildPartial() { - com.google.cloud.vision.v1.OutputConfig result = new com.google.cloud.vision.v1.OutputConfig(this); - if (gcsDestinationBuilder_ == null) { - result.gcsDestination_ = gcsDestination_; - } else { - result.gcsDestination_ = gcsDestinationBuilder_.build(); - } - result.batchSize_ = batchSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.OutputConfig) { - return mergeFrom((com.google.cloud.vision.v1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.OutputConfig other) { - if (other == com.google.cloud.vision.v1.OutputConfig.getDefaultInstance()) return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - if (other.getBatchSize() != 0) { - setBatchSize(other.getBatchSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return gcsDestinationBuilder_ != null || gcsDestination_ != null; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - public com.google.cloud.vision.v1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null ? com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.vision.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.vision.v1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.vision.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (gcsDestination_ != null) { - gcsDestination_ = - com.google.cloud.vision.v1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); - } else { - gcsDestination_ = value; - } - onChanged(); - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - onChanged(); - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1.GcsDestination.Builder getGcsDestinationBuilder() { - - onChanged(); - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null ? - com.google.cloud.vision.v1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, com.google.cloud.vision.v1.GcsDestinationOrBuilder>( - getGcsDestination(), - getParentForChildren(), - isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - private int batchSize_ ; - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @param value The batchSize to set. - * @return This builder for chaining. - */ - public Builder setBatchSize(int value) { - - batchSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return This builder for chaining. - */ - public Builder clearBatchSize() { - - batchSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OutputConfig) - private static final com.google.cloud.vision.v1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.OutputConfig(); - } - - public static com.google.cloud.vision.v1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java deleted file mode 100644 index 1a8816b0f0a0..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.vision.v1.GcsDestination getGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.vision.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - int getBatchSize(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java deleted file mode 100644 index 5df0266c8790..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java +++ /dev/null @@ -1,1358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Detected page from OCR.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Page} - */ -public final class Page extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Page) - PageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Page() { - blocks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Page(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - height_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blocks_.add( - input.readMessage(com.google.cloud.vision.v1.Block.parser(), extensionRegistry)); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Page.class, com.google.cloud.vision.v1.Page.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int BLOCKS_FIELD_NUMBER = 4; - private java.util.List blocks_; - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Block getBlocks(int index) { - return blocks_.get(index); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (height_ != 0) { - output.writeInt32(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Page)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Page other = (com.google.cloud.vision.v1.Page) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!getBlocksList() - .equals(other.getBlocksList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Page parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Page parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Page parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected page from OCR.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Page} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Page) - com.google.cloud.vision.v1.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Page.class, com.google.cloud.vision.v1.Page.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - width_ = 0; - - height_ = 0; - - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Page_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Page getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Page.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Page build() { - com.google.cloud.vision.v1.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Page buildPartial() { - com.google.cloud.vision.v1.Page result = new com.google.cloud.vision.v1.Page(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - result.width_ = width_; - result.height_ = height_; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Page) { - return mergeFrom((com.google.cloud.vision.v1.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Page other) { - if (other == com.google.cloud.vision.v1.Page.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Page) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private int width_ ; - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder> blocksBuilder_; - - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public com.google.cloud.vision.v1.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder addBlocks(com.google.cloud.vision.v1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder addBlocks( - com.google.cloud.vision.v1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder addAllBlocks( - java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public com.google.cloud.vision.v1.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public com.google.cloud.vision.v1.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public com.google.cloud.vision.v1.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Page) - private static final com.google.cloud.vision.v1.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Page(); - } - - public static com.google.cloud.vision.v1.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Page(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java deleted file mode 100644 index a14f99ddab34..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PageOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Page) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - int getHeight(); - - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - java.util.List - getBlocksList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - com.google.cloud.vision.v1.Block getBlocks(int index); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - int getBlocksCount(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - java.util.List - getBlocksOrBuilderList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1.Block blocks = 4; - */ - com.google.cloud.vision.v1.BlockOrBuilder getBlocksOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java deleted file mode 100644 index 337437ebac6b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Structural unit of text representing a number of words in certain order.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Paragraph} - */ -public final class Paragraph extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Paragraph) - ParagraphOrBuilder { -private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Paragraph() { - words_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Paragraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Paragraph( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add( - input.readMessage(com.google.cloud.vision.v1.Word.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int WORDS_FIELD_NUMBER = 3; - private java.util.List words_; - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - @java.lang.Override - public java.util.List getWordsList() { - return words_; - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - @java.lang.Override - public java.util.List - getWordsOrBuilderList() { - return words_; - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - @java.lang.Override - public int getWordsCount() { - return words_.size(); - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Word getWords(int index) { - return words_.get(index); - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( - int index) { - return words_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - output.writeMessage(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Paragraph)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Paragraph other = (com.google.cloud.vision.v1.Paragraph) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Paragraph parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Paragraph parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Paragraph parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Paragraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structural unit of text representing a number of words in certain order.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Paragraph} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Paragraph) - com.google.cloud.vision.v1.ParagraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Paragraph.class, com.google.cloud.vision.v1.Paragraph.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Paragraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWordsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - wordsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Paragraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Paragraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Paragraph build() { - com.google.cloud.vision.v1.Paragraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Paragraph buildPartial() { - com.google.cloud.vision.v1.Paragraph result = new com.google.cloud.vision.v1.Paragraph(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - } else { - result.words_ = wordsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Paragraph) { - return mergeFrom((com.google.cloud.vision.v1.Paragraph)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Paragraph other) { - if (other == com.google.cloud.vision.v1.Paragraph.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (wordsBuilder_ == null) { - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - } else { - if (!other.words_.isEmpty()) { - if (wordsBuilder_.isEmpty()) { - wordsBuilder_.dispose(); - wordsBuilder_ = null; - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - wordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWordsFieldBuilder() : null; - } else { - wordsBuilder_.addAllMessages(other.words_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Paragraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Paragraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List words_ = - java.util.Collections.emptyList(); - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(words_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder> wordsBuilder_; - - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public java.util.List getWordsList() { - if (wordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(words_); - } else { - return wordsBuilder_.getMessageList(); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public int getWordsCount() { - if (wordsBuilder_ == null) { - return words_.size(); - } else { - return wordsBuilder_.getCount(); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public com.google.cloud.vision.v1.Word getWords(int index) { - if (wordsBuilder_ == null) { - return words_.get(index); - } else { - return wordsBuilder_.getMessage(index); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - } else { - wordsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.set(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder addWords(com.google.cloud.vision.v1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - } else { - wordsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(index, value); - onChanged(); - } else { - wordsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder addWords( - com.google.cloud.vision.v1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder addAllWords( - java.lang.Iterable values) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - } else { - wordsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder clearWords() { - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - wordsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public Builder removeWords(int index) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.remove(index); - onChanged(); - } else { - wordsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public com.google.cloud.vision.v1.Word.Builder getWordsBuilder( - int index) { - return getWordsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( - int index) { - if (wordsBuilder_ == null) { - return words_.get(index); } else { - return wordsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public java.util.List - getWordsOrBuilderList() { - if (wordsBuilder_ != null) { - return wordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(words_); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public com.google.cloud.vision.v1.Word.Builder addWordsBuilder() { - return getWordsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Word.getDefaultInstance()); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public com.google.cloud.vision.v1.Word.Builder addWordsBuilder( - int index) { - return getWordsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Word.getDefaultInstance()); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - public java.util.List - getWordsBuilderList() { - return getWordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder> - getWordsFieldBuilder() { - if (wordsBuilder_ == null) { - wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - words_ = null; - } - return wordsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Paragraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Paragraph) - private static final com.google.cloud.vision.v1.Paragraph DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Paragraph(); - } - - public static com.google.cloud.vision.v1.Paragraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Paragraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paragraph(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Paragraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java deleted file mode 100644 index 13c5555fb3f1..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ParagraphOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Paragraph) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - java.util.List - getWordsList(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - com.google.cloud.vision.v1.Word getWords(int index); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - int getWordsCount(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - java.util.List - getWordsOrBuilderList(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1.Word words = 3; - */ - com.google.cloud.vision.v1.WordOrBuilder getWordsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java deleted file mode 100644 index 49bd8fe649f6..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A 3D position in the image, used primarily for Face detection landmarks.
- * A valid Position must have both x and y coordinates.
- * The position coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Position} - */ -public final class Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Position) - PositionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Position.newBuilder() to construct. - private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Position() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Position(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Position( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - case 29: { - - z_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Position.class, com.google.cloud.vision.v1.Position.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - public static final int Z_FIELD_NUMBER = 3; - private float z_; - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - output.writeFloat(3, z_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, z_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Position)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Position other = (com.google.cloud.vision.v1.Position) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (java.lang.Float.floatToIntBits(getZ()) - != java.lang.Float.floatToIntBits( - other.getZ())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getZ()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A 3D position in the image, used primarily for Face detection landmarks.
-   * A valid Position must have both x and y coordinates.
-   * The position coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Position) - com.google.cloud.vision.v1.PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Position.class, com.google.cloud.vision.v1.Position.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Position.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - z_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Position_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Position getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Position.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Position build() { - com.google.cloud.vision.v1.Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Position buildPartial() { - com.google.cloud.vision.v1.Position result = new com.google.cloud.vision.v1.Position(this); - result.x_ = x_; - result.y_ = y_; - result.z_ = z_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Position) { - return mergeFrom((com.google.cloud.vision.v1.Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Position other) { - if (other == com.google.cloud.vision.v1.Position.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - if (other.getZ() != 0F) { - setZ(other.getZ()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Position parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - - private float z_ ; - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @param value The z to set. - * @return This builder for chaining. - */ - public Builder setZ(float value) { - - z_ = value; - onChanged(); - return this; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return This builder for chaining. - */ - public Builder clearZ() { - - z_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Position) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Position) - private static final com.google.cloud.vision.v1.Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Position(); - } - - public static com.google.cloud.vision.v1.Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Position parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java deleted file mode 100644 index bac632247b7d..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PositionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -public interface PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Position) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); - - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - float getZ(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java deleted file mode 100644 index 273e8c965d0e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java +++ /dev/null @@ -1,2617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A Product contains ReferenceImages.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Product} - */ -public final class Product extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Product) - ProductOrBuilder { -private static final long serialVersionUID = 0L; - // Use Product.newBuilder() to construct. - private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Product() { - name_ = ""; - displayName_ = ""; - description_ = ""; - productCategory_ = ""; - productLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Product(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - productCategory_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productLabels_.add( - input.readMessage(com.google.cloud.vision.v1.Product.KeyValue.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Product.class, com.google.cloud.vision.v1.Product.Builder.class); - } - - public interface KeyValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Product.KeyValue) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - java.lang.String getKey(); - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - *
-   * A product label represented as a key-value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Product.KeyValue} - */ - public static final class KeyValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Product.KeyValue) - KeyValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use KeyValue.newBuilder() to construct. - private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KeyValue() { - key_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KeyValue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KeyValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Product.KeyValue.class, com.google.cloud.vision.v1.Product.KeyValue.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Product.KeyValue)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Product.KeyValue other = (com.google.cloud.vision.v1.Product.KeyValue) obj; - - if (!getKey() - .equals(other.getKey())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Product.KeyValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A product label represented as a key-value pair.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.Product.KeyValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Product.KeyValue) - com.google.cloud.vision.v1.Product.KeyValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Product.KeyValue.class, com.google.cloud.vision.v1.Product.KeyValue.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Product.KeyValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - key_ = ""; - - value_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValue getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValue build() { - com.google.cloud.vision.v1.Product.KeyValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValue buildPartial() { - com.google.cloud.vision.v1.Product.KeyValue result = new com.google.cloud.vision.v1.Product.KeyValue(this); - result.key_ = key_; - result.value_ = value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Product.KeyValue) { - return mergeFrom((com.google.cloud.vision.v1.Product.KeyValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Product.KeyValue other) { - if (other == com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Product.KeyValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Product.KeyValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The bytes for key. - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Product.KeyValue) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Product.KeyValue) - private static final com.google.cloud.vision.v1.Product.KeyValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Product.KeyValue(); - } - - public static com.google.cloud.vision.v1.Product.KeyValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KeyValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValue(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; - private volatile java.lang.Object productCategory_; - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-   * still supported, but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - @java.lang.Override - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } - } - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-   * still supported, but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; - private java.util.List productLabels_; - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List getProductLabelsList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List - getProductLabelsOrBuilderList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public int getProductLabelsCount() { - return productLabels_.size(); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index) { - return productLabels_.get(index); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - return productLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - output.writeMessage(5, productLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, productLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Product)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Product other = (com.google.cloud.vision.v1.Product) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getProductCategory() - .equals(other.getProductCategory())) return false; - if (!getProductLabelsList() - .equals(other.getProductLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getProductCategory().hashCode(); - if (getProductLabelsCount() > 0) { - hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getProductLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Product parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Product parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Product parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Product parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Product prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Product contains ReferenceImages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Product} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Product) - com.google.cloud.vision.v1.ProductOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Product.class, com.google.cloud.vision.v1.Product.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - productCategory_ = ""; - - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_Product_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Product.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product build() { - com.google.cloud.vision.v1.Product result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product buildPartial() { - com.google.cloud.vision.v1.Product result = new com.google.cloud.vision.v1.Product(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.productCategory_ = productCategory_; - if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productLabels_ = productLabels_; - } else { - result.productLabels_ = productLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Product) { - return mergeFrom((com.google.cloud.vision.v1.Product)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Product other) { - if (other == com.google.cloud.vision.v1.Product.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getProductCategory().isEmpty()) { - productCategory_ = other.productCategory_; - onChanged(); - } - if (productLabelsBuilder_ == null) { - if (!other.productLabels_.isEmpty()) { - if (productLabels_.isEmpty()) { - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductLabelsIsMutable(); - productLabels_.addAll(other.productLabels_); - } - onChanged(); - } - } else { - if (!other.productLabels_.isEmpty()) { - if (productLabelsBuilder_.isEmpty()) { - productLabelsBuilder_.dispose(); - productLabelsBuilder_ = null; - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - productLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductLabelsFieldBuilder() : null; - } else { - productLabelsBuilder_.addAllMessages(other.productLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Product parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Product) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object productCategory_ = ""; - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-     * still supported, but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-     * still supported, but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-     * still supported, but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategory( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productCategory_ = value; - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-     * still supported, but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return This builder for chaining. - */ - public Builder clearProductCategory() { - - productCategory_ = getDefaultInstance().getProductCategory(); - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-     * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-     * still supported, but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The bytes for productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productCategory_ = value; - onChanged(); - return this; - } - - private java.util.List productLabels_ = - java.util.Collections.emptyList(); - private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(productLabels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder> productLabelsBuilder_; - - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public java.util.List getProductLabelsList() { - if (productLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productLabels_); - } else { - return productLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public int getProductLabelsCount() { - if (productLabelsBuilder_ == null) { - return productLabels_.size(); - } else { - return productLabelsBuilder_.getCount(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); - } else { - return productLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.set(index, value); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels(com.google.cloud.vision.v1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(index, value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder addAllProductLabels( - java.lang.Iterable values) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productLabels_); - onChanged(); - } else { - productLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder clearProductLabels() { - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public Builder removeProductLabels(int index) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.remove(index); - onChanged(); - } else { - productLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1.Product.KeyValue.Builder getProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); } else { - return productLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsOrBuilderList() { - if (productLabelsBuilder_ != null) { - return productLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productLabels_); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder() { - return getProductLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsBuilderList() { - return getProductLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder> - getProductLabelsFieldBuilder() { - if (productLabelsBuilder_ == null) { - productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Product.KeyValue, com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder>( - productLabels_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productLabels_ = null; - } - return productLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Product) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Product) - private static final com.google.cloud.vision.v1.Product DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Product(); - } - - public static com.google.cloud.vision.v1.Product getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Product parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Product getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java deleted file mode 100644 index 08d513840cab..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - - @Deprecated - protected ProductName() { - project = null; - location = null; - product = null; - } - - private ProductName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductName of(String project, String location, String product) { - return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); - } - - public static String format(String project, String location, String product) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .build() - .toString(); - } - - public static ProductName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT.validatedMatch( - formattedString, "ProductName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT.instantiate( - "project", project, "location", location, "product", product); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductName that = ((ProductName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - return h; - } - - /** Builder for projects/{project}/locations/{location}/products/{product}. */ - public static class Builder { - private String project; - private String location; - private String product; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - private Builder(ProductName productName) { - this.project = productName.project; - this.location = productName.location; - this.product = productName.product; - } - - public ProductName build() { - return new ProductName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java deleted file mode 100644 index 26524dc310d2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductOrBuilder.java +++ /dev/null @@ -1,194 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ProductOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Product) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-   * still supported, but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - java.lang.String getProductCategory(); - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
-   * "general-v1". The legacy categories "homegoods", "apparel", and "toys" are
-   * still supported, but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - com.google.protobuf.ByteString - getProductCategoryBytes(); - - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1.Product.KeyValue getProductLabels(int index); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - int getProductLabelsCount(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsOrBuilderList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java deleted file mode 100644 index 57551f380aba..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java +++ /dev/null @@ -1,1390 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Parameters for a product search request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchParams} - */ -public final class ProductSearchParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchParams) - ProductSearchParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchParams.newBuilder() to construct. - private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchParams() { - productSet_ = ""; - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - productSet_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productCategories_.add(s); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 74: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchParams.class, com.google.cloud.vision.v1.ProductSearchParams.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 9; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 6; - private volatile java.lang.Object productSet_; - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - @java.lang.Override - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } - } - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList productCategories_; - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_; - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - - public static final int FILTER_FIELD_NUMBER = 8; - private volatile java.lang.Object filter_; - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); - } - for (int i = 0; i < productCategories_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); - } - if (boundingPoly_ != null) { - output.writeMessage(9, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); - } - { - int dataSize = 0; - for (int i = 0; i < productCategories_.size(); i++) { - dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); - } - size += dataSize; - size += 1 * getProductCategoriesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSearchParams other = (com.google.cloud.vision.v1.ProductSearchParams) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getProductSet() - .equals(other.getProductSet())) return false; - if (!getProductCategoriesList() - .equals(other.getProductCategoriesList())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - if (getProductCategoriesCount() > 0) { - hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getProductCategoriesList().hashCode(); - } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchParams) - com.google.cloud.vision.v1.ProductSearchParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchParams.class, com.google.cloud.vision.v1.ProductSearchParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSearchParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - productSet_ = ""; - - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParams build() { - com.google.cloud.vision.v1.ProductSearchParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParams buildPartial() { - com.google.cloud.vision.v1.ProductSearchParams result = new com.google.cloud.vision.v1.ProductSearchParams(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.productSet_ = productSet_; - if (((bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productCategories_ = productCategories_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSearchParams) { - return mergeFrom((com.google.cloud.vision.v1.ProductSearchParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchParams other) { - if (other == com.google.cloud.vision.v1.ProductSearchParams.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (!other.getProductSet().isEmpty()) { - productSet_ = other.productSet_; - onChanged(); - } - if (!other.productCategories_.isEmpty()) { - if (productCategories_.isEmpty()) { - productCategories_ = other.productCategories_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductCategoriesIsMutable(); - productCategories_.addAll(other.productCategories_); - } - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSearchParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSearchParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.lang.Object productSet_ = ""; - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSet_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProductSet() { - - productSet_ = getDefaultInstance().getProductSet(); - onChanged(); - return this; - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The bytes for productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSet_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_.getUnmodifiableView(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index to set the value at. - * @param value The productCategories to set. - * @return This builder for chaining. - */ - public Builder setProductCategories( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategories( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param values The productCategories to add. - * @return This builder for chaining. - */ - public Builder addAllProductCategories( - java.lang.Iterable values) { - ensureProductCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productCategories_); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return This builder for chaining. - */ - public Builder clearProductCategories() { - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The bytes of the productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategoriesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchParams) - private static final com.google.cloud.vision.v1.ProductSearchParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchParams(); - } - - public static com.google.cloud.vision.v1.ProductSearchParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java deleted file mode 100644 index cc978287f7a6..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParamsOrBuilder.java +++ /dev/null @@ -1,160 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search.proto - -package com.google.cloud.vision.v1; - -public interface ProductSearchParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - java.lang.String getProductSet(); - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - com.google.protobuf.ByteString - getProductSetBytes(); - - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - java.util.List - getProductCategoriesList(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - int getProductCategoriesCount(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - java.lang.String getProductCategories(int index); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - com.google.protobuf.ByteString - getProductCategoriesBytes(int index); - - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java deleted file mode 100644 index 6fc2214c343e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchProto.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search.proto - -package com.google.cloud.vision.v1; - -public final class ProductSearchProto { - private ProductSearchProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSearchParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSearchParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n+google/cloud/vision/v1/product_search." + - "proto\022\026google.cloud.vision.v1\032\031google/ap" + - "i/resource.proto\032%google/cloud/vision/v1" + - "/geometry.proto\0323google/cloud/vision/v1/" + - "product_search_service.proto\032\037google/pro" + - "tobuf/timestamp.proto\"\272\001\n\023ProductSearchP" + - "arams\022;\n\rbounding_poly\030\t \001(\0132$.google.cl" + - "oud.vision.v1.BoundingPoly\022:\n\013product_se" + - "t\030\006 \001(\tB%\372A\"\n vision.googleapis.com/Prod" + - "uctSet\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006fi" + - "lter\030\010 \001(\t\"\210\005\n\024ProductSearchResults\022.\n\ni" + - "ndex_time\030\002 \001(\0132\032.google.protobuf.Timest" + - "amp\022D\n\007results\030\005 \003(\01323.google.cloud.visi" + - "on.v1.ProductSearchResults.Result\022[\n\027pro" + - "duct_grouped_results\030\006 \003(\0132:.google.clou" + - "d.vision.v1.ProductSearchResults.Grouped" + - "Result\032X\n\006Result\0220\n\007product\030\001 \001(\0132\037.goog" + - "le.cloud.vision.v1.Product\022\r\n\005score\030\002 \001(" + - "\002\022\r\n\005image\030\003 \001(\t\032S\n\020ObjectAnnotation\022\013\n\003" + - "mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004name" + - "\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\355\001\n\rGroupedResult\022" + - ";\n\rbounding_poly\030\001 \001(\0132$.google.cloud.vi" + - "sion.v1.BoundingPoly\022D\n\007results\030\002 \003(\01323." + - "google.cloud.vision.v1.ProductSearchResu" + - "lts.Result\022Y\n\022object_annotations\030\003 \003(\0132=" + - ".google.cloud.vision.v1.ProductSearchRes" + - "ults.ObjectAnnotationBz\n\032com.google.clou" + - "d.vision.v1B\022ProductSearchProtoP\001Z - * Results for a product search request. - * - * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults} - */ -public final class ProductSearchResults extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults) - ProductSearchResultsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchResults.newBuilder() to construct. - private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchResults() { - results_ = java.util.Collections.emptyList(); - productGroupedResults_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchResults(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchResults( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productGroupedResults_.add( - input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.class, com.google.cloud.vision.v1.ProductSearchResults.Builder.class); - } - - public interface ResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.Result) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return The product. - */ - com.google.cloud.vision.v1.Product getProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - java.lang.String getImage(); - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - com.google.protobuf.ByteString - getImageBytes(); - } - /** - *
-   * Information about a product.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.Result} - */ - public static final class Result extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Result() { - image_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.Result.class, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.Product product_; - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int IMAGE_FIELD_NUMBER = 3; - private volatile java.lang.Object image_; - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - @java.lang.Override - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } - } - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.Result)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSearchResults.Result other = (com.google.cloud.vision.v1.ProductSearchResults.Result) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getImage() - .equals(other.getImage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about a product.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.Result} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.Result) - com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.Result.class, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSearchResults.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - score_ = 0F; - - image_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result build() { - com.google.cloud.vision.v1.ProductSearchResults.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result buildPartial() { - com.google.cloud.vision.v1.ProductSearchResults.Result result = new com.google.cloud.vision.v1.ProductSearchResults.Result(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.score_ = score_; - result.image_ = image_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.Result) { - return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.Result)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.Result other) { - if (other == com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getImage().isEmpty()) { - image_ = other.image_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSearchResults.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - * @return The product. - */ - public com.google.cloud.vision.v1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public Builder setProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public Builder setProduct( - com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1.Product product = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private float score_ ; - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object image_ = ""; - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The image. - */ - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The bytes for image. - */ - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The image to set. - * @return This builder for chaining. - */ - public Builder setImage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - image_ = value; - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return This builder for chaining. - */ - public Builder clearImage() { - - image_ = getDefaultInstance().getImage(); - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The bytes for image to set. - * @return This builder for chaining. - */ - public Builder setImageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - image_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.Result) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.Result) - private static final com.google.cloud.vision.v1.ProductSearchResults.Result DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.Result(); - } - - public static com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Prediction for what the object in the bounding box is.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} - */ - public static final class ObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) - ObjectAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ObjectAnnotation.newBuilder() to construct. - private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Prediction for what the object in the bounding box is.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation build() { - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation buildPartial() { - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation other) { - if (other == com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation) - private static final com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation(); - } - - public static com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GroupedResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults.GroupedResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - int getResultsCount(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - int getObjectAnnotationsCount(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsOrBuilderList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index); - } - /** - *
-   * Information about the products similar to a single product in a query
-   * image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.GroupedResult} - */ - public static final class GroupedResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSearchResults.GroupedResult) - GroupedResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use GroupedResult.newBuilder() to construct. - private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupedResult() { - results_ = java.util.Collections.emptyList(); - objectAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupedResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupedResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - objectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List objectAnnotations_; - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List getObjectAnnotationsList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List - getObjectAnnotationsOrBuilderList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public int getObjectAnnotationsCount() { - return objectAnnotations_.size(); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - return objectAnnotations_.get(index); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - return objectAnnotations_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - output.writeMessage(3, objectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, objectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults.GroupedResult)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getObjectAnnotationsList() - .equals(other.getObjectAnnotationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getObjectAnnotationsCount() > 0) { - hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getObjectAnnotationsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about the products similar to a single product in a query
-     * image.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults.GroupedResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults.GroupedResult) - com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getObjectAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult build() { - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult buildPartial() { - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1.ProductSearchResults.GroupedResult(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (objectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.objectAnnotations_ = objectAnnotations_; - } else { - result.objectAnnotations_ = objectAnnotationsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) { - return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults.GroupedResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult other) { - if (other == com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (objectAnnotationsBuilder_ == null) { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotations_.isEmpty()) { - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.addAll(other.objectAnnotations_); - } - onChanged(); - } - } else { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotationsBuilder_.isEmpty()) { - objectAnnotationsBuilder_.dispose(); - objectAnnotationsBuilder_ = null; - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - objectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getObjectAnnotationsFieldBuilder() : null; - } else { - objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder addResults(com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List objectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; - - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List getObjectAnnotationsList() { - if (objectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } else { - return objectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public int getObjectAnnotationsCount() { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.size(); - } else { - return objectAnnotationsBuilder_.getCount(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); - } else { - return objectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations(com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addAllObjectAnnotations( - java.lang.Iterable values) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, objectAnnotations_); - onChanged(); - } else { - objectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder clearObjectAnnotations() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder removeObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.remove(index); - onChanged(); - } else { - objectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); } else { - return objectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsOrBuilderList() { - if (objectAnnotationsBuilder_ != null) { - return objectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { - return getObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsBuilderList() { - return getObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder> - getObjectAnnotationsFieldBuilder() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationOrBuilder>( - objectAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - objectAnnotations_ = null; - } - return objectAnnotationsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults.GroupedResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults.GroupedResult) - private static final com.google.cloud.vision.v1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults.GroupedResult(); - } - - public static com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupedResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupedResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INDEX_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int RESULTS_FIELD_NUMBER = 5; - private java.util.List results_; - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; - private java.util.List productGroupedResults_; - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List getProductGroupedResultsList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List - getProductGroupedResultsOrBuilderList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public int getProductGroupedResultsCount() { - return productGroupedResults_.size(); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - return productGroupedResults_.get(index); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - return productGroupedResults_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (indexTime_ != null) { - output.writeMessage(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - output.writeMessage(6, productGroupedResults_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, productGroupedResults_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSearchResults)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSearchResults other = (com.google.cloud.vision.v1.ProductSearchResults) obj; - - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getProductGroupedResultsList() - .equals(other.getProductGroupedResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getProductGroupedResultsCount() > 0) { - hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductGroupedResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSearchResults prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSearchResults} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSearchResults) - com.google.cloud.vision.v1.ProductSearchResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSearchResults.class, com.google.cloud.vision.v1.ProductSearchResults.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSearchResults.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getProductGroupedResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchProto.internal_static_google_cloud_vision_v1_ProductSearchResults_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults build() { - com.google.cloud.vision.v1.ProductSearchResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults buildPartial() { - com.google.cloud.vision.v1.ProductSearchResults result = new com.google.cloud.vision.v1.ProductSearchResults(this); - int from_bitField0_ = bitField0_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (productGroupedResultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.productGroupedResults_ = productGroupedResults_; - } else { - result.productGroupedResults_ = productGroupedResultsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSearchResults) { - return mergeFrom((com.google.cloud.vision.v1.ProductSearchResults)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSearchResults other) { - if (other == com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()) return this; - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (productGroupedResultsBuilder_ == null) { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResults_.isEmpty()) { - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.addAll(other.productGroupedResults_); - } - onChanged(); - } - } else { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResultsBuilder_.isEmpty()) { - productGroupedResultsBuilder_.dispose(); - productGroupedResultsBuilder_ = null; - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - productGroupedResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductGroupedResultsFieldBuilder() : null; - } else { - productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSearchResults parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSearchResults) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder addResults(com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List productGroupedResults_ = - java.util.Collections.emptyList(); - private void ensureProductGroupedResultsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; - - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List getProductGroupedResultsList() { - if (productGroupedResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } else { - return productGroupedResultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public int getProductGroupedResultsCount() { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.size(); - } else { - return productGroupedResultsBuilder_.getCount(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); - } else { - return productGroupedResultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults(com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addAllProductGroupedResults( - java.lang.Iterable values) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productGroupedResults_); - onChanged(); - } else { - productGroupedResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder clearProductGroupedResults() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder removeProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.remove(index); - onChanged(); - } else { - productGroupedResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); } else { - return productGroupedResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsOrBuilderList() { - if (productGroupedResultsBuilder_ != null) { - return productGroupedResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { - return getProductGroupedResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsBuilderList() { - return getProductGroupedResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder> - getProductGroupedResultsFieldBuilder() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder>( - productGroupedResults_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - productGroupedResults_ = null; - } - return productGroupedResultsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSearchResults) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSearchResults) - private static final com.google.cloud.vision.v1.ProductSearchResults DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSearchResults(); - } - - public static com.google.cloud.vision.v1.ProductSearchResults getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchResults parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchResults(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSearchResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java deleted file mode 100644 index 5c4e626f997d..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResultsOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search.proto - -package com.google.cloud.vision.v1; - -public interface ProductSearchResultsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSearchResults) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1.ProductSearchResults.Result getResults(int index); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - int getResultsCount(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - int getProductGroupedResultsCount(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsOrBuilderList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java deleted file mode 100644 index 5cb92afd7630..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchServiceProto.java +++ /dev/null @@ -1,637 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public final class ProductSearchServiceProto { - private ProductSearchServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Product_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Product_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Product_KeyValue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Product_KeyValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CreateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CreateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_GetProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_GetProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_DeleteProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_DeleteProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CreateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CreateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_GetProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_GetProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_DeleteProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_DeleteProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_CreateReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListReferenceImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListReferenceImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_GetReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_GetReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_DeleteReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductsInProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ListProductsInProductSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImportProductSetsGcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImportProductSetsInputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImportProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImportProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ImportProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ImportProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_BatchOperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_BatchOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1/product_search_" + - "service.proto\022\026google.cloud.vision.v1\032\034g" + - "oogle/api/annotations.proto\032\027google/api/" + - "client.proto\032\037google/api/field_behavior." + - "proto\032\031google/api/resource.proto\032%google" + - "/cloud/vision/v1/geometry.proto\032#google/" + - "longrunning/operations.proto\032\033google/pro" + - "tobuf/empty.proto\032 google/protobuf/field" + - "_mask.proto\032\037google/protobuf/timestamp.p" + - "roto\032\027google/rpc/status.proto\"\253\002\n\007Produc" + - "t\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n" + - "\013description\030\003 \001(\t\022\035\n\020product_category\030\004" + - " \001(\tB\003\340A\005\022@\n\016product_labels\030\005 \003(\0132(.goog" + - "le.cloud.vision.v1.Product.KeyValue\032&\n\010K" + - "eyValue\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[" + - "\n\035vision.googleapis.com/Product\022:project" + - "s/{project}/locations/{location}/product" + - "s/{product}\"\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t" + - "\022\024\n\014display_name\030\002 \001(\t\0223\n\nindex_time\030\003 \001" + - "(\0132\032.google.protobuf.TimestampB\003\340A\003\022,\n\013i" + - "ndex_error\030\004 \001(\0132\022.google.rpc.StatusB\003\340A" + - "\003:h\352Ae\n vision.googleapis.com/ProductSet" + - "\022Aprojects/{project}/locations/{location" + - "}/productSets/{product_set}\"\376\001\n\016Referenc" + - "eImage\022\014\n\004name\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022A" + - "\n\016bounding_polys\030\003 \003(\0132$.google.cloud.vi" + - "sion.v1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision" + - ".googleapis.com/ReferenceImage\022\\projects" + - "/{project}/locations/{location}/products" + - "/{product}/referenceImages/{reference_im" + - "age}\"\234\001\n\024CreateProductRequest\0229\n\006parent\030" + - "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + - "Location\0225\n\007product\030\002 \001(\0132\037.google.cloud" + - ".vision.v1.ProductB\003\340A\002\022\022\n\nproduct_id\030\003 " + - "\001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001 \001" + - "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" + - "ation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + - " \001(\t\"b\n\024ListProductsResponse\0221\n\010products" + - "\030\001 \003(\0132\037.google.cloud.vision.v1.Product\022" + - "\027\n\017next_page_token\030\002 \001(\t\"H\n\021GetProductRe" + - "quest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vision.goog" + - "leapis.com/Product\"~\n\024UpdateProductReque" + - "st\0225\n\007product\030\001 \001(\0132\037.google.cloud.visio" + - "n.v1.ProductB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032" + - ".google.protobuf.FieldMask\"K\n\024DeleteProd" + - "uctRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vision" + - ".googleapis.com/Product\"\252\001\n\027CreateProduc" + - "tSetRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + - "ations.googleapis.com/Location\022<\n\013produc" + - "t_set\030\002 \001(\0132\".google.cloud.vision.v1.Pro" + - "ductSetB\003\340A\002\022\026\n\016product_set_id\030\003 \001(\t\"z\n\026" + - "ListProductSetsRequest\0229\n\006parent\030\001 \001(\tB)" + - "\340A\002\372A#\n!locations.googleapis.com/Locatio" + - "n\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + - "\"l\n\027ListProductSetsResponse\0228\n\014product_s" + - "ets\030\001 \003(\0132\".google.cloud.vision.v1.Produ" + - "ctSet\022\027\n\017next_page_token\030\002 \001(\t\"N\n\024GetPro" + - "ductSetRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vi" + - "sion.googleapis.com/ProductSet\"\210\001\n\027Updat" + - "eProductSetRequest\022<\n\013product_set\030\001 \001(\0132" + - "\".google.cloud.vision.v1.ProductSetB\003\340A\002" + - "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + - "FieldMask\"Q\n\027DeleteProductSetRequest\0226\n\004" + - "name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.co" + - "m/ProductSet\"\266\001\n\033CreateReferenceImageReq" + - "uest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.goo" + - "gleapis.com/Product\022D\n\017reference_image\030\002" + - " \001(\0132&.google.cloud.vision.v1.ReferenceI" + - "mageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001(\t\"z\n" + - "\032ListReferenceImagesRequest\0225\n\006parent\030\001 " + - "\001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/Produ" + - "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + - "\t\"\213\001\n\033ListReferenceImagesResponse\022@\n\020ref" + - "erence_images\030\001 \003(\0132&.google.cloud.visio" + - "n.v1.ReferenceImage\022\021\n\tpage_size\030\002 \001(\005\022\027" + - "\n\017next_page_token\030\003 \001(\t\"V\n\030GetReferenceI" + - "mageRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$visio" + - "n.googleapis.com/ReferenceImage\"Y\n\033Delet" + - "eReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340A" + - "\002\372A&\n$vision.googleapis.com/ReferenceIma" + - "ge\"\217\001\n\035AddProductToProductSetRequest\0226\n\004" + - "name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.co" + - "m/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037\n\035v" + - "ision.googleapis.com/Product\"\224\001\n\"RemoveP" + - "roductFromProductSetRequest\0226\n\004name\030\001 \001(" + - "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + - "Set\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037\n\035vision.goo" + - "gleapis.com/Product\"\200\001\n\037ListProductsInPr" + - "oductSetRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n v" + - "ision.googleapis.com/ProductSet\022\021\n\tpage_" + - "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"n\n ListPr" + - "oductsInProductSetResponse\0221\n\010products\030\001" + - " \003(\0132\037.google.cloud.vision.v1.Product\022\027\n" + - "\017next_page_token\030\002 \001(\t\"2\n\032ImportProductS" + - "etsGcsSource\022\024\n\014csv_file_uri\030\001 \001(\t\"r\n\034Im" + - "portProductSetsInputConfig\022H\n\ngcs_source" + - "\030\001 \001(\01322.google.cloud.vision.v1.ImportPr" + - "oductSetsGcsSourceH\000B\010\n\006source\"\246\001\n\030Impor" + - "tProductSetsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" + - "\372A#\n!locations.googleapis.com/Location\022O" + - "\n\014input_config\030\002 \001(\01324.google.cloud.visi" + - "on.v1.ImportProductSetsInputConfigB\003\340A\002\"" + - "\203\001\n\031ImportProductSetsResponse\022@\n\020referen" + - "ce_images\030\001 \003(\0132&.google.cloud.vision.v1" + - ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + - "le.rpc.Status\"\227\002\n\026BatchOperationMetadata" + - "\022C\n\005state\030\001 \001(\01624.google.cloud.vision.v1" + - ".BatchOperationMetadata.State\022/\n\013submit_" + - "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022," + - "\n\010end_time\030\003 \001(\0132\032.google.protobuf.Times" + - "tamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\016\n\n" + - "PROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006FAILED\020\003" + - "\022\r\n\tCANCELLED\020\004\"/\n\025ProductSetPurgeConfig" + - "\022\026\n\016product_set_id\030\001 \001(\t\"\337\001\n\024PurgeProduc" + - "tsRequest\022Q\n\030product_set_purge_config\030\002 " + - "\001(\0132-.google.cloud.vision.v1.ProductSetP" + - "urgeConfigH\000\022 \n\026delete_orphan_products\030\003" + - " \001(\010H\000\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + - "s.googleapis.com/Location\022\r\n\005force\030\004 \001(\010" + - "B\010\n\006target2\364\035\n\rProductSearch\022\321\001\n\020CreateP" + - "roductSet\022/.google.cloud.vision.v1.Creat" + - "eProductSetRequest\032\".google.cloud.vision" + - ".v1.ProductSet\"h\202\323\344\223\002>\"//v1/{parent=proj" + - "ects/*/locations/*}/productSets:\013product" + - "_set\332A!parent,product_set,product_set_id" + - "\022\264\001\n\017ListProductSets\022..google.cloud.visi" + - "on.v1.ListProductSetsRequest\032/.google.cl" + - "oud.vision.v1.ListProductSetsResponse\"@\202" + - "\323\344\223\0021\022//v1/{parent=projects/*/locations/" + - "*}/productSets\332A\006parent\022\241\001\n\rGetProductSe" + - "t\022,.google.cloud.vision.v1.GetProductSet" + - "Request\032\".google.cloud.vision.v1.Product" + - "Set\">\202\323\344\223\0021\022//v1/{name=projects/*/locati" + - "ons/*/productSets/*}\332A\004name\022\323\001\n\020UpdatePr" + - "oductSet\022/.google.cloud.vision.v1.Update" + - "ProductSetRequest\032\".google.cloud.vision." + - "v1.ProductSet\"j\202\323\344\223\002J2;/v1/{product_set." + - "name=projects/*/locations/*/productSets/" + - "*}:\013product_set\332A\027product_set,update_mas" + - "k\022\233\001\n\020DeleteProductSet\022/.google.cloud.vi" + - "sion.v1.DeleteProductSetRequest\032\026.google" + - ".protobuf.Empty\">\202\323\344\223\0021*//v1/{name=proje" + - "cts/*/locations/*/productSets/*}\332A\004name\022" + - "\271\001\n\rCreateProduct\022,.google.cloud.vision." + - "v1.CreateProductRequest\032\037.google.cloud.v" + - "ision.v1.Product\"Y\202\323\344\223\0027\",/v1/{parent=pr" + - "ojects/*/locations/*}/products:\007product\332" + - "A\031parent,product,product_id\022\250\001\n\014ListProd" + - "ucts\022+.google.cloud.vision.v1.ListProduc" + - "tsRequest\032,.google.cloud.vision.v1.ListP" + - "roductsResponse\"=\202\323\344\223\002.\022,/v1/{parent=pro" + - "jects/*/locations/*}/products\332A\006parent\022\225" + - "\001\n\nGetProduct\022).google.cloud.vision.v1.G" + - "etProductRequest\032\037.google.cloud.vision.v" + - "1.Product\";\202\323\344\223\002.\022,/v1/{name=projects/*/" + - "locations/*/products/*}\332A\004name\022\273\001\n\rUpdat" + - "eProduct\022,.google.cloud.vision.v1.Update" + - "ProductRequest\032\037.google.cloud.vision.v1." + - "Product\"[\202\323\344\223\002?24/v1/{product.name=proje" + - "cts/*/locations/*/products/*}:\007product\332A" + - "\023product,update_mask\022\222\001\n\rDeleteProduct\022," + - ".google.cloud.vision.v1.DeleteProductReq" + - "uest\032\026.google.protobuf.Empty\";\202\323\344\223\002.*,/v" + - "1/{name=projects/*/locations/*/products/" + - "*}\332A\004name\022\371\001\n\024CreateReferenceImage\0223.goo" + - "gle.cloud.vision.v1.CreateReferenceImage" + - "Request\032&.google.cloud.vision.v1.Referen" + - "ceImage\"\203\001\202\323\344\223\002Q\">/v1/{parent=projects/*" + - "/locations/*/products/*}/referenceImages" + - ":\017reference_image\332A)parent,reference_ima" + - "ge,reference_image_id\022\262\001\n\024DeleteReferenc" + - "eImage\0223.google.cloud.vision.v1.DeleteRe" + - "ferenceImageRequest\032\026.google.protobuf.Em" + - "pty\"M\202\323\344\223\002@*>/v1/{name=projects/*/locati" + - "ons/*/products/*/referenceImages/*}\332A\004na" + - "me\022\317\001\n\023ListReferenceImages\0222.google.clou" + - "d.vision.v1.ListReferenceImagesRequest\0323" + - ".google.cloud.vision.v1.ListReferenceIma" + - "gesResponse\"O\202\323\344\223\002@\022>/v1/{parent=project" + - "s/*/locations/*/products/*}/referenceIma" + - "ges\332A\006parent\022\274\001\n\021GetReferenceImage\0220.goo" + - "gle.cloud.vision.v1.GetReferenceImageReq" + - "uest\032&.google.cloud.vision.v1.ReferenceI" + - "mage\"M\202\323\344\223\002@\022>/v1/{name=projects/*/locat" + - "ions/*/products/*/referenceImages/*}\332A\004n" + - "ame\022\275\001\n\026AddProductToProductSet\0225.google." + - "cloud.vision.v1.AddProductToProductSetRe" + - "quest\032\026.google.protobuf.Empty\"T\202\323\344\223\002?\":/" + - "v1/{name=projects/*/locations/*/productS" + - "ets/*}:addProduct:\001*\332A\014name,product\022\312\001\n\033" + - "RemoveProductFromProductSet\022:.google.clo" + - "ud.vision.v1.RemoveProductFromProductSet" + - "Request\032\026.google.protobuf.Empty\"W\202\323\344\223\002B\"" + - "=/v1/{name=projects/*/locations/*/produc" + - "tSets/*}:removeProduct:\001*\332A\014name,product" + - "\022\326\001\n\030ListProductsInProductSet\0227.google.c" + - "loud.vision.v1.ListProductsInProductSetR" + - "equest\0328.google.cloud.vision.v1.ListProd" + - "uctsInProductSetResponse\"G\202\323\344\223\002:\0228/v1/{n" + - "ame=projects/*/locations/*/productSets/*" + - "}/products\332A\004name\022\364\001\n\021ImportProductSets\022" + - "0.google.cloud.vision.v1.ImportProductSe" + - "tsRequest\032\035.google.longrunning.Operation" + - "\"\215\001\202\323\344\223\002;\"6/v1/{parent=projects/*/locati" + - "ons/*}/productSets:import:\001*\332A\023parent,in" + - "put_config\312A3\n\031ImportProductSetsResponse" + - "\022\026BatchOperationMetadata\022\326\001\n\rPurgeProduc" + - "ts\022,.google.cloud.vision.v1.PurgeProduct" + - "sRequest\032\035.google.longrunning.Operation\"" + - "x\202\323\344\223\0027\"2/v1/{parent=projects/*/location" + - "s/*}/products:purge:\001*\332A\006parent\312A/\n\025goog" + - "le.protobuf.Empty\022\026BatchOperationMetadat" + - "a\032v\312A\025vision.googleapis.com\322A[https://ww" + - "w.googleapis.com/auth/cloud-platform,htt" + - "ps://www.googleapis.com/auth/cloud-visio" + - "nB\201\001\n\032com.google.cloud.vision.v1B\031Produc" + - "tSearchServiceProtoP\001Z - * A ProductSet contains Products. A ProductSet can contain a maximum of 1 - * million reference images. If the limit is exceeded, periodic indexing will - * fail. - * - * - * Protobuf type {@code google.cloud.vision.v1.ProductSet} - */ -public final class ProductSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSet) - ProductSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSet.newBuilder() to construct. - private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSet() { - name_ = ""; - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (indexError_ != null) { - subBuilder = indexError_.toBuilder(); - } - indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexError_); - indexError_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSet.class, com.google.cloud.vision.v1.ProductSet.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEX_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int INDEX_ERROR_FIELD_NUMBER = 4; - private com.google.rpc.Status indexError_; - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - @java.lang.Override - public boolean hasIndexError() { - return indexError_ != null; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - @java.lang.Override - public com.google.rpc.Status getIndexError() { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - return getIndexError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (indexTime_ != null) { - output.writeMessage(3, getIndexTime()); - } - if (indexError_ != null) { - output.writeMessage(4, getIndexError()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIndexTime()); - } - if (indexError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIndexError()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSet)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSet other = (com.google.cloud.vision.v1.ProductSet) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (hasIndexError() != other.hasIndexError()) return false; - if (hasIndexError()) { - if (!getIndexError() - .equals(other.getIndexError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (hasIndexError()) { - hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getIndexError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
-   * million reference images. If the limit is exceeded, periodic indexing will
-   * fail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSet) - com.google.cloud.vision.v1.ProductSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSet.class, com.google.cloud.vision.v1.ProductSet.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (indexErrorBuilder_ == null) { - indexError_ = null; - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSet_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet build() { - com.google.cloud.vision.v1.ProductSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet buildPartial() { - com.google.cloud.vision.v1.ProductSet result = new com.google.cloud.vision.v1.ProductSet(this); - result.name_ = name_; - result.displayName_ = displayName_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (indexErrorBuilder_ == null) { - result.indexError_ = indexError_; - } else { - result.indexError_ = indexErrorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSet) { - return mergeFrom((com.google.cloud.vision.v1.ProductSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSet other) { - if (other == com.google.cloud.vision.v1.ProductSet.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (other.hasIndexError()) { - mergeIndexError(other.getIndexError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private com.google.rpc.Status indexError_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - public boolean hasIndexError() { - return indexErrorBuilder_ != null || indexError_ != null; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - public com.google.rpc.Status getIndexError() { - if (indexErrorBuilder_ == null) { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } else { - return indexErrorBuilder_.getMessage(); - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexError_ = value; - onChanged(); - } else { - indexErrorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError( - com.google.rpc.Status.Builder builderForValue) { - if (indexErrorBuilder_ == null) { - indexError_ = builderForValue.build(); - onChanged(); - } else { - indexErrorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (indexError_ != null) { - indexError_ = - com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); - } else { - indexError_ = value; - } - onChanged(); - } else { - indexErrorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexError() { - if (indexErrorBuilder_ == null) { - indexError_ = null; - onChanged(); - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.Status.Builder getIndexErrorBuilder() { - - onChanged(); - return getIndexErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - if (indexErrorBuilder_ != null) { - return indexErrorBuilder_.getMessageOrBuilder(); - } else { - return indexError_ == null ? - com.google.rpc.Status.getDefaultInstance() : indexError_; - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getIndexErrorFieldBuilder() { - if (indexErrorBuilder_ == null) { - indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getIndexError(), - getParentForChildren(), - isClean()); - indexError_ = null; - } - return indexErrorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSet) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSet) - private static final com.google.cloud.vision.v1.ProductSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSet(); - } - - public static com.google.cloud.vision.v1.ProductSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java deleted file mode 100644 index 50c2e485af8f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductSetName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/productSets/{product_set}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String productSet; - - @Deprecated - protected ProductSetName() { - project = null; - location = null; - productSet = null; - } - - private ProductSetName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - productSet = Preconditions.checkNotNull(builder.getProductSet()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductSetName of(String project, String location, String productSet) { - return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); - } - - public static String format(String project, String location, String productSet) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProductSet(productSet) - .build() - .toString(); - } - - public static ProductSetName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_SET.validatedMatch( - formattedString, "ProductSetName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductSetName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (productSet != null) { - fieldMapBuilder.put("product_set", productSet); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_SET.instantiate( - "project", project, "location", location, "product_set", productSet); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductSetName that = ((ProductSetName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.productSet, that.productSet); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(productSet); - return h; - } - - /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ - public static class Builder { - private String project; - private String location; - private String productSet; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProductSet(String productSet) { - this.productSet = productSet; - return this; - } - - private Builder(ProductSetName productSetName) { - this.project = productSetName.project; - this.location = productSetName.location; - this.productSet = productSetName.productSet; - } - - public ProductSetName build() { - return new ProductSetName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java deleted file mode 100644 index e67969e951f4..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetOrBuilder.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ProductSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - boolean hasIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - com.google.rpc.Status getIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java deleted file mode 100644 index 158a7d1a8ab7..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfig.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Config to control which ProductSet contains the Products to be deleted.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSetPurgeConfig} - */ -public final class ProductSetPurgeConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ProductSetPurgeConfig) - ProductSetPurgeConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSetPurgeConfig.newBuilder() to construct. - private ProductSetPurgeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSetPurgeConfig() { - productSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSetPurgeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSetPurgeConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - productSetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder.class); - } - - public static final int PRODUCT_SET_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object productSetId_; - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - @java.lang.Override - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } - } - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, productSetId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, productSetId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ProductSetPurgeConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ProductSetPurgeConfig other = (com.google.cloud.vision.v1.ProductSetPurgeConfig) obj; - - if (!getProductSetId() - .equals(other.getProductSetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductSetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ProductSetPurgeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Config to control which ProductSet contains the Products to be deleted.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ProductSetPurgeConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ProductSetPurgeConfig) - com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ProductSetPurgeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - productSetId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig build() { - com.google.cloud.vision.v1.ProductSetPurgeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig buildPartial() { - com.google.cloud.vision.v1.ProductSetPurgeConfig result = new com.google.cloud.vision.v1.ProductSetPurgeConfig(this); - result.productSetId_ = productSetId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ProductSetPurgeConfig) { - return mergeFrom((com.google.cloud.vision.v1.ProductSetPurgeConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ProductSetPurgeConfig other) { - if (other == com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance()) return this; - if (!other.getProductSetId().isEmpty()) { - productSetId_ = other.productSetId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ProductSetPurgeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ProductSetPurgeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object productSetId_ = ""; - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @param value The productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSetId_ = value; - onChanged(); - return this; - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return This builder for chaining. - */ - public Builder clearProductSetId() { - - productSetId_ = getDefaultInstance().getProductSetId(); - onChanged(); - return this; - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @param value The bytes for productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSetId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ProductSetPurgeConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ProductSetPurgeConfig) - private static final com.google.cloud.vision.v1.ProductSetPurgeConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ProductSetPurgeConfig(); - } - - public static com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSetPurgeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSetPurgeConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java deleted file mode 100644 index 9909e1160c60..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSetPurgeConfigOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ProductSetPurgeConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ProductSetPurgeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - java.lang.String getProductSetId(); - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - com.google.protobuf.ByteString - getProductSetIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java deleted file mode 100644 index 6f500cdd8c3f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java +++ /dev/null @@ -1,842 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A `Property` consists of a user-supplied name/value pair.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Property} - */ -public final class Property extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Property) - PropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Property.newBuilder() to construct. - private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Property() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Property(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Property( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 24: { - - uint64Value_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Property.class, com.google.cloud.vision.v1.Property.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UINT64_VALUE_FIELD_NUMBER = 3; - private long uint64Value_; - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - if (uint64Value_ != 0L) { - output.writeUInt64(3, uint64Value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - if (uint64Value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, uint64Value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Property)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Property other = (com.google.cloud.vision.v1.Property) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (getUint64Value() - != other.getUint64Value()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Value()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Property parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Property parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Property parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Property parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Property parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Property parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Property parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Property parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Property parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Property parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Property parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Property parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Property prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `Property` consists of a user-supplied name/value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Property} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Property) - com.google.cloud.vision.v1.PropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Property.class, com.google.cloud.vision.v1.Property.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Property.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - uint64Value_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_Property_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Property getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Property.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Property build() { - com.google.cloud.vision.v1.Property result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Property buildPartial() { - com.google.cloud.vision.v1.Property result = new com.google.cloud.vision.v1.Property(this); - result.name_ = name_; - result.value_ = value_; - result.uint64Value_ = uint64Value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Property) { - return mergeFrom((com.google.cloud.vision.v1.Property)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Property other) { - if (other == com.google.cloud.vision.v1.Property.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getUint64Value() != 0L) { - setUint64Value(other.getUint64Value()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Property parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Property) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - - private long uint64Value_ ; - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @param value The uint64Value to set. - * @return This builder for chaining. - */ - public Builder setUint64Value(long value) { - - uint64Value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return This builder for chaining. - */ - public Builder clearUint64Value() { - - uint64Value_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Property) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Property) - private static final com.google.cloud.vision.v1.Property DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Property(); - } - - public static com.google.cloud.vision.v1.Property getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Property parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Property(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Property getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java deleted file mode 100644 index 5f764c7d0c8b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PropertyOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface PropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Property) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - long getUint64Value(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java deleted file mode 100644 index 8d70e226ff53..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequest.java +++ /dev/null @@ -1,1143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `PurgeProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.PurgeProductsRequest} - */ -public final class PurgeProductsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.PurgeProductsRequest) - PurgeProductsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use PurgeProductsRequest.newBuilder() to construct. - private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PurgeProductsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PurgeProductsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PurgeProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder subBuilder = null; - if (targetCase_ == 2) { - subBuilder = ((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_).toBuilder(); - } - target_ = - input.readMessage(com.google.cloud.vision.v1.ProductSetPurgeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); - target_ = subBuilder.buildPartial(); - } - targetCase_ = 2; - break; - } - case 24: { - target_ = input.readBool(); - targetCase_ = 3; - break; - } - case 32: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.PurgeProductsRequest.class, com.google.cloud.vision.v1.PurgeProductsRequest.Builder.class); - } - - private int targetCase_ = 0; - private java.lang.Object target_; - public enum TargetCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PRODUCT_SET_PURGE_CONFIG(2), - DELETE_ORPHAN_PRODUCTS(3), - TARGET_NOT_SET(0); - private final int value; - private TargetCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TargetCase valueOf(int value) { - return forNumber(value); - } - - public static TargetCase forNumber(int value) { - switch (value) { - case 2: return PRODUCT_SET_PURGE_CONFIG; - case 3: return DELETE_ORPHAN_PRODUCTS; - case 0: return TARGET_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public static final int PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER = 2; - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - @java.lang.Override - public boolean hasProductSetPurgeConfig() { - return targetCase_ == 2; - } - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig() { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - - public static final int DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER = 3; - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - @java.lang.Override - public boolean hasDeleteOrphanProducts() { - return targetCase_ == 3; - } - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - @java.lang.Override - public boolean getDeleteOrphanProducts() { - if (targetCase_ == 3) { - return (java.lang.Boolean) target_; - } - return false; - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 4; - private boolean force_; - /** - *
-   * The default value is false. Override this value to true to actually perform
-   * the purge.
-   * 
- * - * bool force = 4; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (targetCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); - } - if (targetCase_ == 3) { - output.writeBool( - 3, (boolean)((java.lang.Boolean) target_)); - } - if (force_ != false) { - output.writeBool(4, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (targetCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_); - } - if (targetCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 3, (boolean)((java.lang.Boolean) target_)); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.PurgeProductsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.PurgeProductsRequest other = (com.google.cloud.vision.v1.PurgeProductsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getForce() - != other.getForce()) return false; - if (!getTargetCase().equals(other.getTargetCase())) return false; - switch (targetCase_) { - case 2: - if (!getProductSetPurgeConfig() - .equals(other.getProductSetPurgeConfig())) return false; - break; - case 3: - if (getDeleteOrphanProducts() - != other.getDeleteOrphanProducts()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - switch (targetCase_) { - case 2: - hash = (37 * hash) + PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getProductSetPurgeConfig().hashCode(); - break; - case 3: - hash = (37 * hash) + DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDeleteOrphanProducts()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.PurgeProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.PurgeProductsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `PurgeProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.PurgeProductsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.PurgeProductsRequest) - com.google.cloud.vision.v1.PurgeProductsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.PurgeProductsRequest.class, com.google.cloud.vision.v1.PurgeProductsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.PurgeProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - force_ = false; - - targetCase_ = 0; - target_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.PurgeProductsRequest build() { - com.google.cloud.vision.v1.PurgeProductsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.PurgeProductsRequest buildPartial() { - com.google.cloud.vision.v1.PurgeProductsRequest result = new com.google.cloud.vision.v1.PurgeProductsRequest(this); - if (targetCase_ == 2) { - if (productSetPurgeConfigBuilder_ == null) { - result.target_ = target_; - } else { - result.target_ = productSetPurgeConfigBuilder_.build(); - } - } - if (targetCase_ == 3) { - result.target_ = target_; - } - result.parent_ = parent_; - result.force_ = force_; - result.targetCase_ = targetCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.PurgeProductsRequest) { - return mergeFrom((com.google.cloud.vision.v1.PurgeProductsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.PurgeProductsRequest other) { - if (other == com.google.cloud.vision.v1.PurgeProductsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - switch (other.getTargetCase()) { - case PRODUCT_SET_PURGE_CONFIG: { - mergeProductSetPurgeConfig(other.getProductSetPurgeConfig()); - break; - } - case DELETE_ORPHAN_PRODUCTS: { - setDeleteOrphanProducts(other.getDeleteOrphanProducts()); - break; - } - case TARGET_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.PurgeProductsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.PurgeProductsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int targetCase_ = 0; - private java.lang.Object target_; - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public Builder clearTarget() { - targetCase_ = 0; - target_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder> productSetPurgeConfigBuilder_; - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - @java.lang.Override - public boolean hasProductSetPurgeConfig() { - return targetCase_ == 2; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig() { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } else { - if (targetCase_ == 2) { - return productSetPurgeConfigBuilder_.getMessage(); - } - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder setProductSetPurgeConfig(com.google.cloud.vision.v1.ProductSetPurgeConfig value) { - if (productSetPurgeConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - onChanged(); - } else { - productSetPurgeConfigBuilder_.setMessage(value); - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder setProductSetPurgeConfig( - com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder builderForValue) { - if (productSetPurgeConfigBuilder_ == null) { - target_ = builderForValue.build(); - onChanged(); - } else { - productSetPurgeConfigBuilder_.setMessage(builderForValue.build()); - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder mergeProductSetPurgeConfig(com.google.cloud.vision.v1.ProductSetPurgeConfig value) { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2 && - target_ != com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance()) { - target_ = com.google.cloud.vision.v1.ProductSetPurgeConfig.newBuilder((com.google.cloud.vision.v1.ProductSetPurgeConfig) target_) - .mergeFrom(value).buildPartial(); - } else { - target_ = value; - } - onChanged(); - } else { - if (targetCase_ == 2) { - productSetPurgeConfigBuilder_.mergeFrom(value); - } else { - productSetPurgeConfigBuilder_.setMessage(value); - } - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder clearProductSetPurgeConfig() { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - } else { - if (targetCase_ == 2) { - targetCase_ = 0; - target_ = null; - } - productSetPurgeConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder getProductSetPurgeConfigBuilder() { - return getProductSetPurgeConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { - if ((targetCase_ == 2) && (productSetPurgeConfigBuilder_ != null)) { - return productSetPurgeConfigBuilder_.getMessageOrBuilder(); - } else { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder> - getProductSetPurgeConfigFieldBuilder() { - if (productSetPurgeConfigBuilder_ == null) { - if (!(targetCase_ == 2)) { - target_ = com.google.cloud.vision.v1.ProductSetPurgeConfig.getDefaultInstance(); - } - productSetPurgeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSetPurgeConfig, com.google.cloud.vision.v1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder>( - (com.google.cloud.vision.v1.ProductSetPurgeConfig) target_, - getParentForChildren(), - isClean()); - target_ = null; - } - targetCase_ = 2; - onChanged();; - return productSetPurgeConfigBuilder_; - } - - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - public boolean hasDeleteOrphanProducts() { - return targetCase_ == 3; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - public boolean getDeleteOrphanProducts() { - if (targetCase_ == 3) { - return (java.lang.Boolean) target_; - } - return false; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @param value The deleteOrphanProducts to set. - * @return This builder for chaining. - */ - public Builder setDeleteOrphanProducts(boolean value) { - targetCase_ = 3; - target_ = value; - onChanged(); - return this; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return This builder for chaining. - */ - public Builder clearDeleteOrphanProducts() { - if (targetCase_ == 3) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.PurgeProductsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.PurgeProductsRequest) - private static final com.google.cloud.vision.v1.PurgeProductsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.PurgeProductsRequest(); - } - - public static com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PurgeProductsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeProductsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.PurgeProductsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java deleted file mode 100644 index 57400ff88ae9..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/PurgeProductsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface PurgeProductsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.PurgeProductsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - boolean hasProductSetPurgeConfig(); - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - com.google.cloud.vision.v1.ProductSetPurgeConfig getProductSetPurgeConfig(); - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - com.google.cloud.vision.v1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder(); - - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - boolean hasDeleteOrphanProducts(); - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - boolean getDeleteOrphanProducts(); - - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The default value is false. Override this value to true to actually perform
-   * the purge.
-   * 
- * - * bool force = 4; - * @return The force. - */ - boolean getForce(); - - public com.google.cloud.vision.v1.PurgeProductsRequest.TargetCase getTargetCase(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java deleted file mode 100644 index c3d62d2d07b8..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java +++ /dev/null @@ -1,1372 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A `ReferenceImage` represents a product image and its associated metadata,
- * such as bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.ReferenceImage} - */ -public final class ReferenceImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.ReferenceImage) - ReferenceImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReferenceImage.newBuilder() to construct. - private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReferenceImage() { - name_ = ""; - uri_ = ""; - boundingPolys_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReferenceImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReferenceImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - boundingPolys_.add( - input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ReferenceImage.class, com.google.cloud.vision.v1.ReferenceImage.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - private volatile java.lang.Object uri_; - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; - private java.util.List boundingPolys_; - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List getBoundingPolysList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List - getBoundingPolysOrBuilderList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public int getBoundingPolysCount() { - return boundingPolys_.size(); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index) { - return boundingPolys_.get(index); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - return boundingPolys_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - output.writeMessage(3, boundingPolys_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, boundingPolys_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.ReferenceImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.ReferenceImage other = (com.google.cloud.vision.v1.ReferenceImage) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (!getBoundingPolysList() - .equals(other.getBoundingPolysList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (getBoundingPolysCount() > 0) { - hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPolysList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ReferenceImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.ReferenceImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `ReferenceImage` represents a product image and its associated metadata,
-   * such as bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.ReferenceImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.ReferenceImage) - com.google.cloud.vision.v1.ReferenceImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.ReferenceImage.class, com.google.cloud.vision.v1.ReferenceImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.ReferenceImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBoundingPolysFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uri_ = ""; - - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_ReferenceImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage build() { - com.google.cloud.vision.v1.ReferenceImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage buildPartial() { - com.google.cloud.vision.v1.ReferenceImage result = new com.google.cloud.vision.v1.ReferenceImage(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uri_ = uri_; - if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingPolys_ = boundingPolys_; - } else { - result.boundingPolys_ = boundingPolysBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.ReferenceImage) { - return mergeFrom((com.google.cloud.vision.v1.ReferenceImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.ReferenceImage other) { - if (other == com.google.cloud.vision.v1.ReferenceImage.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (boundingPolysBuilder_ == null) { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolys_.isEmpty()) { - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingPolysIsMutable(); - boundingPolys_.addAll(other.boundingPolys_); - } - onChanged(); - } - } else { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolysBuilder_.isEmpty()) { - boundingPolysBuilder_.dispose(); - boundingPolysBuilder_ = null; - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingPolysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBoundingPolysFieldBuilder() : null; - } else { - boundingPolysBuilder_.addAllMessages(other.boundingPolys_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.ReferenceImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.ReferenceImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private java.util.List boundingPolys_ = - java.util.Collections.emptyList(); - private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(boundingPolys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingPolysBuilder_; - - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List getBoundingPolysList() { - if (boundingPolysBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingPolys_); - } else { - return boundingPolysBuilder_.getMessageList(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public int getBoundingPolysCount() { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.size(); - } else { - return boundingPolysBuilder_.getCount(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); - } else { - return boundingPolysBuilder_.getMessage(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, value); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addAllBoundingPolys( - java.lang.Iterable values) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, boundingPolys_); - onChanged(); - } else { - boundingPolysBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearBoundingPolys() { - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.remove(index); - onChanged(); - } else { - boundingPolysBuilder_.remove(index); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().getBuilder(index); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); } else { - return boundingPolysBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysOrBuilderList() { - if (boundingPolysBuilder_ != null) { - return boundingPolysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingPolys_); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder() { - return getBoundingPolysFieldBuilder().addBuilder( - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysBuilderList() { - return getBoundingPolysFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingPolysFieldBuilder() { - if (boundingPolysBuilder_ == null) { - boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - boundingPolys_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingPolys_ = null; - } - return boundingPolysBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.ReferenceImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ReferenceImage) - private static final com.google.cloud.vision.v1.ReferenceImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.ReferenceImage(); - } - - public static com.google.cloud.vision.v1.ReferenceImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReferenceImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReferenceImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.ReferenceImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java deleted file mode 100644 index de1c28eba0ab..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageName.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ReferenceImageName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - private final String referenceImage; - - @Deprecated - protected ReferenceImageName() { - project = null; - location = null; - product = null; - referenceImage = null; - } - - private ReferenceImageName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ReferenceImageName of( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build(); - } - - public static String format( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build() - .toString(); - } - - public static ReferenceImageName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( - formattedString, "ReferenceImageName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("product"), - matchMap.get("reference_image")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ReferenceImageName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - if (referenceImage != null) { - fieldMapBuilder.put("reference_image", referenceImage); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( - "project", - project, - "location", - location, - "product", - product, - "reference_image", - referenceImage); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ReferenceImageName that = ((ReferenceImageName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product) - && Objects.equals(this.referenceImage, that.referenceImage); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - h *= 1000003; - h ^= Objects.hashCode(referenceImage); - return h; - } - - /** - * Builder for - * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. - */ - public static class Builder { - private String project; - private String location; - private String product; - private String referenceImage; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - public Builder setReferenceImage(String referenceImage) { - this.referenceImage = referenceImage; - return this; - } - - private Builder(ReferenceImageName referenceImageName) { - this.project = referenceImageName.project; - this.location = referenceImageName.location; - this.product = referenceImageName.product; - this.referenceImage = referenceImageName.referenceImage; - } - - public ReferenceImageName build() { - return new ReferenceImageName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java deleted file mode 100644 index 277ffca2e83c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImageOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface ReferenceImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.ReferenceImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingPolys(int index); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getBoundingPolysCount(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysOrBuilderList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java deleted file mode 100644 index 0764b44491a2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `RemoveProductFromProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.RemoveProductFromProductSetRequest} - */ -public final class RemoveProductFromProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.RemoveProductFromProductSetRequest) - RemoveProductFromProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveProductFromProductSetRequest.newBuilder() to construct. - private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveProductFromProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveProductFromProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RemoveProductFromProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.RemoveProductFromProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `RemoveProductFromProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.RemoveProductFromProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.RemoveProductFromProductSetRequest) - com.google.cloud.vision.v1.RemoveProductFromProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest build() { - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest buildPartial() { - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1.RemoveProductFromProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.RemoveProductFromProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest other) { - if (other == com.google.cloud.vision.v1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.RemoveProductFromProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.RemoveProductFromProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.RemoveProductFromProductSetRequest) - private static final com.google.cloud.vision.v1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.RemoveProductFromProductSetRequest(); - } - - public static com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveProductFromProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveProductFromProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java deleted file mode 100644 index 9948cf3c64da..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface RemoveProductFromProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.RemoveProductFromProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java deleted file mode 100644 index 5875814d5817..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Set of features pertaining to the image, computed by computer vision
- * methods over safe-search verticals (for example, adult, spoof, medical,
- * violence).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.SafeSearchAnnotation} - */ -public final class SafeSearchAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.SafeSearchAnnotation) - SafeSearchAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use SafeSearchAnnotation.newBuilder() to construct. - private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SafeSearchAnnotation() { - adult_ = 0; - spoof_ = 0; - medical_ = 0; - violence_ = 0; - racy_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SafeSearchAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SafeSearchAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - adult_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - spoof_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - medical_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - violence_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - racy_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.SafeSearchAnnotation.class, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder.class); - } - - public static final int ADULT_FIELD_NUMBER = 1; - private int adult_; - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SPOOF_FIELD_NUMBER = 2; - private int spoof_; - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int MEDICAL_FIELD_NUMBER = 3; - private int medical_; - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int VIOLENCE_FIELD_NUMBER = 4; - private int violence_; - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RACY_FIELD_NUMBER = 9; - private int racy_; - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override public com.google.cloud.vision.v1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adult_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, racy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adult_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, racy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.SafeSearchAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.SafeSearchAnnotation other = (com.google.cloud.vision.v1.SafeSearchAnnotation) obj; - - if (adult_ != other.adult_) return false; - if (spoof_ != other.spoof_) return false; - if (medical_ != other.medical_) return false; - if (violence_ != other.violence_) return false; - if (racy_ != other.racy_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADULT_FIELD_NUMBER; - hash = (53 * hash) + adult_; - hash = (37 * hash) + SPOOF_FIELD_NUMBER; - hash = (53 * hash) + spoof_; - hash = (37 * hash) + MEDICAL_FIELD_NUMBER; - hash = (53 * hash) + medical_; - hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; - hash = (53 * hash) + violence_; - hash = (37 * hash) + RACY_FIELD_NUMBER; - hash = (53 * hash) + racy_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.SafeSearchAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of features pertaining to the image, computed by computer vision
-   * methods over safe-search verticals (for example, adult, spoof, medical,
-   * violence).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.SafeSearchAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.SafeSearchAnnotation) - com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.SafeSearchAnnotation.class, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.SafeSearchAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adult_ = 0; - - spoof_ = 0; - - medical_ = 0; - - violence_ = 0; - - racy_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotation build() { - com.google.cloud.vision.v1.SafeSearchAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotation buildPartial() { - com.google.cloud.vision.v1.SafeSearchAnnotation result = new com.google.cloud.vision.v1.SafeSearchAnnotation(this); - result.adult_ = adult_; - result.spoof_ = spoof_; - result.medical_ = medical_; - result.violence_ = violence_; - result.racy_ = racy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.SafeSearchAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.SafeSearchAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.SafeSearchAnnotation other) { - if (other == com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()) return this; - if (other.adult_ != 0) { - setAdultValue(other.getAdultValue()); - } - if (other.spoof_ != 0) { - setSpoofValue(other.getSpoofValue()); - } - if (other.medical_ != 0) { - setMedicalValue(other.getMedicalValue()); - } - if (other.violence_ != 0) { - setViolenceValue(other.getViolenceValue()); - } - if (other.racy_ != 0) { - setRacyValue(other.getRacyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.SafeSearchAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.SafeSearchAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int adult_ = 0; - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @param value The enum numeric value on the wire for adult to set. - * @return This builder for chaining. - */ - public Builder setAdultValue(int value) { - - adult_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @param value The adult to set. - * @return This builder for chaining. - */ - public Builder setAdult(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - adult_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return This builder for chaining. - */ - public Builder clearAdult() { - - adult_ = 0; - onChanged(); - return this; - } - - private int spoof_ = 0; - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @param value The enum numeric value on the wire for spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoofValue(int value) { - - spoof_ = value; - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @param value The spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoof(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - spoof_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return This builder for chaining. - */ - public Builder clearSpoof() { - - spoof_ = 0; - onChanged(); - return this; - } - - private int medical_ = 0; - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @param value The enum numeric value on the wire for medical to set. - * @return This builder for chaining. - */ - public Builder setMedicalValue(int value) { - - medical_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @param value The medical to set. - * @return This builder for chaining. - */ - public Builder setMedical(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - medical_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return This builder for chaining. - */ - public Builder clearMedical() { - - medical_ = 0; - onChanged(); - return this; - } - - private int violence_ = 0; - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @param value The enum numeric value on the wire for violence to set. - * @return This builder for chaining. - */ - public Builder setViolenceValue(int value) { - - violence_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @param value The violence to set. - * @return This builder for chaining. - */ - public Builder setViolence(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - violence_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return This builder for chaining. - */ - public Builder clearViolence() { - - violence_ = 0; - onChanged(); - return this; - } - - private int racy_ = 0; - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @param value The enum numeric value on the wire for racy to set. - * @return This builder for chaining. - */ - public Builder setRacyValue(int value) { - - racy_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.Likelihood result = com.google.cloud.vision.v1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @param value The racy to set. - * @return This builder for chaining. - */ - public Builder setRacy(com.google.cloud.vision.v1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - racy_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return This builder for chaining. - */ - public Builder clearRacy() { - - racy_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.SafeSearchAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.SafeSearchAnnotation) - private static final com.google.cloud.vision.v1.SafeSearchAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.SafeSearchAnnotation(); - } - - public static com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafeSearchAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SafeSearchAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.SafeSearchAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java deleted file mode 100644 index 482f3c3cc2f1..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotationOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface SafeSearchAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.SafeSearchAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - int getAdultValue(); - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1.Likelihood adult = 1; - * @return The adult. - */ - com.google.cloud.vision.v1.Likelihood getAdult(); - - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - int getSpoofValue(); - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1.Likelihood spoof = 2; - * @return The spoof. - */ - com.google.cloud.vision.v1.Likelihood getSpoof(); - - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - int getMedicalValue(); - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1.Likelihood medical = 3; - * @return The medical. - */ - com.google.cloud.vision.v1.Likelihood getMedical(); - - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - int getViolenceValue(); - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1.Likelihood violence = 4; - * @return The violence. - */ - com.google.cloud.vision.v1.Likelihood getViolence(); - - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - int getRacyValue(); - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1.Likelihood racy = 9; - * @return The racy. - */ - com.google.cloud.vision.v1.Likelihood getRacy(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java deleted file mode 100644 index 6b2fa642c87b..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A single symbol representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Symbol} - */ -public final class Symbol extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Symbol) - SymbolOrBuilder { -private static final long serialVersionUID = 0L; - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Symbol() { - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Symbol(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Symbol( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Symbol.class, com.google.cloud.vision.v1.Symbol.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object text_; - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Symbol)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Symbol other = (com.google.cloud.vision.v1.Symbol) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Symbol parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Symbol prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single symbol representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Symbol} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Symbol) - com.google.cloud.vision.v1.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Symbol.class, com.google.cloud.vision.v1.Symbol.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - text_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Symbol_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Symbol getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Symbol.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Symbol build() { - com.google.cloud.vision.v1.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Symbol buildPartial() { - com.google.cloud.vision.v1.Symbol result = new com.google.cloud.vision.v1.Symbol(this); - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.text_ = text_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Symbol) { - return mergeFrom((com.google.cloud.vision.v1.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Symbol other) { - if (other == com.google.cloud.vision.v1.Symbol.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Symbol) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Symbol) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Symbol) - private static final com.google.cloud.vision.v1.Symbol DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Symbol(); - } - - public static com.google.cloud.vision.v1.Symbol getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Symbol getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java deleted file mode 100644 index aaa4693159ec..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SymbolOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Symbol) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java deleted file mode 100644 index 4db8ca068034..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java +++ /dev/null @@ -1,3812 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -/** - *
- * TextAnnotation contains a structured representation of OCR extracted text.
- * The hierarchy of an OCR extracted text structure is like this:
- *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
- * Each structural component, starting from Page, may further have their own
- * properties. Properties describe detected languages, breaks etc.. Please refer
- * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more
- * detail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation} - */ -public final class TextAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation) - TextAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextAnnotation.newBuilder() to construct. - private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextAnnotation() { - pages_ = java.util.Collections.emptyList(); - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pages_.add( - input.readMessage(com.google.cloud.vision.v1.Page.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.class, com.google.cloud.vision.v1.TextAnnotation.Builder.class); - } - - public interface DetectedLanguageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - } - /** - *
-   * Detected language for a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedLanguage} - */ - public static final class DetectedLanguage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedLanguage() { - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedLanguage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedLanguage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder.class); - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) obj; - - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedLanguage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - languageCode_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage build() { - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage buildPartial() { - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage(this); - result.languageCode_ = languageCode_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) { - return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage other) { - if (other == com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.DetectedLanguage) - private static final com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage(); - } - - public static com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedLanguage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectedBreakOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType(); - - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - boolean getIsPrefix(); - } - /** - *
-   * Detected start or end of a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak} - */ - public static final class DetectedBreak extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedBreak() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedBreak(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedBreak( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - isPrefix_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder.class); - } - - /** - *
-     * Enum to denote the type of break found. New line, space etc.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType} - */ - public enum BreakType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - SURE_SPACE(2), - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - EOL_SURE_SPACE(3), - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - HYPHEN(4), - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - LINE_BREAK(5), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - public static final int SURE_SPACE_VALUE = 2; - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - public static final int EOL_SURE_SPACE_VALUE = 3; - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - public static final int HYPHEN_VALUE = 4; - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - public static final int LINE_BREAK_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BreakType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BreakType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SPACE; - case 2: return SURE_SPACE; - case 3: return EOL_SURE_SPACE; - case 4: return HYPHEN; - case 5: return LINE_BREAK; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BreakType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BreakType findValueByNumber(int number) { - return BreakType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); - } - - private static final BreakType[] VALUES = values(); - - public static BreakType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BreakType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - - public static final int IS_PREFIX_FIELD_NUMBER = 2; - private boolean isPrefix_; - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (isPrefix_ != false) { - output.writeBool(2, isPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (isPrefix_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, isPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedBreak)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) obj; - - if (type_ != other.type_) return false; - if (getIsPrefix() - != other.getIsPrefix()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPrefix()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected start or end of a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.DetectedBreak} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.DetectedBreak) - com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - isPrefix_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak build() { - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak buildPartial() { - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1.TextAnnotation.DetectedBreak(this); - result.type_ = type_; - result.isPrefix_ = isPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) { - return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.DetectedBreak)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak other) { - if (other == com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsPrefix() != false) { - setIsPrefix(other.getIsPrefix()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isPrefix_ ; - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @param value The isPrefix to set. - * @return This builder for chaining. - */ - public Builder setIsPrefix(boolean value) { - - isPrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearIsPrefix() { - - isPrefix_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.DetectedBreak) - private static final com.google.cloud.vision.v1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.DetectedBreak(); - } - - public static com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedBreak(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TextPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation.TextProperty) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - int getDetectedLanguagesCount(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesOrBuilderList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index); - - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - boolean hasDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); - } - /** - *
-   * Additional information detected on the structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.TextProperty} - */ - public static final class TextProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextAnnotation.TextProperty) - TextPropertyOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextProperty.newBuilder() to construct. - private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextProperty() { - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextProperty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextProperty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectedLanguages_.add( - input.readMessage(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder subBuilder = null; - if (detectedBreak_ != null) { - subBuilder = detectedBreak_.toBuilder(); - } - detectedBreak_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectedBreak_); - detectedBreak_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder.class); - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; - private java.util.List detectedLanguages_; - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - return detectedLanguages_.get(index); - } - - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_; - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak() { - return detectedBreak_ == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - return getDetectedBreak(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetectedBreak()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation.TextProperty)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1.TextAnnotation.TextProperty) obj; - - if (!getDetectedLanguagesList() - .equals(other.getDetectedLanguagesList())) return false; - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak() - .equals(other.getDetectedBreak())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation.TextProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Additional information detected on the structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation.TextProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation.TextProperty) - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectedLanguagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectedLanguagesBuilder_.clear(); - } - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty build() { - com.google.cloud.vision.v1.TextAnnotation.TextProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty buildPartial() { - com.google.cloud.vision.v1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1.TextAnnotation.TextProperty(this); - int from_bitField0_ = bitField0_; - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (detectedBreakBuilder_ == null) { - result.detectedBreak_ = detectedBreak_; - } else { - result.detectedBreak_ = detectedBreakBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.TextAnnotation.TextProperty) { - return mergeFrom((com.google.cloud.vision.v1.TextAnnotation.TextProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation.TextProperty other) { - if (other == com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance()) return this; - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectedLanguagesFieldBuilder() : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.TextAnnotation.TextProperty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List detectedLanguages_ = - java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; - - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages(com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return detectedBreakBuilder_ != null || detectedBreak_ != null; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null ? com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - onChanged(); - } else { - detectedBreakBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak( - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - onChanged(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder mergeDetectedBreak(com.google.cloud.vision.v1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (detectedBreak_ != null) { - detectedBreak_ = - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); - } else { - detectedBreak_ = value; - } - onChanged(); - } else { - detectedBreakBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder clearDetectedBreak() { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - onChanged(); - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { - - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null ? - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedBreakOrBuilder>( - getDetectedBreak(), - getParentForChildren(), - isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation.TextProperty) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation.TextProperty) - private static final com.google.cloud.vision.v1.TextAnnotation.TextProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation.TextProperty(); - } - - public static com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextProperty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PAGES_FIELD_NUMBER = 1; - private java.util.List pages_; - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - @java.lang.Override - public java.util.List getPagesList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - @java.lang.Override - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - @java.lang.Override - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Page getPages(int index) { - return pages_.get(index); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.TextAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.TextAnnotation other = (com.google.cloud.vision.v1.TextAnnotation) obj; - - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!getText() - .equals(other.getText())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.TextAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * TextAnnotation contains a structured representation of OCR extracted text.
-   * The hierarchy of an OCR extracted text structure is like this:
-   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
-   * Each structural component, starting from Page, may further have their own
-   * properties. Properties describe detected languages, breaks etc.. Please refer
-   * to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more
-   * detail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextAnnotation) - com.google.cloud.vision.v1.TextAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextAnnotation.class, com.google.cloud.vision.v1.TextAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.TextAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pagesBuilder_.clear(); - } - text_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation build() { - com.google.cloud.vision.v1.TextAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation buildPartial() { - com.google.cloud.vision.v1.TextAnnotation result = new com.google.cloud.vision.v1.TextAnnotation(this); - int from_bitField0_ = bitField0_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - result.text_ = text_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.TextAnnotation) { - return mergeFrom((com.google.cloud.vision.v1.TextAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.TextAnnotation other) { - if (other == com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()) return this; - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - pagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.TextAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.TextAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder> pagesBuilder_; - - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public com.google.cloud.vision.v1.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder addPages(com.google.cloud.vision.v1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder addPages( - com.google.cloud.vision.v1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public com.google.cloud.vision.v1.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public com.google.cloud.vision.v1.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public com.google.cloud.vision.v1.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation) - private static final com.google.cloud.vision.v1.TextAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextAnnotation(); - } - - public static com.google.cloud.vision.v1.TextAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java deleted file mode 100644 index 5a686b18b66c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface TextAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - java.util.List - getPagesList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - com.google.cloud.vision.v1.Page getPages(int index); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - int getPagesCount(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - java.util.List - getPagesOrBuilderList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1.Page pages = 1; - */ - com.google.cloud.vision.v1.PageOrBuilder getPagesOrBuilder( - int index); - - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java deleted file mode 100644 index 5a8c2333e26c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotationProto.java +++ /dev/null @@ -1,183 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public final class TextAnnotationProto { - private TextAnnotationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_TextAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_TextAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_TextAnnotation_DetectedLanguage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_TextAnnotation_DetectedBreak_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_TextAnnotation_TextProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Page_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Page_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Block_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Block_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Paragraph_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Paragraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Word_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Word_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_Symbol_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_Symbol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1/text_annotation" + - ".proto\022\026google.cloud.vision.v1\032%google/c" + - "loud/vision/v1/geometry.proto\"\226\004\n\016TextAn" + - "notation\022+\n\005pages\030\001 \003(\0132\034.google.cloud.v" + - "ision.v1.Page\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedL" + - "anguage\022\025\n\rlanguage_code\030\001 \001(\t\022\022\n\nconfid" + - "ence\030\002 \001(\002\032\325\001\n\rDetectedBreak\022L\n\004type\030\001 \001" + - "(\0162>.google.cloud.vision.v1.TextAnnotati" + - "on.DetectedBreak.BreakType\022\021\n\tis_prefix\030" + - "\002 \001(\010\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE" + - "\020\001\022\016\n\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n" + - "\n\006HYPHEN\020\004\022\016\n\nLINE_BREAK\020\005\032\261\001\n\014TextPrope" + - "rty\022S\n\022detected_languages\030\001 \003(\01327.google" + - ".cloud.vision.v1.TextAnnotation.Detected" + - "Language\022L\n\016detected_break\030\002 \001(\01324.googl" + - "e.cloud.vision.v1.TextAnnotation.Detecte" + - "dBreak\"\257\001\n\004Page\022E\n\010property\030\001 \001(\01323.goog" + - "le.cloud.vision.v1.TextAnnotation.TextPr" + - "operty\022\r\n\005width\030\002 \001(\005\022\016\n\006height\030\003 \001(\005\022-\n" + - "\006blocks\030\004 \003(\0132\035.google.cloud.vision.v1.B" + - "lock\022\022\n\nconfidence\030\005 \001(\002\"\346\002\n\005Block\022E\n\010pr" + - "operty\030\001 \001(\01323.google.cloud.vision.v1.Te" + - "xtAnnotation.TextProperty\022:\n\014bounding_bo" + - "x\030\002 \001(\0132$.google.cloud.vision.v1.Boundin" + - "gPoly\0225\n\nparagraphs\030\003 \003(\0132!.google.cloud" + - ".vision.v1.Paragraph\022;\n\nblock_type\030\004 \001(\016" + - "2\'.google.cloud.vision.v1.Block.BlockTyp" + - "e\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBlockType\022\013\n\007UN" + - "KNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022\013\n\007PICTURE\020" + - "\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\317\001\n\tParagraph\022" + - "E\n\010property\030\001 \001(\01323.google.cloud.vision." + - "v1.TextAnnotation.TextProperty\022:\n\014boundi" + - "ng_box\030\002 \001(\0132$.google.cloud.vision.v1.Bo" + - "undingPoly\022+\n\005words\030\003 \003(\0132\034.google.cloud" + - ".vision.v1.Word\022\022\n\nconfidence\030\004 \001(\002\"\316\001\n\004" + - "Word\022E\n\010property\030\001 \001(\01323.google.cloud.vi" + - "sion.v1.TextAnnotation.TextProperty\022:\n\014b" + - "ounding_box\030\002 \001(\0132$.google.cloud.vision." + - "v1.BoundingPoly\022/\n\007symbols\030\003 \003(\0132\036.googl" + - "e.cloud.vision.v1.Symbol\022\022\n\nconfidence\030\004" + - " \001(\002\"\255\001\n\006Symbol\022E\n\010property\030\001 \001(\01323.goog" + - "le.cloud.vision.v1.TextAnnotation.TextPr" + - "operty\022:\n\014bounding_box\030\002 \001(\0132$.google.cl" + - "oud.vision.v1.BoundingPoly\022\014\n\004text\030\003 \001(\t" + - "\022\022\n\nconfidence\030\004 \001(\002B{\n\032com.google.cloud" + - ".vision.v1B\023TextAnnotationProtoP\001Z - * Parameters for text detections. This is used to control TEXT_DETECTION and - * DOCUMENT_TEXT_DETECTION features. - * - * - * Protobuf type {@code google.cloud.vision.v1.TextDetectionParams} - */ -public final class TextDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.TextDetectionParams) - TextDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextDetectionParams.newBuilder() to construct. - private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextDetectionParams() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 72: { - - enableTextDetectionConfidenceScore_ = input.readBool(); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advancedOcrOptions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextDetectionParams.class, com.google.cloud.vision.v1.TextDetectionParams.Builder.class); - } - - public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; - private boolean enableTextDetectionConfidenceScore_; - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - - public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList advancedOcrOptions_; - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_; - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enableTextDetectionConfidenceScore_ != false) { - output.writeBool(9, enableTextDetectionConfidenceScore_); - } - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableTextDetectionConfidenceScore_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, enableTextDetectionConfidenceScore_); - } - { - int dataSize = 0; - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdvancedOcrOptionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.TextDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.TextDetectionParams other = (com.google.cloud.vision.v1.TextDetectionParams) obj; - - if (getEnableTextDetectionConfidenceScore() - != other.getEnableTextDetectionConfidenceScore()) return false; - if (!getAdvancedOcrOptionsList() - .equals(other.getAdvancedOcrOptionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableTextDetectionConfidenceScore()); - if (getAdvancedOcrOptionsCount() > 0) { - hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.TextDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for text detections. This is used to control TEXT_DETECTION and
-   * DOCUMENT_TEXT_DETECTION features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.TextDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.TextDetectionParams) - com.google.cloud.vision.v1.TextDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.TextDetectionParams.class, com.google.cloud.vision.v1.TextDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.TextDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - enableTextDetectionConfidenceScore_ = false; - - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_TextDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParams build() { - com.google.cloud.vision.v1.TextDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParams buildPartial() { - com.google.cloud.vision.v1.TextDetectionParams result = new com.google.cloud.vision.v1.TextDetectionParams(this); - int from_bitField0_ = bitField0_; - result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; - if (((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.advancedOcrOptions_ = advancedOcrOptions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.TextDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1.TextDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.TextDetectionParams other) { - if (other == com.google.cloud.vision.v1.TextDetectionParams.getDefaultInstance()) return this; - if (other.getEnableTextDetectionConfidenceScore() != false) { - setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); - } - if (!other.advancedOcrOptions_.isEmpty()) { - if (advancedOcrOptions_.isEmpty()) { - advancedOcrOptions_ = other.advancedOcrOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.addAll(other.advancedOcrOptions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.TextDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.TextDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean enableTextDetectionConfidenceScore_ ; - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @param value The enableTextDetectionConfidenceScore to set. - * @return This builder for chaining. - */ - public Builder setEnableTextDetectionConfidenceScore(boolean value) { - - enableTextDetectionConfidenceScore_ = value; - onChanged(); - return this; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return This builder for chaining. - */ - public Builder clearEnableTextDetectionConfidenceScore() { - - enableTextDetectionConfidenceScore_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdvancedOcrOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_.getUnmodifiableView(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index to set the value at. - * @param value The advancedOcrOptions to set. - * @return This builder for chaining. - */ - public Builder setAdvancedOcrOptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param values The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAllAdvancedOcrOptions( - java.lang.Iterable values) { - ensureAdvancedOcrOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, advancedOcrOptions_); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return This builder for chaining. - */ - public Builder clearAdvancedOcrOptions() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The bytes of the advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.TextDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextDetectionParams) - private static final com.google.cloud.vision.v1.TextDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.TextDetectionParams(); - } - - public static com.google.cloud.vision.v1.TextDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.TextDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java deleted file mode 100644 index 2a652659af9e..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextDetectionParamsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface TextDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.TextDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - boolean getEnableTextDetectionConfidenceScore(); - - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - java.util.List - getAdvancedOcrOptionsList(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - int getAdvancedOcrOptionsCount(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - java.lang.String getAdvancedOcrOptions(int index); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java deleted file mode 100644 index 98b42fb202e9..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `UpdateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.UpdateProductRequest} - */ -public final class UpdateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.UpdateProductRequest) - UpdateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductRequest.newBuilder() to construct. - private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.UpdateProductRequest.class, com.google.cloud.vision.v1.UpdateProductRequest.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.Product product_; - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.UpdateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.UpdateProductRequest other = (com.google.cloud.vision.v1.UpdateProductRequest) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.UpdateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.UpdateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.UpdateProductRequest) - com.google.cloud.vision.v1.UpdateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.UpdateProductRequest.class, com.google.cloud.vision.v1.UpdateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductRequest build() { - com.google.cloud.vision.v1.UpdateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductRequest buildPartial() { - com.google.cloud.vision.v1.UpdateProductRequest result = new com.google.cloud.vision.v1.UpdateProductRequest(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.UpdateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1.UpdateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.UpdateProductRequest other) { - if (other == com.google.cloud.vision.v1.UpdateProductRequest.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.UpdateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.UpdateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.UpdateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.UpdateProductRequest) - private static final com.google.cloud.vision.v1.UpdateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.UpdateProductRequest(); - } - - public static com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java deleted file mode 100644 index 7126cf1c1fed..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface UpdateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.UpdateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1.Product getProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java deleted file mode 100644 index 92c5cb77ecd9..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java +++ /dev/null @@ -1,937 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Request message for the `UpdateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.UpdateProductSetRequest} - */ -public final class UpdateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.UpdateProductSetRequest) - UpdateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductSetRequest.newBuilder() to construct. - private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductSetRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.UpdateProductSetRequest.class, com.google.cloud.vision.v1.UpdateProductSetRequest.Builder.class); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (productSet_ != null) { - output.writeMessage(1, getProductSet()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProductSet()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.UpdateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.UpdateProductSetRequest other = (com.google.cloud.vision.v1.UpdateProductSetRequest) obj; - - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.UpdateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.UpdateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.UpdateProductSetRequest) - com.google.cloud.vision.v1.UpdateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.UpdateProductSetRequest.class, com.google.cloud.vision.v1.UpdateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.UpdateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductSetRequest build() { - com.google.cloud.vision.v1.UpdateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductSetRequest buildPartial() { - com.google.cloud.vision.v1.UpdateProductSetRequest result = new com.google.cloud.vision.v1.UpdateProductSetRequest(this); - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.UpdateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1.UpdateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.UpdateProductSetRequest other) { - if (other == com.google.cloud.vision.v1.UpdateProductSetRequest.getDefaultInstance()) return this; - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.UpdateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.UpdateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.UpdateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.UpdateProductSetRequest) - private static final com.google.cloud.vision.v1.UpdateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.UpdateProductSetRequest(); - } - - public static com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.UpdateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java deleted file mode 100644 index 5b04f5d58185..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/product_search_service.proto - -package com.google.cloud.vision.v1; - -public interface UpdateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.UpdateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java deleted file mode 100644 index c121a38abf70..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the vertex coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.Vertex} - */ -public final class Vertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Vertex) - VertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use Vertex.newBuilder() to construct. - private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Vertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Vertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - x_ = input.readInt32(); - break; - } - case 16: { - - y_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Vertex.class, com.google.cloud.vision.v1.Vertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private int x_; - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private int y_; - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (x_ != 0) { - output.writeInt32(1, x_); - } - if (y_ != 0) { - output.writeInt32(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, x_); - } - if (y_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Vertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Vertex other = (com.google.cloud.vision.v1.Vertex) obj; - - if (getX() - != other.getX()) return false; - if (getY() - != other.getY()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX(); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Vertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Vertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Vertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Vertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Vertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Vertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the vertex coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Vertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Vertex) - com.google.cloud.vision.v1.VertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Vertex.class, com.google.cloud.vision.v1.Vertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Vertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0; - - y_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.GeometryProto.internal_static_google_cloud_vision_v1_Vertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Vertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Vertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Vertex build() { - com.google.cloud.vision.v1.Vertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Vertex buildPartial() { - com.google.cloud.vision.v1.Vertex result = new com.google.cloud.vision.v1.Vertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Vertex) { - return mergeFrom((com.google.cloud.vision.v1.Vertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Vertex other) { - if (other == com.google.cloud.vision.v1.Vertex.getDefaultInstance()) return this; - if (other.getX() != 0) { - setX(other.getX()); - } - if (other.getY() != 0) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Vertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Vertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(int value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0; - onChanged(); - return this; - } - - private int y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Vertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Vertex) - private static final com.google.cloud.vision.v1.Vertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Vertex(); - } - - public static com.google.cloud.vision.v1.Vertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Vertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Vertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Vertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java deleted file mode 100644 index 174b9650b559..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/VertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/geometry.proto - -package com.google.cloud.vision.v1; - -public interface VertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Vertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - int getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - int getY(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java deleted file mode 100644 index 77a0f6ab3ef2..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java +++ /dev/null @@ -1,7560 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/web_detection.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Relevant information for the image from the Internet.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection} - */ -public final class WebDetection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection) - WebDetectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetection.newBuilder() to construct. - private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetection() { - webEntities_ = java.util.Collections.emptyList(); - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - visuallySimilarImages_ = java.util.Collections.emptyList(); - bestGuessLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - webEntities_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebEntity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pagesWithMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebPage.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - visuallySimilarImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bestGuessLabels_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebLabel.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.class, com.google.cloud.vision.v1.WebDetection.Builder.class); - } - - public interface WebEntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebEntity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - *
-   * Entity deduced from similar images on the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity} - */ - public static final class WebEntity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebEntity) - WebEntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebEntity.newBuilder() to construct. - private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebEntity() { - entityId_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebEntity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebEntity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - entityId_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebEntity.class, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object entityId_; - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebEntity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetection.WebEntity other = (com.google.cloud.vision.v1.WebDetection.WebEntity) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebEntity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Entity deduced from similar images on the Internet.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebEntity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebEntity) - com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebEntity.class, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetection.WebEntity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - entityId_ = ""; - - score_ = 0F; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntity build() { - com.google.cloud.vision.v1.WebDetection.WebEntity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntity buildPartial() { - com.google.cloud.vision.v1.WebDetection.WebEntity result = new com.google.cloud.vision.v1.WebDetection.WebEntity(this); - result.entityId_ = entityId_; - result.score_ = score_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetection.WebEntity) { - return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebEntity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebEntity other) { - if (other == com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetection.WebEntity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebEntity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object entityId_ = ""; - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - entityId_ = value; - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - - entityId_ = getDefaultInstance().getEntityId(); - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - entityId_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebEntity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebEntity) - private static final com.google.cloud.vision.v1.WebDetection.WebEntity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebEntity(); - } - - public static com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebEntity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebEntity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Metadata for online images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage} - */ - public static final class WebImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebImage) - WebImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebImage.newBuilder() to construct. - private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebImage() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebImage.class, com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetection.WebImage other = (com.google.cloud.vision.v1.WebDetection.WebImage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for online images.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebImage) - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebImage.class, com.google.cloud.vision.v1.WebDetection.WebImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetection.WebImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage build() { - com.google.cloud.vision.v1.WebDetection.WebImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage buildPartial() { - com.google.cloud.vision.v1.WebDetection.WebImage result = new com.google.cloud.vision.v1.WebDetection.WebImage(this); - result.url_ = url_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetection.WebImage) { - return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebImage other) { - if (other == com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetection.WebImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebImage) - private static final com.google.cloud.vision.v1.WebDetection.WebImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebImage(); - } - - public static com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebPageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebPage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - java.lang.String getPageTitle(); - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - com.google.protobuf.ByteString - getPageTitleBytes(); - - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - int getFullMatchingImagesCount(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - int getPartialMatchingImagesCount(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - } - /** - *
-   * Metadata for web pages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage} - */ - public static final class WebPage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebPage) - WebPageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebPage.newBuilder() to construct. - private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebPage() { - url_ = ""; - pageTitle_ = ""; - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebPage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebPage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageTitle_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebPage.class, com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PAGE_TITLE_FIELD_NUMBER = 3; - private volatile java.lang.Object pageTitle_; - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - @java.lang.Override - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } - } - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List fullMatchingImages_; - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; - private java.util.List partialMatchingImages_; - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(5, partialMatchingImages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, partialMatchingImages_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebPage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetection.WebPage other = (com.google.cloud.vision.v1.WebDetection.WebPage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getPageTitle() - .equals(other.getPageTitle())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; - hash = (53 * hash) + getPageTitle().hashCode(); - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebPage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for web pages.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebPage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebPage) - com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebPage.class, com.google.cloud.vision.v1.WebDetection.WebPage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetection.WebPage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - pageTitle_ = ""; - - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPage build() { - com.google.cloud.vision.v1.WebDetection.WebPage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() { - com.google.cloud.vision.v1.WebDetection.WebPage result = new com.google.cloud.vision.v1.WebDetection.WebPage(this); - int from_bitField0_ = bitField0_; - result.url_ = url_; - result.score_ = score_; - result.pageTitle_ = pageTitle_; - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetection.WebPage) { - return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebPage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebPage other) { - if (other == com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getPageTitle().isEmpty()) { - pageTitle_ = other.pageTitle_; - onChanged(); - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetection.WebPage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebPage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object pageTitle_ = ""; - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageTitle_ = value; - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return This builder for chaining. - */ - public Builder clearPageTitle() { - - pageTitle_ = getDefaultInstance().getPageTitle(); - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The bytes for pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageTitle_ = value; - onChanged(); - return this; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebPage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebPage) - private static final com.google.cloud.vision.v1.WebDetection.WebPage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebPage(); - } - - public static com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebPage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebPage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection.WebLabel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - } - /** - *
-   * Label to provide extra metadata for the web detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel} - */ - public static final class WebLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetection.WebLabel) - WebLabelOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebLabel.newBuilder() to construct. - private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebLabel() { - label_ = ""; - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebLabel.class, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - private volatile java.lang.Object label_; - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetection.WebLabel)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetection.WebLabel other = (com.google.cloud.vision.v1.WebDetection.WebLabel) obj; - - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection.WebLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Label to provide extra metadata for the web detection.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection.WebLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection.WebLabel) - com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.WebLabel.class, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetection.WebLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - label_ = ""; - - languageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabel build() { - com.google.cloud.vision.v1.WebDetection.WebLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabel buildPartial() { - com.google.cloud.vision.v1.WebDetection.WebLabel result = new com.google.cloud.vision.v1.WebDetection.WebLabel(this); - result.label_ = label_; - result.languageCode_ = languageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetection.WebLabel) { - return mergeFrom((com.google.cloud.vision.v1.WebDetection.WebLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection.WebLabel other) { - if (other == com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()) return this; - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetection.WebLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetection.WebLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection.WebLabel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection.WebLabel) - private static final com.google.cloud.vision.v1.WebDetection.WebLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection.WebLabel(); - } - - public static com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int WEB_ENTITIES_FIELD_NUMBER = 1; - private java.util.List webEntities_; - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List getWebEntitiesList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List - getWebEntitiesOrBuilderList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public int getWebEntitiesCount() { - return webEntities_.size(); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) { - return webEntities_.get(index); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - return webEntities_.get(index); - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; - private java.util.List fullMatchingImages_; - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; - private java.util.List partialMatchingImages_; - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List pagesWithMatchingImages_; - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List getPagesWithMatchingImagesList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public int getPagesWithMatchingImagesCount() { - return pagesWithMatchingImages_.size(); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - return pagesWithMatchingImages_.get(index); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - return pagesWithMatchingImages_.get(index); - } - - public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; - private java.util.List visuallySimilarImages_; - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List getVisuallySimilarImagesList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public int getVisuallySimilarImagesCount() { - return visuallySimilarImages_.size(); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) { - return visuallySimilarImages_.get(index); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - return visuallySimilarImages_.get(index); - } - - public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; - private java.util.List bestGuessLabels_; - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List getBestGuessLabelsList() { - return bestGuessLabels_; - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List - getBestGuessLabelsOrBuilderList() { - return bestGuessLabels_; - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public int getBestGuessLabelsCount() { - return bestGuessLabels_.size(); - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) { - return bestGuessLabels_.get(index); - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - return bestGuessLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < webEntities_.size(); i++) { - output.writeMessage(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - output.writeMessage(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - output.writeMessage(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - output.writeMessage(8, bestGuessLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < webEntities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, bestGuessLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetection)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetection other = (com.google.cloud.vision.v1.WebDetection) obj; - - if (!getWebEntitiesList() - .equals(other.getWebEntitiesList())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!getPagesWithMatchingImagesList() - .equals(other.getPagesWithMatchingImagesList())) return false; - if (!getVisuallySimilarImagesList() - .equals(other.getVisuallySimilarImagesList())) return false; - if (!getBestGuessLabelsList() - .equals(other.getBestGuessLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWebEntitiesCount() > 0) { - hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getWebEntitiesList().hashCode(); - } - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - if (getPagesWithMatchingImagesCount() > 0) { - hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); - } - if (getVisuallySimilarImagesCount() > 0) { - hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); - } - if (getBestGuessLabelsCount() > 0) { - hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getBestGuessLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Relevant information for the image from the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetection) - com.google.cloud.vision.v1.WebDetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetection.class, com.google.cloud.vision.v1.WebDetection.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWebEntitiesFieldBuilder(); - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - getPagesWithMatchingImagesFieldBuilder(); - getVisuallySimilarImagesFieldBuilder(); - getBestGuessLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - webEntitiesBuilder_.clear(); - } - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - partialMatchingImagesBuilder_.clear(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - visuallySimilarImagesBuilder_.clear(); - } - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.WebDetectionProto.internal_static_google_cloud_vision_v1_WebDetection_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection build() { - com.google.cloud.vision.v1.WebDetection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection buildPartial() { - com.google.cloud.vision.v1.WebDetection result = new com.google.cloud.vision.v1.WebDetection(this); - int from_bitField0_ = bitField0_; - if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.webEntities_ = webEntities_; - } else { - result.webEntities_ = webEntitiesBuilder_.build(); - } - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.pagesWithMatchingImages_ = pagesWithMatchingImages_; - } else { - result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); - } - if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.visuallySimilarImages_ = visuallySimilarImages_; - } else { - result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); - } - if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bestGuessLabels_ = bestGuessLabels_; - } else { - result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetection) { - return mergeFrom((com.google.cloud.vision.v1.WebDetection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetection other) { - if (other == com.google.cloud.vision.v1.WebDetection.getDefaultInstance()) return this; - if (webEntitiesBuilder_ == null) { - if (!other.webEntities_.isEmpty()) { - if (webEntities_.isEmpty()) { - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWebEntitiesIsMutable(); - webEntities_.addAll(other.webEntities_); - } - onChanged(); - } - } else { - if (!other.webEntities_.isEmpty()) { - if (webEntitiesBuilder_.isEmpty()) { - webEntitiesBuilder_.dispose(); - webEntitiesBuilder_ = null; - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - webEntitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWebEntitiesFieldBuilder() : null; - } else { - webEntitiesBuilder_.addAllMessages(other.webEntities_); - } - } - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImages_.isEmpty()) { - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); - } - onChanged(); - } - } else { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImagesBuilder_.isEmpty()) { - pagesWithMatchingImagesBuilder_.dispose(); - pagesWithMatchingImagesBuilder_ = null; - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - pagesWithMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesWithMatchingImagesFieldBuilder() : null; - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); - } - } - } - if (visuallySimilarImagesBuilder_ == null) { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImages_.isEmpty()) { - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.addAll(other.visuallySimilarImages_); - } - onChanged(); - } - } else { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImagesBuilder_.isEmpty()) { - visuallySimilarImagesBuilder_.dispose(); - visuallySimilarImagesBuilder_ = null; - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - visuallySimilarImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVisuallySimilarImagesFieldBuilder() : null; - } else { - visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); - } - } - } - if (bestGuessLabelsBuilder_ == null) { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabels_.isEmpty()) { - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.addAll(other.bestGuessLabels_); - } - onChanged(); - } - } else { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabelsBuilder_.isEmpty()) { - bestGuessLabelsBuilder_.dispose(); - bestGuessLabelsBuilder_ = null; - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - bestGuessLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBestGuessLabelsFieldBuilder() : null; - } else { - bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List webEntities_ = - java.util.Collections.emptyList(); - private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(webEntities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; - - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List getWebEntitiesList() { - if (webEntitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webEntities_); - } else { - return webEntitiesBuilder_.getMessageList(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public int getWebEntitiesCount() { - if (webEntitiesBuilder_ == null) { - return webEntities_.size(); - } else { - return webEntitiesBuilder_.getCount(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); - } else { - return webEntitiesBuilder_.getMessage(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.set(index, value); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.set(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities(com.google.cloud.vision.v1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(index, value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addAllWebEntities( - java.lang.Iterable values) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, webEntities_); - onChanged(); - } else { - webEntitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder clearWebEntities() { - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - webEntitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public Builder removeWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.remove(index); - onChanged(); - } else { - webEntitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); } else { - return webEntitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesOrBuilderList() { - if (webEntitiesBuilder_ != null) { - return webEntitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webEntities_); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { - return getWebEntitiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesBuilderList() { - return getWebEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder> - getWebEntitiesFieldBuilder() { - if (webEntitiesBuilder_ == null) { - webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - webEntities_ = null; - } - return webEntitiesBuilder_; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - - private java.util.List pagesWithMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; - - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List getPagesWithMatchingImagesList() { - if (pagesWithMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } else { - return pagesWithMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public int getPagesWithMatchingImagesCount() { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.size(); - } else { - return pagesWithMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); - } else { - return pagesWithMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addAllPagesWithMatchingImages( - java.lang.Iterable values) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pagesWithMatchingImages_); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder clearPagesWithMatchingImages() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder removePagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.remove(index); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); } else { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - if (pagesWithMatchingImagesBuilder_ != null) { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesBuilderList() { - return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder> - getPagesWithMatchingImagesFieldBuilder() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebPage, com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>( - pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - pagesWithMatchingImages_ = null; - } - return pagesWithMatchingImagesBuilder_; - } - - private java.util.List visuallySimilarImages_ = - java.util.Collections.emptyList(); - private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; - - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List getVisuallySimilarImagesList() { - if (visuallySimilarImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } else { - return visuallySimilarImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public int getVisuallySimilarImagesCount() { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.size(); - } else { - return visuallySimilarImagesBuilder_.getCount(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); - } else { - return visuallySimilarImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages(com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addAllVisuallySimilarImages( - java.lang.Iterable values) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visuallySimilarImages_); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder clearVisuallySimilarImages() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - visuallySimilarImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder removeVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.remove(index); - onChanged(); - } else { - visuallySimilarImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); } else { - return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - if (visuallySimilarImagesBuilder_ != null) { - return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesBuilderList() { - return getVisuallySimilarImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder> - getVisuallySimilarImagesFieldBuilder() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebImage, com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( - visuallySimilarImages_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - visuallySimilarImages_ = null; - } - return visuallySimilarImagesBuilder_; - } - - private java.util.List bestGuessLabels_ = - java.util.Collections.emptyList(); - private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; - - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List getBestGuessLabelsList() { - if (bestGuessLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } else { - return bestGuessLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public int getBestGuessLabelsCount() { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.size(); - } else { - return bestGuessLabelsBuilder_.getCount(); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); - } else { - return bestGuessLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels(com.google.cloud.vision.v1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addAllBestGuessLabels( - java.lang.Iterable values) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bestGuessLabels_); - onChanged(); - } else { - bestGuessLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder clearBestGuessLabels() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder removeBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.remove(index); - onChanged(); - } else { - bestGuessLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); } else { - return bestGuessLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsOrBuilderList() { - if (bestGuessLabelsBuilder_ != null) { - return bestGuessLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { - return getBestGuessLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsBuilderList() { - return getBestGuessLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder> - getBestGuessLabelsFieldBuilder() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.WebDetection.WebLabel, com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>( - bestGuessLabels_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - bestGuessLabels_ = null; - } - return bestGuessLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetection) - private static final com.google.cloud.vision.v1.WebDetection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetection(); - } - - public static com.google.cloud.vision.v1.WebDetection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java deleted file mode 100644 index 62d8fc8fc4d5..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionOrBuilder.java +++ /dev/null @@ -1,293 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/web_detection.proto - -package com.google.cloud.vision.v1; - -public interface WebDetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1.WebDetection.WebEntity getWebEntities(int index); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - int getWebEntitiesCount(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesOrBuilderList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index); - - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - int getFullMatchingImagesCount(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - int getPartialMatchingImagesCount(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1.WebDetection.WebPage getPagesWithMatchingImages(int index); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - int getPagesWithMatchingImagesCount(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesOrBuilderList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index); - - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1.WebDetection.WebImage getVisuallySimilarImages(int index); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - int getVisuallySimilarImagesCount(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesOrBuilderList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index); - - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsList(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1.WebDetection.WebLabel getBestGuessLabels(int index); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - int getBestGuessLabelsCount(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsOrBuilderList(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java deleted file mode 100644 index 2dc32b410b24..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -/** - *
- * Parameters for web detection request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetectionParams} - */ -public final class WebDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.WebDetectionParams) - WebDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetectionParams.newBuilder() to construct. - private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetectionParams() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - includeGeoResults_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetectionParams.class, com.google.cloud.vision.v1.WebDetectionParams.Builder.class); - } - - public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; - private boolean includeGeoResults_; - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (includeGeoResults_ != false) { - output.writeBool(2, includeGeoResults_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGeoResults_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeGeoResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.WebDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.WebDetectionParams other = (com.google.cloud.vision.v1.WebDetectionParams) obj; - - if (getIncludeGeoResults() - != other.getIncludeGeoResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeGeoResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.WebDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for web detection request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.WebDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.WebDetectionParams) - com.google.cloud.vision.v1.WebDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.WebDetectionParams.class, com.google.cloud.vision.v1.WebDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.WebDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - includeGeoResults_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_WebDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParams build() { - com.google.cloud.vision.v1.WebDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParams buildPartial() { - com.google.cloud.vision.v1.WebDetectionParams result = new com.google.cloud.vision.v1.WebDetectionParams(this); - result.includeGeoResults_ = includeGeoResults_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.WebDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1.WebDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.WebDetectionParams other) { - if (other == com.google.cloud.vision.v1.WebDetectionParams.getDefaultInstance()) return this; - if (other.getIncludeGeoResults() != false) { - setIncludeGeoResults(other.getIncludeGeoResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.WebDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.WebDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean includeGeoResults_ ; - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @param value The includeGeoResults to set. - * @return This builder for chaining. - */ - public Builder setIncludeGeoResults(boolean value) { - - includeGeoResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeGeoResults() { - - includeGeoResults_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.WebDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.WebDetectionParams) - private static final com.google.cloud.vision.v1.WebDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.WebDetectionParams(); - } - - public static com.google.cloud.vision.v1.WebDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.WebDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java deleted file mode 100644 index f2f408b1c530..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParamsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/image_annotator.proto - -package com.google.cloud.vision.v1; - -public interface WebDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.WebDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - boolean getIncludeGeoResults(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java deleted file mode 100644 index 088cb3823b03..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionProto.java +++ /dev/null @@ -1,116 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/web_detection.proto - -package com.google.cloud.vision.v1; - -public final class WebDetectionProto { - private WebDetectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetection_WebEntity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetection_WebEntity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetection_WebImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetection_WebImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetection_WebPage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetection_WebPage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1_WebDetection_WebLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1_WebDetection_WebLabel_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n*google/cloud/vision/v1/web_detection.p" + - "roto\022\026google.cloud.vision.v1\"\324\006\n\014WebDete" + - "ction\022D\n\014web_entities\030\001 \003(\0132..google.clo" + - "ud.vision.v1.WebDetection.WebEntity\022K\n\024f" + - "ull_matching_images\030\002 \003(\0132-.google.cloud" + - ".vision.v1.WebDetection.WebImage\022N\n\027part" + - "ial_matching_images\030\003 \003(\0132-.google.cloud" + - ".vision.v1.WebDetection.WebImage\022P\n\032page" + - "s_with_matching_images\030\004 \003(\0132,.google.cl" + - "oud.vision.v1.WebDetection.WebPage\022N\n\027vi" + - "sually_similar_images\030\006 \003(\0132-.google.clo" + - "ud.vision.v1.WebDetection.WebImage\022H\n\021be" + - "st_guess_labels\030\010 \003(\0132-.google.cloud.vis" + - "ion.v1.WebDetection.WebLabel\032B\n\tWebEntit" + - "y\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\023\n\013d" + - "escription\030\003 \001(\t\032&\n\010WebImage\022\013\n\003url\030\001 \001(" + - "\t\022\r\n\005score\030\002 \001(\002\032\326\001\n\007WebPage\022\013\n\003url\030\001 \001(" + - "\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage_title\030\003 \001(\t\022K\n\024" + - "full_matching_images\030\004 \003(\0132-.google.clou" + - "d.vision.v1.WebDetection.WebImage\022N\n\027par" + - "tial_matching_images\030\005 \003(\0132-.google.clou" + - "d.vision.v1.WebDetection.WebImage\0320\n\010Web" + - "Label\022\r\n\005label\030\001 \001(\t\022\025\n\rlanguage_code\030\002 " + - "\001(\tBy\n\032com.google.cloud.vision.v1B\021WebDe" + - "tectionProtoP\001Z - * A word representation. - * - * - * Protobuf type {@code google.cloud.vision.v1.Word} - */ -public final class Word extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.Word) - WordOrBuilder { -private static final long serialVersionUID = 0L; - // Use Word.newBuilder() to construct. - private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Word() { - symbols_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Word(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Word( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - symbols_.add( - input.readMessage(com.google.cloud.vision.v1.Symbol.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Word.class, com.google.cloud.vision.v1.Word.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SYMBOLS_FIELD_NUMBER = 3; - private java.util.List symbols_; - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List getSymbolsList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List - getSymbolsOrBuilderList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - @java.lang.Override - public int getSymbolsCount() { - return symbols_.size(); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.Symbol getSymbols(int index) { - return symbols_.get(index); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - return symbols_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - output.writeMessage(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1.Word)) { - return super.equals(obj); - } - com.google.cloud.vision.v1.Word other = (com.google.cloud.vision.v1.Word) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getSymbolsList() - .equals(other.getSymbolsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getSymbolsCount() > 0) { - hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; - hash = (53 * hash) + getSymbolsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1.Word parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Word parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Word parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Word parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Word parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1.Word parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1.Word parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Word parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Word parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Word parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1.Word parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1.Word parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1.Word prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A word representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1.Word} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.Word) - com.google.cloud.vision.v1.WordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1.Word.class, com.google.cloud.vision.v1.Word.Builder.class); - } - - // Construct using com.google.cloud.vision.v1.Word.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSymbolsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - symbolsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1.TextAnnotationProto.internal_static_google_cloud_vision_v1_Word_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Word getDefaultInstanceForType() { - return com.google.cloud.vision.v1.Word.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1.Word build() { - com.google.cloud.vision.v1.Word result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Word buildPartial() { - com.google.cloud.vision.v1.Word result = new com.google.cloud.vision.v1.Word(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.symbols_ = symbols_; - } else { - result.symbols_ = symbolsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1.Word) { - return mergeFrom((com.google.cloud.vision.v1.Word)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1.Word other) { - if (other == com.google.cloud.vision.v1.Word.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (symbolsBuilder_ == null) { - if (!other.symbols_.isEmpty()) { - if (symbols_.isEmpty()) { - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSymbolsIsMutable(); - symbols_.addAll(other.symbols_); - } - onChanged(); - } - } else { - if (!other.symbols_.isEmpty()) { - if (symbolsBuilder_.isEmpty()) { - symbolsBuilder_.dispose(); - symbolsBuilder_ = null; - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - symbolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSymbolsFieldBuilder() : null; - } else { - symbolsBuilder_.addAllMessages(other.symbols_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1.Word parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1.Word) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List symbols_ = - java.util.Collections.emptyList(); - private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(symbols_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder> symbolsBuilder_; - - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public java.util.List getSymbolsList() { - if (symbolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbols_); - } else { - return symbolsBuilder_.getMessageList(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public int getSymbolsCount() { - if (symbolsBuilder_ == null) { - return symbols_.size(); - } else { - return symbolsBuilder_.getCount(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1.Symbol getSymbols(int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); - } else { - return symbolsBuilder_.getMessage(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.set(index, value); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.set(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder addSymbols(com.google.cloud.vision.v1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(value); - onChanged(); - } else { - symbolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(index, value); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder addSymbols( - com.google.cloud.vision.v1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder addAllSymbols( - java.lang.Iterable values) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbols_); - onChanged(); - } else { - symbolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder clearSymbols() { - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - symbolsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public Builder removeSymbols(int index) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.remove(index); - onChanged(); - } else { - symbolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1.Symbol.Builder getSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); } else { - return symbolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsOrBuilderList() { - if (symbolsBuilder_ != null) { - return symbolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(symbols_); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1.Symbol.Builder addSymbolsBuilder() { - return getSymbolsFieldBuilder().addBuilder( - com.google.cloud.vision.v1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1.Symbol.Builder addSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsBuilderList() { - return getSymbolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder> - getSymbolsFieldBuilder() { - if (symbolsBuilder_ == null) { - symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - symbols_ = null; - } - return symbolsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.Word) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Word) - private static final com.google.cloud.vision.v1.Word DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1.Word(); - } - - public static com.google.cloud.vision.v1.Word getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Word parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Word(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1.Word getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java deleted file mode 100644 index 0061a231c753..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WordOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1/text_annotation.proto - -package com.google.cloud.vision.v1; - -public interface WordOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.Word) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - java.util.List - getSymbolsList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1.Symbol getSymbols(int index); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - int getSymbolsCount(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - java.util.List - getSymbolsOrBuilderList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1.SymbolOrBuilder getSymbolsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto deleted file mode 100644 index 7e0d24c2f066..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/geometry.proto +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// A vertex represents a 2D point in the image. -// NOTE: the vertex coordinates are in the same scale as the original image. -message Vertex { - // X coordinate. - int32 x = 1; - - // Y coordinate. - int32 y = 2; -} - -// A vertex represents a 2D point in the image. -// NOTE: the normalized vertex coordinates are relative to the original image -// and range from 0 to 1. -message NormalizedVertex { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; -} - -// A bounding polygon for the detected image annotation. -message BoundingPoly { - // The bounding polygon vertices. - repeated Vertex vertices = 1; - - // The bounding polygon normalized vertices. - repeated NormalizedVertex normalized_vertices = 2; -} - -// A 3D position in the image, used primarily for Face detection landmarks. -// A valid Position must have both x and y coordinates. -// The position coordinates are in the same scale as the original image. -message Position { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; - - // Z coordinate (or depth). - float z = 3; -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto deleted file mode 100644 index 6fed6112bec7..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/image_annotator.proto +++ /dev/null @@ -1,1044 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/vision/v1/geometry.proto"; -import "google/cloud/vision/v1/product_search.proto"; -import "google/cloud/vision/v1/text_annotation.proto"; -import "google/cloud/vision/v1/web_detection.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/color.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ImageAnnotatorProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// Service that performs Google Cloud Vision API detection tasks over client -// images, such as face, landmark, logo, label, and text detection. The -// ImageAnnotator service returns detected entities from the images. -service ImageAnnotator { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { - option (google.api.http) = { - post: "/v1/images:annotate" - body: "*" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/images:annotate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=projects/*}/images:annotate" - body: "*" - } - }; - option (google.api.method_signature) = "requests"; - } - - // Service that performs image detection and annotation for a batch of files. - // Now only "application/pdf", "image/tiff" and "image/gif" are supported. - // - // This service will extract at most 5 (customers can specify which 5 in - // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - // file provided and perform detection and annotation for each image - // extracted. - rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) { - option (google.api.http) = { - post: "/v1/files:annotate" - body: "*" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/files:annotate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=projects/*}/files:annotate" - body: "*" - } - }; - option (google.api.method_signature) = "requests"; - } - - // Run asynchronous image detection and annotation for a list of images. - // - // Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - // - // This service will write image annotation outputs to json files in customer - // GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/images:asyncBatchAnnotate" - body: "*" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=projects/*}/images:asyncBatchAnnotate" - body: "*" - } - }; - option (google.api.method_signature) = "requests,output_config"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateImagesResponse" - metadata_type: "OperationMetadata" - }; - } - - // Run asynchronous image detection and annotation for a list of generic - // files, such as PDF files, which may contain multiple pages and multiple - // images per page. Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/files:asyncBatchAnnotate" - body: "*" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=projects/*}/files:asyncBatchAnnotate" - body: "*" - } - }; - option (google.api.method_signature) = "requests"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateFilesResponse" - metadata_type: "OperationMetadata" - }; - } -} - -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely. - VERY_UNLIKELY = 1; - - // It is unlikely. - UNLIKELY = 2; - - // It is possible. - POSSIBLE = 3; - - // It is likely. - LIKELY = 4; - - // It is very likely. - VERY_LIKELY = 5; -} - -// The type of Google Cloud Vision API detection to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message Feature { - // Type of Google Cloud Vision API feature to be extracted. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run face detection. - FACE_DETECTION = 1; - - // Run landmark detection. - LANDMARK_DETECTION = 2; - - // Run logo detection. - LOGO_DETECTION = 3; - - // Run label detection. - LABEL_DETECTION = 4; - - // Run text detection / optical character recognition (OCR). Text detection - // is optimized for areas of text within a larger image; if the image is - // a document, use `DOCUMENT_TEXT_DETECTION` instead. - TEXT_DETECTION = 5; - - // Run dense text document OCR. Takes precedence when both - // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - DOCUMENT_TEXT_DETECTION = 11; - - // Run Safe Search to detect potentially unsafe - // or undesirable content. - SAFE_SEARCH_DETECTION = 6; - - // Compute a set of image properties, such as the - // image's dominant colors. - IMAGE_PROPERTIES = 7; - - // Run crop hints. - CROP_HINTS = 9; - - // Run web detection. - WEB_DETECTION = 10; - - // Run Product Search. - PRODUCT_SEARCH = 12; - - // Run localizer for object detection. - OBJECT_LOCALIZATION = 19; - } - - // The feature type. - Type type = 1; - - // Maximum number of results of this type. Does not apply to - // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - int32 max_results = 2; - - // Model to use for the feature. - // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - // support "builtin/weekly" for the bleeding edge release updated weekly. - string model = 3; -} - -// External image source (Google Cloud Storage or web URL image location). -message ImageSource { - // **Use `image_uri` instead.** - // - // The Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - string gcs_image_uri = 1; - - // The URI of the source image. Can be either: - // - // 1. A Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more - // info. - // - // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - // HTTP/HTTPS URLs, Google cannot guarantee that the request will be - // completed. Your request may fail if the specified host denies the - // request (e.g. due to request throttling or DOS prevention), or if Google - // throttles requests to the site for abuse prevention. You should not - // depend on externally-hosted images for production applications. - // - // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - // precedence. - string image_uri = 2; -} - -// Client image to perform Google Cloud Vision API tasks over. -message Image { - // Image content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - // - // Currently, this field only works for BatchAnnotateImages requests. It does - // not work for AsyncBatchAnnotateImages requests. - bytes content = 1; - - // Google Cloud Storage image location, or publicly-accessible image - // URL. If both `content` and `source` are provided for an image, `content` - // takes precedence and is used to perform the image annotation request. - ImageSource source = 2; -} - -// A face annotation object contains the results of face detection. -message FaceAnnotation { - // A face-specific landmark (for example, a face feature). - message Landmark { - // Face landmark (feature) type. - // Left and right are defined from the vantage of the viewer of the image - // without considering mirror projections typical of photos. So, `LEFT_EYE`, - // typically, is the person's right eye. - enum Type { - // Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0; - - // Left eye. - LEFT_EYE = 1; - - // Right eye. - RIGHT_EYE = 2; - - // Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3; - - // Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4; - - // Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5; - - // Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6; - - // Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7; - - // Nose tip. - NOSE_TIP = 8; - - // Upper lip. - UPPER_LIP = 9; - - // Lower lip. - LOWER_LIP = 10; - - // Mouth left. - MOUTH_LEFT = 11; - - // Mouth right. - MOUTH_RIGHT = 12; - - // Mouth center. - MOUTH_CENTER = 13; - - // Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14; - - // Nose, bottom left. - NOSE_BOTTOM_LEFT = 15; - - // Nose, bottom center. - NOSE_BOTTOM_CENTER = 16; - - // Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17; - - // Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18; - - // Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19; - - // Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20; - - // Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21; - - // Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22; - - // Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23; - - // Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24; - - // Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25; - - // Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - - // Left ear tragion. - LEFT_EAR_TRAGION = 27; - - // Right ear tragion. - RIGHT_EAR_TRAGION = 28; - - // Left eye pupil. - LEFT_EYE_PUPIL = 29; - - // Right eye pupil. - RIGHT_EYE_PUPIL = 30; - - // Forehead glabella. - FOREHEAD_GLABELLA = 31; - - // Chin gnathion. - CHIN_GNATHION = 32; - - // Chin left gonion. - CHIN_LEFT_GONION = 33; - - // Chin right gonion. - CHIN_RIGHT_GONION = 34; - - // Left cheek center. - LEFT_CHEEK_CENTER = 35; - - // Right cheek center. - RIGHT_CHEEK_CENTER = 36; - } - - // Face landmark type. - Type type = 3; - - // Face landmark position. - Position position = 4; - } - - // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale. - // The bounding box is computed to "frame" the face in accordance with human - // expectations. It is based on the landmarker results. - // Note that one or more x and/or y coordinates may not be generated in the - // `BoundingPoly` (the polygon will be unbounded) if only a partial face - // appears in the image to be annotated. - BoundingPoly bounding_poly = 1; - - // The `fd_bounding_poly` bounding polygon is tighter than the - // `boundingPoly`, and encloses only the skin part of the face. Typically, it - // is used to eliminate the face from any image analysis that detects the - // "amount of skin" visible in an image. It is not based on the - // landmarker results, only on the initial face detection, hence - // the fd (face detection) prefix. - BoundingPoly fd_bounding_poly = 2; - - // Detected face landmarks. - repeated Landmark landmarks = 3; - - // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - // of the face relative to the image vertical about the axis perpendicular to - // the face. Range [-180,180]. - float roll_angle = 4; - - // Yaw angle, which indicates the leftward/rightward angle that the face is - // pointing relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - float pan_angle = 5; - - // Pitch angle, which indicates the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - float tilt_angle = 6; - - // Detection confidence. Range [0, 1]. - float detection_confidence = 7; - - // Face landmarking confidence. Range [0, 1]. - float landmarking_confidence = 8; - - // Joy likelihood. - Likelihood joy_likelihood = 9; - - // Sorrow likelihood. - Likelihood sorrow_likelihood = 10; - - // Anger likelihood. - Likelihood anger_likelihood = 11; - - // Surprise likelihood. - Likelihood surprise_likelihood = 12; - - // Under-exposed likelihood. - Likelihood under_exposed_likelihood = 13; - - // Blurred likelihood. - Likelihood blurred_likelihood = 14; - - // Headwear likelihood. - Likelihood headwear_likelihood = 15; -} - -// Detected entity location information. -message LocationInfo { - // lat/long location coordinates. - google.type.LatLng lat_lng = 1; -} - -// A `Property` consists of a user-supplied name/value pair. -message Property { - // Name of the property. - string name = 1; - - // Value of the property. - string value = 2; - - // Value of numeric properties. - uint64 uint64_value = 3; -} - -// Set of detected entity features. -message EntityAnnotation { - // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search - // API](https://developers.google.com/knowledge-graph/). - string mid = 1; - - // The language code for the locale in which the entity textual - // `description` is expressed. - string locale = 2; - - // Entity textual description, expressed in its `locale` language. - string description = 3; - - // Overall score of the result. Range [0, 1]. - float score = 4; - - // **Deprecated. Use `score` instead.** - // The accuracy of the entity detection in an image. - // For example, for an image in which the "Eiffel Tower" entity is detected, - // this field represents the confidence that there is a tower in the query - // image. Range [0, 1]. - float confidence = 5 [deprecated = true]; - - // The relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of "tower" is likely higher to an image - // containing the detected "Eiffel Tower" than to an image containing a - // detected distant towering building, even though the confidence that - // there is a tower in each image may be the same. Range [0, 1]. - float topicality = 6; - - // Image region to which this entity belongs. Not produced - // for `LABEL_DETECTION` features. - BoundingPoly bounding_poly = 7; - - // The location information for the detected entity. Multiple - // `LocationInfo` elements can be present because one location may - // indicate the location of the scene in the image, and another location - // may indicate the location of the place where the image was taken. - // Location information is usually present for landmarks. - repeated LocationInfo locations = 8; - - // Some entities may have optional user-supplied `Property` (name/value) - // fields, such a score or string that qualifies the entity. - repeated Property properties = 9; -} - -// Set of detected objects with bounding boxes. -message LocalizedObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - - // Image region to which this object belongs. This must be populated. - BoundingPoly bounding_poly = 5; -} - -// Set of features pertaining to the image, computed by computer vision -// methods over safe-search verticals (for example, adult, spoof, medical, -// violence). -message SafeSearchAnnotation { - // Represents the adult content likelihood for the image. Adult content may - // contain elements such as nudity, pornographic images or cartoons, or - // sexual activities. - Likelihood adult = 1; - - // Spoof likelihood. The likelihood that an modification - // was made to the image's canonical version to make it appear - // funny or offensive. - Likelihood spoof = 2; - - // Likelihood that this is a medical image. - Likelihood medical = 3; - - // Likelihood that this image contains violent content. - Likelihood violence = 4; - - // Likelihood that the request image contains racy content. Racy content may - // include (but is not limited to) skimpy or sheer clothing, strategically - // covered nudity, lewd or provocative poses, or close-ups of sensitive - // body areas. - Likelihood racy = 9; -} - -// Rectangle determined by min and max `LatLng` pairs. -message LatLongRect { - // Min lat/long pair. - google.type.LatLng min_lat_lng = 1; - - // Max lat/long pair. - google.type.LatLng max_lat_lng = 2; -} - -// Color information consists of RGB channels, score, and the fraction of -// the image that the color occupies in the image. -message ColorInfo { - // RGB components of the color. - google.type.Color color = 1; - - // Image-specific score for this color. Value in range [0, 1]. - float score = 2; - - // The fraction of pixels the color occupies in the image. - // Value in range [0, 1]. - float pixel_fraction = 3; -} - -// Set of dominant colors and their corresponding scores. -message DominantColorsAnnotation { - // RGB color values with their score and pixel fraction. - repeated ColorInfo colors = 1; -} - -// Stores image properties, such as dominant colors. -message ImageProperties { - // If present, dominant colors completed successfully. - DominantColorsAnnotation dominant_colors = 1; -} - -// Single crop hint that is used to generate a new crop when serving an image. -message CropHint { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale. - BoundingPoly bounding_poly = 1; - - // Confidence of this being a salient region. Range [0, 1]. - float confidence = 2; - - // Fraction of importance of this salient region with respect to the original - // image. - float importance_fraction = 3; -} - -// Set of crop hints that are used to generate new crops when serving images. -message CropHintsAnnotation { - // Crop hint results. - repeated CropHint crop_hints = 1; -} - -// Parameters for crop hints annotation request. -message CropHintsParams { - // Aspect ratios in floats, representing the ratio of the width to the height - // of the image. For example, if the desired aspect ratio is 4/3, the - // corresponding float value should be 1.33333. If not specified, the - // best possible crop is returned. The number of provided aspect ratios is - // limited to a maximum of 16; any aspect ratios provided after the 16th are - // ignored. - repeated float aspect_ratios = 1; -} - -// Parameters for web detection request. -message WebDetectionParams { - // Whether to include results derived from the geo information in the image. - bool include_geo_results = 2; -} - -// Parameters for text detections. This is used to control TEXT_DETECTION and -// DOCUMENT_TEXT_DETECTION features. -message TextDetectionParams { - // By default, Cloud Vision API only includes confidence score for - // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - // score for TEXT_DETECTION as well. - bool enable_text_detection_confidence_score = 9; - - // A list of advanced OCR options to fine-tune OCR behavior. - repeated string advanced_ocr_options = 11; -} - -// Image context and/or feature-specific parameters. -message ImageContext { - // Not used. - LatLongRect lat_long_rect = 1; - - // List of languages to use for TEXT_DETECTION. In most cases, an empty value - // yields the best results since it enables automatic language detection. For - // languages based on the Latin alphabet, setting `language_hints` is not - // needed. In rare cases, when the language of the text in the image is known, - // setting a hint will help get better results (although it will be a - // significant hindrance if the hint is wrong). Text detection returns an - // error if one or more of the specified languages is not one of the - // [supported languages](https://cloud.google.com/vision/docs/languages). - repeated string language_hints = 2; - - // Parameters for crop hints annotation request. - CropHintsParams crop_hints_params = 4; - - // Parameters for product search. - ProductSearchParams product_search_params = 5; - - // Parameters for web detection. - WebDetectionParams web_detection_params = 6; - - // Parameters for text detection and document text detection. - TextDetectionParams text_detection_params = 12; -} - -// Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features, and with context information. -message AnnotateImageRequest { - // The image to be processed. - Image image = 1; - - // Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image. - ImageContext image_context = 3; -} - -// If an image was produced from a file (e.g. a PDF), this message gives -// information about the source of that image. -message ImageAnnotationContext { - // The URI of the file used to produce the image. - string uri = 1; - - // If the file was a PDF or TIFF, this field gives the page number within - // the file used to produce the image. - int32 page_number = 2; -} - -// Response to an image annotation request. -message AnnotateImageResponse { - // If present, face detection has completed successfully. - repeated FaceAnnotation face_annotations = 1; - - // If present, landmark detection has completed successfully. - repeated EntityAnnotation landmark_annotations = 2; - - // If present, logo detection has completed successfully. - repeated EntityAnnotation logo_annotations = 3; - - // If present, label detection has completed successfully. - repeated EntityAnnotation label_annotations = 4; - - // If present, localized object detection has completed successfully. - // This will be sorted descending by confidence score. - repeated LocalizedObjectAnnotation localized_object_annotations = 22; - - // If present, text (OCR) detection has completed successfully. - repeated EntityAnnotation text_annotations = 5; - - // If present, text (OCR) detection or document (OCR) text detection has - // completed successfully. - // This annotation provides the structural hierarchy for the OCR detected - // text. - TextAnnotation full_text_annotation = 12; - - // If present, safe-search annotation has completed successfully. - SafeSearchAnnotation safe_search_annotation = 6; - - // If present, image properties were extracted successfully. - ImageProperties image_properties_annotation = 8; - - // If present, crop hints have completed successfully. - CropHintsAnnotation crop_hints_annotation = 11; - - // If present, web detection has completed successfully. - WebDetection web_detection = 13; - - // If present, product search has completed successfully. - ProductSearchResults product_search_results = 14; - - // If set, represents the error message for the operation. - // Note that filled-in image annotations are guaranteed to be - // correct, even when `error` is set. - google.rpc.Status error = 9; - - // If present, contextual information is needed to understand where this image - // comes from. - ImageAnnotationContext context = 21; -} - -// Multiple image annotation requests are batched into a single service call. -message BatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Target project and location to make a call. - // - // Format: `projects/{project-id}/locations/{location-id}`. - // - // If no parent is specified, a region will be chosen automatically. - // - // Supported location-ids: - // `us`: USA country only, - // `asia`: East asia areas, like Japan, Taiwan, - // `eu`: The European Union. - // - // Example: `projects/project-A/locations/eu`. - string parent = 4; -} - -// Response to a batch image annotation request. -message BatchAnnotateImagesResponse { - // Individual responses to image annotation requests within the batch. - repeated AnnotateImageResponse responses = 1; -} - -// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. -message AnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Pages of the file to perform image annotation. - // - // Pages starts from 1, we assume the first page of the file is page 1. - // At most 5 pages are supported per request. Pages can be negative. - // - // Page 1 means the first page. - // Page 2 means the second page. - // Page -1 means the last page. - // Page -2 means the second to the last page. - // - // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - // - // If this field is empty, by default the service performs image annotation - // for the first 5 pages of the file. - repeated int32 pages = 4; -} - -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. This field will be - // empty if the `error` field is set. - repeated AnnotateImageResponse responses = 2; - - // This field gives the total number of pages in the file. - int32 total_pages = 3; - - // If set, represents the error message for the failed request. The - // `responses` field will not be set in this case. - google.rpc.Status error = 4; -} - -// A list of requests to annotate files using the BatchAnnotateFiles API. -message BatchAnnotateFilesRequest { - // Required. The list of file annotation requests. Right now we support only one - // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Target project and location to make a call. - // - // Format: `projects/{project-id}/locations/{location-id}`. - // - // If no parent is specified, a region will be chosen automatically. - // - // Supported location-ids: - // `us`: USA country only, - // `asia`: East asia areas, like Japan, Taiwan, - // `eu`: The European Union. - // - // Example: `projects/project-A/locations/eu`. - string parent = 3; -} - -// A list of file annotation responses. -message BatchAnnotateFilesResponse { - // The list of file annotation responses, each response corresponding to each - // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileResponse responses = 1; -} - -// An offline file annotation request. -message AsyncAnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 4; -} - -// The response for a single offline file annotation request. -message AsyncAnnotateFileResponse { - // The output location and metadata from AsyncAnnotateFileRequest. - OutputConfig output_config = 1; -} - -// Request for async image annotation for a list of images. -message AsyncBatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Target project and location to make a call. - // - // Format: `projects/{project-id}/locations/{location-id}`. - // - // If no parent is specified, a region will be chosen automatically. - // - // Supported location-ids: - // `us`: USA country only, - // `asia`: East asia areas, like Japan, Taiwan, - // `eu`: The European Union. - // - // Example: `projects/project-A/locations/eu`. - string parent = 4; -} - -// Response to an async batch image annotation request. -message AsyncBatchAnnotateImagesResponse { - // The output location and metadata from AsyncBatchAnnotateImagesRequest. - OutputConfig output_config = 1; -} - -// Multiple async file annotation requests are batched into a single service -// call. -message AsyncBatchAnnotateFilesRequest { - // Required. Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Target project and location to make a call. - // - // Format: `projects/{project-id}/locations/{location-id}`. - // - // If no parent is specified, a region will be chosen automatically. - // - // Supported location-ids: - // `us`: USA country only, - // `asia`: East asia areas, like Japan, Taiwan, - // `eu`: The European Union. - // - // Example: `projects/project-A/locations/eu`. - string parent = 4; -} - -// Response to an async batch file annotation request. -message AsyncBatchAnnotateFilesResponse { - // The list of file annotation responses, one for each request in - // AsyncBatchAnnotateFilesRequest. - repeated AsyncAnnotateFileResponse responses = 1; -} - -// The desired input location and metadata. -message InputConfig { - // The Google Cloud Storage location to read the input from. - GcsSource gcs_source = 1; - - // File content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - // - // Currently, this field only works for BatchAnnotateFiles requests. It does - // not work for AsyncBatchAnnotateFiles requests. - bytes content = 3; - - // The type of the file. Currently only "application/pdf", "image/tiff" and - // "image/gif" are supported. Wildcards are not supported. - string mime_type = 2; -} - -// The desired output location and metadata. -message OutputConfig { - // The Google Cloud Storage location to write the output(s) to. - GcsDestination gcs_destination = 1; - - // The max number of response protos to put into each output JSON file on - // Google Cloud Storage. - // The valid range is [1, 100]. If not specified, the default value is 20. - // - // For example, for one pdf file with 100 pages, 100 response protos will - // be generated. If `batch_size` = 20, then 5 json files each - // containing 20 response protos will be written under the prefix - // `gcs_destination`.`uri`. - // - // Currently, batch_size only applies to GcsDestination, with potential future - // support for other output configurations. - int32 batch_size = 2; -} - -// The Google Cloud Storage location where the input will be read from. -message GcsSource { - // Google Cloud Storage URI for the input file. This must only be a - // Google Cloud Storage object. Wildcards are not currently supported. - string uri = 1; -} - -// The Google Cloud Storage location where the output will be written to. -message GcsDestination { - // Google Cloud Storage URI prefix where the results will be stored. Results - // will be in JSON format and preceded by its corresponding input URI prefix. - // This field can either represent a gcs file prefix or gcs directory. In - // either case, the uri should be unique because in order to get all of the - // output files, you will need to do a wildcard gcs search on the uri prefix - // you provide. - // - // Examples: - // - // * File Prefix: gs://bucket-name/here/filenameprefix The output files - // will be created in gs://bucket-name/here/ and the names of the - // output files will begin with "filenameprefix". - // - // * Directory Prefix: gs://bucket-name/some/location/ The output files - // will be created in gs://bucket-name/some/location/ and the names of the - // output files could be anything because there was no filename prefix - // specified. - // - // If multiple outputs, each response is still AnnotateFileResponse, each of - // which contains some subset of the full list of AnnotateImageResponse. - // Multiple outputs can happen if, for example, the output JSON is too large - // and overflows into multiple sharded files. - string uri = 1; -} - -// Contains metadata for the BatchAnnotateImages operation. -message OperationMetadata { - // Batch operation states. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is received. - CREATED = 1; - - // Request is actively being processed. - RUNNING = 2; - - // The batch processing is done. - DONE = 3; - - // The batch processing was cancelled. - CANCELLED = 4; - } - - // Current state of the batch operation. - State state = 1; - - // The time when the batch request was received. - google.protobuf.Timestamp create_time = 5; - - // The time when the operation result was last updated. - google.protobuf.Timestamp update_time = 6; -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto deleted file mode 100644 index a2a9850582b5..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -import "google/api/resource.proto"; -import "google/cloud/vision/v1/geometry.proto"; -import "google/cloud/vision/v1/product_search_service.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// Parameters for a product search request. -message ProductSearchParams { - // The bounding polygon around the area of interest in the image. - // If it is not specified, system discretion will be applied. - BoundingPoly bounding_poly = 9; - - // The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6 [(google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - }]; - - // The list of product categories to search in. Currently, we only consider - // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - // "packagedgoods-v1", or "general-v1" should be specified. The legacy - // categories "homegoods", "apparel", and "toys" are still supported but will - // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - // or "toys-v2" for better product search accuracy. It is recommended to - // migrate existing products to these categories as well. - repeated string product_categories = 7; - - // The filtering expression. This can be used to restrict search results based - // on Product labels. We currently support an AND of OR of key-value - // expressions, where each expression within an OR must have the same key. An - // '=' should be used to connect the key and value. - // - // For example, "(color = red OR color = blue) AND brand = Google" is - // acceptable, but "(color = red OR brand = Google)" is not acceptable. - // "color: red" is not acceptable because it uses a ':' instead of an '='. - string filter = 8; -} - -// Results for a product search request. -message ProductSearchResults { - // Information about a product. - message Result { - // The Product. - Product product = 1; - - // A confidence level on the match, ranging from 0 (no confidence) to - // 1 (full confidence). - float score = 2; - - // The resource name of the image from the product that is the closest match - // to the query. - string image = 3; - } - - // Prediction for what the object in the bounding box is. - message ObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - } - - // Information about the products similar to a single product in a query - // image. - message GroupedResult { - // The bounding polygon around the product detected in the query image. - BoundingPoly bounding_poly = 1; - - // List of results, one for each product match. - repeated Result results = 2; - - // List of generic predictions for the object in the bounding box. - repeated ObjectAnnotation object_annotations = 3; - } - - // Timestamp of the index which provided these results. Products added to the - // product set and products removed from the product set after this time are - // not reflected in the current results. - google.protobuf.Timestamp index_time = 2; - - // List of results, one for each product match. - repeated Result results = 5; - - // List of results grouped by products detected in the query image. Each entry - // corresponds to one bounding polygon in the query image, and contains the - // matching products specific to that region. There may be duplicate product - // matches in the union of all the per-product results. - repeated GroupedResult product_grouped_results = 6; -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto deleted file mode 100644 index 65680d909681..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/product_search_service.proto +++ /dev/null @@ -1,1022 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vision/v1/geometry.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchServiceProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// Manages Products and ProductSets of reference images for use in product -// search. It uses the following resource model: -// -// - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named -// `projects/*/locations/*/productSets/*`, which acts as a way to put different -// products into groups to limit identification. -// -// In parallel, -// -// - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named -// `projects/*/locations/*/products/*` -// -// - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named -// `projects/*/locations/*/products/*/referenceImages/*` -service ProductSearch { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Creates and returns a new ProductSet resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - // 4096 characters. - rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/productSets" - body: "product_set" - }; - option (google.api.method_signature) = "parent,product_set,product_set_id"; - } - - // Lists ProductSets in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - // than 1. - rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/productSets" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a ProductSet resource. - // Only display_name can be updated currently. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but - // missing from the request or longer than 4096 characters. - rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - patch: "/v1/{product_set.name=projects/*/locations/*/productSets/*}" - body: "product_set" - }; - option (google.api.method_signature) = "product_set,update_mask"; - } - - // Permanently deletes a ProductSet. Products and ReferenceImages in the - // ProductSet are not deleted. - // - // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteProductSet(DeleteProductSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new product resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is missing or invalid. - rpc CreateProduct(CreateProductRequest) returns (Product) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/products" - body: "product" - }; - option (google.api.method_signature) = "parent,product,product_id"; - } - - // Lists products in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/products" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a Product. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - rpc GetProduct(GetProductRequest) returns (Product) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a Product resource. - // Only the `display_name`, `description`, and `labels` fields can be updated - // right now. - // - // If labels are updated, the change will not be reflected in queries until - // the next index time. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - // missing from the request or longer than 4096 characters. - // * Returns INVALID_ARGUMENT if description is present in update_mask but is - // longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is present in update_mask. - rpc UpdateProduct(UpdateProductRequest) returns (Product) { - option (google.api.http) = { - patch: "/v1/{product.name=projects/*/locations/*/products/*}" - body: "product" - }; - option (google.api.method_signature) = "product,update_mask"; - } - - // Permanently deletes a product and its reference images. - // - // Metadata of the product and all its images will be deleted right away, but - // search queries against ProductSets containing the product may still work - // until all related caches are refreshed. - rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new ReferenceImage resource. - // - // The `bounding_poly` field is optional. If `bounding_poly` is not specified, - // the system will try to detect regions of interest in the image that are - // compatible with the product_category on the parent product. If it is - // specified, detection is ALWAYS skipped. The system converts polygons into - // non-rotated rectangles. - // - // Note that the pipeline will resize the image if the image resolution is too - // large to process (above 50MP). - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if the product does not exist. - // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - // compatible with the parent product's product_category is detected. - // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - rpc CreateReferenceImage(CreateReferenceImageRequest) returns (ReferenceImage) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" - body: "reference_image" - }; - option (google.api.method_signature) = "parent,reference_image,reference_image_id"; - } - - // Permanently deletes a reference image. - // - // The image metadata will be deleted right away, but search queries - // against ProductSets containing the image may still work until all related - // caches are refreshed. - // - // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteReferenceImage(DeleteReferenceImageRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists reference images. - // - // Possible errors: - // - // * Returns NOT_FOUND if the parent product does not exist. - // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - // than 1. - rpc ListReferenceImages(ListReferenceImagesRequest) returns (ListReferenceImagesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/products/*}/referenceImages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ReferenceImage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the specified image does not exist. - rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Adds a Product to the specified ProductSet. If the Product is already - // present, no change is made. - // - // One Product can be added to at most 100 ProductSets. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc AddProductToProductSet(AddProductToProductSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/productSets/*}:addProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Removes a Product from the specified ProductSet. - rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/productSets/*}:removeProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Lists the Products in a ProductSet, in an unspecified order. If the - // ProductSet does not exist, the products field of the response will be - // empty. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProductsInProductSet(ListProductsInProductSetRequest) returns (ListProductsInProductSetResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/productSets/*}/products" - }; - option (google.api.method_signature) = "name"; - } - - // Asynchronous API that imports a list of reference images to specified - // product sets based on a list of image information. - // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - // progress and results of the request. - // `Operation.metadata` contains `BatchOperationMetadata`. (progress) - // `Operation.response` contains `ImportProductSetsResponse`. (results) - // - // The input source of this method is a csv file on Google Cloud Storage. - // For the format of the csv file please see - // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - rpc ImportProductSets(ImportProductSetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/productSets:import" - body: "*" - }; - option (google.api.method_signature) = "parent,input_config"; - option (google.longrunning.operation_info) = { - response_type: "ImportProductSetsResponse" - metadata_type: "BatchOperationMetadata" - }; - } - - // Asynchronous API to delete all Products in a ProductSet or all Products - // that are in no ProductSet. - // - // If a Product is a member of the specified ProductSet in addition to other - // ProductSets, the Product will still be deleted. - // - // It is recommended to not delete the specified ProductSet until after this - // operation has completed. It is also recommended to not add any of the - // Products involved in the batch delete to a new ProductSet while this - // operation is running because those Products may still end up deleted. - // - // It's not possible to undo the PurgeProducts operation. Therefore, it is - // recommended to keep the csv files used in ImportProductSets (if that was - // how you originally built the Product Set) before starting PurgeProducts, in - // case you need to re-import the data after deletion. - // - // If the plan is to purge all of the Products from a ProductSet and then - // re-use the empty ProductSet to re-import new Products into the empty - // ProductSet, you must wait until the PurgeProducts operation has finished - // for that ProductSet. - // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - // progress and results of the request. - // `Operation.metadata` contains `BatchOperationMetadata`. (progress) - rpc PurgeProducts(PurgeProductsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/products:purge" - body: "*" - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "BatchOperationMetadata" - }; - } -} - -// A Product contains ReferenceImages. -message Product { - option (google.api.resource) = { - type: "vision.googleapis.com/Product" - pattern: "projects/{project}/locations/{location}/products/{product}" - }; - - // A product label represented as a key-value pair. - message KeyValue { - // The key of the label attached to the product. Cannot be empty and cannot - // exceed 128 bytes. - string key = 1; - - // The value of the label attached to the product. Cannot be empty and - // cannot exceed 128 bytes. - string value = 2; - } - - // The resource name of the product. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - // - // This field is ignored when creating a product. - string name = 1; - - // The user-provided name for this Product. Must not be empty. Must be at most - // 4096 characters long. - string display_name = 2; - - // User-provided metadata to be stored with this product. Must be at most 4096 - // characters long. - string description = 3; - - // Immutable. The category for the product identified by the reference image. This should - // be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or - // "general-v1". The legacy categories "homegoods", "apparel", and "toys" are - // still supported, but these should not be used for new products. - string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; - - // Key-value pairs that can be attached to a product. At query time, - // constraints can be specified based on the product_labels. - // - // Note that integer values can be provided as strings, e.g. "1199". Only - // strings with integer values can match a range-based restriction which is - // to be supported soon. - // - // Multiple values can be assigned to the same key. One product may have up to - // 500 product_labels. - // - // Notice that the total number of distinct product_labels over all products - // in one ProductSet cannot exceed 1M, otherwise the product search pipeline - // will refuse to work for that ProductSet. - repeated KeyValue product_labels = 5; -} - -// A ProductSet contains Products. A ProductSet can contain a maximum of 1 -// million reference images. If the limit is exceeded, periodic indexing will -// fail. -message ProductSet { - option (google.api.resource) = { - type: "vision.googleapis.com/ProductSet" - pattern: "projects/{project}/locations/{location}/productSets/{product_set}" - }; - - // The resource name of the ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - // - // This field is ignored when creating a ProductSet. - string name = 1; - - // The user-provided name for this ProductSet. Must not be empty. Must be at - // most 4096 characters long. - string display_name = 2; - - // Output only. The time at which this ProductSet was last indexed. Query - // results will reflect all updates before this time. If this ProductSet has - // never been indexed, this timestamp is the default value - // "1970-01-01T00:00:00Z". - // - // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If there was an error with indexing the product set, the field - // is populated. - // - // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A `ReferenceImage` represents a product image and its associated metadata, -// such as bounding boxes. -message ReferenceImage { - option (google.api.resource) = { - type: "vision.googleapis.com/ReferenceImage" - pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" - }; - - // The resource name of the reference image. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - // - // This field is ignored when creating a reference image. - string name = 1; - - // Required. The Google Cloud Storage URI of the reference image. - // - // The URI must start with `gs://`. - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Bounding polygons around the areas of interest in the reference image. - // If this field is empty, the system will try to detect regions of - // interest. At most 10 bounding polygons will be used. - // - // The provided shape is converted into a non-rotated rectangle. Once - // converted, the small edge of the rectangle must be greater than or equal - // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - // is not). - repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for the `CreateProduct` method. -message CreateProductRequest { - // Required. The project in which the Product should be created. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The product to create. - Product product = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this Product. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_id = 3; -} - -// Request message for the `ListProducts` method. -message ListProductsRequest { - // Required. The project OR ProductSet from which Products should be listed. - // - // Format: - // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProducts` method. -message ListProductsResponse { - // List of products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProduct` method. -message GetProductRequest { - // Required. Resource name of the Product to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `UpdateProduct` method. -message UpdateProductRequest { - // Required. The Product resource which replaces the one on the server. - // product.name is immutable. - Product product = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields - // to update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask paths include `product_labels`, `display_name`, and - // `description`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProduct` method. -message DeleteProductRequest { - // Required. Resource name of product to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `CreateProductSet` method. -message CreateProductSetRequest { - // Required. The project in which the ProductSet should be created. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The ProductSet to create. - ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this ProductSet. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_set_id = 3; -} - -// Request message for the `ListProductSets` method. -message ListProductSetsRequest { - // Required. The project from which ProductSets should be listed. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductSets` method. -message ListProductSetsResponse { - // List of ProductSets. - repeated ProductSet product_sets = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProductSet` method. -message GetProductSetRequest { - // Required. Resource name of the ProductSet to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `UpdateProductSet` method. -message UpdateProductSetRequest { - // Required. The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - // update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask path is `display_name`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProductSet` method. -message DeleteProductSetRequest { - // Required. Resource name of the ProductSet to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `CreateReferenceImage` method. -message CreateReferenceImageRequest { - // Required. Resource name of the product in which to create the reference image. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; - - // Required. The reference image to create. - // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for the ReferenceImage to be added. If set, - // the server will attempt to use this value as the resource id. If it is - // already in use, an error is returned with code ALREADY_EXISTS. Must be at - // most 128 characters long. It cannot contain the character `/`. - string reference_image_id = 3; -} - -// Request message for the `ListReferenceImages` method. -message ListReferenceImagesRequest { - // Required. Resource name of the product containing the reference images. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // A token identifying a page of results to be returned. This is the value - // of `nextPageToken` returned in a previous reference image list request. - // - // Defaults to the first page if not specified. - string page_token = 3; -} - -// Response message for the `ListReferenceImages` method. -message ListReferenceImagesResponse { - // The list of reference images. - repeated ReferenceImage reference_images = 1; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string next_page_token = 3; -} - -// Request message for the `GetReferenceImage` method. -message GetReferenceImageRequest { - // Required. The resource name of the ReferenceImage to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `DeleteReferenceImage` method. -message DeleteReferenceImageRequest { - // Required. The resource name of the reference image to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `AddProductToProductSet` method. -message AddProductToProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be added to this ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `RemoveProductFromProductSet` method. -message RemoveProductFromProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be removed from this ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `ListProductsInProductSet` method. -message ListProductsInProductSetRequest { - // Required. The ProductSet resource for which to retrieve Products. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductsInProductSet` method. -message ListProductsInProductSetResponse { - // The list of Products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// The Google Cloud Storage location for a csv file which preserves a list of -// ImportProductSetRequests in each line. -message ImportProductSetsGcsSource { - // The Google Cloud Storage URI of the input csv file. - // - // The URI must start with `gs://`. - // - // The format of the input csv file should be one image per line. - // In each line, there are 8 columns. - // - // 1. image-uri - // 2. image-id - // 3. product-set-id - // 4. product-id - // 5. product-category - // 6. product-display-name - // 7. labels - // 8. bounding-poly - // - // The `image-uri`, `product-set-id`, `product-id`, and `product-category` - // columns are required. All other columns are optional. - // - // If the `ProductSet` or `Product` specified by the `product-set-id` and - // `product-id` values does not exist, then the system will create a new - // `ProductSet` or `Product` for the image. In this case, the - // `product-display-name` column refers to - // [display_name][google.cloud.vision.v1.Product.display_name], the - // `product-category` column refers to - // [product_category][google.cloud.vision.v1.Product.product_category], and the - // `labels` column refers to [product_labels][google.cloud.vision.v1.Product.product_labels]. - // - // The `image-id` column is optional but must be unique if provided. If it is - // empty, the system will automatically assign a unique id to the image. - // - // The `product-display-name` column is optional. If it is empty, the system - // sets the [display_name][google.cloud.vision.v1.Product.display_name] field for the product to a - // space (" "). You can update the `display_name` later by using the API. - // - // If a `Product` with the specified `product-id` already exists, then the - // system ignores the `product-display-name`, `product-category`, and `labels` - // columns. - // - // The `labels` column (optional) is a line containing a list of - // comma-separated key-value pairs, in the following format: - // - // "key_1=value_1,key_2=value_2,...,key_n=value_n" - // - // The `bounding-poly` column (optional) identifies one region of - // interest from the image in the same manner as `CreateReferenceImage`. If - // you do not specify the `bounding-poly` column, then the system will try to - // detect regions of interest automatically. - // - // At most one `bounding-poly` column is allowed per line. If the image - // contains multiple regions of interest, add a line to the CSV file that - // includes the same product information, and the `bounding-poly` values for - // each region of interest. - // - // The `bounding-poly` column must contain an even number of comma-separated - // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - // non-negative integers for absolute bounding polygons, and float values - // in [0, 1] for normalized bounding polygons. - // - // The system will resize the image if the image resolution is too - // large to process (larger than 20MP). - string csv_file_uri = 1; -} - -// The input content for the `ImportProductSets` method. -message ImportProductSetsInputConfig { - // The source of the input. - oneof source { - // The Google Cloud Storage location for a csv file which preserves a list - // of ImportProductSetRequests in each line. - ImportProductSetsGcsSource gcs_source = 1; - } -} - -// Request message for the `ImportProductSets` method. -message ImportProductSetsRequest { - // Required. The project in which the ProductSets should be imported. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for the `ImportProductSets` method. -// -// This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] field. -message ImportProductSetsResponse { - // The list of reference_images that are imported successfully. - repeated ReferenceImage reference_images = 1; - - // The rpc status for each ImportProductSet request, including both successes - // and errors. - // - // The number of statuses here matches the number of lines in the csv file, - // and statuses[i] stores the success or failure status of processing the i-th - // line of the csv, starting from line 0. - repeated google.rpc.Status statuses = 2; -} - -// Metadata for the batch operations such as the current state. -// -// This is included in the `metadata` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message BatchOperationMetadata { - // Enumerates the possible states that the batch request can be in. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is actively being processed. - PROCESSING = 1; - - // The request is done and at least one item has been successfully - // processed. - SUCCESSFUL = 2; - - // The request is done and no item has been successfully processed. - FAILED = 3; - - // The request is done after the longrunning.Operations.CancelOperation has - // been called by the user. Any records that were processed before the - // cancel command are output as specified in the request. - CANCELLED = 4; - } - - // The current state of the batch operation. - State state = 1; - - // The time when the batch request was submitted to the server. - google.protobuf.Timestamp submit_time = 2; - - // The time when the batch request is finished and - // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. - google.protobuf.Timestamp end_time = 3; -} - -// Config to control which ProductSet contains the Products to be deleted. -message ProductSetPurgeConfig { - // The ProductSet that contains the Products to delete. If a Product is a - // member of product_set_id in addition to other ProductSets, the Product will - // still be deleted. - string product_set_id = 1; -} - -// Request message for the `PurgeProducts` method. -message PurgeProductsRequest { - // The Products to delete. - oneof target { - // Specify which ProductSet contains the Products to be deleted. - ProductSetPurgeConfig product_set_purge_config = 2; - - // If delete_orphan_products is true, all Products that are not in any - // ProductSet will be deleted. - bool delete_orphan_products = 3; - } - - // Required. The project and location in which the Products should be deleted. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The default value is false. Override this value to true to actually perform - // the purge. - bool force = 4; -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto deleted file mode 100644 index 9c07c322075c..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/text_annotation.proto +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -import "google/cloud/vision/v1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "TextAnnotationProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure is like this: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have their own -// properties. Properties describe detected languages, breaks etc.. Please refer -// to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more -// detail. -message TextAnnotation { - // Detected language for a structural component. - message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 1; - - // Confidence of detected language. Range [0, 1]. - float confidence = 2; - } - - // Detected start or end of a structural component. - message DetectedBreak { - // Enum to denote the type of break found. New line, space etc. - enum BreakType { - // Unknown break label type. - UNKNOWN = 0; - - // Regular space. - SPACE = 1; - - // Sure space (very wide). - SURE_SPACE = 2; - - // Line-wrapping break. - EOL_SURE_SPACE = 3; - - // End-line hyphen that is not present in text; does not co-occur with - // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4; - - // Line break that ends a paragraph. - LINE_BREAK = 5; - } - - // Detected break type. - BreakType type = 1; - - // True if break prepends the element. - bool is_prefix = 2; - } - - // Additional information detected on the structural component. - message TextProperty { - // A list of detected languages together with confidence. - repeated DetectedLanguage detected_languages = 1; - - // Detected start or end of a text segment. - DetectedBreak detected_break = 2; - } - - // List of pages detected by OCR. - repeated Page pages = 1; - - // UTF-8 text detected on the pages. - string text = 2; -} - -// Detected page from OCR. -message Page { - // Additional information detected on the page. - TextAnnotation.TextProperty property = 1; - - // Page width. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 width = 2; - - // Page height. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 height = 3; - - // List of blocks of text, images etc on this page. - repeated Block blocks = 4; - - // Confidence of the OCR results on the page. Range [0, 1]. - float confidence = 5; -} - -// Logical element on the page. -message Block { - // Type of a block (text, image etc) as identified by OCR. - enum BlockType { - // Unknown block type. - UNKNOWN = 0; - - // Regular text block. - TEXT = 1; - - // Table block. - TABLE = 2; - - // Image block. - PICTURE = 3; - - // Horizontal/vertical line box. - RULER = 4; - - // Barcode block. - BARCODE = 5; - } - - // Additional information detected for the block. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // - // * when the text is horizontal it might look like: - // - // 0----1 - // | | - // 3----2 - // - // * when it's rotated 180 degrees around the top-left corner it becomes: - // - // 2----3 - // | | - // 1----0 - // - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of paragraphs in this block (if this blocks is of type text). - repeated Paragraph paragraphs = 3; - - // Detected block type (text, image etc) for this block. - BlockType block_type = 4; - - // Confidence of the OCR results on the block. Range [0, 1]. - float confidence = 5; -} - -// Structural unit of text representing a number of words in certain order. -message Paragraph { - // Additional information detected for the paragraph. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of all words in this paragraph. - repeated Word words = 3; - - // Confidence of the OCR results for the paragraph. Range [0, 1]. - float confidence = 4; -} - -// A word representation. -message Word { - // Additional information detected for the word. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - repeated Symbol symbols = 3; - - // Confidence of the OCR results for the word. Range [0, 1]. - float confidence = 4; -} - -// A single symbol representation. -message Symbol { - // Additional information detected for the symbol. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // The actual UTF-8 representation of the symbol. - string text = 3; - - // Confidence of the OCR results for the symbol. Range [0, 1]. - float confidence = 4; -} diff --git a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto b/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto deleted file mode 100644 index 369a1350d40f..000000000000 --- a/owl-bot-staging/java-vision/v1/proto-google-cloud-vision-v1/src/main/proto/google/cloud/vision/v1/web_detection.proto +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision"; -option java_multiple_files = true; -option java_outer_classname = "WebDetectionProto"; -option java_package = "com.google.cloud.vision.v1"; -option objc_class_prefix = "GCVN"; - -// Relevant information for the image from the Internet. -message WebDetection { - // Entity deduced from similar images on the Internet. - message WebEntity { - // Opaque entity ID. - string entity_id = 1; - - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - float score = 2; - - // Canonical description of the entity, in English. - string description = 3; - } - - // Metadata for online images. - message WebImage { - // The result image URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the image. - float score = 2; - } - - // Metadata for web pages. - message WebPage { - // The result web page URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the web page. - float score = 2; - - // Title for the web page, may contain HTML markups. - string page_title = 3; - - // Fully matching images on the page. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 4; - - // Partial matching images on the page. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its - // crops. - repeated WebImage partial_matching_images = 5; - } - - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - - // Deduced entities from similar images on the Internet. - repeated WebEntity web_entities = 1; - - // Fully matching images from the Internet. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 2; - - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - repeated WebImage partial_matching_images = 3; - - // Web pages containing the matching images from the Internet. - repeated WebPage pages_with_matching_images = 4; - - // The visually similar image results. - repeated WebImage visually_similar_images = 6; - - // The service's best guess as to the topic of the request image. - // Inferred from similar images on the open web. - repeated WebLabel best_guess_labels = 8; -} diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index 407a0e08113b..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFiles(); - } - - public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java deleted file mode 100644 index 81966ec0a228..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.OperationMetadata; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFilesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFilesLRO(); - } - - public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index bab83fd45aa6..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] -import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFiles(); - } - - public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java deleted file mode 100644 index dd2f19273455..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] -import com.google.cloud.vision.v1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); - } - - public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java deleted file mode 100644 index fd4daac8174c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.OutputConfig; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateImages(); - } - - public static void asyncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setParent("parent-995424086") - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java deleted file mode 100644 index d70f74735aad..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.OperationMetadata; -import com.google.cloud.vision.v1.OutputConfig; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateImagesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateImagesLRO(); - } - - public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setParent("parent-995424086") - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java deleted file mode 100644 index 3549656d6e8c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_sync] -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.OutputConfig; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateImages(); - } - - public static void syncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setParent("parent-995424086") - .build(); - AsyncBatchAnnotateImagesResponse response = - imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java deleted file mode 100644 index 9c176e661922..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.OutputConfig; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig(); - } - - public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() - throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - AsyncBatchAnnotateImagesResponse response = - imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java deleted file mode 100644 index 6c883b8837bf..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.AnnotateFileRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateFiles(); - } - - public static void asyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request); - // Do something. - BatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java deleted file mode 100644 index 844e709a2891..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_sync] -import com.google.cloud.vision.v1.AnnotateFileRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateFiles(); - } - - public static void syncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java deleted file mode 100644 index f924b8679def..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] -import com.google.cloud.vision.v1.AnnotateFileRequest; -import com.google.cloud.vision.v1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateFilesListannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateFilesListannotatefilerequest(); - } - - public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java deleted file mode 100644 index 21abc33d3bec..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateImages(); - } - - public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); - // Do something. - BatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 2b85b47fdf9e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotateimages_sync] -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setParent("parent-995424086") - .build(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java deleted file mode 100644 index bce8ba646b2d..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] -import com.google.cloud.vision.v1.AnnotateImageRequest; -import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateImagesListannotateimagerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImagesListannotateimagerequest(); - } - - public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); - } - } -} -// [END vision_v1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index c42fa0d1f913..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index ee7d1e93e5c4..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.ImageAnnotatorSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index a797d91056cb..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorclient_create_setendpoint_sync] -import com.google.cloud.vision.v1.ImageAnnotatorClient; -import com.google.cloud.vision.v1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index fae2c28c273c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_imageannotatorsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1.ImageAnnotatorSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java deleted file mode 100644 index bb216d3cbbc2..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - asyncAddProductToProductSet(); - } - - public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.addProductToProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java deleted file mode 100644 index b7854e68ba8a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_sync] -import com.google.cloud.vision.v1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSet(); - } - - public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.addProductToProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java deleted file mode 100644 index 7fcf26218819..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameProductname(); - } - - public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java deleted file mode 100644 index 15b3dec173a0..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameString(); - } - - public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java deleted file mode 100644 index c828036193da..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringProductname(); - } - - public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java deleted file mode 100644 index 19acbd7d333e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_addproducttoproductset_stringstring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringString(); - } - - public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 58ee9ce5ba26..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSearchSettings; -import com.google.cloud.vision.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 6909f84839a1..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSearchSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index a21ddb568b2a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_create_setendpoint_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSearchSettings; -import com.google.cloud.vision.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java deleted file mode 100644 index 965d12a07bf5..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/AsyncCreateProduct.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class AsyncCreateProduct { - - public static void main(String[] args) throws Exception { - asyncCreateProduct(); - } - - public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - ApiFuture future = productSearchClient.createProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java deleted file mode 100644 index 657f205da15e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProduct.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproduct_sync] -import com.google.cloud.vision.v1.CreateProductRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncCreateProduct { - - public static void main(String[] args) throws Exception { - syncCreateProduct(); - } - - public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - Product response = productSearchClient.createProduct(request); - } - } -} -// [END vision_v1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java deleted file mode 100644 index 9940be3768fd..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproduct_locationnameproductstring_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncCreateProductLocationnameProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductLocationnameProductString(); - } - - public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java deleted file mode 100644 index 5c761a24ad63..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproduct_stringproductstring_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncCreateProductStringProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductStringProductString(); - } - - public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java deleted file mode 100644 index 78c5c6f68fd1..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class AsyncCreateProductSet { - - public static void main(String[] args) throws Exception { - asyncCreateProductSet(); - } - - public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ApiFuture future = - productSearchClient.createProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java deleted file mode 100644 index 1c21416a188e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproductset_sync] -import com.google.cloud.vision.v1.CreateProductSetRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ProductSet response = productSearchClient.createProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java deleted file mode 100644 index 9af78ce034a6..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncCreateProductSetLocationnameProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetLocationnameProductsetString(); - } - - public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java deleted file mode 100644 index eb4eb7041b95..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createproductset_stringproductsetstring_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncCreateProductSetStringProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetStringProductsetString(); - } - - public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java deleted file mode 100644 index 009d254512ed..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class AsyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - asyncCreateReferenceImage(); - } - - public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ApiFuture future = - productSearchClient.createReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java deleted file mode 100644 index 252d3d8efab9..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createreferenceimage_sync] -import com.google.cloud.vision.v1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImage(); - } - - public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ReferenceImage response = productSearchClient.createReferenceImage(request); - } - } -} -// [END vision_v1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java deleted file mode 100644 index 0353a7bacb91..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncCreateReferenceImageProductnameReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageProductnameReferenceimageString(); - } - - public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java deleted file mode 100644 index 8d0cf94e9c67..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncCreateReferenceImageStringReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageStringReferenceimageString(); - } - - public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java deleted file mode 100644 index 835c1a5467db..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteProduct { - - public static void main(String[] args) throws Exception { - asyncDeleteProduct(); - } - - public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java deleted file mode 100644 index 99b9976cad81..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproduct_sync] -import com.google.cloud.vision.v1.DeleteProductRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProduct { - - public static void main(String[] args) throws Exception { - syncDeleteProduct(); - } - - public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.deleteProduct(request); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java deleted file mode 100644 index 2b61e965260e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproduct_productname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductProductname { - - public static void main(String[] args) throws Exception { - syncDeleteProductProductname(); - } - - public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java deleted file mode 100644 index 5d894b0247e8..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproduct_string_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductString { - - public static void main(String[] args) throws Exception { - syncDeleteProductString(); - } - - public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java deleted file mode 100644 index d9200e0d95b9..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - asyncDeleteProductSet(); - } - - public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java deleted file mode 100644 index efa36c27487b..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproductset_sync] -import com.google.cloud.vision.v1.DeleteProductSetRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - syncDeleteProductSet(); - } - - public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - productSearchClient.deleteProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java deleted file mode 100644 index df03f2d90350..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproductset_productsetname_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetProductsetname(); - } - - public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java deleted file mode 100644 index 2ea900242ca9..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deleteproductset_string_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetString { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetString(); - } - - public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java deleted file mode 100644 index 19bfa911bfea..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deletereferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class AsyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - asyncDeleteReferenceImage(); - } - - public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.deleteReferenceImageCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java deleted file mode 100644 index a77173f14d50..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deletereferenceimage_sync] -import com.google.cloud.vision.v1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImage(); - } - - public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - productSearchClient.deleteReferenceImage(request); - } - } -} -// [END vision_v1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java deleted file mode 100644 index b6350460a8e0..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageReferenceimagename(); - } - - public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java deleted file mode 100644 index 1e1afa25b8de..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_deletereferenceimage_string_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageString { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageString(); - } - - public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java deleted file mode 100644 index c1887ad1f2b0..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/AsyncGetProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class AsyncGetProduct { - - public static void main(String[] args) throws Exception { - asyncGetProduct(); - } - - public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.getProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java deleted file mode 100644 index a7c67d8cdddd..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproduct_sync] -import com.google.cloud.vision.v1.GetProductRequest; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncGetProduct { - - public static void main(String[] args) throws Exception { - syncGetProduct(); - } - - public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - Product response = productSearchClient.getProduct(request); - } - } -} -// [END vision_v1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java deleted file mode 100644 index 0cd545c6d15f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproduct_productname_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncGetProductProductname { - - public static void main(String[] args) throws Exception { - syncGetProductProductname(); - } - - public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java deleted file mode 100644 index a5fff300c5ae..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproduct/SyncGetProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproduct_string_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncGetProductString { - - public static void main(String[] args) throws Exception { - syncGetProductString(); - } - - public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java deleted file mode 100644 index fedd368f0b9a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/AsyncGetProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.ProductSetName; - -public class AsyncGetProductSet { - - public static void main(String[] args) throws Exception { - asyncGetProductSet(); - } - - public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = - productSearchClient.getProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java deleted file mode 100644 index 62662fae065c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproductset_sync] -import com.google.cloud.vision.v1.GetProductSetRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncGetProductSet { - - public static void main(String[] args) throws Exception { - syncGetProductSet(); - } - - public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ProductSet response = productSearchClient.getProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java deleted file mode 100644 index dc83c167595f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproductset_productsetname_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncGetProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncGetProductSetProductsetname(); - } - - public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java deleted file mode 100644 index bef47bc37bd0..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getproductset/SyncGetProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getproductset_string_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncGetProductSetString { - - public static void main(String[] args) throws Exception { - syncGetProductSetString(); - } - - public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java deleted file mode 100644 index 5dcfbd9e934c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.ReferenceImageName; - -public class AsyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - asyncGetReferenceImage(); - } - - public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.getReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java deleted file mode 100644 index d11afa0d584f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getreferenceimage_sync] -import com.google.cloud.vision.v1.GetReferenceImageRequest; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.ReferenceImageName; - -public class SyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - syncGetReferenceImage(); - } - - public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ReferenceImage response = productSearchClient.getReferenceImage(request); - } - } -} -// [END vision_v1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java deleted file mode 100644 index 5173516b1e3a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.ReferenceImageName; - -public class SyncGetReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageReferenceimagename(); - } - - public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java deleted file mode 100644 index fdf311488bd2..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_getreferenceimage_string_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.cloud.vision.v1.ReferenceImageName; - -public class SyncGetReferenceImageString { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageString(); - } - - public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java deleted file mode 100644 index 18e9ff5c2827..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_importproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.longrunning.Operation; - -public class AsyncImportProductSets { - - public static void main(String[] args) throws Exception { - asyncImportProductSets(); - } - - public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.importProductSetsCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java deleted file mode 100644 index 4de907415c16..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_importproductsets_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class AsyncImportProductSetsLRO { - - public static void main(String[] args) throws Exception { - asyncImportProductSetsLRO(); - } - - public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - OperationFuture future = - productSearchClient.importProductSetsOperationCallable().futureCall(request); - // Do something. - ImportProductSetsResponse response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java deleted file mode 100644 index 71f4fe016382..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSets.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_importproductsets_sync] -import com.google.cloud.vision.v1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1.ImportProductSetsRequest; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncImportProductSets { - - public static void main(String[] args) throws Exception { - syncImportProductSets(); - } - - public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(request).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java deleted file mode 100644 index 28713098bc0d..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsLocationnameImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() - throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java deleted file mode 100644 index de3a679ccb18..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1.ImportProductSetsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncImportProductSetsStringImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsStringImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java deleted file mode 100644 index 602d49902116..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProducts.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproducts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class AsyncListProducts { - - public static void main(String[] args) throws Exception { - asyncListProducts(); - } - - public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java deleted file mode 100644 index b3da88b93663..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproducts_paged_async] -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.ListProductsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.common.base.Strings; - -public class AsyncListProductsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsPaged(); - } - - public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsResponse response = productSearchClient.listProductsCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java deleted file mode 100644 index 1eb469ac4749..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProducts.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproducts_sync] -import com.google.cloud.vision.v1.ListProductsRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncListProducts { - - public static void main(String[] args) throws Exception { - syncListProducts(); - } - - public static void syncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProducts(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java deleted file mode 100644 index eb2a071ffda7..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproducts_locationname_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncListProductsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductsLocationname(); - } - - public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java deleted file mode 100644 index 93e2384a4624..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproducts/SyncListProductsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproducts_string_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; - -public class SyncListProductsString { - - public static void main(String[] args) throws Exception { - syncListProductsString(); - } - - public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java deleted file mode 100644 index 0e2297fea556..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSets.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class AsyncListProductSets { - - public static void main(String[] args) throws Exception { - asyncListProductSets(); - } - - public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductSetsPagedCallable().futureCall(request); - // Do something. - for (ProductSet element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java deleted file mode 100644 index 15dad8ec89e0..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsets_paged_async] -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.ListProductSetsResponse; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.common.base.Strings; - -public class AsyncListProductSetsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductSetsPaged(); - } - - public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductSetsResponse response = - productSearchClient.listProductSetsCallable().call(request); - for (ProductSet element : response.getProductSetsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java deleted file mode 100644 index 3c85346fad3a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSets.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsets_sync] -import com.google.cloud.vision.v1.ListProductSetsRequest; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncListProductSets { - - public static void main(String[] args) throws Exception { - syncListProductSets(); - } - - public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java deleted file mode 100644 index 13340af5f61e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsets_locationname_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncListProductSetsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductSetsLocationname(); - } - - public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java deleted file mode 100644 index 5462cffe9676..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsets_string_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; - -public class SyncListProductSetsString { - - public static void main(String[] args) throws Exception { - syncListProductSetsString(); - } - - public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java deleted file mode 100644 index bca01700804f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsinproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; - -public class AsyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSet(); - } - - public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java deleted file mode 100644 index 42b373fcbcc1..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsinproductset_paged_async] -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.common.base.Strings; - -public class AsyncListProductsInProductSetPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSetPaged(); - } - - public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsInProductSetResponse response = - productSearchClient.listProductsInProductSetCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java deleted file mode 100644 index fbed3686e817..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsinproductset_sync] -import com.google.cloud.vision.v1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSet(); - } - - public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java deleted file mode 100644 index aacfe68e0c15..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsinproductset_productsetname_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncListProductsInProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetProductsetname(); - } - - public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java deleted file mode 100644 index 465ef4f4b156..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listproductsinproductset_string_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; - -public class SyncListProductsInProductSetString { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetString(); - } - - public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java deleted file mode 100644 index bb444a7a3477..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listreferenceimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class AsyncListReferenceImages { - - public static void main(String[] args) throws Exception { - asyncListReferenceImages(); - } - - public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listReferenceImagesPagedCallable().futureCall(request); - // Do something. - for (ReferenceImage element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java deleted file mode 100644 index 5b5fbeac144f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listreferenceimages_paged_async] -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; -import com.google.common.base.Strings; - -public class AsyncListReferenceImagesPaged { - - public static void main(String[] args) throws Exception { - asyncListReferenceImagesPaged(); - } - - public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListReferenceImagesResponse response = - productSearchClient.listReferenceImagesCallable().call(request); - for (ReferenceImage element : response.getReferenceImagesList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java deleted file mode 100644 index 3ad85e5d4226..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listreferenceimages_sync] -import com.google.cloud.vision.v1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncListReferenceImages { - - public static void main(String[] args) throws Exception { - syncListReferenceImages(); - } - - public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java deleted file mode 100644 index af20db290a29..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listreferenceimages_productname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncListReferenceImagesProductname { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesProductname(); - } - - public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java deleted file mode 100644 index 0200dfb0e566..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_listreferenceimages_string_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ReferenceImage; - -public class SyncListReferenceImagesString { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesString(); - } - - public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java deleted file mode 100644 index d358df187e6f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProducts.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_purgeproducts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.longrunning.Operation; - -public class AsyncPurgeProducts { - - public static void main(String[] args) throws Exception { - asyncPurgeProducts(); - } - - public static void asyncPurgeProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_purgeproducts_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java deleted file mode 100644 index fa20abafc66c..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_purgeproducts_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1.BatchOperationMetadata; -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.protobuf.Empty; - -public class AsyncPurgeProductsLRO { - - public static void main(String[] args) throws Exception { - asyncPurgeProductsLRO(); - } - - public static void asyncPurgeProductsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - OperationFuture future = - productSearchClient.purgeProductsOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_purgeproducts_lro_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java deleted file mode 100644 index ce75436790d3..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProducts.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_purgeproducts_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.PurgeProductsRequest; -import com.google.protobuf.Empty; - -public class SyncPurgeProducts { - - public static void main(String[] args) throws Exception { - syncPurgeProducts(); - } - - public static void syncPurgeProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - productSearchClient.purgeProductsAsync(request).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_purgeproducts_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java deleted file mode 100644 index e4dd9b43b2df..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_purgeproducts_locationname_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncPurgeProductsLocationname { - - public static void main(String[] args) throws Exception { - syncPurgeProductsLocationname(); - } - - public static void syncPurgeProductsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - productSearchClient.purgeProductsAsync(parent).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_purgeproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java deleted file mode 100644 index 5a7bd9a54047..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/purgeproducts/SyncPurgeProductsString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_purgeproducts_string_sync] -import com.google.cloud.vision.v1.LocationName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncPurgeProductsString { - - public static void main(String[] args) throws Exception { - syncPurgeProductsString(); - } - - public static void syncPurgeProductsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - productSearchClient.purgeProductsAsync(parent).get(); - } - } -} -// [END vision_v1_generated_productsearchclient_purgeproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java deleted file mode 100644 index 12bb178479bd..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class AsyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - asyncRemoveProductFromProductSet(); - } - - public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.removeProductFromProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java deleted file mode 100644 index 2c1d2565a2b1..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.cloud.vision.v1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSet(); - } - - public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.removeProductFromProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java deleted file mode 100644 index a85d93527f17..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameProductname(); - } - - public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java deleted file mode 100644 index d14baff1cf16..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameString(); - } - - public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java deleted file mode 100644 index 0295bd233b64..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringProductname(); - } - - public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java deleted file mode 100644 index ce1888b572bf..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] -import com.google.cloud.vision.v1.ProductName; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringString(); - } - - public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java deleted file mode 100644 index 1704b63bc084..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProduct { - - public static void main(String[] args) throws Exception { - asyncUpdateProduct(); - } - - public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java deleted file mode 100644 index ad06e2b0b6a8..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproduct_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProduct { - - public static void main(String[] args) throws Exception { - syncUpdateProduct(); - } - - public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Product response = productSearchClient.updateProduct(request); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java deleted file mode 100644 index 220acd7f3289..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproduct_productfieldmask_sync] -import com.google.cloud.vision.v1.Product; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductProductFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductProductFieldmask(); - } - - public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Product response = productSearchClient.updateProduct(product, updateMask); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java deleted file mode 100644 index c40d55a7ea7e..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - asyncUpdateProductSet(); - } - - public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.updateProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java deleted file mode 100644 index 100bcf3c7d2a..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproductset_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.cloud.vision.v1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - syncUpdateProductSet(); - } - - public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ProductSet response = productSearchClient.updateProductSet(request); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java deleted file mode 100644 index 9727c5ca520f..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] -import com.google.cloud.vision.v1.ProductSearchClient; -import com.google.cloud.vision.v1.ProductSet; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSetProductsetFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductSetProductsetFieldmask(); - } - - public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); - } - } -} -// [END vision_v1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index 7a737a0d8f59..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.samples; - -// [START vision_v1_generated_productsearchsettings_createproductset_sync] -import com.google.cloud.vision.v1.ProductSearchSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 76e7ff91795d..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub.samples; - -// [START vision_v1_generated_imageannotatorstubsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorStubSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index 5396f00848cf..000000000000 --- a/owl-bot-staging/java-vision/v1/samples/snippets/generated/com/google/cloud/vision/v1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1.stub.samples; - -// [START vision_v1_generated_productsearchstubsettings_createproductset_sync] -import com.google.cloud.vision.v1.stub.ProductSearchStubSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchStubSettings.Builder productSearchSettingsBuilder = - ProductSearchStubSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1_generated_productsearchstubsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java deleted file mode 100644 index 9b220983e950..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStub; -import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorClient implements BackgroundResource { - private final ImageAnnotatorSettings settings; - private final ImageAnnotatorStub stub; - - /** Constructs an instance of ImageAnnotatorClient with default settings. */ - public static final ImageAnnotatorClient create() throws IOException { - return create(ImageAnnotatorSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) - throws IOException { - return new ImageAnnotatorClient(settings); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ImageAnnotatorSettings). - */ - public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { - return new ImageAnnotatorClient(stub); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); - } - - protected ImageAnnotatorClient(ImageAnnotatorStub stub) { - this.settings = null; - this.stub = stub; - } - - public final ImageAnnotatorSettings getSettings() { - return settings; - } - - public ImageAnnotatorStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages( - List requests) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { - return batchAnnotateImagesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateImagesCallable() { - return stub.batchAnnotateImagesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java deleted file mode 100644 index 7eb7e7503d94..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); - } - - public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) - throws IOException { - return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ImageAnnotatorStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ImageAnnotatorStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ImageAnnotatorSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ImageAnnotatorStubSettings.newBuilder(clientContext)); - } - - protected Builder(ImageAnnotatorSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ImageAnnotatorStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); - } - - public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { - return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return getStubSettingsBuilder().batchAnnotateImagesSettings(); - } - - @Override - public ImageAnnotatorSettings build() throws IOException { - return new ImageAnnotatorSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json deleted file mode 100644 index 711d85bca29f..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/gapic_metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vision.v1p1beta1", - "libraryPackage": "com.google.cloud.vision.v1p1beta1", - "services": { - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "ImageAnnotatorClient", - "rpcs": { - "BatchAnnotateImages": { - "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java deleted file mode 100644 index 9220329c88a8..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/package-info.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= ImageAnnotatorClient ======================= - * - *

Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

Sample for ImageAnnotatorClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vision.v1p1beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java deleted file mode 100644 index c4c203ed5bd6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java deleted file mode 100644 index 439c6ccba5a4..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/GrpcImageAnnotatorStub.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { - private static final MethodDescriptor - batchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final GrpcImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcImageAnnotatorStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - batchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java deleted file mode 100644 index a3e75588bfdd..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java deleted file mode 100644 index 52cdf9382108..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/HttpJsonImageAnnotatorStub.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - batchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p1beta1/images:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonImageAnnotatorStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - batchAnnotateImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(batchAnnotateImagesMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java deleted file mode 100644 index f7bffd2caeb9..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStub.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ImageAnnotatorStub implements BackgroundResource { - - public UnaryCallable - batchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java deleted file mode 100644 index 8e99499dccad..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorStubSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings - batchAnnotateImagesSettings; - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - public ImageAnnotatorStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcImageAnnotatorStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonImageAnnotatorStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); - } - - /** Builder for ImageAnnotatorStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - batchAnnotateImagesSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(batchAnnotateImagesSettings); - initDefaults(this); - } - - protected Builder(ImageAnnotatorStubSettings settings) { - super(settings); - - batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(batchAnnotateImagesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .batchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - @Override - public ImageAnnotatorStubSettings build() throws IOException { - return new ImageAnnotatorStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java deleted file mode 100644 index f2dc9dfff1bb..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientHttpJsonTest.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p1beta1.stub.HttpJsonImageAnnotatorStub; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientHttpJsonTest { - private static MockHttpService mockService; - private static ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonImageAnnotatorStub.getMethodDescriptors(), - ImageAnnotatorSettings.getDefaultEndpoint()); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java deleted file mode 100644 index 36cd957d50ac..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClientTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.protobuf.AbstractMessage; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientTest { - private static MockImageAnnotator mockImageAnnotator; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() { - mockImageAnnotator = new MockImageAnnotator(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java deleted file mode 100644 index 36198f91c75c..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotator implements MockGrpcService { - private final MockImageAnnotatorImpl serviceImpl; - - public MockImageAnnotator() { - serviceImpl = new MockImageAnnotatorImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java deleted file mode 100644 index 7fc0ebc2c0af..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p1beta1/MockImageAnnotatorImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { - private List requests; - private Queue responses; - - public MockImageAnnotatorImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void batchAnnotateImages( - BatchAnnotateImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateImagesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateImagesResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java deleted file mode 100644 index 142018868f25..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/grpc-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorGrpc.java +++ /dev/null @@ -1,313 +0,0 @@ -package com.google.cloud.vision.v1p1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Service that performs Google Cloud Vision API detection tasks over client
- * images, such as face, landmark, logo, label, and text detection. The
- * ImageAnnotator service returns detected entities from the images.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p1beta1/image_annotator.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ImageAnnotatorGrpc { - - private ImageAnnotatorGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p1beta1.ImageAnnotator"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", - requestType = com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, - responseType = com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) - .build(); - } - } - } - return getBatchAnnotateImagesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - }; - return ImageAnnotatorStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ImageAnnotatorBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - }; - return ImageAnnotatorBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ImageAnnotatorFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - }; - return ImageAnnotatorFutureStub.newStub(factory, channel); - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest, - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse>( - this, METHODID_BATCH_ANNOTATE_IMAGES))) - .build(); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { - private ImageAnnotatorStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ImageAnnotatorBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { - private ImageAnnotatorFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ImageAnnotatorImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BATCH_ANNOTATE_IMAGES: - serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ImageAnnotatorBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ImageAnnotator"); - } - } - - private static final class ImageAnnotatorFileDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier { - ImageAnnotatorFileDescriptorSupplier() {} - } - - private static final class ImageAnnotatorMethodDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ImageAnnotatorMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ImageAnnotatorGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) - .addMethod(getBatchAnnotateImagesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java deleted file mode 100644 index f0c8b57607e4..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java +++ /dev/null @@ -1,1346 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Request for performing Google Cloud Vision API tasks over a user-provided
- * image, with user-requested features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageRequest} - */ -public final class AnnotateImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - AnnotateImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageRequest.newBuilder() to construct. - private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.Image.Builder subBuilder = null; - if (image_ != null) { - subBuilder = image_.toBuilder(); - } - image_ = input.readMessage(com.google.cloud.vision.v1p1beta1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p1beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder.class); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.Image image_; - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return image_ != null; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return The image. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Image getImage() { - return image_ == null ? com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder() { - return getImage(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (image_ != null) { - output.writeMessage(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (image_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) obj; - - if (hasImage() != other.hasImage()) return false; - if (hasImage()) { - if (!getImage() - .equals(other.getImage())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasImage()) { - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for performing Google Cloud Vision API tasks over a user-provided
-   * image, with user-requested features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (imageBuilder_ == null) { - image_ = null; - } else { - image_ = null; - imageBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest build() { - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest buildPartial() { - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p1beta1.AnnotateImageRequest(this); - int from_bitField0_ = bitField0_; - if (imageBuilder_ == null) { - result.image_ = image_; - } else { - result.image_ = imageBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.AnnotateImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest other) { - if (other == com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()) return this; - if (other.hasImage()) { - mergeImage(other.getImage()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.Image image_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder> imageBuilder_; - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return Whether the image field is set. - */ - public boolean hasImage() { - return imageBuilder_ != null || image_ != null; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return The image. - */ - public com.google.cloud.vision.v1p1beta1.Image getImage() { - if (imageBuilder_ == null) { - return image_ == null ? com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; - } else { - return imageBuilder_.getMessage(); - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.vision.v1p1beta1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - image_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public Builder setImage( - com.google.cloud.vision.v1p1beta1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - image_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.vision.v1p1beta1.Image value) { - if (imageBuilder_ == null) { - if (image_ != null) { - image_ = - com.google.cloud.vision.v1p1beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); - } else { - image_ = value; - } - onChanged(); - } else { - imageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - image_ = null; - onChanged(); - } else { - image_ = null; - imageBuilder_ = null; - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p1beta1.Image.Builder getImageBuilder() { - - onChanged(); - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder() { - if (imageBuilder_ != null) { - return imageBuilder_.getMessageOrBuilder(); - } else { - return image_ == null ? - com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance() : image_; - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, com.google.cloud.vision.v1p1beta1.ImageOrBuilder>( - getImage(), - getParentForChildren(), - isClean()); - image_ = null; - } - return imageBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p1beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p1beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p1beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p1beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p1beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p1beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p1beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p1beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p1beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p1beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p1beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p1beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p1beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - private static final com.google.cloud.vision.v1p1beta1.AnnotateImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.AnnotateImageRequest(); - } - - public static com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java deleted file mode 100644 index 20070dd686b2..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface AnnotateImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - * @return The image. - */ - com.google.cloud.vision.v1p1beta1.Image getImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Image image = 1; - */ - com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder(); - - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p1beta1.Feature getFeatures(int index); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p1beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p1beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java deleted file mode 100644 index 9c554e4d2ef2..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java +++ /dev/null @@ -1,4108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Response to an image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} - */ -public final class AnnotateImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - AnnotateImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageResponse.newBuilder() to construct. - private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageResponse() { - faceAnnotations_ = java.util.Collections.emptyList(); - landmarkAnnotations_ = java.util.Collections.emptyList(); - logoAnnotations_ = java.util.Collections.emptyList(); - labelAnnotations_ = java.util.Collections.emptyList(); - textAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - faceAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.FaceAnnotation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - landmarkAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - logoAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labelAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - textAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder subBuilder = null; - if (safeSearchAnnotation_ != null) { - subBuilder = safeSearchAnnotation_.toBuilder(); - } - safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(safeSearchAnnotation_); - safeSearchAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.cloud.vision.v1p1beta1.ImageProperties.Builder subBuilder = null; - if (imagePropertiesAnnotation_ != null) { - subBuilder = imagePropertiesAnnotation_.toBuilder(); - } - imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imagePropertiesAnnotation_); - imagePropertiesAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder subBuilder = null; - if (cropHintsAnnotation_ != null) { - subBuilder = cropHintsAnnotation_.toBuilder(); - } - cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsAnnotation_); - cropHintsAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder subBuilder = null; - if (fullTextAnnotation_ != null) { - subBuilder = fullTextAnnotation_.toBuilder(); - } - fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fullTextAnnotation_); - fullTextAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.vision.v1p1beta1.WebDetection.Builder subBuilder = null; - if (webDetection_ != null) { - subBuilder = webDetection_.toBuilder(); - } - webDetection_ = input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetection_); - webDetection_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); - } - - public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; - private java.util.List faceAnnotations_; - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List getFaceAnnotationsList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List - getFaceAnnotationsOrBuilderList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public int getFaceAnnotationsCount() { - return faceAnnotations_.size(); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { - return faceAnnotations_.get(index); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - return faceAnnotations_.get(index); - } - - public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; - private java.util.List landmarkAnnotations_; - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List getLandmarkAnnotationsList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public int getLandmarkAnnotationsCount() { - return landmarkAnnotations_.size(); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { - return landmarkAnnotations_.get(index); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - return landmarkAnnotations_.get(index); - } - - public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List logoAnnotations_; - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List getLogoAnnotationsList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List - getLogoAnnotationsOrBuilderList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public int getLogoAnnotationsCount() { - return logoAnnotations_.size(); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { - return logoAnnotations_.get(index); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - return logoAnnotations_.get(index); - } - - public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; - private java.util.List labelAnnotations_; - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List getLabelAnnotationsList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List - getLabelAnnotationsOrBuilderList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public int getLabelAnnotationsCount() { - return labelAnnotations_.size(); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { - return labelAnnotations_.get(index); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - return labelAnnotations_.get(index); - } - - public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; - private java.util.List textAnnotations_; - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List getTextAnnotationsList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List - getTextAnnotationsOrBuilderList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public int getTextAnnotationsCount() { - return textAnnotations_.size(); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { - return textAnnotations_.get(index); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - return textAnnotations_.get(index); - } - - public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - @java.lang.Override - public boolean hasFullTextAnnotation() { - return fullTextAnnotation_ != null; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - return getFullTextAnnotation(); - } - - public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - @java.lang.Override - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotation_ != null; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - return getSafeSearchAnnotation(); - } - - public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; - private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - @java.lang.Override - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ != null; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - return getImagePropertiesAnnotation(); - } - - public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; - private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - @java.lang.Override - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotation_ != null; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - return getCropHintsAnnotation(); - } - - public static final int WEB_DETECTION_FIELD_NUMBER = 13; - private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - @java.lang.Override - public boolean hasWebDetection() { - return webDetection_ != null; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { - return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - return getWebDetection(); - } - - public static final int ERROR_FIELD_NUMBER = 9; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < faceAnnotations_.size(); i++) { - output.writeMessage(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - output.writeMessage(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - output.writeMessage(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - output.writeMessage(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - output.writeMessage(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - output.writeMessage(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - output.writeMessage(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - output.writeMessage(9, getError()); - } - if (cropHintsAnnotation_ != null) { - output.writeMessage(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - output.writeMessage(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - output.writeMessage(13, getWebDetection()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < faceAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getError()); - } - if (cropHintsAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getWebDetection()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) obj; - - if (!getFaceAnnotationsList() - .equals(other.getFaceAnnotationsList())) return false; - if (!getLandmarkAnnotationsList() - .equals(other.getLandmarkAnnotationsList())) return false; - if (!getLogoAnnotationsList() - .equals(other.getLogoAnnotationsList())) return false; - if (!getLabelAnnotationsList() - .equals(other.getLabelAnnotationsList())) return false; - if (!getTextAnnotationsList() - .equals(other.getTextAnnotationsList())) return false; - if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; - if (hasFullTextAnnotation()) { - if (!getFullTextAnnotation() - .equals(other.getFullTextAnnotation())) return false; - } - if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; - if (hasSafeSearchAnnotation()) { - if (!getSafeSearchAnnotation() - .equals(other.getSafeSearchAnnotation())) return false; - } - if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; - if (hasImagePropertiesAnnotation()) { - if (!getImagePropertiesAnnotation() - .equals(other.getImagePropertiesAnnotation())) return false; - } - if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; - if (hasCropHintsAnnotation()) { - if (!getCropHintsAnnotation() - .equals(other.getCropHintsAnnotation())) return false; - } - if (hasWebDetection() != other.hasWebDetection()) return false; - if (hasWebDetection()) { - if (!getWebDetection() - .equals(other.getWebDetection())) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFaceAnnotationsCount() > 0) { - hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFaceAnnotationsList().hashCode(); - } - if (getLandmarkAnnotationsCount() > 0) { - hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); - } - if (getLogoAnnotationsCount() > 0) { - hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLogoAnnotationsList().hashCode(); - } - if (getLabelAnnotationsCount() > 0) { - hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLabelAnnotationsList().hashCode(); - } - if (getTextAnnotationsCount() > 0) { - hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTextAnnotationsList().hashCode(); - } - if (hasFullTextAnnotation()) { - hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getFullTextAnnotation().hashCode(); - } - if (hasSafeSearchAnnotation()) { - hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); - } - if (hasImagePropertiesAnnotation()) { - hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); - } - if (hasCropHintsAnnotation()) { - hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsAnnotation().hashCode(); - } - if (hasWebDetection()) { - hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getWebDetection().hashCode(); - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFaceAnnotationsFieldBuilder(); - getLandmarkAnnotationsFieldBuilder(); - getLogoAnnotationsFieldBuilder(); - getLabelAnnotationsFieldBuilder(); - getTextAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - faceAnnotationsBuilder_.clear(); - } - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - landmarkAnnotationsBuilder_.clear(); - } - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - logoAnnotationsBuilder_.clear(); - } - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelAnnotationsBuilder_.clear(); - } - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - textAnnotationsBuilder_.clear(); - } - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - if (webDetectionBuilder_ == null) { - webDetection_ = null; - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse build() { - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(this); - int from_bitField0_ = bitField0_; - if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.faceAnnotations_ = faceAnnotations_; - } else { - result.faceAnnotations_ = faceAnnotationsBuilder_.build(); - } - if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.landmarkAnnotations_ = landmarkAnnotations_; - } else { - result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); - } - if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.logoAnnotations_ = logoAnnotations_; - } else { - result.logoAnnotations_ = logoAnnotationsBuilder_.build(); - } - if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labelAnnotations_ = labelAnnotations_; - } else { - result.labelAnnotations_ = labelAnnotationsBuilder_.build(); - } - if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.textAnnotations_ = textAnnotations_; - } else { - result.textAnnotations_ = textAnnotationsBuilder_.build(); - } - if (fullTextAnnotationBuilder_ == null) { - result.fullTextAnnotation_ = fullTextAnnotation_; - } else { - result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); - } - if (safeSearchAnnotationBuilder_ == null) { - result.safeSearchAnnotation_ = safeSearchAnnotation_; - } else { - result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); - } - if (imagePropertiesAnnotationBuilder_ == null) { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; - } else { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); - } - if (cropHintsAnnotationBuilder_ == null) { - result.cropHintsAnnotation_ = cropHintsAnnotation_; - } else { - result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); - } - if (webDetectionBuilder_ == null) { - result.webDetection_ = webDetection_; - } else { - result.webDetection_ = webDetectionBuilder_.build(); - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.AnnotateImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other) { - if (other == com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()) return this; - if (faceAnnotationsBuilder_ == null) { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotations_.isEmpty()) { - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.addAll(other.faceAnnotations_); - } - onChanged(); - } - } else { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotationsBuilder_.isEmpty()) { - faceAnnotationsBuilder_.dispose(); - faceAnnotationsBuilder_ = null; - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - faceAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFaceAnnotationsFieldBuilder() : null; - } else { - faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); - } - } - } - if (landmarkAnnotationsBuilder_ == null) { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotations_.isEmpty()) { - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.addAll(other.landmarkAnnotations_); - } - onChanged(); - } - } else { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotationsBuilder_.isEmpty()) { - landmarkAnnotationsBuilder_.dispose(); - landmarkAnnotationsBuilder_ = null; - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - landmarkAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarkAnnotationsFieldBuilder() : null; - } else { - landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); - } - } - } - if (logoAnnotationsBuilder_ == null) { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotations_.isEmpty()) { - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.addAll(other.logoAnnotations_); - } - onChanged(); - } - } else { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotationsBuilder_.isEmpty()) { - logoAnnotationsBuilder_.dispose(); - logoAnnotationsBuilder_ = null; - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - logoAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLogoAnnotationsFieldBuilder() : null; - } else { - logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); - } - } - } - if (labelAnnotationsBuilder_ == null) { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotations_.isEmpty()) { - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.addAll(other.labelAnnotations_); - } - onChanged(); - } - } else { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotationsBuilder_.isEmpty()) { - labelAnnotationsBuilder_.dispose(); - labelAnnotationsBuilder_ = null; - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - labelAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelAnnotationsFieldBuilder() : null; - } else { - labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); - } - } - } - if (textAnnotationsBuilder_ == null) { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotations_.isEmpty()) { - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureTextAnnotationsIsMutable(); - textAnnotations_.addAll(other.textAnnotations_); - } - onChanged(); - } - } else { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotationsBuilder_.isEmpty()) { - textAnnotationsBuilder_.dispose(); - textAnnotationsBuilder_ = null; - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - textAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTextAnnotationsFieldBuilder() : null; - } else { - textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); - } - } - } - if (other.hasFullTextAnnotation()) { - mergeFullTextAnnotation(other.getFullTextAnnotation()); - } - if (other.hasSafeSearchAnnotation()) { - mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); - } - if (other.hasImagePropertiesAnnotation()) { - mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); - } - if (other.hasCropHintsAnnotation()) { - mergeCropHintsAnnotation(other.getCropHintsAnnotation()); - } - if (other.hasWebDetection()) { - mergeWebDetection(other.getWebDetection()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List faceAnnotations_ = - java.util.Collections.emptyList(); - private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; - - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List getFaceAnnotationsList() { - if (faceAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } else { - return faceAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public int getFaceAnnotationsCount() { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.size(); - } else { - return faceAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); - } else { - return faceAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations(com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addAllFaceAnnotations( - java.lang.Iterable values) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, faceAnnotations_); - onChanged(); - } else { - faceAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder clearFaceAnnotations() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - faceAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public Builder removeFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.remove(index); - onChanged(); - } else { - faceAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); } else { - return faceAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsOrBuilderList() { - if (faceAnnotationsBuilder_ != null) { - return faceAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { - return getFaceAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsBuilderList() { - return getFaceAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> - getFaceAnnotationsFieldBuilder() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder>( - faceAnnotations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - faceAnnotations_ = null; - } - return faceAnnotationsBuilder_; - } - - private java.util.List landmarkAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; - - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List getLandmarkAnnotationsList() { - if (landmarkAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } else { - return landmarkAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public int getLandmarkAnnotationsCount() { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.size(); - } else { - return landmarkAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); - } else { - return landmarkAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addAllLandmarkAnnotations( - java.lang.Iterable values) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarkAnnotations_); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder clearLandmarkAnnotations() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - landmarkAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder removeLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.remove(index); - onChanged(); - } else { - landmarkAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); } else { - return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - if (landmarkAnnotationsBuilder_ != null) { - return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsBuilderList() { - return getLandmarkAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> - getLandmarkAnnotationsFieldBuilder() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( - landmarkAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - landmarkAnnotations_ = null; - } - return landmarkAnnotationsBuilder_; - } - - private java.util.List logoAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; - - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List getLogoAnnotationsList() { - if (logoAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } else { - return logoAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public int getLogoAnnotationsCount() { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.size(); - } else { - return logoAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); - } else { - return logoAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addAllLogoAnnotations( - java.lang.Iterable values) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logoAnnotations_); - onChanged(); - } else { - logoAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder clearLogoAnnotations() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - logoAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder removeLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.remove(index); - onChanged(); - } else { - logoAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); } else { - return logoAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsOrBuilderList() { - if (logoAnnotationsBuilder_ != null) { - return logoAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { - return getLogoAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsBuilderList() { - return getLogoAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> - getLogoAnnotationsFieldBuilder() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( - logoAnnotations_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - logoAnnotations_ = null; - } - return logoAnnotationsBuilder_; - } - - private java.util.List labelAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; - - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List getLabelAnnotationsList() { - if (labelAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } else { - return labelAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public int getLabelAnnotationsCount() { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.size(); - } else { - return labelAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); - } else { - return labelAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addAllLabelAnnotations( - java.lang.Iterable values) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelAnnotations_); - onChanged(); - } else { - labelAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder clearLabelAnnotations() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public Builder removeLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.remove(index); - onChanged(); - } else { - labelAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); } else { - return labelAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsOrBuilderList() { - if (labelAnnotationsBuilder_ != null) { - return labelAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { - return getLabelAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsBuilderList() { - return getLabelAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> - getLabelAnnotationsFieldBuilder() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( - labelAnnotations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - labelAnnotations_ = null; - } - return labelAnnotationsBuilder_; - } - - private java.util.List textAnnotations_ = - java.util.Collections.emptyList(); - private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = new java.util.ArrayList(textAnnotations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; - - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List getTextAnnotationsList() { - if (textAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textAnnotations_); - } else { - return textAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public int getTextAnnotationsCount() { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.size(); - } else { - return textAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); - } else { - return textAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addAllTextAnnotations( - java.lang.Iterable values) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, textAnnotations_); - onChanged(); - } else { - textAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder clearTextAnnotations() { - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - textAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public Builder removeTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.remove(index); - onChanged(); - } else { - textAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); } else { - return textAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsOrBuilderList() { - if (textAnnotationsBuilder_ != null) { - return textAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textAnnotations_); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { - return getTextAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsBuilderList() { - return getTextAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> - getTextAnnotationsFieldBuilder() { - if (textAnnotationsBuilder_ == null) { - textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( - textAnnotations_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - textAnnotations_ = null; - } - return textAnnotationsBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - public boolean hasFullTextAnnotation() { - return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } else { - return fullTextAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fullTextAnnotation_ = value; - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation( - com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder builderForValue) { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = builderForValue.build(); - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (fullTextAnnotation_ != null) { - fullTextAnnotation_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); - } else { - fullTextAnnotation_ = value; - } - onChanged(); - } else { - fullTextAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder clearFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - onChanged(); - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { - - onChanged(); - return getFullTextAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - if (fullTextAnnotationBuilder_ != null) { - return fullTextAnnotationBuilder_.getMessageOrBuilder(); - } else { - return fullTextAnnotation_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> - getFullTextAnnotationFieldBuilder() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder>( - getFullTextAnnotation(), - getParentForChildren(), - isClean()); - fullTextAnnotation_ = null; - } - return fullTextAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } else { - return safeSearchAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - safeSearchAnnotation_ = value; - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation( - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder builderForValue) { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = builderForValue.build(); - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (safeSearchAnnotation_ != null) { - safeSearchAnnotation_ = - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); - } else { - safeSearchAnnotation_ = value; - } - onChanged(); - } else { - safeSearchAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder clearSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - onChanged(); - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { - - onChanged(); - return getSafeSearchAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - if (safeSearchAnnotationBuilder_ != null) { - return safeSearchAnnotationBuilder_.getMessageOrBuilder(); - } else { - return safeSearchAnnotation_ == null ? - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> - getSafeSearchAnnotationFieldBuilder() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder>( - getSafeSearchAnnotation(), - getParentForChildren(), - isClean()); - safeSearchAnnotation_ = null; - } - return safeSearchAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } else { - return imagePropertiesAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p1beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imagePropertiesAnnotation_ = value; - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation( - com.google.cloud.vision.v1p1beta1.ImageProperties.Builder builderForValue) { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = builderForValue.build(); - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p1beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (imagePropertiesAnnotation_ != null) { - imagePropertiesAnnotation_ = - com.google.cloud.vision.v1p1beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); - } else { - imagePropertiesAnnotation_ = value; - } - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder clearImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - onChanged(); - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p1beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { - - onChanged(); - return getImagePropertiesAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - if (imagePropertiesAnnotationBuilder_ != null) { - return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); - } else { - return imagePropertiesAnnotation_ == null ? - com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> - getImagePropertiesAnnotationFieldBuilder() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder>( - getImagePropertiesAnnotation(), - getParentForChildren(), - isClean()); - imagePropertiesAnnotation_ = null; - } - return imagePropertiesAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } else { - return cropHintsAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsAnnotation_ = value; - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation( - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder builderForValue) { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = builderForValue.build(); - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (cropHintsAnnotation_ != null) { - cropHintsAnnotation_ = - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); - } else { - cropHintsAnnotation_ = value; - } - onChanged(); - } else { - cropHintsAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder clearCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - onChanged(); - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { - - onChanged(); - return getCropHintsAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - if (cropHintsAnnotationBuilder_ != null) { - return cropHintsAnnotationBuilder_.getMessageOrBuilder(); - } else { - return cropHintsAnnotation_ == null ? - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> - getCropHintsAnnotationFieldBuilder() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder>( - getCropHintsAnnotation(), - getParentForChildren(), - isClean()); - cropHintsAnnotation_ = null; - } - return cropHintsAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> webDetectionBuilder_; - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - public boolean hasWebDetection() { - return webDetectionBuilder_ != null || webDetection_ != null; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { - if (webDetectionBuilder_ == null) { - return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; - } else { - return webDetectionBuilder_.getMessage(); - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetection_ = value; - onChanged(); - } else { - webDetectionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection( - com.google.cloud.vision.v1p1beta1.WebDetection.Builder builderForValue) { - if (webDetectionBuilder_ == null) { - webDetection_ = builderForValue.build(); - onChanged(); - } else { - webDetectionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public Builder mergeWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (webDetection_ != null) { - webDetection_ = - com.google.cloud.vision.v1p1beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); - } else { - webDetection_ = value; - } - onChanged(); - } else { - webDetectionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public Builder clearWebDetection() { - if (webDetectionBuilder_ == null) { - webDetection_ = null; - onChanged(); - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.Builder getWebDetectionBuilder() { - - onChanged(); - return getWebDetectionFieldBuilder().getBuilder(); - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - if (webDetectionBuilder_ != null) { - return webDetectionBuilder_.getMessageOrBuilder(); - } else { - return webDetection_ == null ? - com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> - getWebDetectionFieldBuilder() { - if (webDetectionBuilder_ == null) { - webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder>( - getWebDetection(), - getParentForChildren(), - isClean()); - webDetection_ = null; - } - return webDetectionBuilder_; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - private static final com.google.cloud.vision.v1p1beta1.AnnotateImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(); - } - - public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java deleted file mode 100644 index 1ee0a0448868..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponseOrBuilder.java +++ /dev/null @@ -1,406 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface AnnotateImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - int getFaceAnnotationsCount(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsOrBuilderList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - int getLandmarkAnnotationsCount(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsOrBuilderList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - int getLogoAnnotationsCount(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsOrBuilderList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - int getLabelAnnotationsCount(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsOrBuilderList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - int getTextAnnotationsCount(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsOrBuilderList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - boolean hasFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); - - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - boolean hasSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); - - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - boolean hasImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; - */ - com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); - - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - boolean hasCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); - - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - boolean hasWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; - */ - com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); - - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java deleted file mode 100644 index 2039cb820876..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Multiple image annotation requests are batched into a single service call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} - */ -public final class BatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - BatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesRequest.newBuilder() to construct. - private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple image annotation requests are batched into a single service call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index 31d4013e1f92..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface BatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p1beta1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java deleted file mode 100644 index 26dfffc1b251..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Response to a batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} - */ -public final class BatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - BatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesResponse.newBuilder() to construct. - private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index 564cfec86844..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface BatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java deleted file mode 100644 index bc80bf6116b4..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java +++ /dev/null @@ -1,1914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Logical element on the page.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Block} - */ -public final class Block extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Block) - BlockOrBuilder { -private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Block() { - paragraphs_ = java.util.Collections.emptyList(); - blockType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Block(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Block( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paragraphs_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Paragraph.parser(), extensionRegistry)); - break; - } - case 32: { - int rawValue = input.readEnum(); - - blockType_ = rawValue; - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Block.class, com.google.cloud.vision.v1p1beta1.Block.Builder.class); - } - - /** - *
-   * Type of a block (text, image etc) as identified by OCR.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p1beta1.Block.BlockType} - */ - public enum BlockType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - TABLE(2), - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - PICTURE(3), - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - RULER(4), - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - BARCODE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - public static final int TABLE_VALUE = 2; - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - public static final int PICTURE_VALUE = 3; - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - public static final int RULER_VALUE = 4; - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - public static final int BARCODE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TEXT; - case 2: return TABLE; - case 3: return PICTURE; - case 4: return RULER; - case 5: return BARCODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockType findValueByNumber(int number) { - return BlockType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.Block.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockType[] VALUES = values(); - - public static BlockType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Block.BlockType) - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int PARAGRAPHS_FIELD_NUMBER = 3; - private java.util.List paragraphs_; - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List getParagraphsList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - return paragraphs_.get(index); - } - - public static final int BLOCK_TYPE_FIELD_NUMBER = 4; - private int blockType_; - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Block.BlockType result = com.google.cloud.vision.v1p1beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p1beta1.Block.BlockType.UNRECOGNIZED : result; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p1beta1.Block.BlockType.UNKNOWN.getNumber()) { - output.writeEnum(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p1beta1.Block.BlockType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Block)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Block other = (com.google.cloud.vision.v1p1beta1.Block) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getParagraphsList() - .equals(other.getParagraphsList())) return false; - if (blockType_ != other.blockType_) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + blockType_; - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Block parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Block parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Block prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Logical element on the page.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Block} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Block) - com.google.cloud.vision.v1p1beta1.BlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Block.class, com.google.cloud.vision.v1p1beta1.Block.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Block.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParagraphsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - paragraphsBuilder_.clear(); - } - blockType_ = 0; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block build() { - com.google.cloud.vision.v1p1beta1.Block result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block buildPartial() { - com.google.cloud.vision.v1p1beta1.Block result = new com.google.cloud.vision.v1p1beta1.Block(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - result.blockType_ = blockType_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Block) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Block)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Block other) { - if (other == com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParagraphsFieldBuilder() : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (other.blockType_ != 0) { - setBlockTypeValue(other.getBlockTypeValue()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Block parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Block) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List paragraphs_ = - java.util.Collections.emptyList(); - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(paragraphs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder> paragraphsBuilder_; - - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public java.util.List getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); - } else { - return paragraphsBuilder_.getMessageList(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p1beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs(com.google.cloud.vision.v1p1beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p1beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p1beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder addAllParagraphs( - java.lang.Iterable values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p1beta1.Paragraph.Builder getParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(paragraphs_); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p1beta1.Paragraph.Builder addParagraphsBuilder() { - return getParagraphsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p1beta1.Paragraph.Builder addParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - paragraphs_ = null; - } - return paragraphsBuilder_; - } - - private int blockType_ = 0; - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @param value The enum numeric value on the wire for blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockTypeValue(int value) { - - blockType_ = value; - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Block.BlockType result = com.google.cloud.vision.v1p1beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p1beta1.Block.BlockType.UNRECOGNIZED : result; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @param value The blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockType(com.google.cloud.vision.v1p1beta1.Block.BlockType value) { - if (value == null) { - throw new NullPointerException(); - } - - blockType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return This builder for chaining. - */ - public Builder clearBlockType() { - - blockType_ = 0; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Block) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Block) - private static final com.google.cloud.vision.v1p1beta1.Block DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Block(); - } - - public static com.google.cloud.vision.v1p1beta1.Block getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Block parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Block(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java deleted file mode 100644 index 8bd1180141c2..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BlockOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Block) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p1beta1.Paragraph getParagraphs(int index); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - int getParagraphsCount(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsOrBuilderList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index); - - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - int getBlockTypeValue(); - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - com.google.cloud.vision.v1p1beta1.Block.BlockType getBlockType(); - - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java deleted file mode 100644 index 7526ac1941fd..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A bounding polygon for the detected image annotation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BoundingPoly} - */ -public final class BoundingPoly extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.BoundingPoly) - BoundingPolyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingPoly() { - vertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vertices_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Vertex.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BoundingPoly.class, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder.class); - } - - public static final int VERTICES_FIELD_NUMBER = 1; - private java.util.List vertices_; - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List getVerticesList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List - getVerticesOrBuilderList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - @java.lang.Override - public int getVerticesCount() { - return vertices_.size(); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index) { - return vertices_.get(index); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - return vertices_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < vertices_.size(); i++) { - output.writeMessage(1, vertices_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < vertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, vertices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.BoundingPoly other = (com.google.cloud.vision.v1p1beta1.BoundingPoly) obj; - - if (!getVerticesList() - .equals(other.getVerticesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVerticesCount() > 0) { - hash = (37 * hash) + VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A bounding polygon for the detected image annotation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.BoundingPoly} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.BoundingPoly) - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.BoundingPoly.class, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVerticesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - verticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly build() { - com.google.cloud.vision.v1p1beta1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly buildPartial() { - com.google.cloud.vision.v1p1beta1.BoundingPoly result = new com.google.cloud.vision.v1p1beta1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.vertices_ = vertices_; - } else { - result.vertices_ = verticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.BoundingPoly) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.BoundingPoly)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.BoundingPoly other) { - if (other == com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance()) return this; - if (verticesBuilder_ == null) { - if (!other.vertices_.isEmpty()) { - if (vertices_.isEmpty()) { - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVerticesIsMutable(); - vertices_.addAll(other.vertices_); - } - onChanged(); - } - } else { - if (!other.vertices_.isEmpty()) { - if (verticesBuilder_.isEmpty()) { - verticesBuilder_.dispose(); - verticesBuilder_ = null; - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - verticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVerticesFieldBuilder() : null; - } else { - verticesBuilder_.addAllMessages(other.vertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List vertices_ = - java.util.Collections.emptyList(); - private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(vertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder> verticesBuilder_; - - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public java.util.List getVerticesList() { - if (verticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(vertices_); - } else { - return verticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public int getVerticesCount() { - if (verticesBuilder_ == null) { - return vertices_.size(); - } else { - return verticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); - } else { - return verticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p1beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.set(index, value); - onChanged(); - } else { - verticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.set(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder addVertices(com.google.cloud.vision.v1p1beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(value); - onChanged(); - } else { - verticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p1beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(index, value); - onChanged(); - } else { - verticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder addVertices( - com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p1beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder addAllVertices( - java.lang.Iterable values) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vertices_); - onChanged(); - } else { - verticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder clearVertices() { - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - verticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public Builder removeVertices(int index) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.remove(index); - onChanged(); - } else { - verticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p1beta1.Vertex.Builder getVerticesBuilder( - int index) { - return getVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); } else { - return verticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesOrBuilderList() { - if (verticesBuilder_ != null) { - return verticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(vertices_); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder() { - return getVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder( - int index) { - return getVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesBuilderList() { - return getVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder> - getVerticesFieldBuilder() { - if (verticesBuilder_ == null) { - verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - vertices_ = null; - } - return verticesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BoundingPoly) - private static final com.google.cloud.vision.v1p1beta1.BoundingPoly DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.BoundingPoly(); - } - - public static com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java deleted file mode 100644 index 04377a3e7f55..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface BoundingPolyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p1beta1.Vertex getVertices(int index); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - int getVerticesCount(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesOrBuilderList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p1beta1.VertexOrBuilder getVerticesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java deleted file mode 100644 index a63e2cd9d8e4..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Color information consists of RGB channels, score, and the fraction of
- * the image that the color occupies in the image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ColorInfo} - */ -public final class ColorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ColorInfo) - ColorInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use ColorInfo.newBuilder() to construct. - private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ColorInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ColorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Color.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 29: { - - pixelFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ColorInfo.class, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder.class); - } - - public static final int COLOR_FIELD_NUMBER = 1; - private com.google.type.Color color_; - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return color_ != null; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return getColor(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; - private float pixelFraction_; - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (color_ != null) { - output.writeMessage(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - output.writeFloat(3, pixelFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, pixelFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ColorInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.ColorInfo other = (com.google.cloud.vision.v1p1beta1.ColorInfo) obj; - - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor() - .equals(other.getColor())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getPixelFraction()) - != java.lang.Float.floatToIntBits( - other.getPixelFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPixelFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ColorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Color information consists of RGB channels, score, and the fraction of
-   * the image that the color occupies in the image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ColorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ColorInfo) - com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ColorInfo.class, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - score_ = 0F; - - pixelFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfo build() { - com.google.cloud.vision.v1p1beta1.ColorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfo buildPartial() { - com.google.cloud.vision.v1p1beta1.ColorInfo result = new com.google.cloud.vision.v1p1beta1.ColorInfo(this); - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - result.score_ = score_; - result.pixelFraction_ = pixelFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.ColorInfo) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.ColorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ColorInfo other) { - if (other == com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()) return this; - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getPixelFraction() != 0F) { - setPixelFraction(other.getPixelFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.ColorInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.ColorInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor( - com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.Color.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - - private float score_ ; - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float pixelFraction_ ; - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @param value The pixelFraction to set. - * @return This builder for chaining. - */ - public Builder setPixelFraction(float value) { - - pixelFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearPixelFraction() { - - pixelFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ColorInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ColorInfo) - private static final com.google.cloud.vision.v1p1beta1.ColorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ColorInfo(); - } - - public static com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java deleted file mode 100644 index 774d3b205355..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfoOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ColorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ColorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - boolean hasColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - com.google.type.Color getColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - com.google.type.ColorOrBuilder getColorOrBuilder(); - - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - float getPixelFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java deleted file mode 100644 index a3e3f94b7021..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java +++ /dev/null @@ -1,845 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Single crop hint that is used to generate a new crop when serving an image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHint} - */ -public final class CropHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHint) - CropHintOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHint.newBuilder() to construct. - private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHint() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - case 29: { - - importanceFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHint.class, com.google.cloud.vision.v1p1beta1.CropHint.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; - private float importanceFraction_; - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - output.writeFloat(3, importanceFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, importanceFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHint)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.CropHint other = (com.google.cloud.vision.v1p1beta1.CropHint) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getImportanceFraction()) - != java.lang.Float.floatToIntBits( - other.getImportanceFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImportanceFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Single crop hint that is used to generate a new crop when serving an image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHint) - com.google.cloud.vision.v1p1beta1.CropHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHint.class, com.google.cloud.vision.v1p1beta1.CropHint.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.CropHint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - confidence_ = 0F; - - importanceFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHint build() { - com.google.cloud.vision.v1p1beta1.CropHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHint buildPartial() { - com.google.cloud.vision.v1p1beta1.CropHint result = new com.google.cloud.vision.v1p1beta1.CropHint(this); - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.confidence_ = confidence_; - result.importanceFraction_ = importanceFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.CropHint) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHint other) { - if (other == com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getImportanceFraction() != 0F) { - setImportanceFraction(other.getImportanceFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.CropHint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float importanceFraction_ ; - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @param value The importanceFraction to set. - * @return This builder for chaining. - */ - public Builder setImportanceFraction(float value) { - - importanceFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearImportanceFraction() { - - importanceFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHint) - private static final com.google.cloud.vision.v1p1beta1.CropHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHint(); - } - - public static com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java deleted file mode 100644 index 05a68b2a579d..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface CropHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - float getImportanceFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java deleted file mode 100644 index fdbde2545130..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Set of crop hints that are used to generate new crops when serving images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsAnnotation} - */ -public final class CropHintsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - CropHintsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsAnnotation.newBuilder() to construct. - private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsAnnotation() { - cropHints_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cropHints_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.CropHint.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder.class); - } - - public static final int CROP_HINTS_FIELD_NUMBER = 1; - private java.util.List cropHints_; - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List getCropHintsList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List - getCropHintsOrBuilderList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public int getCropHintsCount() { - return cropHints_.size(); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index) { - return cropHints_.get(index); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - return cropHints_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < cropHints_.size(); i++) { - output.writeMessage(1, cropHints_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < cropHints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cropHints_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHintsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) obj; - - if (!getCropHintsList() - .equals(other.getCropHintsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCropHintsCount() > 0) { - hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of crop hints that are used to generate new crops when serving images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCropHintsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation build() { - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p1beta1.CropHintsAnnotation(this); - int from_bitField0_ = bitField0_; - if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cropHints_ = cropHints_; - } else { - result.cropHints_ = cropHintsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHintsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHintsAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance()) return this; - if (cropHintsBuilder_ == null) { - if (!other.cropHints_.isEmpty()) { - if (cropHints_.isEmpty()) { - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCropHintsIsMutable(); - cropHints_.addAll(other.cropHints_); - } - onChanged(); - } - } else { - if (!other.cropHints_.isEmpty()) { - if (cropHintsBuilder_.isEmpty()) { - cropHintsBuilder_.dispose(); - cropHintsBuilder_ = null; - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - cropHintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCropHintsFieldBuilder() : null; - } else { - cropHintsBuilder_.addAllMessages(other.cropHints_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.CropHintsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List cropHints_ = - java.util.Collections.emptyList(); - private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(cropHints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder> cropHintsBuilder_; - - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public java.util.List getCropHintsList() { - if (cropHintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cropHints_); - } else { - return cropHintsBuilder_.getMessageList(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public int getCropHintsCount() { - if (cropHintsBuilder_ == null) { - return cropHints_.size(); - } else { - return cropHintsBuilder_.getCount(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); - } else { - return cropHintsBuilder_.getMessage(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p1beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.set(index, value); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.set(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints(com.google.cloud.vision.v1p1beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p1beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(index, value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p1beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder addAllCropHints( - java.lang.Iterable values) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cropHints_); - onChanged(); - } else { - cropHintsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder clearCropHints() { - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public Builder removeCropHints(int index) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.remove(index); - onChanged(); - } else { - cropHintsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p1beta1.CropHint.Builder getCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().getBuilder(index); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); } else { - return cropHintsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsOrBuilderList() { - if (cropHintsBuilder_ != null) { - return cropHintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cropHints_); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder() { - return getCropHintsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsBuilderList() { - return getCropHintsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder> - getCropHintsFieldBuilder() { - if (cropHintsBuilder_ == null) { - cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cropHints_ = null; - } - return cropHintsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - private static final com.google.cloud.vision.v1p1beta1.CropHintsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHintsAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java deleted file mode 100644 index ff3802bfe6a1..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface CropHintsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p1beta1.CropHint getCropHints(int index); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - int getCropHintsCount(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsOrBuilderList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p1beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java deleted file mode 100644 index 618af7cbd553..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Parameters for crop hints annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsParams} - */ -public final class CropHintsParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.CropHintsParams) - CropHintsParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsParams.newBuilder() to construct. - private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsParams() { - aspectRatios_ = emptyFloatList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - aspectRatios_.addFloat(input.readFloat()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - aspectRatios_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHintsParams.class, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder.class); - } - - public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList aspectRatios_; - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - @java.lang.Override - public java.util.List - getAspectRatiosList() { - return aspectRatios_; - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - private int aspectRatiosMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getAspectRatiosList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); - } - for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.getFloat(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getAspectRatiosList().size(); - size += dataSize; - if (!getAspectRatiosList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - aspectRatiosMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.CropHintsParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.CropHintsParams other = (com.google.cloud.vision.v1p1beta1.CropHintsParams) obj; - - if (!getAspectRatiosList() - .equals(other.getAspectRatiosList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAspectRatiosCount() > 0) { - hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatiosList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.CropHintsParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.CropHintsParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.CropHintsParams) - com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.CropHintsParams.class, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.CropHintsParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParams build() { - com.google.cloud.vision.v1p1beta1.CropHintsParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParams buildPartial() { - com.google.cloud.vision.v1p1beta1.CropHintsParams result = new com.google.cloud.vision.v1p1beta1.CropHintsParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aspectRatios_ = aspectRatios_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.CropHintsParams) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.CropHintsParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.CropHintsParams other) { - if (other == com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance()) return this; - if (!other.aspectRatios_.isEmpty()) { - if (aspectRatios_.isEmpty()) { - aspectRatios_ = other.aspectRatios_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAspectRatiosIsMutable(); - aspectRatios_.addAll(other.aspectRatios_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.CropHintsParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.CropHintsParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); - private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = mutableCopy(aspectRatios_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - public java.util.List - getAspectRatiosList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index to set the value at. - * @param value The aspectRatios to set. - * @return This builder for chaining. - */ - public Builder setAspectRatios( - int index, float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.setFloat(index, value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param value The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAspectRatios(float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.addFloat(value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param values The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAllAspectRatios( - java.lang.Iterable values) { - ensureAspectRatiosIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aspectRatios_); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return This builder for chaining. - */ - public Builder clearAspectRatios() { - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.CropHintsParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsParams) - private static final com.google.cloud.vision.v1p1beta1.CropHintsParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.CropHintsParams(); - } - - public static com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java deleted file mode 100644 index eea5626dd8dd..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParamsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface CropHintsParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.CropHintsParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - java.util.List getAspectRatiosList(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - int getAspectRatiosCount(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - float getAspectRatios(int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java deleted file mode 100644 index d1721d2d5922..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Set of dominant colors and their corresponding scores.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.DominantColorsAnnotation} - */ -public final class DominantColorsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - DominantColorsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DominantColorsAnnotation.newBuilder() to construct. - private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DominantColorsAnnotation() { - colors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DominantColorsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DominantColorsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colors_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.ColorInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder.class); - } - - public static final int COLORS_FIELD_NUMBER = 1; - private java.util.List colors_; - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List getColorsList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List - getColorsOrBuilderList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public int getColorsCount() { - return colors_.size(); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index) { - return colors_.get(index); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - return colors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < colors_.size(); i++) { - output.writeMessage(1, colors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < colors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, colors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) obj; - - if (!getColorsList() - .equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getColorsCount() > 0) { - hash = (37 * hash) + COLORS_FIELD_NUMBER; - hash = (53 * hash) + getColorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of dominant colors and their corresponding scores.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.DominantColorsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getColorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - colorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation build() { - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation(this); - int from_bitField0_ = bitField0_; - if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.colors_ = colors_; - } else { - result.colors_ = colorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance()) return this; - if (colorsBuilder_ == null) { - if (!other.colors_.isEmpty()) { - if (colors_.isEmpty()) { - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColorsIsMutable(); - colors_.addAll(other.colors_); - } - onChanged(); - } - } else { - if (!other.colors_.isEmpty()) { - if (colorsBuilder_.isEmpty()) { - colorsBuilder_.dispose(); - colorsBuilder_ = null; - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - colorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getColorsFieldBuilder() : null; - } else { - colorsBuilder_.addAllMessages(other.colors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List colors_ = - java.util.Collections.emptyList(); - private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(colors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder> colorsBuilder_; - - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public java.util.List getColorsList() { - if (colorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(colors_); - } else { - return colorsBuilder_.getMessageList(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public int getColorsCount() { - if (colorsBuilder_ == null) { - return colors_.size(); - } else { - return colorsBuilder_.getCount(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); - } else { - return colorsBuilder_.getMessage(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p1beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.set(index, value); - onChanged(); - } else { - colorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.set(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder addColors(com.google.cloud.vision.v1p1beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(value); - onChanged(); - } else { - colorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p1beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(index, value); - onChanged(); - } else { - colorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder addColors( - com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder addAllColors( - java.lang.Iterable values) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, colors_); - onChanged(); - } else { - colorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder clearColors() { - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - colorsBuilder_.clear(); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public Builder removeColors(int index) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.remove(index); - onChanged(); - } else { - colorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder getColorsBuilder( - int index) { - return getColorsFieldBuilder().getBuilder(index); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); } else { - return colorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsOrBuilderList() { - if (colorsBuilder_ != null) { - return colorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(colors_); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder() { - return getColorsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder( - int index) { - return getColorsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsBuilderList() { - return getColorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder> - getColorsFieldBuilder() { - if (colorsBuilder_ == null) { - colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - colors_ = null; - } - return colorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - private static final com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DominantColorsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DominantColorsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java deleted file mode 100644 index 07bc1245e0ce..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface DominantColorsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p1beta1.ColorInfo getColors(int index); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - int getColorsCount(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsOrBuilderList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java deleted file mode 100644 index ada7e6fafa1f..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java +++ /dev/null @@ -1,2468 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Set of detected entity features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.EntityAnnotation} - */ -public final class EntityAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.EntityAnnotation) - EntityAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityAnnotation.newBuilder() to construct. - private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityAnnotation() { - mid_ = ""; - locale_ = ""; - description_ = ""; - locations_ = java.util.Collections.emptyList(); - properties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - locale_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - case 53: { - - topicality_ = input.readFloat(); - break; - } - case 58: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.LocationInfo.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - properties_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Property.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.class, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCALE_FIELD_NUMBER = 2; - private volatile java.lang.Object locale_; - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - @java.lang.Override - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } - } - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int TOPICALITY_FIELD_NUMBER = 6; - private float topicality_; - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 7; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 8; - private java.util.List locations_; - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index) { - return locations_.get(index); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 9; - private java.util.List properties_; - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List getPropertiesList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List - getPropertiesOrBuilderList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - @java.lang.Override - public int getPropertiesCount() { - return properties_.size(); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Property getProperties(int index) { - return properties_.get(index); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - return properties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - output.writeFloat(6, topicality_); - } - if (boundingPoly_ != null) { - output.writeMessage(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - output.writeMessage(9, properties_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, topicality_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, properties_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.EntityAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.EntityAnnotation other = (com.google.cloud.vision.v1p1beta1.EntityAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLocale() - .equals(other.getLocale())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getTopicality()) - != java.lang.Float.floatToIntBits( - other.getTopicality())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getLocationsList() - .equals(other.getLocationsList())) return false; - if (!getPropertiesList() - .equals(other.getPropertiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LOCALE_FIELD_NUMBER; - hash = (53 * hash) + getLocale().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTopicality()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (getPropertiesCount() > 0) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getPropertiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected entity features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.EntityAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.EntityAnnotation) - com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.EntityAnnotation.class, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.EntityAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - getPropertiesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - locale_ = ""; - - description_ = ""; - - score_ = 0F; - - confidence_ = 0F; - - topicality_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - propertiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation build() { - com.google.cloud.vision.v1p1beta1.EntityAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.EntityAnnotation result = new com.google.cloud.vision.v1p1beta1.EntityAnnotation(this); - int from_bitField0_ = bitField0_; - result.mid_ = mid_; - result.locale_ = locale_; - result.description_ = description_; - result.score_ = score_; - result.confidence_ = confidence_; - result.topicality_ = topicality_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.properties_ = properties_; - } else { - result.properties_ = propertiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.EntityAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.EntityAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.EntityAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLocale().isEmpty()) { - locale_ = other.locale_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getTopicality() != 0F) { - setTopicality(other.getTopicality()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (propertiesBuilder_ == null) { - if (!other.properties_.isEmpty()) { - if (properties_.isEmpty()) { - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePropertiesIsMutable(); - properties_.addAll(other.properties_); - } - onChanged(); - } - } else { - if (!other.properties_.isEmpty()) { - if (propertiesBuilder_.isEmpty()) { - propertiesBuilder_.dispose(); - propertiesBuilder_ = null; - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - propertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPropertiesFieldBuilder() : null; - } else { - propertiesBuilder_.addAllMessages(other.properties_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.EntityAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.EntityAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object mid_ = ""; - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object locale_ = ""; - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The locale. - */ - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The locale to set. - * @return This builder for chaining. - */ - public Builder setLocale( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locale_ = value; - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return This builder for chaining. - */ - public Builder clearLocale() { - - locale_ = getDefaultInstance().getLocale(); - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The bytes for locale to set. - * @return This builder for chaining. - */ - public Builder setLocaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locale_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float topicality_ ; - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @param value The topicality to set. - * @return This builder for chaining. - */ - public Builder setTopicality(float value) { - - topicality_ = value; - onChanged(); - return this; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return This builder for chaining. - */ - public Builder clearTopicality() { - - topicality_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder> locationsBuilder_; - - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p1beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder addLocations(com.google.cloud.vision.v1p1beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p1beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.util.List properties_ = - java.util.Collections.emptyList(); - private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(properties_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder> propertiesBuilder_; - - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public java.util.List getPropertiesList() { - if (propertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(properties_); - } else { - return propertiesBuilder_.getMessageList(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public int getPropertiesCount() { - if (propertiesBuilder_ == null) { - return properties_.size(); - } else { - return propertiesBuilder_.getCount(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p1beta1.Property getProperties(int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); - } else { - return propertiesBuilder_.getMessage(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p1beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.set(index, value); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.set(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder addProperties(com.google.cloud.vision.v1p1beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(value); - onChanged(); - } else { - propertiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p1beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(index, value); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder addProperties( - com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p1beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder addAllProperties( - java.lang.Iterable values) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, properties_); - onChanged(); - } else { - propertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder clearProperties() { - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - propertiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public Builder removeProperties(int index) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.remove(index); - onChanged(); - } else { - propertiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p1beta1.Property.Builder getPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); } else { - return propertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public java.util.List - getPropertiesOrBuilderList() { - if (propertiesBuilder_ != null) { - return propertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(properties_); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder() { - return getPropertiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - public java.util.List - getPropertiesBuilderList() { - return getPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder> - getPropertiesFieldBuilder() { - if (propertiesBuilder_ == null) { - propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - properties_ = null; - } - return propertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.EntityAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.EntityAnnotation) - private static final com.google.cloud.vision.v1p1beta1.EntityAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.EntityAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.EntityAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java deleted file mode 100644 index 0a2f511f9bfc..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotationOrBuilder.java +++ /dev/null @@ -1,255 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface EntityAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.EntityAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - java.lang.String getLocale(); - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - com.google.protobuf.ByteString - getLocaleBytes(); - - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - float getTopicality(); - - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 7; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p1beta1.LocationInfo getLocations(int index); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - int getLocationsCount(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsOrBuilderList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index); - - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - java.util.List - getPropertiesList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p1beta1.Property getProperties(int index); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - int getPropertiesCount(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - java.util.List - getPropertiesOrBuilderList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p1beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java deleted file mode 100644 index 64455d45269a..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java +++ /dev/null @@ -1,4300 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A face annotation object contains the results of face detection.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation} - */ -public final class FaceAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.FaceAnnotation) - FaceAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceAnnotation.newBuilder() to construct. - private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceAnnotation() { - landmarks_ = java.util.Collections.emptyList(); - joyLikelihood_ = 0; - sorrowLikelihood_ = 0; - angerLikelihood_ = 0; - surpriseLikelihood_ = 0; - underExposedLikelihood_ = 0; - blurredLikelihood_ = 0; - headwearLikelihood_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (fdBoundingPoly_ != null) { - subBuilder = fdBoundingPoly_.toBuilder(); - } - fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fdBoundingPoly_); - fdBoundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - landmarks_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); - break; - } - case 37: { - - rollAngle_ = input.readFloat(); - break; - } - case 45: { - - panAngle_ = input.readFloat(); - break; - } - case 53: { - - tiltAngle_ = input.readFloat(); - break; - } - case 61: { - - detectionConfidence_ = input.readFloat(); - break; - } - case 69: { - - landmarkingConfidence_ = input.readFloat(); - break; - } - case 72: { - int rawValue = input.readEnum(); - - joyLikelihood_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sorrowLikelihood_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - angerLikelihood_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - surpriseLikelihood_ = rawValue; - break; - } - case 104: { - int rawValue = input.readEnum(); - - underExposedLikelihood_ = rawValue; - break; - } - case 112: { - int rawValue = input.readEnum(); - - blurredLikelihood_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - headwearLikelihood_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder.class); - } - - public interface LandmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType(); - - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return Whether the position field is set. - */ - boolean hasPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return The position. - */ - com.google.cloud.vision.v1p1beta1.Position getPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder(); - } - /** - *
-   * A face-specific landmark (for example, a face feature).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} - */ - public static final class Landmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - LandmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Landmark.newBuilder() to construct. - private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Landmark() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Landmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Landmark( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - com.google.cloud.vision.v1p1beta1.Position.Builder subBuilder = null; - if (position_ != null) { - subBuilder = position_.toBuilder(); - } - position_ = input.readMessage(com.google.cloud.vision.v1p1beta1.Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(position_); - position_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder.class); - } - - /** - *
-     * Face landmark (feature) type.
-     * Left and right are defined from the vantage of the viewer of the image
-     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
-     * typically, is the person's right eye.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - UNKNOWN_LANDMARK(0), - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - LEFT_EYE(1), - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - RIGHT_EYE(2), - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - LEFT_OF_LEFT_EYEBROW(3), - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - RIGHT_OF_LEFT_EYEBROW(4), - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - LEFT_OF_RIGHT_EYEBROW(5), - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - RIGHT_OF_RIGHT_EYEBROW(6), - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - MIDPOINT_BETWEEN_EYES(7), - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - NOSE_TIP(8), - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - UPPER_LIP(9), - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - LOWER_LIP(10), - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - MOUTH_LEFT(11), - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - MOUTH_RIGHT(12), - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - MOUTH_CENTER(13), - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - NOSE_BOTTOM_RIGHT(14), - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - NOSE_BOTTOM_LEFT(15), - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - NOSE_BOTTOM_CENTER(16), - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - LEFT_EYE_TOP_BOUNDARY(17), - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - LEFT_EYE_RIGHT_CORNER(18), - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - LEFT_EYE_BOTTOM_BOUNDARY(19), - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - LEFT_EYE_LEFT_CORNER(20), - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - RIGHT_EYE_TOP_BOUNDARY(21), - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - RIGHT_EYE_RIGHT_CORNER(22), - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - RIGHT_EYE_BOTTOM_BOUNDARY(23), - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - RIGHT_EYE_LEFT_CORNER(24), - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - LEFT_EYEBROW_UPPER_MIDPOINT(25), - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - RIGHT_EYEBROW_UPPER_MIDPOINT(26), - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - LEFT_EAR_TRAGION(27), - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - RIGHT_EAR_TRAGION(28), - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - LEFT_EYE_PUPIL(29), - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - RIGHT_EYE_PUPIL(30), - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - FOREHEAD_GLABELLA(31), - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - CHIN_GNATHION(32), - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - CHIN_LEFT_GONION(33), - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - CHIN_RIGHT_GONION(34), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - public static final int UNKNOWN_LANDMARK_VALUE = 0; - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - public static final int LEFT_EYE_VALUE = 1; - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - public static final int RIGHT_EYE_VALUE = 2; - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - public static final int NOSE_TIP_VALUE = 8; - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - public static final int UPPER_LIP_VALUE = 9; - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - public static final int LOWER_LIP_VALUE = 10; - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - public static final int MOUTH_LEFT_VALUE = 11; - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - public static final int MOUTH_RIGHT_VALUE = 12; - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - public static final int MOUTH_CENTER_VALUE = 13; - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - public static final int NOSE_BOTTOM_LEFT_VALUE = 15; - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - public static final int NOSE_BOTTOM_CENTER_VALUE = 16; - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - public static final int LEFT_EAR_TRAGION_VALUE = 27; - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - public static final int RIGHT_EAR_TRAGION_VALUE = 28; - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - public static final int LEFT_EYE_PUPIL_VALUE = 29; - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - public static final int RIGHT_EYE_PUPIL_VALUE = 30; - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - public static final int FOREHEAD_GLABELLA_VALUE = 31; - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - public static final int CHIN_GNATHION_VALUE = 32; - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - public static final int CHIN_LEFT_GONION_VALUE = 33; - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - public static final int CHIN_RIGHT_GONION_VALUE = 34; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN_LANDMARK; - case 1: return LEFT_EYE; - case 2: return RIGHT_EYE; - case 3: return LEFT_OF_LEFT_EYEBROW; - case 4: return RIGHT_OF_LEFT_EYEBROW; - case 5: return LEFT_OF_RIGHT_EYEBROW; - case 6: return RIGHT_OF_RIGHT_EYEBROW; - case 7: return MIDPOINT_BETWEEN_EYES; - case 8: return NOSE_TIP; - case 9: return UPPER_LIP; - case 10: return LOWER_LIP; - case 11: return MOUTH_LEFT; - case 12: return MOUTH_RIGHT; - case 13: return MOUTH_CENTER; - case 14: return NOSE_BOTTOM_RIGHT; - case 15: return NOSE_BOTTOM_LEFT; - case 16: return NOSE_BOTTOM_CENTER; - case 17: return LEFT_EYE_TOP_BOUNDARY; - case 18: return LEFT_EYE_RIGHT_CORNER; - case 19: return LEFT_EYE_BOTTOM_BOUNDARY; - case 20: return LEFT_EYE_LEFT_CORNER; - case 21: return RIGHT_EYE_TOP_BOUNDARY; - case 22: return RIGHT_EYE_RIGHT_CORNER; - case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; - case 24: return RIGHT_EYE_LEFT_CORNER; - case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; - case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; - case 27: return LEFT_EAR_TRAGION; - case 28: return RIGHT_EAR_TRAGION; - case 29: return LEFT_EYE_PUPIL; - case 30: return RIGHT_EYE_PUPIL; - case 31: return FOREHEAD_GLABELLA; - case 32: return CHIN_GNATHION; - case 33: return CHIN_LEFT_GONION; - case 34: return CHIN_RIGHT_GONION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type) - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - - public static final int POSITION_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p1beta1.Position position_; - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return Whether the position field is set. - */ - @java.lang.Override - public boolean hasPosition() { - return position_ != null; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return The position. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Position getPosition() { - return position_ == null ? com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder() { - return getPosition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - output.writeEnum(3, type_); - } - if (position_ != null) { - output.writeMessage(4, getPosition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (position_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPosition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) obj; - - if (type_ != other.type_) return false; - if (hasPosition() != other.hasPosition()) return false; - if (hasPosition()) { - if (!getPosition() - .equals(other.getPosition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasPosition()) { - hash = (37 * hash) + POSITION_FIELD_NUMBER; - hash = (53 * hash) + getPosition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A face-specific landmark (for example, a face feature).
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (positionBuilder_ == null) { - position_ = null; - } else { - position_ = null; - positionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark build() { - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark buildPartial() { - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark(this); - result.type_ = type_; - if (positionBuilder_ == null) { - result.position_ = position_; - } else { - result.position_ = positionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark other) { - if (other == com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasPosition()) { - mergePosition(other.getPosition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p1beta1.Position position_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder> positionBuilder_; - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return Whether the position field is set. - */ - public boolean hasPosition() { - return positionBuilder_ != null || position_ != null; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - * @return The position. - */ - public com.google.cloud.vision.v1p1beta1.Position getPosition() { - if (positionBuilder_ == null) { - return position_ == null ? com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; - } else { - return positionBuilder_.getMessage(); - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public Builder setPosition(com.google.cloud.vision.v1p1beta1.Position value) { - if (positionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - position_ = value; - onChanged(); - } else { - positionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public Builder setPosition( - com.google.cloud.vision.v1p1beta1.Position.Builder builderForValue) { - if (positionBuilder_ == null) { - position_ = builderForValue.build(); - onChanged(); - } else { - positionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public Builder mergePosition(com.google.cloud.vision.v1p1beta1.Position value) { - if (positionBuilder_ == null) { - if (position_ != null) { - position_ = - com.google.cloud.vision.v1p1beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); - } else { - position_ = value; - } - onChanged(); - } else { - positionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public Builder clearPosition() { - if (positionBuilder_ == null) { - position_ = null; - onChanged(); - } else { - position_ = null; - positionBuilder_ = null; - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p1beta1.Position.Builder getPositionBuilder() { - - onChanged(); - return getPositionFieldBuilder().getBuilder(); - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder() { - if (positionBuilder_ != null) { - return positionBuilder_.getMessageOrBuilder(); - } else { - return position_ == null ? - com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance() : position_; - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p1beta1.Position position = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder> - getPositionFieldBuilder() { - if (positionBuilder_ == null) { - positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, com.google.cloud.vision.v1p1beta1.PositionOrBuilder>( - getPosition(), - getParentForChildren(), - isClean()); - position_ = null; - } - return positionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - private static final com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark(); - } - - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Landmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Landmark(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_; - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - @java.lang.Override - public boolean hasFdBoundingPoly() { - return fdBoundingPoly_ != null; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly() { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - return getFdBoundingPoly(); - } - - public static final int LANDMARKS_FIELD_NUMBER = 3; - private java.util.List landmarks_; - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List getLandmarksList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List - getLandmarksOrBuilderList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public int getLandmarksCount() { - return landmarks_.size(); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index) { - return landmarks_.get(index); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - return landmarks_.get(index); - } - - public static final int ROLL_ANGLE_FIELD_NUMBER = 4; - private float rollAngle_; - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - - public static final int PAN_ANGLE_FIELD_NUMBER = 5; - private float panAngle_; - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - - public static final int TILT_ANGLE_FIELD_NUMBER = 6; - private float tiltAngle_; - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - - public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; - private float detectionConfidence_; - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - - public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; - private float landmarkingConfidence_; - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - - public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; - private int joyLikelihood_; - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; - private int sorrowLikelihood_; - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; - private int angerLikelihood_; - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; - private int surpriseLikelihood_; - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; - private int underExposedLikelihood_; - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; - private int blurredLikelihood_; - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; - private int headwearLikelihood_; - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - output.writeMessage(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - output.writeMessage(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - output.writeFloat(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - output.writeFloat(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - output.writeFloat(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - output.writeFloat(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - output.writeFloat(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(15, headwearLikelihood_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, headwearLikelihood_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.FaceAnnotation other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; - if (hasFdBoundingPoly()) { - if (!getFdBoundingPoly() - .equals(other.getFdBoundingPoly())) return false; - } - if (!getLandmarksList() - .equals(other.getLandmarksList())) return false; - if (java.lang.Float.floatToIntBits(getRollAngle()) - != java.lang.Float.floatToIntBits( - other.getRollAngle())) return false; - if (java.lang.Float.floatToIntBits(getPanAngle()) - != java.lang.Float.floatToIntBits( - other.getPanAngle())) return false; - if (java.lang.Float.floatToIntBits(getTiltAngle()) - != java.lang.Float.floatToIntBits( - other.getTiltAngle())) return false; - if (java.lang.Float.floatToIntBits(getDetectionConfidence()) - != java.lang.Float.floatToIntBits( - other.getDetectionConfidence())) return false; - if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - != java.lang.Float.floatToIntBits( - other.getLandmarkingConfidence())) return false; - if (joyLikelihood_ != other.joyLikelihood_) return false; - if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; - if (angerLikelihood_ != other.angerLikelihood_) return false; - if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; - if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; - if (blurredLikelihood_ != other.blurredLikelihood_) return false; - if (headwearLikelihood_ != other.headwearLikelihood_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (hasFdBoundingPoly()) { - hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getFdBoundingPoly().hashCode(); - } - if (getLandmarksCount() > 0) { - hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarksList().hashCode(); - } - hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRollAngle()); - hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPanAngle()); - hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTiltAngle()); - hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getDetectionConfidence()); - hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLandmarkingConfidence()); - hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + joyLikelihood_; - hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + sorrowLikelihood_; - hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + angerLikelihood_; - hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + surpriseLikelihood_; - hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + underExposedLikelihood_; - hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + blurredLikelihood_; - hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + headwearLikelihood_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.FaceAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A face annotation object contains the results of face detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.FaceAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.FaceAnnotation) - com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.class, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.FaceAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLandmarksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - landmarksBuilder_.clear(); - } - rollAngle_ = 0F; - - panAngle_ = 0F; - - tiltAngle_ = 0F; - - detectionConfidence_ = 0F; - - landmarkingConfidence_ = 0F; - - joyLikelihood_ = 0; - - sorrowLikelihood_ = 0; - - angerLikelihood_ = 0; - - surpriseLikelihood_ = 0; - - underExposedLikelihood_ = 0; - - blurredLikelihood_ = 0; - - headwearLikelihood_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation build() { - com.google.cloud.vision.v1p1beta1.FaceAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.FaceAnnotation result = new com.google.cloud.vision.v1p1beta1.FaceAnnotation(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (fdBoundingPolyBuilder_ == null) { - result.fdBoundingPoly_ = fdBoundingPoly_; - } else { - result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); - } - if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.landmarks_ = landmarks_; - } else { - result.landmarks_ = landmarksBuilder_.build(); - } - result.rollAngle_ = rollAngle_; - result.panAngle_ = panAngle_; - result.tiltAngle_ = tiltAngle_; - result.detectionConfidence_ = detectionConfidence_; - result.landmarkingConfidence_ = landmarkingConfidence_; - result.joyLikelihood_ = joyLikelihood_; - result.sorrowLikelihood_ = sorrowLikelihood_; - result.angerLikelihood_ = angerLikelihood_; - result.surpriseLikelihood_ = surpriseLikelihood_; - result.underExposedLikelihood_ = underExposedLikelihood_; - result.blurredLikelihood_ = blurredLikelihood_; - result.headwearLikelihood_ = headwearLikelihood_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.FaceAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.FaceAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.FaceAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.hasFdBoundingPoly()) { - mergeFdBoundingPoly(other.getFdBoundingPoly()); - } - if (landmarksBuilder_ == null) { - if (!other.landmarks_.isEmpty()) { - if (landmarks_.isEmpty()) { - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLandmarksIsMutable(); - landmarks_.addAll(other.landmarks_); - } - onChanged(); - } - } else { - if (!other.landmarks_.isEmpty()) { - if (landmarksBuilder_.isEmpty()) { - landmarksBuilder_.dispose(); - landmarksBuilder_ = null; - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - landmarksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarksFieldBuilder() : null; - } else { - landmarksBuilder_.addAllMessages(other.landmarks_); - } - } - } - if (other.getRollAngle() != 0F) { - setRollAngle(other.getRollAngle()); - } - if (other.getPanAngle() != 0F) { - setPanAngle(other.getPanAngle()); - } - if (other.getTiltAngle() != 0F) { - setTiltAngle(other.getTiltAngle()); - } - if (other.getDetectionConfidence() != 0F) { - setDetectionConfidence(other.getDetectionConfidence()); - } - if (other.getLandmarkingConfidence() != 0F) { - setLandmarkingConfidence(other.getLandmarkingConfidence()); - } - if (other.joyLikelihood_ != 0) { - setJoyLikelihoodValue(other.getJoyLikelihoodValue()); - } - if (other.sorrowLikelihood_ != 0) { - setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); - } - if (other.angerLikelihood_ != 0) { - setAngerLikelihoodValue(other.getAngerLikelihoodValue()); - } - if (other.surpriseLikelihood_ != 0) { - setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); - } - if (other.underExposedLikelihood_ != 0) { - setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); - } - if (other.blurredLikelihood_ != 0) { - setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); - } - if (other.headwearLikelihood_ != 0) { - setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.FaceAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.FaceAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - public boolean hasFdBoundingPoly() { - return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } else { - return fdBoundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdBoundingPoly_ = value; - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = builderForValue.build(); - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (fdBoundingPoly_ != null) { - fdBoundingPoly_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); - } else { - fdBoundingPoly_ = value; - } - onChanged(); - } else { - fdBoundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder clearFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - onChanged(); - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { - - onChanged(); - return getFdBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - if (fdBoundingPolyBuilder_ != null) { - return fdBoundingPolyBuilder_.getMessageOrBuilder(); - } else { - return fdBoundingPoly_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getFdBoundingPolyFieldBuilder() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getFdBoundingPoly(), - getParentForChildren(), - isClean()); - fdBoundingPoly_ = null; - } - return fdBoundingPolyBuilder_; - } - - private java.util.List landmarks_ = - java.util.Collections.emptyList(); - private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(landmarks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; - - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List getLandmarksList() { - if (landmarksBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarks_); - } else { - return landmarksBuilder_.getMessageList(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public int getLandmarksCount() { - if (landmarksBuilder_ == null) { - return landmarks_.size(); - } else { - return landmarksBuilder_.getCount(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); - } else { - return landmarksBuilder_.getMessage(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.set(index, value); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks(com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(value); - onChanged(); - } else { - landmarksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(index, value); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addAllLandmarks( - java.lang.Iterable values) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarks_); - onChanged(); - } else { - landmarksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder clearLandmarks() { - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - landmarksBuilder_.clear(); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder removeLandmarks(int index) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.remove(index); - onChanged(); - } else { - landmarksBuilder_.remove(index); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().getBuilder(index); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); } else { - return landmarksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksOrBuilderList() { - if (landmarksBuilder_ != null) { - return landmarksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarks_); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { - return getLandmarksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksBuilderList() { - return getLandmarksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder> - getLandmarksFieldBuilder() { - if (landmarksBuilder_ == null) { - landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - landmarks_ = null; - } - return landmarksBuilder_; - } - - private float rollAngle_ ; - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @param value The rollAngle to set. - * @return This builder for chaining. - */ - public Builder setRollAngle(float value) { - - rollAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return This builder for chaining. - */ - public Builder clearRollAngle() { - - rollAngle_ = 0F; - onChanged(); - return this; - } - - private float panAngle_ ; - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @param value The panAngle to set. - * @return This builder for chaining. - */ - public Builder setPanAngle(float value) { - - panAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return This builder for chaining. - */ - public Builder clearPanAngle() { - - panAngle_ = 0F; - onChanged(); - return this; - } - - private float tiltAngle_ ; - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @param value The tiltAngle to set. - * @return This builder for chaining. - */ - public Builder setTiltAngle(float value) { - - tiltAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return This builder for chaining. - */ - public Builder clearTiltAngle() { - - tiltAngle_ = 0F; - onChanged(); - return this; - } - - private float detectionConfidence_ ; - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @param value The detectionConfidence to set. - * @return This builder for chaining. - */ - public Builder setDetectionConfidence(float value) { - - detectionConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return This builder for chaining. - */ - public Builder clearDetectionConfidence() { - - detectionConfidence_ = 0F; - onChanged(); - return this; - } - - private float landmarkingConfidence_ ; - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @param value The landmarkingConfidence to set. - * @return This builder for chaining. - */ - public Builder setLandmarkingConfidence(float value) { - - landmarkingConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return This builder for chaining. - */ - public Builder clearLandmarkingConfidence() { - - landmarkingConfidence_ = 0F; - onChanged(); - return this; - } - - private int joyLikelihood_ = 0; - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @param value The enum numeric value on the wire for joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihoodValue(int value) { - - joyLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @param value The joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - joyLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return This builder for chaining. - */ - public Builder clearJoyLikelihood() { - - joyLikelihood_ = 0; - onChanged(); - return this; - } - - private int sorrowLikelihood_ = 0; - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @param value The enum numeric value on the wire for sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihoodValue(int value) { - - sorrowLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @param value The sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - sorrowLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return This builder for chaining. - */ - public Builder clearSorrowLikelihood() { - - sorrowLikelihood_ = 0; - onChanged(); - return this; - } - - private int angerLikelihood_ = 0; - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @param value The enum numeric value on the wire for angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihoodValue(int value) { - - angerLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @param value The angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - angerLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return This builder for chaining. - */ - public Builder clearAngerLikelihood() { - - angerLikelihood_ = 0; - onChanged(); - return this; - } - - private int surpriseLikelihood_ = 0; - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @param value The enum numeric value on the wire for surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihoodValue(int value) { - - surpriseLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @param value The surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - surpriseLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return This builder for chaining. - */ - public Builder clearSurpriseLikelihood() { - - surpriseLikelihood_ = 0; - onChanged(); - return this; - } - - private int underExposedLikelihood_ = 0; - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @param value The enum numeric value on the wire for underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihoodValue(int value) { - - underExposedLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @param value The underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - underExposedLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return This builder for chaining. - */ - public Builder clearUnderExposedLikelihood() { - - underExposedLikelihood_ = 0; - onChanged(); - return this; - } - - private int blurredLikelihood_ = 0; - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @param value The enum numeric value on the wire for blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihoodValue(int value) { - - blurredLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @param value The blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - blurredLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return This builder for chaining. - */ - public Builder clearBlurredLikelihood() { - - blurredLikelihood_ = 0; - onChanged(); - return this; - } - - private int headwearLikelihood_ = 0; - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @param value The enum numeric value on the wire for headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihoodValue(int value) { - - headwearLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @param value The headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - headwearLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return This builder for chaining. - */ - public Builder clearHeadwearLikelihood() { - - headwearLikelihood_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.FaceAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation) - private static final com.google.cloud.vision.v1p1beta1.FaceAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.FaceAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.FaceAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java deleted file mode 100644 index 81024f41d3d7..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotationOrBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface FaceAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.FaceAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - boolean hasFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly fd_bounding_poly = 2; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); - - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark getLandmarks(int index); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - int getLandmarksCount(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksOrBuilderList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index); - - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - float getRollAngle(); - - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - float getPanAngle(); - - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - float getTiltAngle(); - - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - float getDetectionConfidence(); - - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - float getLandmarkingConfidence(); - - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - int getJoyLikelihoodValue(); - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getJoyLikelihood(); - - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - int getSorrowLikelihoodValue(); - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getSorrowLikelihood(); - - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - int getAngerLikelihoodValue(); - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getAngerLikelihood(); - - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - int getSurpriseLikelihoodValue(); - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getSurpriseLikelihood(); - - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - int getUnderExposedLikelihoodValue(); - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getUnderExposedLikelihood(); - - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - int getBlurredLikelihoodValue(); - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getBlurredLikelihood(); - - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - int getHeadwearLikelihoodValue(); - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getHeadwearLikelihood(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java deleted file mode 100644 index 455bc116a4d3..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java +++ /dev/null @@ -1,1109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Users describe the type of Google Cloud Vision API tasks to perform over
- * images by using *Feature*s. Each Feature indicates a type of image
- * detection task to perform. Features encode the Cloud Vision API
- * vertical to operate on and the number of top-scoring results to return.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Feature} - */ -public final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Feature) - FeatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feature.newBuilder() to construct. - private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feature() { - type_ = 0; - model_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - maxResults_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - model_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Feature.class, com.google.cloud.vision.v1p1beta1.Feature.Builder.class); - } - - /** - *
-   * Type of image feature.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p1beta1.Feature.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - FACE_DETECTION(1), - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - LANDMARK_DETECTION(2), - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - LOGO_DETECTION(3), - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - LABEL_DETECTION(4), - /** - *
-     * Run OCR.
-     * 
- * - * TEXT_DETECTION = 5; - */ - TEXT_DETECTION(5), - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - DOCUMENT_TEXT_DETECTION(11), - /** - *
-     * Run computer vision models to compute image safe-search properties.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - SAFE_SEARCH_DETECTION(6), - /** - *
-     * Compute a set of image properties, such as the image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - IMAGE_PROPERTIES(7), - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - CROP_HINTS(9), - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - WEB_DETECTION(10), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - public static final int FACE_DETECTION_VALUE = 1; - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - public static final int LANDMARK_DETECTION_VALUE = 2; - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - public static final int LOGO_DETECTION_VALUE = 3; - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - public static final int LABEL_DETECTION_VALUE = 4; - /** - *
-     * Run OCR.
-     * 
- * - * TEXT_DETECTION = 5; - */ - public static final int TEXT_DETECTION_VALUE = 5; - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; - /** - *
-     * Run computer vision models to compute image safe-search properties.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - public static final int SAFE_SEARCH_DETECTION_VALUE = 6; - /** - *
-     * Compute a set of image properties, such as the image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - public static final int IMAGE_PROPERTIES_VALUE = 7; - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - public static final int CROP_HINTS_VALUE = 9; - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - public static final int WEB_DETECTION_VALUE = 10; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return FACE_DETECTION; - case 2: return LANDMARK_DETECTION; - case 3: return LOGO_DETECTION; - case 4: return LABEL_DETECTION; - case 5: return TEXT_DETECTION; - case 11: return DOCUMENT_TEXT_DETECTION; - case 6: return SAFE_SEARCH_DETECTION; - case 7: return IMAGE_PROPERTIES; - case 9: return CROP_HINTS; - case 10: return WEB_DETECTION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.Feature.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Feature.Type) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Feature.Type result = com.google.cloud.vision.v1p1beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.Feature.Type.UNRECOGNIZED : result; - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 2; - private int maxResults_; - /** - *
-   * Maximum number of results of this type.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int MODEL_FIELD_NUMBER = 3; - private volatile java.lang.Object model_; - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } - } - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p1beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (maxResults_ != 0) { - output.writeInt32(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p1beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Feature)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Feature other = (com.google.cloud.vision.v1p1beta1.Feature) obj; - - if (type_ != other.type_) return false; - if (getMaxResults() - != other.getMaxResults()) return false; - if (!getModel() - .equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Feature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Users describe the type of Google Cloud Vision API tasks to perform over
-   * images by using *Feature*s. Each Feature indicates a type of image
-   * detection task to perform. Features encode the Cloud Vision API
-   * vertical to operate on and the number of top-scoring results to return.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Feature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Feature) - com.google.cloud.vision.v1p1beta1.FeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Feature.class, com.google.cloud.vision.v1p1beta1.Feature.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Feature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - maxResults_ = 0; - - model_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature build() { - com.google.cloud.vision.v1p1beta1.Feature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature buildPartial() { - com.google.cloud.vision.v1p1beta1.Feature result = new com.google.cloud.vision.v1p1beta1.Feature(this); - result.type_ = type_; - result.maxResults_ = maxResults_; - result.model_ = model_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Feature) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Feature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Feature other) { - if (other == com.google.cloud.vision.v1p1beta1.Feature.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Feature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Feature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Feature.Type result = com.google.cloud.vision.v1p1beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.Feature.Type.UNRECOGNIZED : result; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p1beta1.Feature.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int maxResults_ ; - /** - *
-     * Maximum number of results of this type.
-     * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - /** - *
-     * Maximum number of results of this type.
-     * 
- * - * int32 max_results = 2; - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Maximum number of results of this type.
-     * 
- * - * int32 max_results = 2; - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The bytes for model. - */ - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - model_ = value; - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return This builder for chaining. - */ - public Builder clearModel() { - - model_ = getDefaultInstance().getModel(); - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - model_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Feature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Feature) - private static final com.google.cloud.vision.v1p1beta1.Feature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Feature(); - } - - public static com.google.cloud.vision.v1p1beta1.Feature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Feature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java deleted file mode 100644 index 36b8fcf8225b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FeatureOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Feature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Feature.Type type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p1beta1.Feature.Type getType(); - - /** - *
-   * Maximum number of results of this type.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - int getMaxResults(); - - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - java.lang.String getModel(); - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - com.google.protobuf.ByteString - getModelBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java deleted file mode 100644 index 938eae0de41d..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/GeometryProto.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -public final class GeometryProto { - private GeometryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1p1beta1/geometry" + - ".proto\022\035google.cloud.vision.v1p1beta1\"\036\n" + - "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"G\n\014Boundin" + - "gPoly\0227\n\010vertices\030\001 \003(\0132%.google.cloud.v" + - "ision.v1p1beta1.Vertex\"+\n\010Position\022\t\n\001x\030" + - "\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B|\n!com.googl" + - "e.cloud.vision.v1p1beta1B\rGeometryProtoP" + - "\001ZCgoogle.golang.org/genproto/googleapis" + - "/cloud/vision/v1p1beta1;vision\370\001\001b\006proto" + - "3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_BoundingPoly_descriptor, - new java.lang.String[] { "Vertices", }); - internal_static_google_cloud_vision_v1p1beta1_Position_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Position_descriptor, - new java.lang.String[] { "X", "Y", "Z", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java deleted file mode 100644 index 056f55504f86..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java +++ /dev/null @@ -1,781 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Client image to perform Google Cloud Vision API tasks over.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Image} - */ -public final class Image extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Image) - ImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Image() { - content_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - content_ = input.readBytes(); - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.ImageSource.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.vision.v1p1beta1.ImageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Image.class, com.google.cloud.vision.v1p1beta1.Image.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString content_; - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: as with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.ImageSource source_; - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSource getSource() { - return source_ == null ? com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; - } - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!content_.isEmpty()) { - output.writeBytes(1, content_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, content_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Image)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Image other = (com.google.cloud.vision.v1p1beta1.Image) obj; - - if (!getContent() - .equals(other.getContent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Client image to perform Google Cloud Vision API tasks over.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Image) - com.google.cloud.vision.v1p1beta1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Image.class, com.google.cloud.vision.v1p1beta1.Image.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = com.google.protobuf.ByteString.EMPTY; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Image getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Image build() { - com.google.cloud.vision.v1p1beta1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Image buildPartial() { - com.google.cloud.vision.v1p1beta1.Image result = new com.google.cloud.vision.v1p1beta1.Image(this); - result.content_ = content_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Image) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Image other) { - if (other == com.google.cloud.vision.v1p1beta1.Image.getDefaultInstance()) return this; - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: as with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: as with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: as with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p1beta1.ImageSource source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder> sourceBuilder_; - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return The source. - */ - public com.google.cloud.vision.v1p1beta1.ImageSource getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public Builder setSource(com.google.cloud.vision.v1p1beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public Builder setSource( - com.google.cloud.vision.v1p1beta1.ImageSource.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public Builder mergeSource(com.google.cloud.vision.v1p1beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.vision.v1p1beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p1beta1.ImageSource.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance() : source_; - } - } - /** - *
-     * Google Cloud Storage image location. If both `content` and `source`
-     * are provided for an image, `content` takes precedence and is
-     * used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Image) - private static final com.google.cloud.vision.v1p1beta1.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Image(); - } - - public static com.google.cloud.vision.v1p1beta1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java deleted file mode 100644 index d918478ec86f..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorProto.java +++ /dev/null @@ -1,475 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public final class ImageAnnotatorProto { - private ImageAnnotatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Image_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p1beta1/image_an" + - "notator.proto\022\035google.cloud.vision.v1p1b" + - "eta1\032\034google/api/annotations.proto\032\027goog" + - "le/api/client.proto\032\037google/api/field_be" + - "havior.proto\032,google/cloud/vision/v1p1be" + - "ta1/geometry.proto\0323google/cloud/vision/" + - "v1p1beta1/text_annotation.proto\0321google/" + - "cloud/vision/v1p1beta1/web_detection.pro" + - "to\032\027google/rpc/status.proto\032\027google/type" + - "/color.proto\032\030google/type/latlng.proto\"\341" + - "\002\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.cloud." + - "vision.v1p1beta1.Feature.Type\022\023\n\013max_res" + - "ults\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\366\001\n\004Type\022\024\n\020TY" + - "PE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022" + - "LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003" + - "\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECTION\020" + - "\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_S" + - "EARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022" + - "\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\"7\n\013Im" + - "ageSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timag" + - "e_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content\030\001 \001(\014\022:\n" + - "\006source\030\002 \001(\0132*.google.cloud.vision.v1p1" + - "beta1.ImageSource\"\233\016\n\016FaceAnnotation\022B\n\r" + - "bounding_poly\030\001 \001(\0132+.google.cloud.visio" + - "n.v1p1beta1.BoundingPoly\022E\n\020fd_bounding_" + - "poly\030\002 \001(\0132+.google.cloud.vision.v1p1bet" + - "a1.BoundingPoly\022I\n\tlandmarks\030\003 \003(\01326.goo" + - "gle.cloud.vision.v1p1beta1.FaceAnnotatio" + - "n.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022\021\n\tpan_an" + - "gle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024detecti" + - "on_confidence\030\007 \001(\002\022\036\n\026landmarking_confi" + - "dence\030\010 \001(\002\022A\n\016joy_likelihood\030\t \001(\0162).go" + - "ogle.cloud.vision.v1p1beta1.Likelihood\022D" + - "\n\021sorrow_likelihood\030\n \001(\0162).google.cloud" + - ".vision.v1p1beta1.Likelihood\022C\n\020anger_li" + - "kelihood\030\013 \001(\0162).google.cloud.vision.v1p" + - "1beta1.Likelihood\022F\n\023surprise_likelihood" + - "\030\014 \001(\0162).google.cloud.vision.v1p1beta1.L" + - "ikelihood\022K\n\030under_exposed_likelihood\030\r " + - "\001(\0162).google.cloud.vision.v1p1beta1.Like" + - "lihood\022E\n\022blurred_likelihood\030\016 \001(\0162).goo" + - "gle.cloud.vision.v1p1beta1.Likelihood\022F\n" + - "\023headwear_likelihood\030\017 \001(\0162).google.clou" + - "d.vision.v1p1beta1.Likelihood\032\307\007\n\010Landma" + - "rk\022I\n\004type\030\003 \001(\0162;.google.cloud.vision.v" + - "1p1beta1.FaceAnnotation.Landmark.Type\0229\n" + - "\010position\030\004 \001(\0132\'.google.cloud.vision.v1" + - "p1beta1.Position\"\264\006\n\004Type\022\024\n\020UNKNOWN_LAN" + - "DMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024" + - "LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_" + - "EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026" + - "RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025MIDPOINT_BET" + - "WEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t" + - "\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH" + - "_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n\021NOSE_BOTTO" + - "M_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_" + - "BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY" + - "\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022\022\034\n\030LEFT_EY" + - "E_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_EYE_LEFT_COR" + - "NER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIG" + - "HT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTO" + - "M_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022" + - "\037\n\033LEFT_EYEBROW_UPPER_MIDPOINT\020\031\022 \n\034RIGH" + - "T_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_T" + - "RAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_" + - "EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FORE" + - "HEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CH" + - "IN_LEFT_GONION\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\"" + - "4\n\014LocationInfo\022$\n\007lat_lng\030\001 \001(\0132\023.googl" + - "e.type.LatLng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\274\002\n" + - "\020EntityAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale" + - "\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r\n\005score\030\004 \001" + - "(\002\022\022\n\nconfidence\030\005 \001(\002\022\022\n\ntopicality\030\006 \001" + - "(\002\022B\n\rbounding_poly\030\007 \001(\0132+.google.cloud" + - ".vision.v1p1beta1.BoundingPoly\022>\n\tlocati" + - "ons\030\010 \003(\0132+.google.cloud.vision.v1p1beta" + - "1.LocationInfo\022;\n\nproperties\030\t \003(\0132\'.goo" + - "gle.cloud.vision.v1p1beta1.Property\"\274\002\n\024" + - "SafeSearchAnnotation\0228\n\005adult\030\001 \001(\0162).go" + - "ogle.cloud.vision.v1p1beta1.Likelihood\0228" + - "\n\005spoof\030\002 \001(\0162).google.cloud.vision.v1p1" + - "beta1.Likelihood\022:\n\007medical\030\003 \001(\0162).goog" + - "le.cloud.vision.v1p1beta1.Likelihood\022;\n\010" + - "violence\030\004 \001(\0162).google.cloud.vision.v1p" + - "1beta1.Likelihood\0227\n\004racy\030\t \001(\0162).google" + - ".cloud.vision.v1p1beta1.Likelihood\"a\n\013La" + - "tLongRect\022(\n\013min_lat_lng\030\001 \001(\0132\023.google." + - "type.LatLng\022(\n\013max_lat_lng\030\002 \001(\0132\023.googl" + - "e.type.LatLng\"U\n\tColorInfo\022!\n\005color\030\001 \001(" + - "\0132\022.google.type.Color\022\r\n\005score\030\002 \001(\002\022\026\n\016" + - "pixel_fraction\030\003 \001(\002\"T\n\030DominantColorsAn" + - "notation\0228\n\006colors\030\001 \003(\0132(.google.cloud." + - "vision.v1p1beta1.ColorInfo\"c\n\017ImagePrope" + - "rties\022P\n\017dominant_colors\030\001 \001(\01327.google." + - "cloud.vision.v1p1beta1.DominantColorsAnn" + - "otation\"\177\n\010CropHint\022B\n\rbounding_poly\030\001 \001" + - "(\0132+.google.cloud.vision.v1p1beta1.Bound" + - "ingPoly\022\022\n\nconfidence\030\002 \001(\002\022\033\n\023importanc" + - "e_fraction\030\003 \001(\002\"R\n\023CropHintsAnnotation\022" + - ";\n\ncrop_hints\030\001 \003(\0132\'.google.cloud.visio" + - "n.v1p1beta1.CropHint\"(\n\017CropHintsParams\022" + - "\025\n\raspect_ratios\030\001 \003(\002\"1\n\022WebDetectionPa" + - "rams\022\033\n\023include_geo_results\030\002 \001(\010\"c\n\023Tex" + - "tDetectionParams\022.\n&enable_text_detectio" + - "n_confidence_score\030\t \001(\010\022\034\n\024advanced_ocr" + - "_options\030\013 \003(\t\"\330\002\n\014ImageContext\022A\n\rlat_l" + - "ong_rect\030\001 \001(\0132*.google.cloud.vision.v1p" + - "1beta1.LatLongRect\022\026\n\016language_hints\030\002 \003" + - "(\t\022I\n\021crop_hints_params\030\004 \001(\0132..google.c" + - "loud.vision.v1p1beta1.CropHintsParams\022O\n" + - "\024web_detection_params\030\006 \001(\01321.google.clo" + - "ud.vision.v1p1beta1.WebDetectionParams\022Q" + - "\n\025text_detection_params\030\014 \001(\01322.google.c" + - "loud.vision.v1p1beta1.TextDetectionParam" + - "s\"\311\001\n\024AnnotateImageRequest\0223\n\005image\030\001 \001(" + - "\0132$.google.cloud.vision.v1p1beta1.Image\022" + - "8\n\010features\030\002 \003(\0132&.google.cloud.vision." + - "v1p1beta1.Feature\022B\n\rimage_context\030\003 \001(\013" + - "2+.google.cloud.vision.v1p1beta1.ImageCo" + - "ntext\"\302\006\n\025AnnotateImageResponse\022G\n\020face_" + - "annotations\030\001 \003(\0132-.google.cloud.vision." + - "v1p1beta1.FaceAnnotation\022M\n\024landmark_ann" + - "otations\030\002 \003(\0132/.google.cloud.vision.v1p" + - "1beta1.EntityAnnotation\022I\n\020logo_annotati" + - "ons\030\003 \003(\0132/.google.cloud.vision.v1p1beta" + - "1.EntityAnnotation\022J\n\021label_annotations\030" + - "\004 \003(\0132/.google.cloud.vision.v1p1beta1.En" + - "tityAnnotation\022I\n\020text_annotations\030\005 \003(\013" + - "2/.google.cloud.vision.v1p1beta1.EntityA" + - "nnotation\022K\n\024full_text_annotation\030\014 \001(\0132" + - "-.google.cloud.vision.v1p1beta1.TextAnno" + - "tation\022S\n\026safe_search_annotation\030\006 \001(\01323" + - ".google.cloud.vision.v1p1beta1.SafeSearc" + - "hAnnotation\022S\n\033image_properties_annotati" + - "on\030\010 \001(\0132..google.cloud.vision.v1p1beta1" + - ".ImageProperties\022Q\n\025crop_hints_annotatio" + - "n\030\013 \001(\01322.google.cloud.vision.v1p1beta1." + - "CropHintsAnnotation\022B\n\rweb_detection\030\r \001" + - "(\0132+.google.cloud.vision.v1p1beta1.WebDe" + - "tection\022!\n\005error\030\t \001(\0132\022.google.rpc.Stat" + - "us\"h\n\032BatchAnnotateImagesRequest\022J\n\010requ" + - "ests\030\001 \003(\01323.google.cloud.vision.v1p1bet" + - "a1.AnnotateImageRequestB\003\340A\002\"f\n\033BatchAnn" + - "otateImagesResponse\022G\n\tresponses\030\001 \003(\01324" + - ".google.cloud.vision.v1p1beta1.AnnotateI" + - "mageResponse*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022" + - "\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSS" + - "IBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\311\002\n\016" + - "ImageAnnotator\022\276\001\n\023BatchAnnotateImages\0229" + - ".google.cloud.vision.v1p1beta1.BatchAnno" + - "tateImagesRequest\032:.google.cloud.vision." + - "v1p1beta1.BatchAnnotateImagesResponse\"0\202" + - "\323\344\223\002\037\"\032/v1p1beta1/images:annotate:\001*\332A\010r" + - "equests\032v\312A\025vision.googleapis.com\322A[http" + - "s://www.googleapis.com/auth/cloud-platfo" + - "rm,https://www.googleapis.com/auth/cloud" + - "-visionB\202\001\n!com.google.cloud.vision.v1p1" + - "beta1B\023ImageAnnotatorProtoP\001ZCgoogle.gol" + - "ang.org/genproto/googleapis/cloud/vision" + - "/v1p1beta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p1beta1.TextAnnotationProto.getDescriptor(), - com.google.cloud.vision.v1p1beta1.WebDetectionProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.ColorProto.getDescriptor(), - com.google.type.LatLngProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_Feature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Feature_descriptor, - new java.lang.String[] { "Type", "MaxResults", "Model", }); - internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor, - new java.lang.String[] { "GcsImageUri", "ImageUri", }); - internal_static_google_cloud_vision_v1p1beta1_Image_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p1beta1_Image_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Image_descriptor, - new java.lang.String[] { "Content", "Source", }); - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor, - new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor = - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_FaceAnnotation_Landmark_descriptor, - new java.lang.String[] { "Type", "Position", }); - internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor, - new java.lang.String[] { "LatLng", }); - internal_static_google_cloud_vision_v1p1beta1_Property_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Property_descriptor, - new java.lang.String[] { "Name", "Value", "Uint64Value", }); - internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_EntityAnnotation_descriptor, - new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); - internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor, - new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); - internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor, - new java.lang.String[] { "MinLatLng", "MaxLatLng", }); - internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p1beta1_ColorInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_ColorInfo_descriptor, - new java.lang.String[] { "Color", "Score", "PixelFraction", }); - internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_DominantColorsAnnotation_descriptor, - new java.lang.String[] { "Colors", }); - internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor, - new java.lang.String[] { "DominantColors", }); - internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p1beta1_CropHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_CropHint_descriptor, - new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); - internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_CropHintsAnnotation_descriptor, - new java.lang.String[] { "CropHints", }); - internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_CropHintsParams_descriptor, - new java.lang.String[] { "AspectRatios", }); - internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor, - new java.lang.String[] { "IncludeGeoResults", }); - internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor, - new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); - internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor, - new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "WebDetectionParams", "TextDetectionParams", }); - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageRequest_descriptor, - new java.lang.String[] { "Image", "Features", "ImageContext", }); - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor, - new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "Error", }); - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_BatchAnnotateImagesResponse_descriptor, - new java.lang.String[] { "Responses", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p1beta1.TextAnnotationProto.getDescriptor(); - com.google.cloud.vision.v1p1beta1.WebDetectionProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.ColorProto.getDescriptor(); - com.google.type.LatLngProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java deleted file mode 100644 index 444455c6ed36..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java +++ /dev/null @@ -1,1711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Image context and/or feature-specific parameters.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageContext} - */ -public final class ImageContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageContext) - ImageContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageContext.newBuilder() to construct. - private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageContext() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.LatLongRect.Builder subBuilder = null; - if (latLongRect_ != null) { - subBuilder = latLongRect_.toBuilder(); - } - latLongRect_ = input.readMessage(com.google.cloud.vision.v1p1beta1.LatLongRect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLongRect_); - latLongRect_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageHints_.add(s); - break; - } - case 34: { - com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder subBuilder = null; - if (cropHintsParams_ != null) { - subBuilder = cropHintsParams_.toBuilder(); - } - cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.CropHintsParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsParams_); - cropHintsParams_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder subBuilder = null; - if (webDetectionParams_ != null) { - subBuilder = webDetectionParams_.toBuilder(); - } - webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetectionParams_); - webDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder subBuilder = null; - if (textDetectionParams_ != null) { - subBuilder = textDetectionParams_.toBuilder(); - } - textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textDetectionParams_); - textDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageContext.class, com.google.cloud.vision.v1p1beta1.ImageContext.Builder.class); - } - - public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_; - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - @java.lang.Override - public boolean hasLatLongRect() { - return latLongRect_ != null; - } - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect() { - return latLongRect_ == null ? com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - return getLatLongRect(); - } - - public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList languageHints_; - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_; - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - - public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_; - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - @java.lang.Override - public boolean hasCropHintsParams() { - return cropHintsParams_ != null; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams() { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - return getCropHintsParams(); - } - - public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_; - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - @java.lang.Override - public boolean hasWebDetectionParams() { - return webDetectionParams_ != null; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams() { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - return getWebDetectionParams(); - } - - public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p1beta1.TextDetectionParams textDetectionParams_; - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - @java.lang.Override - public boolean hasTextDetectionParams() { - return textDetectionParams_ != null; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams() { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - return getTextDetectionParams(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLongRect_ != null) { - output.writeMessage(1, getLatLongRect()); - } - for (int i = 0; i < languageHints_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); - } - if (cropHintsParams_ != null) { - output.writeMessage(4, getCropHintsParams()); - } - if (webDetectionParams_ != null) { - output.writeMessage(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - output.writeMessage(12, getTextDetectionParams()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLongRect_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLongRect()); - } - { - int dataSize = 0; - for (int i = 0; i < languageHints_.size(); i++) { - dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); - } - size += dataSize; - size += 1 * getLanguageHintsList().size(); - } - if (cropHintsParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCropHintsParams()); - } - if (webDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getTextDetectionParams()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.ImageContext other = (com.google.cloud.vision.v1p1beta1.ImageContext) obj; - - if (hasLatLongRect() != other.hasLatLongRect()) return false; - if (hasLatLongRect()) { - if (!getLatLongRect() - .equals(other.getLatLongRect())) return false; - } - if (!getLanguageHintsList() - .equals(other.getLanguageHintsList())) return false; - if (hasCropHintsParams() != other.hasCropHintsParams()) return false; - if (hasCropHintsParams()) { - if (!getCropHintsParams() - .equals(other.getCropHintsParams())) return false; - } - if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; - if (hasWebDetectionParams()) { - if (!getWebDetectionParams() - .equals(other.getWebDetectionParams())) return false; - } - if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; - if (hasTextDetectionParams()) { - if (!getTextDetectionParams() - .equals(other.getTextDetectionParams())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLongRect()) { - hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; - hash = (53 * hash) + getLatLongRect().hashCode(); - } - if (getLanguageHintsCount() > 0) { - hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getLanguageHintsList().hashCode(); - } - if (hasCropHintsParams()) { - hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsParams().hashCode(); - } - if (hasWebDetectionParams()) { - hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getWebDetectionParams().hashCode(); - } - if (hasTextDetectionParams()) { - hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getTextDetectionParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Image context and/or feature-specific parameters.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageContext) - com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageContext.class, com.google.cloud.vision.v1p1beta1.ImageContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.ImageContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContext build() { - com.google.cloud.vision.v1p1beta1.ImageContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContext buildPartial() { - com.google.cloud.vision.v1p1beta1.ImageContext result = new com.google.cloud.vision.v1p1beta1.ImageContext(this); - int from_bitField0_ = bitField0_; - if (latLongRectBuilder_ == null) { - result.latLongRect_ = latLongRect_; - } else { - result.latLongRect_ = latLongRectBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.languageHints_ = languageHints_; - if (cropHintsParamsBuilder_ == null) { - result.cropHintsParams_ = cropHintsParams_; - } else { - result.cropHintsParams_ = cropHintsParamsBuilder_.build(); - } - if (webDetectionParamsBuilder_ == null) { - result.webDetectionParams_ = webDetectionParams_; - } else { - result.webDetectionParams_ = webDetectionParamsBuilder_.build(); - } - if (textDetectionParamsBuilder_ == null) { - result.textDetectionParams_ = textDetectionParams_; - } else { - result.textDetectionParams_ = textDetectionParamsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.ImageContext) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageContext other) { - if (other == com.google.cloud.vision.v1p1beta1.ImageContext.getDefaultInstance()) return this; - if (other.hasLatLongRect()) { - mergeLatLongRect(other.getLatLongRect()); - } - if (!other.languageHints_.isEmpty()) { - if (languageHints_.isEmpty()) { - languageHints_ = other.languageHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLanguageHintsIsMutable(); - languageHints_.addAll(other.languageHints_); - } - onChanged(); - } - if (other.hasCropHintsParams()) { - mergeCropHintsParams(other.getCropHintsParams()); - } - if (other.hasWebDetectionParams()) { - mergeWebDetectionParams(other.getWebDetectionParams()); - } - if (other.hasTextDetectionParams()) { - mergeTextDetectionParams(other.getTextDetectionParams()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.ImageContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder> latLongRectBuilder_; - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - public boolean hasLatLongRect() { - return latLongRectBuilder_ != null || latLongRect_ != null; - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - public com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect() { - if (latLongRectBuilder_ == null) { - return latLongRect_ == null ? com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } else { - return latLongRectBuilder_.getMessage(); - } - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect(com.google.cloud.vision.v1p1beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLongRect_ = value; - onChanged(); - } else { - latLongRectBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect( - com.google.cloud.vision.v1p1beta1.LatLongRect.Builder builderForValue) { - if (latLongRectBuilder_ == null) { - latLongRect_ = builderForValue.build(); - onChanged(); - } else { - latLongRectBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public Builder mergeLatLongRect(com.google.cloud.vision.v1p1beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (latLongRect_ != null) { - latLongRect_ = - com.google.cloud.vision.v1p1beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); - } else { - latLongRect_ = value; - } - onChanged(); - } else { - latLongRectBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public Builder clearLatLongRect() { - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - onChanged(); - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p1beta1.LatLongRect.Builder getLatLongRectBuilder() { - - onChanged(); - return getLatLongRectFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - if (latLongRectBuilder_ != null) { - return latLongRectBuilder_.getMessageOrBuilder(); - } else { - return latLongRect_ == null ? - com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - } - /** - *
-     * lat/long rectangle that specifies the location of the image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder> - getLatLongRectFieldBuilder() { - if (latLongRectBuilder_ == null) { - latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder>( - getLatLongRect(), - getParentForChildren(), - isClean()); - latLongRect_ = null; - } - return latLongRectBuilder_; - } - - private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_.getUnmodifiableView(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index to set the value at. - * @param value The languageHints to set. - * @return This builder for chaining. - */ - public Builder setLanguageHints( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHints( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param values The languageHints to add. - * @return This builder for chaining. - */ - public Builder addAllLanguageHints( - java.lang.Iterable values) { - ensureLanguageHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, languageHints_); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageHints() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The bytes of the languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHintsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - public boolean hasCropHintsParams() { - return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - public com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } else { - return cropHintsParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams(com.google.cloud.vision.v1p1beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsParams_ = value; - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams( - com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder builderForValue) { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = builderForValue.build(); - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder mergeCropHintsParams(com.google.cloud.vision.v1p1beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (cropHintsParams_ != null) { - cropHintsParams_ = - com.google.cloud.vision.v1p1beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); - } else { - cropHintsParams_ = value; - } - onChanged(); - } else { - cropHintsParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder clearCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - onChanged(); - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { - - onChanged(); - return getCropHintsParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - if (cropHintsParamsBuilder_ != null) { - return cropHintsParamsBuilder_.getMessageOrBuilder(); - } else { - return cropHintsParams_ == null ? - com.google.cloud.vision.v1p1beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder> - getCropHintsParamsFieldBuilder() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder>( - getCropHintsParams(), - getParentForChildren(), - isClean()); - cropHintsParams_ = null; - } - return cropHintsParamsBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - public boolean hasWebDetectionParams() { - return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - public com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } else { - return webDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams(com.google.cloud.vision.v1p1beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetectionParams_ = value; - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams( - com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder builderForValue) { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p1beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (webDetectionParams_ != null) { - webDetectionParams_ = - com.google.cloud.vision.v1p1beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); - } else { - webDetectionParams_ = value; - } - onChanged(); - } else { - webDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder clearWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - onChanged(); - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { - - onChanged(); - return getWebDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - if (webDetectionParamsBuilder_ != null) { - return webDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return webDetectionParams_ == null ? - com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder> - getWebDetectionParamsFieldBuilder() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder>( - getWebDetectionParams(), - getParentForChildren(), - isClean()); - webDetectionParams_ = null; - } - return webDetectionParamsBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.TextDetectionParams textDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - public boolean hasTextDetectionParams() { - return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - public com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } else { - return textDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams(com.google.cloud.vision.v1p1beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textDetectionParams_ = value; - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams( - com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder builderForValue) { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p1beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (textDetectionParams_ != null) { - textDetectionParams_ = - com.google.cloud.vision.v1p1beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); - } else { - textDetectionParams_ = value; - } - onChanged(); - } else { - textDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder clearTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - onChanged(); - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { - - onChanged(); - return getTextDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - if (textDetectionParamsBuilder_ != null) { - return textDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return textDetectionParams_ == null ? - com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder> - getTextDetectionParamsFieldBuilder() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextDetectionParams, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder>( - getTextDetectionParams(), - getParentForChildren(), - isClean()); - textDetectionParams_ = null; - } - return textDetectionParamsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageContext) - private static final com.google.cloud.vision.v1p1beta1.ImageContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageContext(); - } - - public static com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java deleted file mode 100644 index ae176ee844ec..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContextOrBuilder.java +++ /dev/null @@ -1,186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ImageContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - boolean hasLatLongRect(); - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - com.google.cloud.vision.v1p1beta1.LatLongRect getLatLongRect(); - /** - *
-   * lat/long rectangle that specifies the location of the image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.LatLongRect lat_long_rect = 1; - */ - com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); - - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - java.util.List - getLanguageHintsList(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - int getLanguageHintsCount(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - java.lang.String getLanguageHints(int index); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - com.google.protobuf.ByteString - getLanguageHintsBytes(int index); - - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - boolean hasCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - com.google.cloud.vision.v1p1beta1.CropHintsParams getCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.CropHintsParams crop_hints_params = 4; - */ - com.google.cloud.vision.v1p1beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); - - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - boolean hasWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - com.google.cloud.vision.v1p1beta1.WebDetectionParams getWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.WebDetectionParams web_detection_params = 6; - */ - com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); - - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - boolean hasTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - com.google.cloud.vision.v1p1beta1.TextDetectionParams getTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextDetectionParams text_detection_params = 12; - */ - com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java deleted file mode 100644 index 02874223184b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: as with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - * @return The source. - */ - com.google.cloud.vision.v1p1beta1.ImageSource getSource(); - /** - *
-   * Google Cloud Storage image location. If both `content` and `source`
-   * are provided for an image, `content` takes precedence and is
-   * used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p1beta1.ImageSource source = 2; - */ - com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java deleted file mode 100644 index 2850e0cd1034..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Stores image properties, such as dominant colors.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageProperties} - */ -public final class ImageProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageProperties) - ImagePropertiesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageProperties.newBuilder() to construct. - private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageProperties() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder subBuilder = null; - if (dominantColors_ != null) { - subBuilder = dominantColors_.toBuilder(); - } - dominantColors_ = input.readMessage(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dominantColors_); - dominantColors_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageProperties.class, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder.class); - } - - public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_; - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - @java.lang.Override - public boolean hasDominantColors() { - return dominantColors_ != null; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors() { - return dominantColors_ == null ? com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - return getDominantColors(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dominantColors_ != null) { - output.writeMessage(1, getDominantColors()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dominantColors_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDominantColors()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageProperties)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.ImageProperties other = (com.google.cloud.vision.v1p1beta1.ImageProperties) obj; - - if (hasDominantColors() != other.hasDominantColors()) return false; - if (hasDominantColors()) { - if (!getDominantColors() - .equals(other.getDominantColors())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDominantColors()) { - hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; - hash = (53 * hash) + getDominantColors().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Stores image properties, such as dominant colors.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageProperties) - com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageProperties.class, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.ImageProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageProperties build() { - com.google.cloud.vision.v1p1beta1.ImageProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageProperties buildPartial() { - com.google.cloud.vision.v1p1beta1.ImageProperties result = new com.google.cloud.vision.v1p1beta1.ImageProperties(this); - if (dominantColorsBuilder_ == null) { - result.dominantColors_ = dominantColors_; - } else { - result.dominantColors_ = dominantColorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.ImageProperties) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageProperties other) { - if (other == com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance()) return this; - if (other.hasDominantColors()) { - mergeDominantColors(other.getDominantColors()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.ImageProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - public boolean hasDominantColors() { - return dominantColorsBuilder_ != null || dominantColors_ != null; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors() { - if (dominantColorsBuilder_ == null) { - return dominantColors_ == null ? com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } else { - return dominantColorsBuilder_.getMessage(); - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dominantColors_ = value; - onChanged(); - } else { - dominantColorsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors( - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder builderForValue) { - if (dominantColorsBuilder_ == null) { - dominantColors_ = builderForValue.build(); - onChanged(); - } else { - dominantColorsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder mergeDominantColors(com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (dominantColors_ != null) { - dominantColors_ = - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); - } else { - dominantColors_ = value; - } - onChanged(); - } else { - dominantColorsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder clearDominantColors() { - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - onChanged(); - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { - - onChanged(); - return getDominantColorsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - if (dominantColorsBuilder_ != null) { - return dominantColorsBuilder_.getMessageOrBuilder(); - } else { - return dominantColors_ == null ? - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder> - getDominantColorsFieldBuilder() { - if (dominantColorsBuilder_ == null) { - dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder>( - getDominantColors(), - getParentForChildren(), - isClean()); - dominantColors_ = null; - } - return dominantColorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageProperties) - private static final com.google.cloud.vision.v1p1beta1.ImageProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageProperties(); - } - - public static com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java deleted file mode 100644 index ca186d7d13db..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImagePropertiesOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ImagePropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - boolean hasDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation getDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominant_colors = 1; - */ - com.google.cloud.vision.v1p1beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java deleted file mode 100644 index 6649bab9dcc0..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java +++ /dev/null @@ -1,859 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * External image source (Google Cloud Storage image location).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageSource} - */ -public final class ImageSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.ImageSource) - ImageSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageSource.newBuilder() to construct. - private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageSource() { - gcsImageUri_ = ""; - imageUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - gcsImageUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageSource.class, com.google.cloud.vision.v1p1beta1.ImageSource.Builder.class); - } - - public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsImageUri_; - /** - *
-   * NOTE: For new code `image_uri` below is preferred.
-   * Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - @java.lang.Override - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } - } - /** - *
-   * NOTE: For new code `image_uri` below is preferred.
-   * Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object imageUri_; - /** - *
-   * Image URI which supports:
-   * 1) Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 2) Publicly accessible image HTTP/HTTPS URL.
-   * This is preferred over the legacy `gcs_image_uri` above. When both
-   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - *
-   * Image URI which supports:
-   * 1) Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 2) Publicly accessible image HTTP/HTTPS URL.
-   * This is preferred over the legacy `gcs_image_uri` above. When both
-   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.ImageSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.ImageSource other = (com.google.cloud.vision.v1p1beta1.ImageSource) obj; - - if (!getGcsImageUri() - .equals(other.getGcsImageUri())) return false; - if (!getImageUri() - .equals(other.getImageUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsImageUri().hashCode(); - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.ImageSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * External image source (Google Cloud Storage image location).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.ImageSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.ImageSource) - com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.ImageSource.class, com.google.cloud.vision.v1p1beta1.ImageSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.ImageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - gcsImageUri_ = ""; - - imageUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_ImageSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSource build() { - com.google.cloud.vision.v1p1beta1.ImageSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSource buildPartial() { - com.google.cloud.vision.v1p1beta1.ImageSource result = new com.google.cloud.vision.v1p1beta1.ImageSource(this); - result.gcsImageUri_ = gcsImageUri_; - result.imageUri_ = imageUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.ImageSource) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.ImageSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.ImageSource other) { - if (other == com.google.cloud.vision.v1p1beta1.ImageSource.getDefaultInstance()) return this; - if (!other.getGcsImageUri().isEmpty()) { - gcsImageUri_ = other.gcsImageUri_; - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.ImageSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.ImageSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsImageUri_ = ""; - /** - *
-     * NOTE: For new code `image_uri` below is preferred.
-     * Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * NOTE: For new code `image_uri` below is preferred.
-     * Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * NOTE: For new code `image_uri` below is preferred.
-     * Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcsImageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * NOTE: For new code `image_uri` below is preferred.
-     * Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 
- * - * string gcs_image_uri = 1; - * @return This builder for chaining. - */ - public Builder clearGcsImageUri() { - - gcsImageUri_ = getDefaultInstance().getGcsImageUri(); - onChanged(); - return this; - } - /** - *
-     * NOTE: For new code `image_uri` below is preferred.
-     * Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The bytes for gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcsImageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - *
-     * Image URI which supports:
-     * 1) Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 2) Publicly accessible image HTTP/HTTPS URL.
-     * This is preferred over the legacy `gcs_image_uri` above. When both
-     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Image URI which supports:
-     * 1) Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 2) Publicly accessible image HTTP/HTTPS URL.
-     * This is preferred over the legacy `gcs_image_uri` above. When both
-     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Image URI which supports:
-     * 1) Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 2) Publicly accessible image HTTP/HTTPS URL.
-     * This is preferred over the legacy `gcs_image_uri` above. When both
-     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * Image URI which supports:
-     * 1) Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 2) Publicly accessible image HTTP/HTTPS URL.
-     * This is preferred over the legacy `gcs_image_uri` above. When both
-     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - *
-     * Image URI which supports:
-     * 1) Google Cloud Storage image URI, which must be in the following form:
-     * `gs://bucket_name/object_name` (for details, see
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-     * NOTE: Cloud Storage object versioning is not supported.
-     * 2) Publicly accessible image HTTP/HTTPS URL.
-     * This is preferred over the legacy `gcs_image_uri` above. When both
-     * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.ImageSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageSource) - private static final com.google.cloud.vision.v1p1beta1.ImageSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.ImageSource(); - } - - public static com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.ImageSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java deleted file mode 100644 index 6ecdd6db2e87..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSourceOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ImageSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.ImageSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * NOTE: For new code `image_uri` below is preferred.
-   * Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - java.lang.String getGcsImageUri(); - /** - *
-   * NOTE: For new code `image_uri` below is preferred.
-   * Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - com.google.protobuf.ByteString - getGcsImageUriBytes(); - - /** - *
-   * Image URI which supports:
-   * 1) Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 2) Publicly accessible image HTTP/HTTPS URL.
-   * This is preferred over the legacy `gcs_image_uri` above. When both
-   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - *
-   * Image URI which supports:
-   * 1) Google Cloud Storage image URI, which must be in the following form:
-   * `gs://bucket_name/object_name` (for details, see
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris)).
-   * NOTE: Cloud Storage object versioning is not supported.
-   * 2) Publicly accessible image HTTP/HTTPS URL.
-   * This is preferred over the legacy `gcs_image_uri` above. When both
-   * `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString - getImageUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java deleted file mode 100644 index 30513a85cb7a..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Rectangle determined by min and max `LatLng` pairs.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.LatLongRect} - */ -public final class LatLongRect extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.LatLongRect) - LatLongRectOrBuilder { -private static final long serialVersionUID = 0L; - // Use LatLongRect.newBuilder() to construct. - private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LatLongRect() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LatLongRect(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LatLongRect( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (minLatLng_ != null) { - subBuilder = minLatLng_.toBuilder(); - } - minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minLatLng_); - minLatLng_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.type.LatLng.Builder subBuilder = null; - if (maxLatLng_ != null) { - subBuilder = maxLatLng_.toBuilder(); - } - maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxLatLng_); - maxLatLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.LatLongRect.class, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder.class); - } - - public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng minLatLng_; - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - @java.lang.Override - public boolean hasMinLatLng() { - return minLatLng_ != null; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMinLatLng() { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - return getMinLatLng(); - } - - public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; - private com.google.type.LatLng maxLatLng_; - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - @java.lang.Override - public boolean hasMaxLatLng() { - return maxLatLng_ != null; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMaxLatLng() { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - return getMaxLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minLatLng_ != null) { - output.writeMessage(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - output.writeMessage(2, getMaxLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.LatLongRect)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.LatLongRect other = (com.google.cloud.vision.v1p1beta1.LatLongRect) obj; - - if (hasMinLatLng() != other.hasMinLatLng()) return false; - if (hasMinLatLng()) { - if (!getMinLatLng() - .equals(other.getMinLatLng())) return false; - } - if (hasMaxLatLng() != other.hasMaxLatLng()) return false; - if (hasMaxLatLng()) { - if (!getMaxLatLng() - .equals(other.getMaxLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinLatLng()) { - hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMinLatLng().hashCode(); - } - if (hasMaxLatLng()) { - hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMaxLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.LatLongRect prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rectangle determined by min and max `LatLng` pairs.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.LatLongRect} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.LatLongRect) - com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.LatLongRect.class, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.LatLongRect.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LatLongRect_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRect build() { - com.google.cloud.vision.v1p1beta1.LatLongRect result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRect buildPartial() { - com.google.cloud.vision.v1p1beta1.LatLongRect result = new com.google.cloud.vision.v1p1beta1.LatLongRect(this); - if (minLatLngBuilder_ == null) { - result.minLatLng_ = minLatLng_; - } else { - result.minLatLng_ = minLatLngBuilder_.build(); - } - if (maxLatLngBuilder_ == null) { - result.maxLatLng_ = maxLatLng_; - } else { - result.maxLatLng_ = maxLatLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.LatLongRect) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.LatLongRect)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.LatLongRect other) { - if (other == com.google.cloud.vision.v1p1beta1.LatLongRect.getDefaultInstance()) return this; - if (other.hasMinLatLng()) { - mergeMinLatLng(other.getMinLatLng()); - } - if (other.hasMaxLatLng()) { - mergeMaxLatLng(other.getMaxLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.LatLongRect parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.LatLongRect) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng minLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - public boolean hasMinLatLng() { - return minLatLngBuilder_ != null || minLatLng_ != null; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - public com.google.type.LatLng getMinLatLng() { - if (minLatLngBuilder_ == null) { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } else { - return minLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minLatLng_ = value; - onChanged(); - } else { - minLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (minLatLngBuilder_ == null) { - minLatLng_ = builderForValue.build(); - onChanged(); - } else { - minLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder mergeMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (minLatLng_ != null) { - minLatLng_ = - com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); - } else { - minLatLng_ = value; - } - onChanged(); - } else { - minLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder clearMinLatLng() { - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - onChanged(); - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLng.Builder getMinLatLngBuilder() { - - onChanged(); - return getMinLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - if (minLatLngBuilder_ != null) { - return minLatLngBuilder_.getMessageOrBuilder(); - } else { - return minLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMinLatLngFieldBuilder() { - if (minLatLngBuilder_ == null) { - minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMinLatLng(), - getParentForChildren(), - isClean()); - minLatLng_ = null; - } - return minLatLngBuilder_; - } - - private com.google.type.LatLng maxLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - public boolean hasMaxLatLng() { - return maxLatLngBuilder_ != null || maxLatLng_ != null; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - public com.google.type.LatLng getMaxLatLng() { - if (maxLatLngBuilder_ == null) { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } else { - return maxLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxLatLng_ = value; - onChanged(); - } else { - maxLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = builderForValue.build(); - onChanged(); - } else { - maxLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder mergeMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (maxLatLng_ != null) { - maxLatLng_ = - com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); - } else { - maxLatLng_ = value; - } - onChanged(); - } else { - maxLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder clearMaxLatLng() { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - onChanged(); - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLng.Builder getMaxLatLngBuilder() { - - onChanged(); - return getMaxLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - if (maxLatLngBuilder_ != null) { - return maxLatLngBuilder_.getMessageOrBuilder(); - } else { - return maxLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMaxLatLngFieldBuilder() { - if (maxLatLngBuilder_ == null) { - maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMaxLatLng(), - getParentForChildren(), - isClean()); - maxLatLng_ = null; - } - return maxLatLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.LatLongRect) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LatLongRect) - private static final com.google.cloud.vision.v1p1beta1.LatLongRect DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.LatLongRect(); - } - - public static com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LatLongRect parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LatLongRect(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LatLongRect getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java deleted file mode 100644 index 5b7a3f94dee5..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRectOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface LatLongRectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.LatLongRect) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - boolean hasMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - com.google.type.LatLng getMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); - - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - boolean hasMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - com.google.type.LatLng getMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java deleted file mode 100644 index aef339b3b06b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Likelihood.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A bucketized representation of likelihood, which is intended to give clients
- * highly stable results across model upgrades.
- * 
- * - * Protobuf enum {@code google.cloud.vision.v1p1beta1.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.Likelihood) -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java deleted file mode 100644 index bc899c218fd6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Detected entity location information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.LocationInfo} - */ -public final class LocationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.LocationInfo) - LocationInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocationInfo.newBuilder() to construct. - private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocationInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (latLng_ != null) { - subBuilder = latLng_.toBuilder(); - } - latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLng_); - latLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.LocationInfo.class, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder.class); - } - - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return latLng_ != null; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return getLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLng_ != null) { - output.writeMessage(1, getLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.LocationInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.LocationInfo other = (com.google.cloud.vision.v1p1beta1.LocationInfo) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng() - .equals(other.getLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.LocationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected entity location information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.LocationInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.LocationInfo) - com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.LocationInfo.class, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.LocationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLngBuilder_ == null) { - latLng_ = null; - } else { - latLng_ = null; - latLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_LocationInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfo build() { - com.google.cloud.vision.v1p1beta1.LocationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfo buildPartial() { - com.google.cloud.vision.v1p1beta1.LocationInfo result = new com.google.cloud.vision.v1p1beta1.LocationInfo(this); - if (latLngBuilder_ == null) { - result.latLng_ = latLng_; - } else { - result.latLng_ = latLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.LocationInfo) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.LocationInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.LocationInfo other) { - if (other == com.google.cloud.vision.v1p1beta1.LocationInfo.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.LocationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.LocationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return latLngBuilder_ != null || latLng_ != null; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - onChanged(); - } else { - latLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - onChanged(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (latLng_ != null) { - latLng_ = - com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); - } else { - latLng_ = value; - } - onChanged(); - } else { - latLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - if (latLngBuilder_ == null) { - latLng_ = null; - onChanged(); - } else { - latLng_ = null; - latLngBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - - onChanged(); - return getLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getLatLng(), - getParentForChildren(), - isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.LocationInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LocationInfo) - private static final com.google.cloud.vision.v1p1beta1.LocationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.LocationInfo(); - } - - public static com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.LocationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java deleted file mode 100644 index e5cfd64a4634..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface LocationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.LocationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java deleted file mode 100644 index 6105d55b5f73..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java +++ /dev/null @@ -1,1350 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Detected page from OCR.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Page} - */ -public final class Page extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Page) - PageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Page() { - blocks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Page(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - height_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blocks_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Block.parser(), extensionRegistry)); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Page.class, com.google.cloud.vision.v1p1beta1.Page.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - *
-   * Page width in pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-   * Page height in pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int BLOCKS_FIELD_NUMBER = 4; - private java.util.List blocks_; - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Block getBlocks(int index) { - return blocks_.get(index); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (height_ != 0) { - output.writeInt32(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Page)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Page other = (com.google.cloud.vision.v1p1beta1.Page) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!getBlocksList() - .equals(other.getBlocksList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected page from OCR.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Page} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Page) - com.google.cloud.vision.v1p1beta1.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Page.class, com.google.cloud.vision.v1p1beta1.Page.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - width_ = 0; - - height_ = 0; - - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Page getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Page build() { - com.google.cloud.vision.v1p1beta1.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Page buildPartial() { - com.google.cloud.vision.v1p1beta1.Page result = new com.google.cloud.vision.v1p1beta1.Page(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - result.width_ = width_; - result.height_ = height_; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Page) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Page other) { - if (other == com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Page) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private int width_ ; - /** - *
-     * Page width in pixels.
-     * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Page width in pixels.
-     * 
- * - * int32 width = 2; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Page width in pixels.
-     * 
- * - * int32 width = 2; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Page height in pixels.
-     * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Page height in pixels.
-     * 
- * - * int32 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Page height in pixels.
-     * 
- * - * int32 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder> blocksBuilder_; - - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p1beta1.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p1beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder addBlocks(com.google.cloud.vision.v1p1beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p1beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder addBlocks( - com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p1beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder addAllBlocks( - java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p1beta1.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p1beta1.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p1beta1.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Page) - private static final com.google.cloud.vision.v1p1beta1.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Page(); - } - - public static com.google.cloud.vision.v1p1beta1.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Page(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java deleted file mode 100644 index 59a47d4bc9de..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PageOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Page) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * Page width in pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Page height in pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - int getHeight(); - - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - java.util.List - getBlocksList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p1beta1.Block getBlocks(int index); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - int getBlocksCount(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - java.util.List - getBlocksOrBuilderList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p1beta1.BlockOrBuilder getBlocksOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java deleted file mode 100644 index ce2093bbb47c..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Structural unit of text representing a number of words in certain order.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Paragraph} - */ -public final class Paragraph extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Paragraph) - ParagraphOrBuilder { -private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Paragraph() { - words_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Paragraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Paragraph( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Word.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Paragraph.class, com.google.cloud.vision.v1p1beta1.Paragraph.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int WORDS_FIELD_NUMBER = 3; - private java.util.List words_; - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List getWordsList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List - getWordsOrBuilderList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - @java.lang.Override - public int getWordsCount() { - return words_.size(); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Word getWords(int index) { - return words_.get(index); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( - int index) { - return words_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - output.writeMessage(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Paragraph)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Paragraph other = (com.google.cloud.vision.v1p1beta1.Paragraph) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Paragraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structural unit of text representing a number of words in certain order.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Paragraph} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Paragraph) - com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Paragraph.class, com.google.cloud.vision.v1p1beta1.Paragraph.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Paragraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWordsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - wordsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Paragraph build() { - com.google.cloud.vision.v1p1beta1.Paragraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Paragraph buildPartial() { - com.google.cloud.vision.v1p1beta1.Paragraph result = new com.google.cloud.vision.v1p1beta1.Paragraph(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - } else { - result.words_ = wordsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Paragraph) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Paragraph)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Paragraph other) { - if (other == com.google.cloud.vision.v1p1beta1.Paragraph.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (wordsBuilder_ == null) { - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - } else { - if (!other.words_.isEmpty()) { - if (wordsBuilder_.isEmpty()) { - wordsBuilder_.dispose(); - wordsBuilder_ = null; - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - wordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWordsFieldBuilder() : null; - } else { - wordsBuilder_.addAllMessages(other.words_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Paragraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Paragraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List words_ = - java.util.Collections.emptyList(); - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(words_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder> wordsBuilder_; - - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public java.util.List getWordsList() { - if (wordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(words_); - } else { - return wordsBuilder_.getMessageList(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public int getWordsCount() { - if (wordsBuilder_ == null) { - return words_.size(); - } else { - return wordsBuilder_.getCount(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p1beta1.Word getWords(int index) { - if (wordsBuilder_ == null) { - return words_.get(index); - } else { - return wordsBuilder_.getMessage(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p1beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - } else { - wordsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.set(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder addWords(com.google.cloud.vision.v1p1beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - } else { - wordsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p1beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(index, value); - onChanged(); - } else { - wordsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder addWords( - com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p1beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder addAllWords( - java.lang.Iterable values) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - } else { - wordsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder clearWords() { - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - wordsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public Builder removeWords(int index) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.remove(index); - onChanged(); - } else { - wordsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p1beta1.Word.Builder getWordsBuilder( - int index) { - return getWordsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( - int index) { - if (wordsBuilder_ == null) { - return words_.get(index); } else { - return wordsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public java.util.List - getWordsOrBuilderList() { - if (wordsBuilder_ != null) { - return wordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(words_); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p1beta1.Word.Builder addWordsBuilder() { - return getWordsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p1beta1.Word.Builder addWordsBuilder( - int index) { - return getWordsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - public java.util.List - getWordsBuilderList() { - return getWordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder> - getWordsFieldBuilder() { - if (wordsBuilder_ == null) { - wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - words_ = null; - } - return wordsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Paragraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Paragraph) - private static final com.google.cloud.vision.v1p1beta1.Paragraph DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Paragraph(); - } - - public static com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Paragraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paragraph(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Paragraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java deleted file mode 100644 index 7e8db9054b48..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ParagraphOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Paragraph) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - java.util.List - getWordsList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - com.google.cloud.vision.v1p1beta1.Word getWords(int index); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - int getWordsCount(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - java.util.List - getWordsOrBuilderList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Word words = 3; - */ - com.google.cloud.vision.v1p1beta1.WordOrBuilder getWordsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java deleted file mode 100644 index 02237f2413e6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A 3D position in the image, used primarily for Face detection landmarks.
- * A valid Position must have both x and y coordinates.
- * The position coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Position} - */ -public final class Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Position) - PositionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Position.newBuilder() to construct. - private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Position() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Position(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Position( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - case 29: { - - z_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Position.class, com.google.cloud.vision.v1p1beta1.Position.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - public static final int Z_FIELD_NUMBER = 3; - private float z_; - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - output.writeFloat(3, z_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, z_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Position)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Position other = (com.google.cloud.vision.v1p1beta1.Position) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (java.lang.Float.floatToIntBits(getZ()) - != java.lang.Float.floatToIntBits( - other.getZ())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getZ()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A 3D position in the image, used primarily for Face detection landmarks.
-   * A valid Position must have both x and y coordinates.
-   * The position coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Position) - com.google.cloud.vision.v1p1beta1.PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Position.class, com.google.cloud.vision.v1p1beta1.Position.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Position.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - z_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Position_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Position getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Position build() { - com.google.cloud.vision.v1p1beta1.Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Position buildPartial() { - com.google.cloud.vision.v1p1beta1.Position result = new com.google.cloud.vision.v1p1beta1.Position(this); - result.x_ = x_; - result.y_ = y_; - result.z_ = z_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Position) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Position other) { - if (other == com.google.cloud.vision.v1p1beta1.Position.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - if (other.getZ() != 0F) { - setZ(other.getZ()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Position parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - - private float z_ ; - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @param value The z to set. - * @return This builder for chaining. - */ - public Builder setZ(float value) { - - z_ = value; - onChanged(); - return this; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return This builder for chaining. - */ - public Builder clearZ() { - - z_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Position) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Position) - private static final com.google.cloud.vision.v1p1beta1.Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Position(); - } - - public static com.google.cloud.vision.v1p1beta1.Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Position parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java deleted file mode 100644 index 2ba8c03f086f..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PositionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Position) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); - - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - float getZ(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java deleted file mode 100644 index 497914bdda12..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java +++ /dev/null @@ -1,842 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A `Property` consists of a user-supplied name/value pair.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Property} - */ -public final class Property extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Property) - PropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Property.newBuilder() to construct. - private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Property() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Property(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Property( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 24: { - - uint64Value_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Property.class, com.google.cloud.vision.v1p1beta1.Property.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UINT64_VALUE_FIELD_NUMBER = 3; - private long uint64Value_; - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - if (uint64Value_ != 0L) { - output.writeUInt64(3, uint64Value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - if (uint64Value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, uint64Value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Property)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Property other = (com.google.cloud.vision.v1p1beta1.Property) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (getUint64Value() - != other.getUint64Value()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Value()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Property parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Property parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Property prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `Property` consists of a user-supplied name/value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Property} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Property) - com.google.cloud.vision.v1p1beta1.PropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Property.class, com.google.cloud.vision.v1p1beta1.Property.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Property.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - uint64Value_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_Property_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Property getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Property build() { - com.google.cloud.vision.v1p1beta1.Property result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Property buildPartial() { - com.google.cloud.vision.v1p1beta1.Property result = new com.google.cloud.vision.v1p1beta1.Property(this); - result.name_ = name_; - result.value_ = value_; - result.uint64Value_ = uint64Value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Property) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Property)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Property other) { - if (other == com.google.cloud.vision.v1p1beta1.Property.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getUint64Value() != 0L) { - setUint64Value(other.getUint64Value()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Property parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Property) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - - private long uint64Value_ ; - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @param value The uint64Value to set. - * @return This builder for chaining. - */ - public Builder setUint64Value(long value) { - - uint64Value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return This builder for chaining. - */ - public Builder clearUint64Value() { - - uint64Value_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Property) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Property) - private static final com.google.cloud.vision.v1p1beta1.Property DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Property(); - } - - public static com.google.cloud.vision.v1p1beta1.Property getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Property parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Property(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Property getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java deleted file mode 100644 index ce36f3b7690e..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/PropertyOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface PropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Property) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - long getUint64Value(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java deleted file mode 100644 index 5dcbbac7d167..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Set of features pertaining to the image, computed by computer vision
- * methods over safe-search verticals (for example, adult, spoof, medical,
- * violence).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.SafeSearchAnnotation} - */ -public final class SafeSearchAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - SafeSearchAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use SafeSearchAnnotation.newBuilder() to construct. - private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SafeSearchAnnotation() { - adult_ = 0; - spoof_ = 0; - medical_ = 0; - violence_ = 0; - racy_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SafeSearchAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SafeSearchAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - adult_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - spoof_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - medical_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - violence_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - racy_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder.class); - } - - public static final int ADULT_FIELD_NUMBER = 1; - private int adult_; - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SPOOF_FIELD_NUMBER = 2; - private int spoof_; - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int MEDICAL_FIELD_NUMBER = 3; - private int medical_; - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int VIOLENCE_FIELD_NUMBER = 4; - private int violence_; - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RACY_FIELD_NUMBER = 9; - private int racy_; - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adult_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, racy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adult_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p1beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, racy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) obj; - - if (adult_ != other.adult_) return false; - if (spoof_ != other.spoof_) return false; - if (medical_ != other.medical_) return false; - if (violence_ != other.violence_) return false; - if (racy_ != other.racy_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADULT_FIELD_NUMBER; - hash = (53 * hash) + adult_; - hash = (37 * hash) + SPOOF_FIELD_NUMBER; - hash = (53 * hash) + spoof_; - hash = (37 * hash) + MEDICAL_FIELD_NUMBER; - hash = (53 * hash) + medical_; - hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; - hash = (53 * hash) + violence_; - hash = (37 * hash) + RACY_FIELD_NUMBER; - hash = (53 * hash) + racy_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of features pertaining to the image, computed by computer vision
-   * methods over safe-search verticals (for example, adult, spoof, medical,
-   * violence).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.SafeSearchAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adult_ = 0; - - spoof_ = 0; - - medical_ = 0; - - violence_ = 0; - - racy_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation build() { - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation(this); - result.adult_ = adult_; - result.spoof_ = spoof_; - result.medical_ = medical_; - result.violence_ = violence_; - result.racy_ = racy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance()) return this; - if (other.adult_ != 0) { - setAdultValue(other.getAdultValue()); - } - if (other.spoof_ != 0) { - setSpoofValue(other.getSpoofValue()); - } - if (other.medical_ != 0) { - setMedicalValue(other.getMedicalValue()); - } - if (other.violence_ != 0) { - setViolenceValue(other.getViolenceValue()); - } - if (other.racy_ != 0) { - setRacyValue(other.getRacyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int adult_ = 0; - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @param value The enum numeric value on the wire for adult to set. - * @return This builder for chaining. - */ - public Builder setAdultValue(int value) { - - adult_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @param value The adult to set. - * @return This builder for chaining. - */ - public Builder setAdult(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - adult_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return This builder for chaining. - */ - public Builder clearAdult() { - - adult_ = 0; - onChanged(); - return this; - } - - private int spoof_ = 0; - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @param value The enum numeric value on the wire for spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoofValue(int value) { - - spoof_ = value; - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @param value The spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoof(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - spoof_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return This builder for chaining. - */ - public Builder clearSpoof() { - - spoof_ = 0; - onChanged(); - return this; - } - - private int medical_ = 0; - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @param value The enum numeric value on the wire for medical to set. - * @return This builder for chaining. - */ - public Builder setMedicalValue(int value) { - - medical_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @param value The medical to set. - * @return This builder for chaining. - */ - public Builder setMedical(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - medical_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return This builder for chaining. - */ - public Builder clearMedical() { - - medical_ = 0; - onChanged(); - return this; - } - - private int violence_ = 0; - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @param value The enum numeric value on the wire for violence to set. - * @return This builder for chaining. - */ - public Builder setViolenceValue(int value) { - - violence_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @param value The violence to set. - * @return This builder for chaining. - */ - public Builder setViolence(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - violence_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return This builder for chaining. - */ - public Builder clearViolence() { - - violence_ = 0; - onChanged(); - return this; - } - - private int racy_ = 0; - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @param value The enum numeric value on the wire for racy to set. - * @return This builder for chaining. - */ - public Builder setRacyValue(int value) { - - racy_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.Likelihood result = com.google.cloud.vision.v1p1beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p1beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @param value The racy to set. - * @return This builder for chaining. - */ - public Builder setRacy(com.google.cloud.vision.v1p1beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - racy_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return This builder for chaining. - */ - public Builder clearRacy() { - - racy_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - private static final com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafeSearchAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SafeSearchAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java deleted file mode 100644 index d86304073839..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotationOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface SafeSearchAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - int getAdultValue(); - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood adult = 1; - * @return The adult. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getAdult(); - - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - int getSpoofValue(); - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood spoof = 2; - * @return The spoof. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getSpoof(); - - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - int getMedicalValue(); - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood medical = 3; - * @return The medical. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getMedical(); - - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - int getViolenceValue(); - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood violence = 4; - * @return The violence. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getViolence(); - - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - int getRacyValue(); - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p1beta1.Likelihood racy = 9; - * @return The racy. - */ - com.google.cloud.vision.v1p1beta1.Likelihood getRacy(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java deleted file mode 100644 index 1f8703351983..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A single symbol representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Symbol} - */ -public final class Symbol extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Symbol) - SymbolOrBuilder { -private static final long serialVersionUID = 0L; - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Symbol() { - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Symbol(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Symbol( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Symbol.class, com.google.cloud.vision.v1p1beta1.Symbol.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object text_; - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Symbol)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Symbol other = (com.google.cloud.vision.v1p1beta1.Symbol) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Symbol prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single symbol representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Symbol} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Symbol) - com.google.cloud.vision.v1p1beta1.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Symbol.class, com.google.cloud.vision.v1p1beta1.Symbol.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - text_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Symbol build() { - com.google.cloud.vision.v1p1beta1.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Symbol buildPartial() { - com.google.cloud.vision.v1p1beta1.Symbol result = new com.google.cloud.vision.v1p1beta1.Symbol(this); - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.text_ = text_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Symbol) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Symbol other) { - if (other == com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Symbol) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Symbol) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Symbol) - private static final com.google.cloud.vision.v1p1beta1.Symbol DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Symbol(); - } - - public static com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Symbol getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java deleted file mode 100644 index 5884bbe3032e..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SymbolOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Symbol) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java deleted file mode 100644 index 41d2655636c6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java +++ /dev/null @@ -1,3814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * TextAnnotation contains a structured representation of OCR extracted text.
- * The hierarchy of an OCR extracted text structure is like this:
- *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
- * Each structural component, starting from Page, may further have their own
- * properties. Properties describe detected languages, breaks etc.. Please refer
- * to the
- * [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty]
- * message definition below for more detail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation} - */ -public final class TextAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation) - TextAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextAnnotation.newBuilder() to construct. - private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextAnnotation() { - pages_ = java.util.Collections.emptyList(); - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Page.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder.class); - } - - public interface DetectedLanguageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - } - /** - *
-   * Detected language for a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} - */ - public static final class DetectedLanguage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedLanguage() { - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedLanguage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedLanguage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) obj; - - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - languageCode_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage build() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage buildPartial() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage(this); - result.languageCode_ = languageCode_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage other) { - if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage(); - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedLanguage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectedBreakOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType(); - - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - boolean getIsPrefix(); - } - /** - *
-   * Detected start or end of a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} - */ - public static final class DetectedBreak extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedBreak() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedBreak(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedBreak( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - isPrefix_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - /** - *
-     * Enum to denote the type of break found. New line, space etc.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType} - */ - public enum BreakType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - SURE_SPACE(2), - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - EOL_SURE_SPACE(3), - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - HYPHEN(4), - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - LINE_BREAK(5), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - public static final int SURE_SPACE_VALUE = 2; - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - public static final int EOL_SURE_SPACE_VALUE = 3; - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - public static final int HYPHEN_VALUE = 4; - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - public static final int LINE_BREAK_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BreakType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BreakType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SPACE; - case 2: return SURE_SPACE; - case 3: return EOL_SURE_SPACE; - case 4: return HYPHEN; - case 5: return LINE_BREAK; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BreakType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BreakType findValueByNumber(int number) { - return BreakType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); - } - - private static final BreakType[] VALUES = values(); - - public static BreakType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BreakType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - - public static final int IS_PREFIX_FIELD_NUMBER = 2; - private boolean isPrefix_; - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (isPrefix_ != false) { - output.writeBool(2, isPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (isPrefix_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, isPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) obj; - - if (type_ != other.type_) return false; - if (getIsPrefix() - != other.getIsPrefix()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPrefix()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected start or end of a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - isPrefix_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak build() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak buildPartial() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak(this); - result.type_ = type_; - result.isPrefix_ = isPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak other) { - if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsPrefix() != false) { - setIsPrefix(other.getIsPrefix()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isPrefix_ ; - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @param value The isPrefix to set. - * @return This builder for chaining. - */ - public Builder setIsPrefix(boolean value) { - - isPrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearIsPrefix() { - - isPrefix_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak(); - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedBreak(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TextPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - int getDetectedLanguagesCount(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesOrBuilderList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index); - - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - boolean hasDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); - } - /** - *
-   * Additional information detected on the structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} - */ - public static final class TextProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - TextPropertyOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextProperty.newBuilder() to construct. - private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextProperty() { - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextProperty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextProperty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectedLanguages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; - if (detectedBreak_ != null) { - subBuilder = detectedBreak_.toBuilder(); - } - detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectedBreak_); - detectedBreak_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder.class); - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; - private java.util.List detectedLanguages_; - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - return detectedLanguages_.get(index); - } - - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_; - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - return detectedBreak_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - return getDetectedBreak(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetectedBreak()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) obj; - - if (!getDetectedLanguagesList() - .equals(other.getDetectedLanguagesList())) return false; - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak() - .equals(other.getDetectedBreak())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Additional information detected on the structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectedLanguagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectedLanguagesBuilder_.clear(); - } - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty build() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty buildPartial() { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty(this); - int from_bitField0_ = bitField0_; - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (detectedBreakBuilder_ == null) { - result.detectedBreak_ = detectedBreak_; - } else { - result.detectedBreak_ = detectedBreakBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty other) { - if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectedLanguagesFieldBuilder() : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List detectedLanguages_ = - java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; - - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return detectedBreakBuilder_ != null || detectedBreak_ != null; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - onChanged(); - } else { - detectedBreakBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak( - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - onChanged(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder mergeDetectedBreak(com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (detectedBreak_ != null) { - detectedBreak_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); - } else { - detectedBreak_ = value; - } - onChanged(); - } else { - detectedBreakBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder clearDetectedBreak() { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - onChanged(); - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { - - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreakOrBuilder>( - getDetectedBreak(), - getParentForChildren(), - isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - private static final com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty(); - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextProperty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PAGES_FIELD_NUMBER = 1; - private java.util.List pages_; - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List getPagesList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - @java.lang.Override - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Page getPages(int index) { - return pages_.get(index); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.TextAnnotation other = (com.google.cloud.vision.v1p1beta1.TextAnnotation) obj; - - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!getText() - .equals(other.getText())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * TextAnnotation contains a structured representation of OCR extracted text.
-   * The hierarchy of an OCR extracted text structure is like this:
-   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
-   * Each structural component, starting from Page, may further have their own
-   * properties. Properties describe detected languages, breaks etc.. Please refer
-   * to the
-   * [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty]
-   * message definition below for more detail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextAnnotation) - com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextAnnotation.class, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.TextAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pagesBuilder_.clear(); - } - text_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation build() { - com.google.cloud.vision.v1p1beta1.TextAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation buildPartial() { - com.google.cloud.vision.v1p1beta1.TextAnnotation result = new com.google.cloud.vision.v1p1beta1.TextAnnotation(this); - int from_bitField0_ = bitField0_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - result.text_ = text_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.TextAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.TextAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextAnnotation other) { - if (other == com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance()) return this; - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - pagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.TextAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.TextAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder> pagesBuilder_; - - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p1beta1.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p1beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder addPages(com.google.cloud.vision.v1p1beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p1beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder addPages( - com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p1beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p1beta1.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p1beta1.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p1beta1.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation) - private static final com.google.cloud.vision.v1p1beta1.TextAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextAnnotation(); - } - - public static com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java deleted file mode 100644 index 27dd9b9a4a96..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface TextAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - java.util.List - getPagesList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p1beta1.Page getPages(int index); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - int getPagesCount(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - java.util.List - getPagesOrBuilderList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p1beta1.PageOrBuilder getPagesOrBuilder( - int index); - - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java deleted file mode 100644 index df44c643aabc..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotationProto.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public final class TextAnnotationProto { - private TextAnnotationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Page_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Block_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p1beta1/text_ann" + - "otation.proto\022\035google.cloud.vision.v1p1b" + - "eta1\032,google/cloud/vision/v1p1beta1/geom" + - "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + - " \003(\0132#.google.cloud.vision.v1p1beta1.Pag" + - "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + - "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + - "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + - "cloud.vision.v1p1beta1.TextAnnotation.De" + - "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + - "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + - "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + - "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + - "\n\022detected_languages\030\001 \003(\0132>.google.clou" + - "d.vision.v1p1beta1.TextAnnotation.Detect" + - "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + - "gle.cloud.vision.v1p1beta1.TextAnnotatio" + - "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + - "(\0132:.google.cloud.vision.v1p1beta1.TextA" + - "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + - "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + - "loud.vision.v1p1beta1.Block\022\022\n\nconfidenc" + - "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + - "ogle.cloud.vision.v1p1beta1.TextAnnotati" + - "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + - "google.cloud.vision.v1p1beta1.BoundingPo" + - "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + - "sion.v1p1beta1.Paragraph\022B\n\nblock_type\030\004" + - " \001(\0162..google.cloud.vision.v1p1beta1.Blo" + - "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + - "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + - "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + - "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + - "oud.vision.v1p1beta1.TextAnnotation.Text" + - "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + - "cloud.vision.v1p1beta1.BoundingPoly\0222\n\005w" + - "ords\030\003 \003(\0132#.google.cloud.vision.v1p1bet" + - "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + - "property\030\001 \001(\0132:.google.cloud.vision.v1p" + - "1beta1.TextAnnotation.TextProperty\022A\n\014bo" + - "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + - "1p1beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + - ".google.cloud.vision.v1p1beta1.Symbol\022\022\n" + - "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + - "\030\001 \001(\0132:.google.cloud.vision.v1p1beta1.T" + - "extAnnotation.TextProperty\022A\n\014bounding_b" + - "ox\030\002 \001(\0132+.google.cloud.vision.v1p1beta1" + - ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + - "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p1" + - "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + - "ang.org/genproto/googleapis/cloud/vision" + - "/v1p1beta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor, - new java.lang.String[] { "Pages", "Text", }); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor = - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedLanguage_descriptor, - new java.lang.String[] { "LanguageCode", "Confidence", }); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor = - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_DetectedBreak_descriptor, - new java.lang.String[] { "Type", "IsPrefix", }); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor = - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_TextAnnotation_TextProperty_descriptor, - new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); - internal_static_google_cloud_vision_v1p1beta1_Page_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p1beta1_Page_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Page_descriptor, - new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); - internal_static_google_cloud_vision_v1p1beta1_Block_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p1beta1_Block_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Block_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); - internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p1beta1_Paragraph_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Paragraph_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); - internal_static_google_cloud_vision_v1p1beta1_Word_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Word_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); - internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p1beta1_Symbol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_Symbol_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.cloud.vision.v1p1beta1.GeometryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java deleted file mode 100644 index b78d85301ea6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParams.java +++ /dev/null @@ -1,767 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Parameters for text detections. This is used to control TEXT_DETECTION and
- * DOCUMENT_TEXT_DETECTION features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextDetectionParams} - */ -public final class TextDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.TextDetectionParams) - TextDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextDetectionParams.newBuilder() to construct. - private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextDetectionParams() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 72: { - - enableTextDetectionConfidenceScore_ = input.readBool(); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advancedOcrOptions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextDetectionParams.class, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder.class); - } - - public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; - private boolean enableTextDetectionConfidenceScore_; - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - - public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList advancedOcrOptions_; - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_; - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enableTextDetectionConfidenceScore_ != false) { - output.writeBool(9, enableTextDetectionConfidenceScore_); - } - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableTextDetectionConfidenceScore_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, enableTextDetectionConfidenceScore_); - } - { - int dataSize = 0; - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdvancedOcrOptionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.TextDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.TextDetectionParams other = (com.google.cloud.vision.v1p1beta1.TextDetectionParams) obj; - - if (getEnableTextDetectionConfidenceScore() - != other.getEnableTextDetectionConfidenceScore()) return false; - if (!getAdvancedOcrOptionsList() - .equals(other.getAdvancedOcrOptionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableTextDetectionConfidenceScore()); - if (getAdvancedOcrOptionsCount() > 0) { - hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.TextDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for text detections. This is used to control TEXT_DETECTION and
-   * DOCUMENT_TEXT_DETECTION features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.TextDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.TextDetectionParams) - com.google.cloud.vision.v1p1beta1.TextDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.TextDetectionParams.class, com.google.cloud.vision.v1p1beta1.TextDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.TextDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - enableTextDetectionConfidenceScore_ = false; - - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParams build() { - com.google.cloud.vision.v1p1beta1.TextDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParams buildPartial() { - com.google.cloud.vision.v1p1beta1.TextDetectionParams result = new com.google.cloud.vision.v1p1beta1.TextDetectionParams(this); - int from_bitField0_ = bitField0_; - result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; - if (((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.advancedOcrOptions_ = advancedOcrOptions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.TextDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.TextDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.TextDetectionParams other) { - if (other == com.google.cloud.vision.v1p1beta1.TextDetectionParams.getDefaultInstance()) return this; - if (other.getEnableTextDetectionConfidenceScore() != false) { - setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); - } - if (!other.advancedOcrOptions_.isEmpty()) { - if (advancedOcrOptions_.isEmpty()) { - advancedOcrOptions_ = other.advancedOcrOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.addAll(other.advancedOcrOptions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.TextDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.TextDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean enableTextDetectionConfidenceScore_ ; - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @param value The enableTextDetectionConfidenceScore to set. - * @return This builder for chaining. - */ - public Builder setEnableTextDetectionConfidenceScore(boolean value) { - - enableTextDetectionConfidenceScore_ = value; - onChanged(); - return this; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return This builder for chaining. - */ - public Builder clearEnableTextDetectionConfidenceScore() { - - enableTextDetectionConfidenceScore_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdvancedOcrOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_.getUnmodifiableView(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index to set the value at. - * @param value The advancedOcrOptions to set. - * @return This builder for chaining. - */ - public Builder setAdvancedOcrOptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param values The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAllAdvancedOcrOptions( - java.lang.Iterable values) { - ensureAdvancedOcrOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, advancedOcrOptions_); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return This builder for chaining. - */ - public Builder clearAdvancedOcrOptions() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The bytes of the advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.TextDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextDetectionParams) - private static final com.google.cloud.vision.v1p1beta1.TextDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.TextDetectionParams(); - } - - public static com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java deleted file mode 100644 index 7c57f410906b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextDetectionParamsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface TextDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.TextDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - boolean getEnableTextDetectionConfidenceScore(); - - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - java.util.List - getAdvancedOcrOptionsList(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - int getAdvancedOcrOptionsCount(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - java.lang.String getAdvancedOcrOptions(int index); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java deleted file mode 100644 index ce0045a464fb..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the vertex coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Vertex} - */ -public final class Vertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Vertex) - VertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use Vertex.newBuilder() to construct. - private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Vertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Vertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - x_ = input.readInt32(); - break; - } - case 16: { - - y_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Vertex.class, com.google.cloud.vision.v1p1beta1.Vertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private int x_; - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private int y_; - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (x_ != 0) { - output.writeInt32(1, x_); - } - if (y_ != 0) { - output.writeInt32(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, x_); - } - if (y_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Vertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Vertex other = (com.google.cloud.vision.v1p1beta1.Vertex) obj; - - if (getX() - != other.getX()) return false; - if (getY() - != other.getY()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX(); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Vertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the vertex coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Vertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Vertex) - com.google.cloud.vision.v1p1beta1.VertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Vertex.class, com.google.cloud.vision.v1p1beta1.Vertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Vertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0; - - y_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.GeometryProto.internal_static_google_cloud_vision_v1p1beta1_Vertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Vertex build() { - com.google.cloud.vision.v1p1beta1.Vertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Vertex buildPartial() { - com.google.cloud.vision.v1p1beta1.Vertex result = new com.google.cloud.vision.v1p1beta1.Vertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Vertex) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Vertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Vertex other) { - if (other == com.google.cloud.vision.v1p1beta1.Vertex.getDefaultInstance()) return this; - if (other.getX() != 0) { - setX(other.getX()); - } - if (other.getY() != 0) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Vertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Vertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(int value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0; - onChanged(); - return this; - } - - private int y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Vertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Vertex) - private static final com.google.cloud.vision.v1p1beta1.Vertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Vertex(); - } - - public static com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Vertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Vertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Vertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java deleted file mode 100644 index 555ae15381e1..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/VertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/geometry.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface VertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Vertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - int getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - int getY(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java deleted file mode 100644 index 7e38690ea1e5..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java +++ /dev/null @@ -1,7537 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/web_detection.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Relevant information for the image from the Internet.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection} - */ -public final class WebDetection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection) - WebDetectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetection.newBuilder() to construct. - private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetection() { - webEntities_ = java.util.Collections.emptyList(); - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - visuallySimilarImages_ = java.util.Collections.emptyList(); - bestGuessLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - webEntities_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pagesWithMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - visuallySimilarImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bestGuessLabels_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.class, com.google.cloud.vision.v1p1beta1.WebDetection.Builder.class); - } - - public interface WebEntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - *
-   * Entity deduced from similar images on the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebEntity} - */ - public static final class WebEntity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - WebEntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebEntity.newBuilder() to construct. - private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebEntity() { - entityId_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebEntity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebEntity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - entityId_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object entityId_; - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Entity deduced from similar images on the Internet.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebEntity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - entityId_ = ""; - - score_ = 0F; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity build() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity(this); - result.entityId_ = entityId_; - result.score_ = score_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object entityId_ = ""; - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - entityId_ = value; - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - - entityId_ = getDefaultInstance().getEntityId(); - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - entityId_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebEntity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebEntity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Metadata for online images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebImage} - */ - public static final class WebImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - WebImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebImage.newBuilder() to construct. - private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebImage() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for online images.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage build() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebImage(this); - result.url_ = url_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebImage(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebPageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - java.lang.String getPageTitle(); - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - com.google.protobuf.ByteString - getPageTitleBytes(); - - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - int getFullMatchingImagesCount(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - int getPartialMatchingImagesCount(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - } - /** - *
-   * Metadata for web pages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebPage} - */ - public static final class WebPage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - WebPageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebPage.newBuilder() to construct. - private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebPage() { - url_ = ""; - pageTitle_ = ""; - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebPage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebPage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageTitle_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PAGE_TITLE_FIELD_NUMBER = 3; - private volatile java.lang.Object pageTitle_; - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - @java.lang.Override - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } - } - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List fullMatchingImages_; - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; - private java.util.List partialMatchingImages_; - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(5, partialMatchingImages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, partialMatchingImages_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebPage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getPageTitle() - .equals(other.getPageTitle())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; - hash = (53 * hash) + getPageTitle().hashCode(); - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for web pages.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebPage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - pageTitle_ = ""; - - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage build() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebPage(this); - int from_bitField0_ = bitField0_; - result.url_ = url_; - result.score_ = score_; - result.pageTitle_ = pageTitle_; - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebPage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getPageTitle().isEmpty()) { - pageTitle_ = other.pageTitle_; - onChanged(); - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object pageTitle_ = ""; - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageTitle_ = value; - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return This builder for chaining. - */ - public Builder clearPageTitle() { - - pageTitle_ = getDefaultInstance().getPageTitle(); - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The bytes for pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageTitle_ = value; - onChanged(); - return this; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebPage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebPage(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebPage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebPage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - } - /** - *
-   * Label to provide extra metadata for the web detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebLabel} - */ - public static final class WebLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) - WebLabelOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebLabel.newBuilder() to construct. - private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebLabel() { - label_ = ""; - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - private volatile java.lang.Object label_; - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) obj; - - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Label to provide extra metadata for the web detection.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection.WebLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - label_ = ""; - - languageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel build() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel(this); - result.label_ = label_; - result.languageCode_ = languageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()) return this; - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebLabel) - private static final com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int WEB_ENTITIES_FIELD_NUMBER = 1; - private java.util.List webEntities_; - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List getWebEntitiesList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List - getWebEntitiesOrBuilderList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public int getWebEntitiesCount() { - return webEntities_.size(); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index) { - return webEntities_.get(index); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - return webEntities_.get(index); - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; - private java.util.List fullMatchingImages_; - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; - private java.util.List partialMatchingImages_; - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List pagesWithMatchingImages_; - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List getPagesWithMatchingImagesList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public int getPagesWithMatchingImagesCount() { - return pagesWithMatchingImages_.size(); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - return pagesWithMatchingImages_.get(index); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - return pagesWithMatchingImages_.get(index); - } - - public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; - private java.util.List visuallySimilarImages_; - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List getVisuallySimilarImagesList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public int getVisuallySimilarImagesCount() { - return visuallySimilarImages_.size(); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - return visuallySimilarImages_.get(index); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - return visuallySimilarImages_.get(index); - } - - public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; - private java.util.List bestGuessLabels_; - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List getBestGuessLabelsList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List - getBestGuessLabelsOrBuilderList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public int getBestGuessLabelsCount() { - return bestGuessLabels_.size(); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - return bestGuessLabels_.get(index); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - return bestGuessLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < webEntities_.size(); i++) { - output.writeMessage(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - output.writeMessage(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - output.writeMessage(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - output.writeMessage(8, bestGuessLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < webEntities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, bestGuessLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetection)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetection other = (com.google.cloud.vision.v1p1beta1.WebDetection) obj; - - if (!getWebEntitiesList() - .equals(other.getWebEntitiesList())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!getPagesWithMatchingImagesList() - .equals(other.getPagesWithMatchingImagesList())) return false; - if (!getVisuallySimilarImagesList() - .equals(other.getVisuallySimilarImagesList())) return false; - if (!getBestGuessLabelsList() - .equals(other.getBestGuessLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWebEntitiesCount() > 0) { - hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getWebEntitiesList().hashCode(); - } - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - if (getPagesWithMatchingImagesCount() > 0) { - hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); - } - if (getVisuallySimilarImagesCount() > 0) { - hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); - } - if (getBestGuessLabelsCount() > 0) { - hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getBestGuessLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Relevant information for the image from the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetection) - com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetection.class, com.google.cloud.vision.v1p1beta1.WebDetection.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWebEntitiesFieldBuilder(); - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - getPagesWithMatchingImagesFieldBuilder(); - getVisuallySimilarImagesFieldBuilder(); - getBestGuessLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - webEntitiesBuilder_.clear(); - } - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - partialMatchingImagesBuilder_.clear(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - visuallySimilarImagesBuilder_.clear(); - } - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection build() { - com.google.cloud.vision.v1p1beta1.WebDetection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetection result = new com.google.cloud.vision.v1p1beta1.WebDetection(this); - int from_bitField0_ = bitField0_; - if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.webEntities_ = webEntities_; - } else { - result.webEntities_ = webEntitiesBuilder_.build(); - } - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.pagesWithMatchingImages_ = pagesWithMatchingImages_; - } else { - result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); - } - if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.visuallySimilarImages_ = visuallySimilarImages_; - } else { - result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); - } - if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bestGuessLabels_ = bestGuessLabels_; - } else { - result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetection) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetection other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance()) return this; - if (webEntitiesBuilder_ == null) { - if (!other.webEntities_.isEmpty()) { - if (webEntities_.isEmpty()) { - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWebEntitiesIsMutable(); - webEntities_.addAll(other.webEntities_); - } - onChanged(); - } - } else { - if (!other.webEntities_.isEmpty()) { - if (webEntitiesBuilder_.isEmpty()) { - webEntitiesBuilder_.dispose(); - webEntitiesBuilder_ = null; - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - webEntitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWebEntitiesFieldBuilder() : null; - } else { - webEntitiesBuilder_.addAllMessages(other.webEntities_); - } - } - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImages_.isEmpty()) { - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); - } - onChanged(); - } - } else { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImagesBuilder_.isEmpty()) { - pagesWithMatchingImagesBuilder_.dispose(); - pagesWithMatchingImagesBuilder_ = null; - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - pagesWithMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesWithMatchingImagesFieldBuilder() : null; - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); - } - } - } - if (visuallySimilarImagesBuilder_ == null) { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImages_.isEmpty()) { - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.addAll(other.visuallySimilarImages_); - } - onChanged(); - } - } else { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImagesBuilder_.isEmpty()) { - visuallySimilarImagesBuilder_.dispose(); - visuallySimilarImagesBuilder_ = null; - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - visuallySimilarImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVisuallySimilarImagesFieldBuilder() : null; - } else { - visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); - } - } - } - if (bestGuessLabelsBuilder_ == null) { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabels_.isEmpty()) { - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.addAll(other.bestGuessLabels_); - } - onChanged(); - } - } else { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabelsBuilder_.isEmpty()) { - bestGuessLabelsBuilder_.dispose(); - bestGuessLabelsBuilder_ = null; - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - bestGuessLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBestGuessLabelsFieldBuilder() : null; - } else { - bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List webEntities_ = - java.util.Collections.emptyList(); - private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(webEntities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; - - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List getWebEntitiesList() { - if (webEntitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webEntities_); - } else { - return webEntitiesBuilder_.getMessageList(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public int getWebEntitiesCount() { - if (webEntitiesBuilder_ == null) { - return webEntities_.size(); - } else { - return webEntitiesBuilder_.getCount(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); - } else { - return webEntitiesBuilder_.getMessage(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.set(index, value); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.set(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities(com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(index, value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addAllWebEntities( - java.lang.Iterable values) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, webEntities_); - onChanged(); - } else { - webEntitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder clearWebEntities() { - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - webEntitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder removeWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.remove(index); - onChanged(); - } else { - webEntitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); } else { - return webEntitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesOrBuilderList() { - if (webEntitiesBuilder_ != null) { - return webEntitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webEntities_); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { - return getWebEntitiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesBuilderList() { - return getWebEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder> - getWebEntitiesFieldBuilder() { - if (webEntitiesBuilder_ == null) { - webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - webEntities_ = null; - } - return webEntitiesBuilder_; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - - private java.util.List pagesWithMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; - - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List getPagesWithMatchingImagesList() { - if (pagesWithMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } else { - return pagesWithMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public int getPagesWithMatchingImagesCount() { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.size(); - } else { - return pagesWithMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); - } else { - return pagesWithMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addAllPagesWithMatchingImages( - java.lang.Iterable values) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pagesWithMatchingImages_); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder clearPagesWithMatchingImages() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder removePagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.remove(index); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); } else { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - if (pagesWithMatchingImagesBuilder_ != null) { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesBuilderList() { - return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder> - getPagesWithMatchingImagesFieldBuilder() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage, com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder>( - pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - pagesWithMatchingImages_ = null; - } - return pagesWithMatchingImagesBuilder_; - } - - private java.util.List visuallySimilarImages_ = - java.util.Collections.emptyList(); - private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; - - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List getVisuallySimilarImagesList() { - if (visuallySimilarImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } else { - return visuallySimilarImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public int getVisuallySimilarImagesCount() { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.size(); - } else { - return visuallySimilarImagesBuilder_.getCount(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); - } else { - return visuallySimilarImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addAllVisuallySimilarImages( - java.lang.Iterable values) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visuallySimilarImages_); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder clearVisuallySimilarImages() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - visuallySimilarImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder removeVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.remove(index); - onChanged(); - } else { - visuallySimilarImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); } else { - return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - if (visuallySimilarImagesBuilder_ != null) { - return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesBuilderList() { - return getVisuallySimilarImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder> - getVisuallySimilarImagesFieldBuilder() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage, com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( - visuallySimilarImages_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - visuallySimilarImages_ = null; - } - return visuallySimilarImagesBuilder_; - } - - private java.util.List bestGuessLabels_ = - java.util.Collections.emptyList(); - private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; - - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List getBestGuessLabelsList() { - if (bestGuessLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } else { - return bestGuessLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public int getBestGuessLabelsCount() { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.size(); - } else { - return bestGuessLabelsBuilder_.getCount(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); - } else { - return bestGuessLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels(com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addAllBestGuessLabels( - java.lang.Iterable values) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bestGuessLabels_); - onChanged(); - } else { - bestGuessLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder clearBestGuessLabels() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder removeBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.remove(index); - onChanged(); - } else { - bestGuessLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); } else { - return bestGuessLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsOrBuilderList() { - if (bestGuessLabelsBuilder_ != null) { - return bestGuessLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { - return getBestGuessLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsBuilderList() { - return getBestGuessLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder> - getBestGuessLabelsFieldBuilder() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder>( - bestGuessLabels_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - bestGuessLabels_ = null; - } - return bestGuessLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection) - private static final com.google.cloud.vision.v1p1beta1.WebDetection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetection(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java deleted file mode 100644 index 476bc2737f4e..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionOrBuilder.java +++ /dev/null @@ -1,288 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/web_detection.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface WebDetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity getWebEntities(int index); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - int getWebEntitiesCount(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesOrBuilderList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index); - - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - int getFullMatchingImagesCount(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - int getPartialMatchingImagesCount(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - int getPagesWithMatchingImagesCount(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesOrBuilderList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index); - - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImage getVisuallySimilarImages(int index); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - int getVisuallySimilarImagesCount(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesOrBuilderList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index); - - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel getBestGuessLabels(int index); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - int getBestGuessLabelsCount(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsOrBuilderList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java deleted file mode 100644 index 9b87f3a47a7b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * Parameters for web detection request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetectionParams} - */ -public final class WebDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.WebDetectionParams) - WebDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetectionParams.newBuilder() to construct. - private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetectionParams() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - includeGeoResults_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetectionParams.class, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder.class); - } - - public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; - private boolean includeGeoResults_; - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (includeGeoResults_ != false) { - output.writeBool(2, includeGeoResults_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGeoResults_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeGeoResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.WebDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.WebDetectionParams other = (com.google.cloud.vision.v1p1beta1.WebDetectionParams) obj; - - if (getIncludeGeoResults() - != other.getIncludeGeoResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeGeoResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.WebDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for web detection request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.WebDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.WebDetectionParams) - com.google.cloud.vision.v1p1beta1.WebDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.WebDetectionParams.class, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.WebDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - includeGeoResults_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p1beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParams build() { - com.google.cloud.vision.v1p1beta1.WebDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParams buildPartial() { - com.google.cloud.vision.v1p1beta1.WebDetectionParams result = new com.google.cloud.vision.v1p1beta1.WebDetectionParams(this); - result.includeGeoResults_ = includeGeoResults_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.WebDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.WebDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.WebDetectionParams other) { - if (other == com.google.cloud.vision.v1p1beta1.WebDetectionParams.getDefaultInstance()) return this; - if (other.getIncludeGeoResults() != false) { - setIncludeGeoResults(other.getIncludeGeoResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.WebDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.WebDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean includeGeoResults_ ; - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @param value The includeGeoResults to set. - * @return This builder for chaining. - */ - public Builder setIncludeGeoResults(boolean value) { - - includeGeoResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeGeoResults() { - - includeGeoResults_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.WebDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetectionParams) - private static final com.google.cloud.vision.v1p1beta1.WebDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.WebDetectionParams(); - } - - public static com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.WebDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java deleted file mode 100644 index f0d59fa3e424..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParamsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/image_annotator.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface WebDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.WebDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - boolean getIncludeGeoResults(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java deleted file mode 100644 index f8bf6d561187..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionProto.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/web_detection.proto - -package com.google.cloud.vision.v1p1beta1; - -public final class WebDetectionProto { - private WebDetectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/vision/v1p1beta1/web_dete" + - "ction.proto\022\035google.cloud.vision.v1p1bet" + - "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + - "\01325.google.cloud.vision.v1p1beta1.WebDet" + - "ection.WebEntity\022R\n\024full_matching_images" + - "\030\002 \003(\01324.google.cloud.vision.v1p1beta1.W" + - "ebDetection.WebImage\022U\n\027partial_matching" + - "_images\030\003 \003(\01324.google.cloud.vision.v1p1" + - "beta1.WebDetection.WebImage\022W\n\032pages_wit" + - "h_matching_images\030\004 \003(\01323.google.cloud.v" + - "ision.v1p1beta1.WebDetection.WebPage\022U\n\027" + - "visually_similar_images\030\006 \003(\01324.google.c" + - "loud.vision.v1p1beta1.WebDetection.WebIm" + - "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + - "cloud.vision.v1p1beta1.WebDetection.WebL" + - "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + - "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + - "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + - "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + - "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + - "(\01324.google.cloud.vision.v1p1beta1.WebDe" + - "tection.WebImage\022U\n\027partial_matching_ima" + - "ges\030\005 \003(\01324.google.cloud.vision.v1p1beta" + - "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + - "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + - "m.google.cloud.vision.v1p1beta1B\021WebDete" + - "ctionProtoP\001ZCgoogle.golang.org/genproto" + - "/googleapis/cloud/vision/v1p1beta1;visio" + - "n\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor, - new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor = - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebEntity_descriptor, - new java.lang.String[] { "EntityId", "Score", "Description", }); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor = - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebImage_descriptor, - new java.lang.String[] { "Url", "Score", }); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor = - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebPage_descriptor, - new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor = - internal_static_google_cloud_vision_v1p1beta1_WebDetection_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p1beta1_WebDetection_WebLabel_descriptor, - new java.lang.String[] { "Label", "LanguageCode", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java deleted file mode 100644 index 01d73d0ac84a..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java +++ /dev/null @@ -1,1617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -/** - *
- * A word representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Word} - */ -public final class Word extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.Word) - WordOrBuilder { -private static final long serialVersionUID = 0L; - // Use Word.newBuilder() to construct. - private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Word() { - symbols_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Word(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Word( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - symbols_.add( - input.readMessage(com.google.cloud.vision.v1p1beta1.Symbol.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Word.class, com.google.cloud.vision.v1p1beta1.Word.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SYMBOLS_FIELD_NUMBER = 3; - private java.util.List symbols_; - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List getSymbolsList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List - getSymbolsOrBuilderList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - @java.lang.Override - public int getSymbolsCount() { - return symbols_.size(); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index) { - return symbols_.get(index); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - return symbols_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - output.writeMessage(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p1beta1.Word)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p1beta1.Word other = (com.google.cloud.vision.v1p1beta1.Word) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getSymbolsList() - .equals(other.getSymbolsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getSymbolsCount() > 0) { - hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; - hash = (53 * hash) + getSymbolsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Word parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Word parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p1beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p1beta1.Word prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A word representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p1beta1.Word} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.Word) - com.google.cloud.vision.v1p1beta1.WordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p1beta1.Word.class, com.google.cloud.vision.v1p1beta1.Word.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p1beta1.Word.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSymbolsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - symbolsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p1beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p1beta1_Word_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Word getDefaultInstanceForType() { - return com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Word build() { - com.google.cloud.vision.v1p1beta1.Word result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Word buildPartial() { - com.google.cloud.vision.v1p1beta1.Word result = new com.google.cloud.vision.v1p1beta1.Word(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.symbols_ = symbols_; - } else { - result.symbols_ = symbolsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p1beta1.Word) { - return mergeFrom((com.google.cloud.vision.v1p1beta1.Word)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.Word other) { - if (other == com.google.cloud.vision.v1p1beta1.Word.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (symbolsBuilder_ == null) { - if (!other.symbols_.isEmpty()) { - if (symbols_.isEmpty()) { - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSymbolsIsMutable(); - symbols_.addAll(other.symbols_); - } - onChanged(); - } - } else { - if (!other.symbols_.isEmpty()) { - if (symbolsBuilder_.isEmpty()) { - symbolsBuilder_.dispose(); - symbolsBuilder_ = null; - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - symbolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSymbolsFieldBuilder() : null; - } else { - symbolsBuilder_.addAllMessages(other.symbols_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p1beta1.Word parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p1beta1.Word) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p1beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p1beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List symbols_ = - java.util.Collections.emptyList(); - private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(symbols_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder> symbolsBuilder_; - - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public java.util.List getSymbolsList() { - if (symbolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbols_); - } else { - return symbolsBuilder_.getMessageList(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public int getSymbolsCount() { - if (symbolsBuilder_ == null) { - return symbols_.size(); - } else { - return symbolsBuilder_.getCount(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); - } else { - return symbolsBuilder_.getMessage(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p1beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.set(index, value); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.set(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder addSymbols(com.google.cloud.vision.v1p1beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(value); - onChanged(); - } else { - symbolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p1beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(index, value); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p1beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder addAllSymbols( - java.lang.Iterable values) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbols_); - onChanged(); - } else { - symbolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder clearSymbols() { - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - symbolsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public Builder removeSymbols(int index) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.remove(index); - onChanged(); - } else { - symbolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p1beta1.Symbol.Builder getSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); } else { - return symbolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsOrBuilderList() { - if (symbolsBuilder_ != null) { - return symbolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(symbols_); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p1beta1.Symbol.Builder addSymbolsBuilder() { - return getSymbolsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p1beta1.Symbol.Builder addSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p1beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsBuilderList() { - return getSymbolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder> - getSymbolsFieldBuilder() { - if (symbolsBuilder_ == null) { - symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - symbols_ = null; - } - return symbolsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p1beta1.Word) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Word) - private static final com.google.cloud.vision.v1p1beta1.Word DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.Word(); - } - - public static com.google.cloud.vision.v1p1beta1.Word getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Word parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Word(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p1beta1.Word getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java deleted file mode 100644 index 5efeee951df6..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WordOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p1beta1/text_annotation.proto - -package com.google.cloud.vision.v1p1beta1; - -public interface WordOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p1beta1.Word) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p1beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p1beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p1beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p1beta1.Symbol getSymbols(int index); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - int getSymbolsCount(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsOrBuilderList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p1beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p1beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto deleted file mode 100644 index 6d46d9c342ec..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/geometry.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p1beta1; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.cloud.vision.v1p1beta1"; - -// A vertex represents a 2D point in the image. -// NOTE: the vertex coordinates are in the same scale as the original image. -message Vertex { - // X coordinate. - int32 x = 1; - - // Y coordinate. - int32 y = 2; -} - -// A bounding polygon for the detected image annotation. -message BoundingPoly { - // The bounding polygon vertices. - repeated Vertex vertices = 1; -} - -// A 3D position in the image, used primarily for Face detection landmarks. -// A valid Position must have both x and y coordinates. -// The position coordinates are in the same scale as the original image. -message Position { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; - - // Z coordinate (or depth). - float z = 3; -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto deleted file mode 100644 index f66ad504fca9..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/image_annotator.proto +++ /dev/null @@ -1,618 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/vision/v1p1beta1/geometry.proto"; -import "google/cloud/vision/v1p1beta1/text_annotation.proto"; -import "google/cloud/vision/v1p1beta1/web_detection.proto"; -import "google/rpc/status.proto"; -import "google/type/color.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ImageAnnotatorProto"; -option java_package = "com.google.cloud.vision.v1p1beta1"; - -// Service that performs Google Cloud Vision API detection tasks over client -// images, such as face, landmark, logo, label, and text detection. The -// ImageAnnotator service returns detected entities from the images. -service ImageAnnotator { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { - option (google.api.http) = { - post: "/v1p1beta1/images:annotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - } -} - -// Users describe the type of Google Cloud Vision API tasks to perform over -// images by using *Feature*s. Each Feature indicates a type of image -// detection task to perform. Features encode the Cloud Vision API -// vertical to operate on and the number of top-scoring results to return. -message Feature { - // Type of image feature. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run face detection. - FACE_DETECTION = 1; - - // Run landmark detection. - LANDMARK_DETECTION = 2; - - // Run logo detection. - LOGO_DETECTION = 3; - - // Run label detection. - LABEL_DETECTION = 4; - - // Run OCR. - TEXT_DETECTION = 5; - - // Run dense text document OCR. Takes precedence when both - // DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present. - DOCUMENT_TEXT_DETECTION = 11; - - // Run computer vision models to compute image safe-search properties. - SAFE_SEARCH_DETECTION = 6; - - // Compute a set of image properties, such as the image's dominant colors. - IMAGE_PROPERTIES = 7; - - // Run crop hints. - CROP_HINTS = 9; - - // Run web detection. - WEB_DETECTION = 10; - } - - // The feature type. - Type type = 1; - - // Maximum number of results of this type. - int32 max_results = 2; - - // Model to use for the feature. - // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - // support "builtin/weekly" for the bleeding edge release updated weekly. - string model = 3; -} - -// External image source (Google Cloud Storage image location). -message ImageSource { - // NOTE: For new code `image_uri` below is preferred. - // Google Cloud Storage image URI, which must be in the following form: - // `gs://bucket_name/object_name` (for details, see - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris)). - // NOTE: Cloud Storage object versioning is not supported. - string gcs_image_uri = 1; - - // Image URI which supports: - // 1) Google Cloud Storage image URI, which must be in the following form: - // `gs://bucket_name/object_name` (for details, see - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris)). - // NOTE: Cloud Storage object versioning is not supported. - // 2) Publicly accessible image HTTP/HTTPS URL. - // This is preferred over the legacy `gcs_image_uri` above. When both - // `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - // precedence. - string image_uri = 2; -} - -// Client image to perform Google Cloud Vision API tasks over. -message Image { - // Image content, represented as a stream of bytes. - // Note: as with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - bytes content = 1; - - // Google Cloud Storage image location. If both `content` and `source` - // are provided for an image, `content` takes precedence and is - // used to perform the image annotation request. - ImageSource source = 2; -} - -// A face annotation object contains the results of face detection. -message FaceAnnotation { - // A face-specific landmark (for example, a face feature). - message Landmark { - // Face landmark (feature) type. - // Left and right are defined from the vantage of the viewer of the image - // without considering mirror projections typical of photos. So, `LEFT_EYE`, - // typically, is the person's right eye. - enum Type { - // Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0; - - // Left eye. - LEFT_EYE = 1; - - // Right eye. - RIGHT_EYE = 2; - - // Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3; - - // Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4; - - // Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5; - - // Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6; - - // Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7; - - // Nose tip. - NOSE_TIP = 8; - - // Upper lip. - UPPER_LIP = 9; - - // Lower lip. - LOWER_LIP = 10; - - // Mouth left. - MOUTH_LEFT = 11; - - // Mouth right. - MOUTH_RIGHT = 12; - - // Mouth center. - MOUTH_CENTER = 13; - - // Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14; - - // Nose, bottom left. - NOSE_BOTTOM_LEFT = 15; - - // Nose, bottom center. - NOSE_BOTTOM_CENTER = 16; - - // Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17; - - // Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18; - - // Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19; - - // Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20; - - // Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21; - - // Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22; - - // Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23; - - // Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24; - - // Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25; - - // Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - - // Left ear tragion. - LEFT_EAR_TRAGION = 27; - - // Right ear tragion. - RIGHT_EAR_TRAGION = 28; - - // Left eye pupil. - LEFT_EYE_PUPIL = 29; - - // Right eye pupil. - RIGHT_EYE_PUPIL = 30; - - // Forehead glabella. - FOREHEAD_GLABELLA = 31; - - // Chin gnathion. - CHIN_GNATHION = 32; - - // Chin left gonion. - CHIN_LEFT_GONION = 33; - - // Chin right gonion. - CHIN_RIGHT_GONION = 34; - } - - // Face landmark type. - Type type = 3; - - // Face landmark position. - Position position = 4; - } - - // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale, as returned in `ImageParams`. - // The bounding box is computed to "frame" the face in accordance with human - // expectations. It is based on the landmarker results. - // Note that one or more x and/or y coordinates may not be generated in the - // `BoundingPoly` (the polygon will be unbounded) if only a partial face - // appears in the image to be annotated. - BoundingPoly bounding_poly = 1; - - // The `fd_bounding_poly` bounding polygon is tighter than the - // `boundingPoly`, and encloses only the skin part of the face. Typically, it - // is used to eliminate the face from any image analysis that detects the - // "amount of skin" visible in an image. It is not based on the - // landmarker results, only on the initial face detection, hence - // the fd (face detection) prefix. - BoundingPoly fd_bounding_poly = 2; - - // Detected face landmarks. - repeated Landmark landmarks = 3; - - // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - // of the face relative to the image vertical about the axis perpendicular to - // the face. Range [-180,180]. - float roll_angle = 4; - - // Yaw angle, which indicates the leftward/rightward angle that the face is - // pointing relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - float pan_angle = 5; - - // Pitch angle, which indicates the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - float tilt_angle = 6; - - // Detection confidence. Range [0, 1]. - float detection_confidence = 7; - - // Face landmarking confidence. Range [0, 1]. - float landmarking_confidence = 8; - - // Joy likelihood. - Likelihood joy_likelihood = 9; - - // Sorrow likelihood. - Likelihood sorrow_likelihood = 10; - - // Anger likelihood. - Likelihood anger_likelihood = 11; - - // Surprise likelihood. - Likelihood surprise_likelihood = 12; - - // Under-exposed likelihood. - Likelihood under_exposed_likelihood = 13; - - // Blurred likelihood. - Likelihood blurred_likelihood = 14; - - // Headwear likelihood. - Likelihood headwear_likelihood = 15; -} - -// Detected entity location information. -message LocationInfo { - // lat/long location coordinates. - google.type.LatLng lat_lng = 1; -} - -// A `Property` consists of a user-supplied name/value pair. -message Property { - // Name of the property. - string name = 1; - - // Value of the property. - string value = 2; - - // Value of numeric properties. - uint64 uint64_value = 3; -} - -// Set of detected entity features. -message EntityAnnotation { - // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search - // API](https://developers.google.com/knowledge-graph/). - string mid = 1; - - // The language code for the locale in which the entity textual - // `description` is expressed. - string locale = 2; - - // Entity textual description, expressed in its `locale` language. - string description = 3; - - // Overall score of the result. Range [0, 1]. - float score = 4; - - // The accuracy of the entity detection in an image. - // For example, for an image in which the "Eiffel Tower" entity is detected, - // this field represents the confidence that there is a tower in the query - // image. Range [0, 1]. - float confidence = 5; - - // The relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of "tower" is likely higher to an image - // containing the detected "Eiffel Tower" than to an image containing a - // detected distant towering building, even though the confidence that - // there is a tower in each image may be the same. Range [0, 1]. - float topicality = 6; - - // Image region to which this entity belongs. Not produced - // for `LABEL_DETECTION` features. - BoundingPoly bounding_poly = 7; - - // The location information for the detected entity. Multiple - // `LocationInfo` elements can be present because one location may - // indicate the location of the scene in the image, and another location - // may indicate the location of the place where the image was taken. - // Location information is usually present for landmarks. - repeated LocationInfo locations = 8; - - // Some entities may have optional user-supplied `Property` (name/value) - // fields, such a score or string that qualifies the entity. - repeated Property properties = 9; -} - -// Set of features pertaining to the image, computed by computer vision -// methods over safe-search verticals (for example, adult, spoof, medical, -// violence). -message SafeSearchAnnotation { - // Represents the adult content likelihood for the image. Adult content may - // contain elements such as nudity, pornographic images or cartoons, or - // sexual activities. - Likelihood adult = 1; - - // Spoof likelihood. The likelihood that an modification - // was made to the image's canonical version to make it appear - // funny or offensive. - Likelihood spoof = 2; - - // Likelihood that this is a medical image. - Likelihood medical = 3; - - // Likelihood that this image contains violent content. - Likelihood violence = 4; - - // Likelihood that the request image contains racy content. Racy content may - // include (but is not limited to) skimpy or sheer clothing, strategically - // covered nudity, lewd or provocative poses, or close-ups of sensitive - // body areas. - Likelihood racy = 9; -} - -// Rectangle determined by min and max `LatLng` pairs. -message LatLongRect { - // Min lat/long pair. - google.type.LatLng min_lat_lng = 1; - - // Max lat/long pair. - google.type.LatLng max_lat_lng = 2; -} - -// Color information consists of RGB channels, score, and the fraction of -// the image that the color occupies in the image. -message ColorInfo { - // RGB components of the color. - google.type.Color color = 1; - - // Image-specific score for this color. Value in range [0, 1]. - float score = 2; - - // The fraction of pixels the color occupies in the image. - // Value in range [0, 1]. - float pixel_fraction = 3; -} - -// Set of dominant colors and their corresponding scores. -message DominantColorsAnnotation { - // RGB color values with their score and pixel fraction. - repeated ColorInfo colors = 1; -} - -// Stores image properties, such as dominant colors. -message ImageProperties { - // If present, dominant colors completed successfully. - DominantColorsAnnotation dominant_colors = 1; -} - -// Single crop hint that is used to generate a new crop when serving an image. -message CropHint { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale, as returned in `ImageParams`. - BoundingPoly bounding_poly = 1; - - // Confidence of this being a salient region. Range [0, 1]. - float confidence = 2; - - // Fraction of importance of this salient region with respect to the original - // image. - float importance_fraction = 3; -} - -// Set of crop hints that are used to generate new crops when serving images. -message CropHintsAnnotation { - // Crop hint results. - repeated CropHint crop_hints = 1; -} - -// Parameters for crop hints annotation request. -message CropHintsParams { - // Aspect ratios in floats, representing the ratio of the width to the height - // of the image. For example, if the desired aspect ratio is 4/3, the - // corresponding float value should be 1.33333. If not specified, the - // best possible crop is returned. The number of provided aspect ratios is - // limited to a maximum of 16; any aspect ratios provided after the 16th are - // ignored. - repeated float aspect_ratios = 1; -} - -// Parameters for web detection request. -message WebDetectionParams { - // Whether to include results derived from the geo information in the image. - bool include_geo_results = 2; -} - -// Parameters for text detections. This is used to control TEXT_DETECTION and -// DOCUMENT_TEXT_DETECTION features. -message TextDetectionParams { - - // By default, Cloud Vision API only includes confidence score for - // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - // score for TEXT_DETECTION as well. - bool enable_text_detection_confidence_score = 9; - - // A list of advanced OCR options to fine-tune OCR behavior. - repeated string advanced_ocr_options = 11; -} - -// Image context and/or feature-specific parameters. -message ImageContext { - // lat/long rectangle that specifies the location of the image. - LatLongRect lat_long_rect = 1; - - // List of languages to use for TEXT_DETECTION. In most cases, an empty value - // yields the best results since it enables automatic language detection. For - // languages based on the Latin alphabet, setting `language_hints` is not - // needed. In rare cases, when the language of the text in the image is known, - // setting a hint will help get better results (although it will be a - // significant hindrance if the hint is wrong). Text detection returns an - // error if one or more of the specified languages is not one of the - // [supported languages](https://cloud.google.com/vision/docs/languages). - repeated string language_hints = 2; - - // Parameters for crop hints annotation request. - CropHintsParams crop_hints_params = 4; - - // Parameters for web detection. - WebDetectionParams web_detection_params = 6; - - // Parameters for text detection and document text detection. - TextDetectionParams text_detection_params = 12; -} - -// Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features. -message AnnotateImageRequest { - // The image to be processed. - Image image = 1; - - // Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image. - ImageContext image_context = 3; -} - -// Response to an image annotation request. -message AnnotateImageResponse { - // If present, face detection has completed successfully. - repeated FaceAnnotation face_annotations = 1; - - // If present, landmark detection has completed successfully. - repeated EntityAnnotation landmark_annotations = 2; - - // If present, logo detection has completed successfully. - repeated EntityAnnotation logo_annotations = 3; - - // If present, label detection has completed successfully. - repeated EntityAnnotation label_annotations = 4; - - // If present, text (OCR) detection has completed successfully. - repeated EntityAnnotation text_annotations = 5; - - // If present, text (OCR) detection or document (OCR) text detection has - // completed successfully. - // This annotation provides the structural hierarchy for the OCR detected - // text. - TextAnnotation full_text_annotation = 12; - - // If present, safe-search annotation has completed successfully. - SafeSearchAnnotation safe_search_annotation = 6; - - // If present, image properties were extracted successfully. - ImageProperties image_properties_annotation = 8; - - // If present, crop hints have completed successfully. - CropHintsAnnotation crop_hints_annotation = 11; - - // If present, web detection has completed successfully. - WebDetection web_detection = 13; - - // If set, represents the error message for the operation. - // Note that filled-in image annotations are guaranteed to be - // correct, even when `error` is set. - google.rpc.Status error = 9; -} - -// Multiple image annotation requests are batched into a single service call. -message BatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to a batch image annotation request. -message BatchAnnotateImagesResponse { - // Individual responses to image annotation requests within the batch. - repeated AnnotateImageResponse responses = 1; -} - -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely that the image belongs to the specified vertical. - VERY_UNLIKELY = 1; - - // It is unlikely that the image belongs to the specified vertical. - UNLIKELY = 2; - - // It is possible that the image belongs to the specified vertical. - POSSIBLE = 3; - - // It is likely that the image belongs to the specified vertical. - LIKELY = 4; - - // It is very likely that the image belongs to the specified vertical. - VERY_LIKELY = 5; -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto deleted file mode 100644 index f85cc44dfd59..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/text_annotation.proto +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p1beta1; - -import "google/cloud/vision/v1p1beta1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "TextAnnotationProto"; -option java_package = "com.google.cloud.vision.v1p1beta1"; - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure is like this: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have their own -// properties. Properties describe detected languages, breaks etc.. Please refer -// to the -// [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty] -// message definition below for more detail. -message TextAnnotation { - // Detected language for a structural component. - message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 1; - - // Confidence of detected language. Range [0, 1]. - float confidence = 2; - } - - // Detected start or end of a structural component. - message DetectedBreak { - // Enum to denote the type of break found. New line, space etc. - enum BreakType { - // Unknown break label type. - UNKNOWN = 0; - - // Regular space. - SPACE = 1; - - // Sure space (very wide). - SURE_SPACE = 2; - - // Line-wrapping break. - EOL_SURE_SPACE = 3; - - // End-line hyphen that is not present in text; does not co-occur with - // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4; - - // Line break that ends a paragraph. - LINE_BREAK = 5; - } - - // Detected break type. - BreakType type = 1; - - // True if break prepends the element. - bool is_prefix = 2; - } - - // Additional information detected on the structural component. - message TextProperty { - // A list of detected languages together with confidence. - repeated DetectedLanguage detected_languages = 1; - - // Detected start or end of a text segment. - DetectedBreak detected_break = 2; - } - - // List of pages detected by OCR. - repeated Page pages = 1; - - // UTF-8 text detected on the pages. - string text = 2; -} - -// Detected page from OCR. -message Page { - // Additional information detected on the page. - TextAnnotation.TextProperty property = 1; - - // Page width in pixels. - int32 width = 2; - - // Page height in pixels. - int32 height = 3; - - // List of blocks of text, images etc on this page. - repeated Block blocks = 4; - - // Confidence of the OCR results on the page. Range [0, 1]. - float confidence = 5; -} - -// Logical element on the page. -message Block { - // Type of a block (text, image etc) as identified by OCR. - enum BlockType { - // Unknown block type. - UNKNOWN = 0; - - // Regular text block. - TEXT = 1; - - // Table block. - TABLE = 2; - - // Image block. - PICTURE = 3; - - // Horizontal/vertical line box. - RULER = 4; - - // Barcode block. - BARCODE = 5; - } - - // Additional information detected for the block. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of paragraphs in this block (if this blocks is of type text). - repeated Paragraph paragraphs = 3; - - // Detected block type (text, image etc) for this block. - BlockType block_type = 4; - - // Confidence of the OCR results on the block. Range [0, 1]. - float confidence = 5; -} - -// Structural unit of text representing a number of words in certain order. -message Paragraph { - // Additional information detected for the paragraph. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of words in this paragraph. - repeated Word words = 3; - - // Confidence of the OCR results for the paragraph. Range [0, 1]. - float confidence = 4; -} - -// A word representation. -message Word { - // Additional information detected for the word. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - repeated Symbol symbols = 3; - - // Confidence of the OCR results for the word. Range [0, 1]. - float confidence = 4; -} - -// A single symbol representation. -message Symbol { - // Additional information detected for the symbol. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // The actual UTF-8 representation of the symbol. - string text = 3; - - // Confidence of the OCR results for the symbol. Range [0, 1]. - float confidence = 4; -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto deleted file mode 100644 index c50e1ad62cc8..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/proto-google-cloud-vision-v1p1beta1/src/main/proto/google/cloud/vision/v1p1beta1/web_detection.proto +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p1beta1; - - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "WebDetectionProto"; -option java_package = "com.google.cloud.vision.v1p1beta1"; - -// Relevant information for the image from the Internet. -message WebDetection { - // Entity deduced from similar images on the Internet. - message WebEntity { - // Opaque entity ID. - string entity_id = 1; - - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - float score = 2; - - // Canonical description of the entity, in English. - string description = 3; - } - - // Metadata for online images. - message WebImage { - // The result image URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the image. - float score = 2; - } - - // Metadata for web pages. - message WebPage { - // The result web page URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the web page. - float score = 2; - - // Title for the web page, may contain HTML markups. - string page_title = 3; - - // Fully matching images on the page. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 4; - - // Partial matching images on the page. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its - // crops. - repeated WebImage partial_matching_images = 5; - } - - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - - // Deduced entities from similar images on the Internet. - repeated WebEntity web_entities = 1; - - // Fully matching images from the Internet. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 2; - - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - repeated WebImage partial_matching_images = 3; - - // Web pages containing the matching images from the Internet. - repeated WebPage pages_with_matching_images = 4; - - // The visually similar image results. - repeated WebImage visually_similar_images = 6; - - // Best guess text labels for the request image. - repeated WebLabel best_guess_labels = 8; -} diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java deleted file mode 100644 index 1d51e8ec2f76..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateImages(); - } - - public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); - // Do something. - BatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 7135c01739b3..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_sync] -import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); - } - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java deleted file mode 100644 index fd295212a666..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] -import com.google.cloud.vision.v1p1beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateImagesListannotateimagerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImagesListannotateimagerequest(); - } - - public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); - } - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index fd559b5be3db..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p1beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index d4a8a48d420b..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 4506072cbb00..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p1beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p1beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 1221c05f23a4..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.samples; - -// [START vision_v1p1beta1_generated_imageannotatorsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p1beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 963d6f74191a..000000000000 --- a/owl-bot-staging/java-vision/v1p1beta1/samples/snippets/generated/com/google/cloud/vision/v1p1beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p1beta1.stub.samples; - -// [START vision_v1p1beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p1beta1.stub.ImageAnnotatorStubSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorStubSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p1beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java deleted file mode 100644 index f1e9ad6c2093..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClient.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStub; -import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorClient implements BackgroundResource { - private final ImageAnnotatorSettings settings; - private final ImageAnnotatorStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ImageAnnotatorClient with default settings. */ - public static final ImageAnnotatorClient create() throws IOException { - return create(ImageAnnotatorSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) - throws IOException { - return new ImageAnnotatorClient(settings); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ImageAnnotatorSettings). - */ - public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { - return new ImageAnnotatorClient(stub); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ImageAnnotatorClient(ImageAnnotatorStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ImageAnnotatorSettings getSettings() { - return settings; - } - - public ImageAnnotatorStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages( - List requests) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { - return batchAnnotateImagesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateImagesCallable() { - return stub.batchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run async image detection and annotation for a list of generic files (e.g. PDF) which may - * contain multiple pages and multiple images per page. Progress and results can be retrieved - * through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
-   * }
-   * }
- * - * @param requests Required. Individual async file annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(List requests) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return asyncBatchAnnotateFilesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run async image detection and annotation for a list of generic files (e.g. PDF) which may - * contain multiple pages and multiple images per page. Progress and results can be retrieved - * through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { - return asyncBatchAnnotateFilesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run async image detection and annotation for a list of generic files (e.g. PDF) which may - * contain multiple pages and multiple images per page. Progress and results can be retrieved - * through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return stub.asyncBatchAnnotateFilesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run async image detection and annotation for a list of generic files (e.g. PDF) which may - * contain multiple pages and multiple images per page. Progress and results can be retrieved - * through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateFilesCallable() { - return stub.asyncBatchAnnotateFilesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java deleted file mode 100644 index 6557ba40327e..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateFilesOperationSettings(); - } - - public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) - throws IOException { - return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ImageAnnotatorStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ImageAnnotatorStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ImageAnnotatorSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ImageAnnotatorStubSettings.newBuilder(clientContext)); - } - - protected Builder(ImageAnnotatorSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ImageAnnotatorStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); - } - - public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { - return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return getStubSettingsBuilder().batchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); - } - - @Override - public ImageAnnotatorSettings build() throws IOException { - return new ImageAnnotatorSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json deleted file mode 100644 index e4c1882ed562..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/gapic_metadata.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vision.v1p2beta1", - "libraryPackage": "com.google.cloud.vision.v1p2beta1", - "services": { - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "ImageAnnotatorClient", - "rpcs": { - "AsyncBatchAnnotateFiles": { - "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] - }, - "BatchAnnotateImages": { - "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java deleted file mode 100644 index f1254f6cdf57..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/package-info.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= ImageAnnotatorClient ======================= - * - *

Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

Sample for ImageAnnotatorClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vision.v1p2beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java deleted file mode 100644 index 9a46dc820cc6..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java deleted file mode 100644 index 0efebe4129be..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/GrpcImageAnnotatorStub.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { - private static final MethodDescriptor - batchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p2beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final GrpcImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcImageAnnotatorStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - batchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .build(); - GrpcCallSettings - asyncBatchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java deleted file mode 100644 index 9fc90fd37f8c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java deleted file mode 100644 index 57c2c44afb14..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/HttpJsonImageAnnotatorStub.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(OperationMetadata.getDescriptor()) - .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/images:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p2beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/files:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateFilesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonImageAnnotatorStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - batchAnnotateImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(batchAnnotateImagesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java deleted file mode 100644 index 697f897efca9..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStub.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ImageAnnotatorStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - batchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java deleted file mode 100644 index eab5af0ff930..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.OperationMetadata; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorStubSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings - batchAnnotateImagesSettings; - private final UnaryCallSettings - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - public ImageAnnotatorStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcImageAnnotatorStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonImageAnnotatorStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); - asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); - asyncBatchAnnotateFilesOperationSettings = - settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); - } - - /** Builder for ImageAnnotatorStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - batchAnnotateImagesSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); - initDefaults(this); - } - - protected Builder(ImageAnnotatorStubSettings settings) { - super(settings); - - batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); - asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateFilesOperationSettings = - settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .batchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateFilesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateFilesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - @Override - public ImageAnnotatorStubSettings build() throws IOException { - return new ImageAnnotatorStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java deleted file mode 100644 index 345c3ad7020e..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientHttpJsonTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p2beta1.stub.HttpJsonImageAnnotatorStub; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientHttpJsonTest { - private static MockHttpService mockService; - private static ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonImageAnnotatorStub.getMethodDescriptors(), - ImageAnnotatorSettings.getDefaultEndpoint()); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java deleted file mode 100644 index fccfdc12efa4..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorClientTest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientTest { - private static MockImageAnnotator mockImageAnnotator; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() { - mockImageAnnotator = new MockImageAnnotator(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateFilesRequest actualRequest = - ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java deleted file mode 100644 index 6f72a4b50c45..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotator implements MockGrpcService { - private final MockImageAnnotatorImpl serviceImpl; - - public MockImageAnnotator() { - serviceImpl = new MockImageAnnotatorImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java deleted file mode 100644 index cc30e9f33bf7..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p2beta1/MockImageAnnotatorImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { - private List requests; - private Queue responses; - - public MockImageAnnotatorImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void batchAnnotateImages( - BatchAnnotateImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateImagesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateFiles( - AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java deleted file mode 100644 index 6f324bd374ea..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/grpc-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorGrpc.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.google.cloud.vision.v1p2beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Service that performs Google Cloud Vision API detection tasks over client
- * images, such as face, landmark, logo, label, and text detection. The
- * ImageAnnotator service returns detected entities from the images.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p2beta1/image_annotator.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ImageAnnotatorGrpc { - - private ImageAnnotatorGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p2beta1.ImageAnnotator"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", - requestType = com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, - responseType = com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) - .build(); - } - } - } - return getBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", - requestType = com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) - .build(); - } - } - } - return getAsyncBatchAnnotateFilesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - }; - return ImageAnnotatorStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ImageAnnotatorBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - }; - return ImageAnnotatorBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ImageAnnotatorFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - }; - return ImageAnnotatorFutureStub.newStub(factory, channel); - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Run async image detection and annotation for a list of generic files (e.g.
-     * PDF) which may contain multiple pages and multiple images per page.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest, - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse>( - this, METHODID_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getAsyncBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) - .build(); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { - private ImageAnnotatorStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run async image detection and annotation for a list of generic files (e.g.
-     * PDF) which may contain multiple pages and multiple images per page.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ImageAnnotatorBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run async image detection and annotation for a list of generic files (e.g.
-     * PDF) which may contain multiple pages and multiple images per page.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { - private ImageAnnotatorFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run async image detection and annotation for a list of generic files (e.g.
-     * PDF) which may contain multiple pages and multiple images per page.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 1; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ImageAnnotatorImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BATCH_ANNOTATE_IMAGES: - serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_FILES: - serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ImageAnnotatorBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ImageAnnotator"); - } - } - - private static final class ImageAnnotatorFileDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier { - ImageAnnotatorFileDescriptorSupplier() {} - } - - private static final class ImageAnnotatorMethodDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ImageAnnotatorMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ImageAnnotatorGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) - .addMethod(getBatchAnnotateImagesMethod()) - .addMethod(getAsyncBatchAnnotateFilesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java deleted file mode 100644 index da1800f52636..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Response to a single file annotation request. A file may contain one or more
- * images, which individually have their own responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateFileResponse} - */ -public final class AnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - AnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileResponse.newBuilder() to construct. - private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int RESPONSES_FIELD_NUMBER = 2; - private java.util.List responses_; - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(2, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a single file annotation request. A file may contain one or more
-   * images, which individually have their own responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - com.google.cloud.vision.v1p2beta1.AnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse build() { - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p2beta1.AnnotateFileResponse(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p2beta1.AnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p2beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - private static final com.google.cloud.vision.v1p2beta1.AnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java deleted file mode 100644 index 7e80598525f9..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java deleted file mode 100644 index de64ed09eab6..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java +++ /dev/null @@ -1,1346 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Request for performing Google Cloud Vision API tasks over a user-provided
- * image, with user-requested features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageRequest} - */ -public final class AnnotateImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - AnnotateImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageRequest.newBuilder() to construct. - private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.Image.Builder subBuilder = null; - if (image_ != null) { - subBuilder = image_.toBuilder(); - } - image_ = input.readMessage(com.google.cloud.vision.v1p2beta1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p2beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder.class); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.Image image_; - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return image_ != null; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return The image. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Image getImage() { - return image_ == null ? com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder() { - return getImage(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (image_ != null) { - output.writeMessage(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (image_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) obj; - - if (hasImage() != other.hasImage()) return false; - if (hasImage()) { - if (!getImage() - .equals(other.getImage())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasImage()) { - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for performing Google Cloud Vision API tasks over a user-provided
-   * image, with user-requested features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (imageBuilder_ == null) { - image_ = null; - } else { - image_ = null; - imageBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest build() { - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest buildPartial() { - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p2beta1.AnnotateImageRequest(this); - int from_bitField0_ = bitField0_; - if (imageBuilder_ == null) { - result.image_ = image_; - } else { - result.image_ = imageBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest other) { - if (other == com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()) return this; - if (other.hasImage()) { - mergeImage(other.getImage()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.Image image_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder> imageBuilder_; - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return Whether the image field is set. - */ - public boolean hasImage() { - return imageBuilder_ != null || image_ != null; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return The image. - */ - public com.google.cloud.vision.v1p2beta1.Image getImage() { - if (imageBuilder_ == null) { - return image_ == null ? com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; - } else { - return imageBuilder_.getMessage(); - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.vision.v1p2beta1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - image_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public Builder setImage( - com.google.cloud.vision.v1p2beta1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - image_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.vision.v1p2beta1.Image value) { - if (imageBuilder_ == null) { - if (image_ != null) { - image_ = - com.google.cloud.vision.v1p2beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); - } else { - image_ = value; - } - onChanged(); - } else { - imageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - image_ = null; - onChanged(); - } else { - image_ = null; - imageBuilder_ = null; - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p2beta1.Image.Builder getImageBuilder() { - - onChanged(); - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder() { - if (imageBuilder_ != null) { - return imageBuilder_.getMessageOrBuilder(); - } else { - return image_ == null ? - com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance() : image_; - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, com.google.cloud.vision.v1p2beta1.ImageOrBuilder>( - getImage(), - getParentForChildren(), - isClean()); - image_ = null; - } - return imageBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p2beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p2beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - private static final com.google.cloud.vision.v1p2beta1.AnnotateImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateImageRequest(); - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java deleted file mode 100644 index f6610bbce26b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AnnotateImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - * @return The image. - */ - com.google.cloud.vision.v1p2beta1.Image getImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Image image = 1; - */ - com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder(); - - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p2beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java deleted file mode 100644 index 0d456dc11162..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java +++ /dev/null @@ -1,4356 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Response to an image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageResponse} - */ -public final class AnnotateImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - AnnotateImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageResponse.newBuilder() to construct. - private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageResponse() { - faceAnnotations_ = java.util.Collections.emptyList(); - landmarkAnnotations_ = java.util.Collections.emptyList(); - logoAnnotations_ = java.util.Collections.emptyList(); - labelAnnotations_ = java.util.Collections.emptyList(); - textAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - faceAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.FaceAnnotation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - landmarkAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - logoAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labelAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - textAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder subBuilder = null; - if (safeSearchAnnotation_ != null) { - subBuilder = safeSearchAnnotation_.toBuilder(); - } - safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(safeSearchAnnotation_); - safeSearchAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.cloud.vision.v1p2beta1.ImageProperties.Builder subBuilder = null; - if (imagePropertiesAnnotation_ != null) { - subBuilder = imagePropertiesAnnotation_.toBuilder(); - } - imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imagePropertiesAnnotation_); - imagePropertiesAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder subBuilder = null; - if (cropHintsAnnotation_ != null) { - subBuilder = cropHintsAnnotation_.toBuilder(); - } - cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsAnnotation_); - cropHintsAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder subBuilder = null; - if (fullTextAnnotation_ != null) { - subBuilder = fullTextAnnotation_.toBuilder(); - } - fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fullTextAnnotation_); - fullTextAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.vision.v1p2beta1.WebDetection.Builder subBuilder = null; - if (webDetection_ != null) { - subBuilder = webDetection_.toBuilder(); - } - webDetection_ = input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetection_); - webDetection_ = subBuilder.buildPartial(); - } - - break; - } - case 170: { - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder.class); - } - - public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; - private java.util.List faceAnnotations_; - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List getFaceAnnotationsList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List - getFaceAnnotationsOrBuilderList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public int getFaceAnnotationsCount() { - return faceAnnotations_.size(); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index) { - return faceAnnotations_.get(index); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - return faceAnnotations_.get(index); - } - - public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; - private java.util.List landmarkAnnotations_; - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List getLandmarkAnnotationsList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public int getLandmarkAnnotationsCount() { - return landmarkAnnotations_.size(); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index) { - return landmarkAnnotations_.get(index); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - return landmarkAnnotations_.get(index); - } - - public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List logoAnnotations_; - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List getLogoAnnotationsList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List - getLogoAnnotationsOrBuilderList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public int getLogoAnnotationsCount() { - return logoAnnotations_.size(); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index) { - return logoAnnotations_.get(index); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - return logoAnnotations_.get(index); - } - - public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; - private java.util.List labelAnnotations_; - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List getLabelAnnotationsList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List - getLabelAnnotationsOrBuilderList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public int getLabelAnnotationsCount() { - return labelAnnotations_.size(); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index) { - return labelAnnotations_.get(index); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - return labelAnnotations_.get(index); - } - - public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; - private java.util.List textAnnotations_; - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List getTextAnnotationsList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List - getTextAnnotationsOrBuilderList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public int getTextAnnotationsCount() { - return textAnnotations_.size(); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index) { - return textAnnotations_.get(index); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - return textAnnotations_.get(index); - } - - public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_; - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - @java.lang.Override - public boolean hasFullTextAnnotation() { - return fullTextAnnotation_ != null; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation() { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - return getFullTextAnnotation(); - } - - public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_; - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - @java.lang.Override - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotation_ != null; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - return getSafeSearchAnnotation(); - } - - public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; - private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_; - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - @java.lang.Override - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ != null; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - return getImagePropertiesAnnotation(); - } - - public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; - private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_; - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - @java.lang.Override - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotation_ != null; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation() { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - return getCropHintsAnnotation(); - } - - public static final int WEB_DETECTION_FIELD_NUMBER = 13; - private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_; - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - @java.lang.Override - public boolean hasWebDetection() { - return webDetection_ != null; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection() { - return webDetection_ == null ? com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - return getWebDetection(); - } - - public static final int ERROR_FIELD_NUMBER = 9; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - public static final int CONTEXT_FIELD_NUMBER = 21; - private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_; - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext() { - return context_ == null ? com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - return getContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < faceAnnotations_.size(); i++) { - output.writeMessage(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - output.writeMessage(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - output.writeMessage(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - output.writeMessage(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - output.writeMessage(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - output.writeMessage(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - output.writeMessage(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - output.writeMessage(9, getError()); - } - if (cropHintsAnnotation_ != null) { - output.writeMessage(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - output.writeMessage(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - output.writeMessage(13, getWebDetection()); - } - if (context_ != null) { - output.writeMessage(21, getContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < faceAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getError()); - } - if (cropHintsAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getWebDetection()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) obj; - - if (!getFaceAnnotationsList() - .equals(other.getFaceAnnotationsList())) return false; - if (!getLandmarkAnnotationsList() - .equals(other.getLandmarkAnnotationsList())) return false; - if (!getLogoAnnotationsList() - .equals(other.getLogoAnnotationsList())) return false; - if (!getLabelAnnotationsList() - .equals(other.getLabelAnnotationsList())) return false; - if (!getTextAnnotationsList() - .equals(other.getTextAnnotationsList())) return false; - if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; - if (hasFullTextAnnotation()) { - if (!getFullTextAnnotation() - .equals(other.getFullTextAnnotation())) return false; - } - if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; - if (hasSafeSearchAnnotation()) { - if (!getSafeSearchAnnotation() - .equals(other.getSafeSearchAnnotation())) return false; - } - if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; - if (hasImagePropertiesAnnotation()) { - if (!getImagePropertiesAnnotation() - .equals(other.getImagePropertiesAnnotation())) return false; - } - if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; - if (hasCropHintsAnnotation()) { - if (!getCropHintsAnnotation() - .equals(other.getCropHintsAnnotation())) return false; - } - if (hasWebDetection() != other.hasWebDetection()) return false; - if (hasWebDetection()) { - if (!getWebDetection() - .equals(other.getWebDetection())) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFaceAnnotationsCount() > 0) { - hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFaceAnnotationsList().hashCode(); - } - if (getLandmarkAnnotationsCount() > 0) { - hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); - } - if (getLogoAnnotationsCount() > 0) { - hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLogoAnnotationsList().hashCode(); - } - if (getLabelAnnotationsCount() > 0) { - hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLabelAnnotationsList().hashCode(); - } - if (getTextAnnotationsCount() > 0) { - hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTextAnnotationsList().hashCode(); - } - if (hasFullTextAnnotation()) { - hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getFullTextAnnotation().hashCode(); - } - if (hasSafeSearchAnnotation()) { - hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); - } - if (hasImagePropertiesAnnotation()) { - hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); - } - if (hasCropHintsAnnotation()) { - hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsAnnotation().hashCode(); - } - if (hasWebDetection()) { - hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getWebDetection().hashCode(); - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AnnotateImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFaceAnnotationsFieldBuilder(); - getLandmarkAnnotationsFieldBuilder(); - getLogoAnnotationsFieldBuilder(); - getLabelAnnotationsFieldBuilder(); - getTextAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - faceAnnotationsBuilder_.clear(); - } - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - landmarkAnnotationsBuilder_.clear(); - } - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - logoAnnotationsBuilder_.clear(); - } - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelAnnotationsBuilder_.clear(); - } - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - textAnnotationsBuilder_.clear(); - } - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - if (webDetectionBuilder_ == null) { - webDetection_ = null; - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse build() { - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p2beta1.AnnotateImageResponse(this); - int from_bitField0_ = bitField0_; - if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.faceAnnotations_ = faceAnnotations_; - } else { - result.faceAnnotations_ = faceAnnotationsBuilder_.build(); - } - if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.landmarkAnnotations_ = landmarkAnnotations_; - } else { - result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); - } - if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.logoAnnotations_ = logoAnnotations_; - } else { - result.logoAnnotations_ = logoAnnotationsBuilder_.build(); - } - if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labelAnnotations_ = labelAnnotations_; - } else { - result.labelAnnotations_ = labelAnnotationsBuilder_.build(); - } - if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.textAnnotations_ = textAnnotations_; - } else { - result.textAnnotations_ = textAnnotationsBuilder_.build(); - } - if (fullTextAnnotationBuilder_ == null) { - result.fullTextAnnotation_ = fullTextAnnotation_; - } else { - result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); - } - if (safeSearchAnnotationBuilder_ == null) { - result.safeSearchAnnotation_ = safeSearchAnnotation_; - } else { - result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); - } - if (imagePropertiesAnnotationBuilder_ == null) { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; - } else { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); - } - if (cropHintsAnnotationBuilder_ == null) { - result.cropHintsAnnotation_ = cropHintsAnnotation_; - } else { - result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); - } - if (webDetectionBuilder_ == null) { - result.webDetection_ = webDetection_; - } else { - result.webDetection_ = webDetectionBuilder_.build(); - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AnnotateImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse other) { - if (other == com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()) return this; - if (faceAnnotationsBuilder_ == null) { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotations_.isEmpty()) { - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.addAll(other.faceAnnotations_); - } - onChanged(); - } - } else { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotationsBuilder_.isEmpty()) { - faceAnnotationsBuilder_.dispose(); - faceAnnotationsBuilder_ = null; - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - faceAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFaceAnnotationsFieldBuilder() : null; - } else { - faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); - } - } - } - if (landmarkAnnotationsBuilder_ == null) { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotations_.isEmpty()) { - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.addAll(other.landmarkAnnotations_); - } - onChanged(); - } - } else { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotationsBuilder_.isEmpty()) { - landmarkAnnotationsBuilder_.dispose(); - landmarkAnnotationsBuilder_ = null; - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - landmarkAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarkAnnotationsFieldBuilder() : null; - } else { - landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); - } - } - } - if (logoAnnotationsBuilder_ == null) { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotations_.isEmpty()) { - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.addAll(other.logoAnnotations_); - } - onChanged(); - } - } else { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotationsBuilder_.isEmpty()) { - logoAnnotationsBuilder_.dispose(); - logoAnnotationsBuilder_ = null; - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - logoAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLogoAnnotationsFieldBuilder() : null; - } else { - logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); - } - } - } - if (labelAnnotationsBuilder_ == null) { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotations_.isEmpty()) { - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.addAll(other.labelAnnotations_); - } - onChanged(); - } - } else { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotationsBuilder_.isEmpty()) { - labelAnnotationsBuilder_.dispose(); - labelAnnotationsBuilder_ = null; - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - labelAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelAnnotationsFieldBuilder() : null; - } else { - labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); - } - } - } - if (textAnnotationsBuilder_ == null) { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotations_.isEmpty()) { - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureTextAnnotationsIsMutable(); - textAnnotations_.addAll(other.textAnnotations_); - } - onChanged(); - } - } else { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotationsBuilder_.isEmpty()) { - textAnnotationsBuilder_.dispose(); - textAnnotationsBuilder_ = null; - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - textAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTextAnnotationsFieldBuilder() : null; - } else { - textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); - } - } - } - if (other.hasFullTextAnnotation()) { - mergeFullTextAnnotation(other.getFullTextAnnotation()); - } - if (other.hasSafeSearchAnnotation()) { - mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); - } - if (other.hasImagePropertiesAnnotation()) { - mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); - } - if (other.hasCropHintsAnnotation()) { - mergeCropHintsAnnotation(other.getCropHintsAnnotation()); - } - if (other.hasWebDetection()) { - mergeWebDetection(other.getWebDetection()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List faceAnnotations_ = - java.util.Collections.emptyList(); - private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; - - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List getFaceAnnotationsList() { - if (faceAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } else { - return faceAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public int getFaceAnnotationsCount() { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.size(); - } else { - return faceAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); - } else { - return faceAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations(com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addAllFaceAnnotations( - java.lang.Iterable values) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, faceAnnotations_); - onChanged(); - } else { - faceAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder clearFaceAnnotations() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - faceAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public Builder removeFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.remove(index); - onChanged(); - } else { - faceAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); } else { - return faceAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsOrBuilderList() { - if (faceAnnotationsBuilder_ != null) { - return faceAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { - return getFaceAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsBuilderList() { - return getFaceAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder> - getFaceAnnotationsFieldBuilder() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder>( - faceAnnotations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - faceAnnotations_ = null; - } - return faceAnnotationsBuilder_; - } - - private java.util.List landmarkAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; - - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List getLandmarkAnnotationsList() { - if (landmarkAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } else { - return landmarkAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public int getLandmarkAnnotationsCount() { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.size(); - } else { - return landmarkAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); - } else { - return landmarkAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addAllLandmarkAnnotations( - java.lang.Iterable values) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarkAnnotations_); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder clearLandmarkAnnotations() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - landmarkAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder removeLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.remove(index); - onChanged(); - } else { - landmarkAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); } else { - return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - if (landmarkAnnotationsBuilder_ != null) { - return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsBuilderList() { - return getLandmarkAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> - getLandmarkAnnotationsFieldBuilder() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( - landmarkAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - landmarkAnnotations_ = null; - } - return landmarkAnnotationsBuilder_; - } - - private java.util.List logoAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; - - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List getLogoAnnotationsList() { - if (logoAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } else { - return logoAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public int getLogoAnnotationsCount() { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.size(); - } else { - return logoAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); - } else { - return logoAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addAllLogoAnnotations( - java.lang.Iterable values) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logoAnnotations_); - onChanged(); - } else { - logoAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder clearLogoAnnotations() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - logoAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder removeLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.remove(index); - onChanged(); - } else { - logoAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); } else { - return logoAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsOrBuilderList() { - if (logoAnnotationsBuilder_ != null) { - return logoAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { - return getLogoAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsBuilderList() { - return getLogoAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> - getLogoAnnotationsFieldBuilder() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( - logoAnnotations_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - logoAnnotations_ = null; - } - return logoAnnotationsBuilder_; - } - - private java.util.List labelAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; - - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List getLabelAnnotationsList() { - if (labelAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } else { - return labelAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public int getLabelAnnotationsCount() { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.size(); - } else { - return labelAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); - } else { - return labelAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addAllLabelAnnotations( - java.lang.Iterable values) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelAnnotations_); - onChanged(); - } else { - labelAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder clearLabelAnnotations() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public Builder removeLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.remove(index); - onChanged(); - } else { - labelAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); } else { - return labelAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsOrBuilderList() { - if (labelAnnotationsBuilder_ != null) { - return labelAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { - return getLabelAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsBuilderList() { - return getLabelAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> - getLabelAnnotationsFieldBuilder() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( - labelAnnotations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - labelAnnotations_ = null; - } - return labelAnnotationsBuilder_; - } - - private java.util.List textAnnotations_ = - java.util.Collections.emptyList(); - private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - textAnnotations_ = new java.util.ArrayList(textAnnotations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; - - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List getTextAnnotationsList() { - if (textAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textAnnotations_); - } else { - return textAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public int getTextAnnotationsCount() { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.size(); - } else { - return textAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); - } else { - return textAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations(com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addAllTextAnnotations( - java.lang.Iterable values) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, textAnnotations_); - onChanged(); - } else { - textAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder clearTextAnnotations() { - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - textAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public Builder removeTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.remove(index); - onChanged(); - } else { - textAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); } else { - return textAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsOrBuilderList() { - if (textAnnotationsBuilder_ != null) { - return textAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textAnnotations_); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { - return getTextAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsBuilderList() { - return getTextAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder> - getTextAnnotationsFieldBuilder() { - if (textAnnotationsBuilder_ == null) { - textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.EntityAnnotation, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( - textAnnotations_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - textAnnotations_ = null; - } - return textAnnotationsBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - public boolean hasFullTextAnnotation() { - return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } else { - return fullTextAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation(com.google.cloud.vision.v1p2beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fullTextAnnotation_ = value; - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation( - com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder builderForValue) { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = builderForValue.build(); - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p2beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (fullTextAnnotation_ != null) { - fullTextAnnotation_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); - } else { - fullTextAnnotation_ = value; - } - onChanged(); - } else { - fullTextAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder clearFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - onChanged(); - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { - - onChanged(); - return getFullTextAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - if (fullTextAnnotationBuilder_ != null) { - return fullTextAnnotationBuilder_.getMessageOrBuilder(); - } else { - return fullTextAnnotation_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder> - getFullTextAnnotationFieldBuilder() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder>( - getFullTextAnnotation(), - getParentForChildren(), - isClean()); - fullTextAnnotation_ = null; - } - return fullTextAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } else { - return safeSearchAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - safeSearchAnnotation_ = value; - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation( - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder builderForValue) { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = builderForValue.build(); - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (safeSearchAnnotation_ != null) { - safeSearchAnnotation_ = - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); - } else { - safeSearchAnnotation_ = value; - } - onChanged(); - } else { - safeSearchAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder clearSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - onChanged(); - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { - - onChanged(); - return getSafeSearchAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - if (safeSearchAnnotationBuilder_ != null) { - return safeSearchAnnotationBuilder_.getMessageOrBuilder(); - } else { - return safeSearchAnnotation_ == null ? - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder> - getSafeSearchAnnotationFieldBuilder() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder>( - getSafeSearchAnnotation(), - getParentForChildren(), - isClean()); - safeSearchAnnotation_ = null; - } - return safeSearchAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - public com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } else { - return imagePropertiesAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p2beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imagePropertiesAnnotation_ = value; - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation( - com.google.cloud.vision.v1p2beta1.ImageProperties.Builder builderForValue) { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = builderForValue.build(); - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p2beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (imagePropertiesAnnotation_ != null) { - imagePropertiesAnnotation_ = - com.google.cloud.vision.v1p2beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); - } else { - imagePropertiesAnnotation_ = value; - } - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder clearImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - onChanged(); - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p2beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { - - onChanged(); - return getImagePropertiesAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - if (imagePropertiesAnnotationBuilder_ != null) { - return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); - } else { - return imagePropertiesAnnotation_ == null ? - com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder> - getImagePropertiesAnnotationFieldBuilder() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder>( - getImagePropertiesAnnotation(), - getParentForChildren(), - isClean()); - imagePropertiesAnnotation_ = null; - } - return imagePropertiesAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } else { - return cropHintsAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsAnnotation_ = value; - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation( - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder builderForValue) { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = builderForValue.build(); - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (cropHintsAnnotation_ != null) { - cropHintsAnnotation_ = - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); - } else { - cropHintsAnnotation_ = value; - } - onChanged(); - } else { - cropHintsAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder clearCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - onChanged(); - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { - - onChanged(); - return getCropHintsAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - if (cropHintsAnnotationBuilder_ != null) { - return cropHintsAnnotationBuilder_.getMessageOrBuilder(); - } else { - return cropHintsAnnotation_ == null ? - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder> - getCropHintsAnnotationFieldBuilder() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder>( - getCropHintsAnnotation(), - getParentForChildren(), - isClean()); - cropHintsAnnotation_ = null; - } - return cropHintsAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder> webDetectionBuilder_; - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - public boolean hasWebDetection() { - return webDetectionBuilder_ != null || webDetection_ != null; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - public com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection() { - if (webDetectionBuilder_ == null) { - return webDetection_ == null ? com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; - } else { - return webDetectionBuilder_.getMessage(); - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection(com.google.cloud.vision.v1p2beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetection_ = value; - onChanged(); - } else { - webDetectionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection( - com.google.cloud.vision.v1p2beta1.WebDetection.Builder builderForValue) { - if (webDetectionBuilder_ == null) { - webDetection_ = builderForValue.build(); - onChanged(); - } else { - webDetectionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public Builder mergeWebDetection(com.google.cloud.vision.v1p2beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (webDetection_ != null) { - webDetection_ = - com.google.cloud.vision.v1p2beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); - } else { - webDetection_ = value; - } - onChanged(); - } else { - webDetectionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public Builder clearWebDetection() { - if (webDetectionBuilder_ == null) { - webDetection_ = null; - onChanged(); - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.Builder getWebDetectionBuilder() { - - onChanged(); - return getWebDetectionFieldBuilder().getBuilder(); - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - if (webDetectionBuilder_ != null) { - return webDetectionBuilder_.getMessageOrBuilder(); - } else { - return webDetection_ == null ? - com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance() : webDetection_; - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder> - getWebDetectionFieldBuilder() { - if (webDetectionBuilder_ == null) { - webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder>( - getWebDetection(), - getParentForChildren(), - isClean()); - webDetection_ = null; - } - return webDetectionBuilder_; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder> contextBuilder_; - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext( - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public Builder mergeContext(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - private static final com.google.cloud.vision.v1p2beta1.AnnotateImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AnnotateImageResponse(); - } - - public static com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java deleted file mode 100644 index c9055eb121e9..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponseOrBuilder.java +++ /dev/null @@ -1,436 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AnnotateImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p2beta1.FaceAnnotation getFaceAnnotations(int index); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - int getFaceAnnotationsCount(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsOrBuilderList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotation getLandmarkAnnotations(int index); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - int getLandmarkAnnotationsCount(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsOrBuilderList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotation getLogoAnnotations(int index); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - int getLogoAnnotationsCount(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsOrBuilderList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotation getLabelAnnotations(int index); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - int getLabelAnnotationsCount(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsOrBuilderList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotation getTextAnnotations(int index); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - int getTextAnnotationsCount(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsOrBuilderList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - boolean hasFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation getFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation full_text_annotation = 12; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); - - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - boolean hasSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); - - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - boolean hasImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - com.google.cloud.vision.v1p2beta1.ImageProperties getImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageProperties image_properties_annotation = 8; - */ - com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); - - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - boolean hasCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); - - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - boolean hasWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - com.google.cloud.vision.v1p2beta1.WebDetection getWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetection web_detection = 13; - */ - com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); - - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageAnnotationContext context = 21; - */ - com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java deleted file mode 100644 index 2b086d817049..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java +++ /dev/null @@ -1,1580 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * An offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} - */ -public final class AsyncAnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - AsyncAnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileRequest.newBuilder() to construct. - private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p2beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.vision.v1p2beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (outputConfig_ != null) { - output.writeMessage(4, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest build() { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p2beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p2beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p2beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p2beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p2beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p2beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p2beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p2beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - private static final com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java deleted file mode 100644 index 4052046dcf0d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AsyncAnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p2beta1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p2beta1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p2beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p2beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 4; - */ - com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java deleted file mode 100644 index 58dc4e62a537..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The response for a single offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} - */ -public final class AsyncAnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - AsyncAnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileResponse.newBuilder() to construct. - private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p2beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response for a single offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse build() { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p2beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p2beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - private static final com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java deleted file mode 100644 index a910bcfd7c7c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AsyncAnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p2beta1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java deleted file mode 100644 index 9133d4c8dfae..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java +++ /dev/null @@ -1,874 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Multiple async file annotation requests are batched into a single service
- * call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} - */ -public final class AsyncBatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - AsyncBatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. - private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple async file annotation requests are batched into a single service
-   * call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index f2aa927ea9f8..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AsyncBatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest getRequests(int index); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java deleted file mode 100644 index 88364f0ab78e..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Response to an async batch file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} - */ -public final class AsyncBatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - AsyncBatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. - private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index f16c1193c2b0..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface AsyncBatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java deleted file mode 100644 index fa3f305982e8..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Multiple image annotation requests are batched into a single service call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} - */ -public final class BatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - BatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesRequest.newBuilder() to construct. - private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple image annotation requests are batched into a single service call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index b068595ed47d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface BatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java deleted file mode 100644 index bdc96fcca2d2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Response to a batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} - */ -public final class BatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - BatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesResponse.newBuilder() to construct. - private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index 3615f5a29e08..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface BatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java deleted file mode 100644 index 70eabde18c66..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java +++ /dev/null @@ -1,1914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Logical element on the page.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Block} - */ -public final class Block extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Block) - BlockOrBuilder { -private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Block() { - paragraphs_ = java.util.Collections.emptyList(); - blockType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Block(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Block( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paragraphs_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Paragraph.parser(), extensionRegistry)); - break; - } - case 32: { - int rawValue = input.readEnum(); - - blockType_ = rawValue; - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Block.class, com.google.cloud.vision.v1p2beta1.Block.Builder.class); - } - - /** - *
-   * Type of a block (text, image etc) as identified by OCR.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.Block.BlockType} - */ - public enum BlockType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - TABLE(2), - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - PICTURE(3), - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - RULER(4), - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - BARCODE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - public static final int TABLE_VALUE = 2; - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - public static final int PICTURE_VALUE = 3; - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - public static final int RULER_VALUE = 4; - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - public static final int BARCODE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TEXT; - case 2: return TABLE; - case 3: return PICTURE; - case 4: return RULER; - case 5: return BARCODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockType findValueByNumber(int number) { - return BlockType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.Block.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockType[] VALUES = values(); - - public static BlockType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Block.BlockType) - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int PARAGRAPHS_FIELD_NUMBER = 3; - private java.util.List paragraphs_; - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List getParagraphsList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - return paragraphs_.get(index); - } - - public static final int BLOCK_TYPE_FIELD_NUMBER = 4; - private int blockType_; - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Block.BlockType result = com.google.cloud.vision.v1p2beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p2beta1.Block.BlockType.UNRECOGNIZED : result; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p2beta1.Block.BlockType.UNKNOWN.getNumber()) { - output.writeEnum(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p2beta1.Block.BlockType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Block)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Block other = (com.google.cloud.vision.v1p2beta1.Block) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getParagraphsList() - .equals(other.getParagraphsList())) return false; - if (blockType_ != other.blockType_) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + blockType_; - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Block parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Block parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Block prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Logical element on the page.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Block} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Block) - com.google.cloud.vision.v1p2beta1.BlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Block.class, com.google.cloud.vision.v1p2beta1.Block.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Block.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParagraphsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - paragraphsBuilder_.clear(); - } - blockType_ = 0; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block build() { - com.google.cloud.vision.v1p2beta1.Block result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block buildPartial() { - com.google.cloud.vision.v1p2beta1.Block result = new com.google.cloud.vision.v1p2beta1.Block(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - result.blockType_ = blockType_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Block) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Block)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Block other) { - if (other == com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParagraphsFieldBuilder() : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (other.blockType_ != 0) { - setBlockTypeValue(other.getBlockTypeValue()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Block parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Block) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List paragraphs_ = - java.util.Collections.emptyList(); - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(paragraphs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder> paragraphsBuilder_; - - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public java.util.List getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); - } else { - return paragraphsBuilder_.getMessageList(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p2beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs(com.google.cloud.vision.v1p2beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p2beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p2beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder addAllParagraphs( - java.lang.Iterable values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p2beta1.Paragraph.Builder getParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(paragraphs_); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p2beta1.Paragraph.Builder addParagraphsBuilder() { - return getParagraphsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p2beta1.Paragraph.Builder addParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - paragraphs_ = null; - } - return paragraphsBuilder_; - } - - private int blockType_ = 0; - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @param value The enum numeric value on the wire for blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockTypeValue(int value) { - - blockType_ = value; - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Block.BlockType result = com.google.cloud.vision.v1p2beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p2beta1.Block.BlockType.UNRECOGNIZED : result; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @param value The blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockType(com.google.cloud.vision.v1p2beta1.Block.BlockType value) { - if (value == null) { - throw new NullPointerException(); - } - - blockType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return This builder for chaining. - */ - public Builder clearBlockType() { - - blockType_ = 0; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Block) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Block) - private static final com.google.cloud.vision.v1p2beta1.Block DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Block(); - } - - public static com.google.cloud.vision.v1p2beta1.Block getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Block parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Block(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java deleted file mode 100644 index ef09321b576b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BlockOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Block) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p2beta1.Paragraph getParagraphs(int index); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - int getParagraphsCount(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsOrBuilderList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index); - - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - int getBlockTypeValue(); - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - com.google.cloud.vision.v1p2beta1.Block.BlockType getBlockType(); - - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java deleted file mode 100644 index 68010ef4b5da..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java +++ /dev/null @@ -1,1312 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A bounding polygon for the detected image annotation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BoundingPoly} - */ -public final class BoundingPoly extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.BoundingPoly) - BoundingPolyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingPoly() { - vertices_ = java.util.Collections.emptyList(); - normalizedVertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vertices_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Vertex.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - normalizedVertices_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.NormalizedVertex.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BoundingPoly.class, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder.class); - } - - public static final int VERTICES_FIELD_NUMBER = 1; - private java.util.List vertices_; - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List getVerticesList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List - getVerticesOrBuilderList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - @java.lang.Override - public int getVerticesCount() { - return vertices_.size(); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index) { - return vertices_.get(index); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - return vertices_.get(index); - } - - public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; - private java.util.List normalizedVertices_; - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List getNormalizedVerticesList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List - getNormalizedVerticesOrBuilderList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public int getNormalizedVerticesCount() { - return normalizedVertices_.size(); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index) { - return normalizedVertices_.get(index); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - return normalizedVertices_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < vertices_.size(); i++) { - output.writeMessage(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - output.writeMessage(2, normalizedVertices_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < vertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, normalizedVertices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.BoundingPoly other = (com.google.cloud.vision.v1p2beta1.BoundingPoly) obj; - - if (!getVerticesList() - .equals(other.getVerticesList())) return false; - if (!getNormalizedVerticesList() - .equals(other.getNormalizedVerticesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVerticesCount() > 0) { - hash = (37 * hash) + VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getVerticesList().hashCode(); - } - if (getNormalizedVerticesCount() > 0) { - hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getNormalizedVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A bounding polygon for the detected image annotation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.BoundingPoly} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.BoundingPoly) - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.BoundingPoly.class, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVerticesFieldBuilder(); - getNormalizedVerticesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - verticesBuilder_.clear(); - } - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly build() { - com.google.cloud.vision.v1p2beta1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly buildPartial() { - com.google.cloud.vision.v1p2beta1.BoundingPoly result = new com.google.cloud.vision.v1p2beta1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.vertices_ = vertices_; - } else { - result.vertices_ = verticesBuilder_.build(); - } - if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.normalizedVertices_ = normalizedVertices_; - } else { - result.normalizedVertices_ = normalizedVerticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.BoundingPoly) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.BoundingPoly)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.BoundingPoly other) { - if (other == com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance()) return this; - if (verticesBuilder_ == null) { - if (!other.vertices_.isEmpty()) { - if (vertices_.isEmpty()) { - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVerticesIsMutable(); - vertices_.addAll(other.vertices_); - } - onChanged(); - } - } else { - if (!other.vertices_.isEmpty()) { - if (verticesBuilder_.isEmpty()) { - verticesBuilder_.dispose(); - verticesBuilder_ = null; - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - verticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVerticesFieldBuilder() : null; - } else { - verticesBuilder_.addAllMessages(other.vertices_); - } - } - } - if (normalizedVerticesBuilder_ == null) { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVertices_.isEmpty()) { - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.addAll(other.normalizedVertices_); - } - onChanged(); - } - } else { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVerticesBuilder_.isEmpty()) { - normalizedVerticesBuilder_.dispose(); - normalizedVerticesBuilder_ = null; - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - normalizedVerticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNormalizedVerticesFieldBuilder() : null; - } else { - normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List vertices_ = - java.util.Collections.emptyList(); - private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(vertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder> verticesBuilder_; - - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public java.util.List getVerticesList() { - if (verticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(vertices_); - } else { - return verticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public int getVerticesCount() { - if (verticesBuilder_ == null) { - return vertices_.size(); - } else { - return verticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); - } else { - return verticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p2beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.set(index, value); - onChanged(); - } else { - verticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.set(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder addVertices(com.google.cloud.vision.v1p2beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(value); - onChanged(); - } else { - verticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p2beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(index, value); - onChanged(); - } else { - verticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder addVertices( - com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p2beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder addAllVertices( - java.lang.Iterable values) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vertices_); - onChanged(); - } else { - verticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder clearVertices() { - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - verticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public Builder removeVertices(int index) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.remove(index); - onChanged(); - } else { - verticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p2beta1.Vertex.Builder getVerticesBuilder( - int index) { - return getVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); } else { - return verticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesOrBuilderList() { - if (verticesBuilder_ != null) { - return verticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(vertices_); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder() { - return getVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder( - int index) { - return getVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesBuilderList() { - return getVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder> - getVerticesFieldBuilder() { - if (verticesBuilder_ == null) { - verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - vertices_ = null; - } - return verticesBuilder_; - } - - private java.util.List normalizedVertices_ = - java.util.Collections.emptyList(); - private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; - - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List getNormalizedVerticesList() { - if (normalizedVerticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } else { - return normalizedVerticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.size(); - } else { - return normalizedVerticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices(com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addAllNormalizedVertices( - java.lang.Iterable values) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, normalizedVertices_); - onChanged(); - } else { - normalizedVerticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder clearNormalizedVertices() { - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder removeNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.remove(index); - onChanged(); - } else { - normalizedVerticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); } else { - return normalizedVerticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - if (normalizedVerticesBuilder_ != null) { - return normalizedVerticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { - return getNormalizedVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesBuilderList() { - return getNormalizedVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder> - getNormalizedVerticesFieldBuilder() { - if (normalizedVerticesBuilder_ == null) { - normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.NormalizedVertex, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder>( - normalizedVertices_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - normalizedVertices_ = null; - } - return normalizedVerticesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BoundingPoly) - private static final com.google.cloud.vision.v1p2beta1.BoundingPoly DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.BoundingPoly(); - } - - public static com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java deleted file mode 100644 index b173fb638213..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface BoundingPolyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p2beta1.Vertex getVertices(int index); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - int getVerticesCount(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesOrBuilderList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p2beta1.VertexOrBuilder getVerticesOrBuilder( - int index); - - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p2beta1.NormalizedVertex getNormalizedVertices(int index); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - int getNormalizedVerticesCount(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesOrBuilderList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java deleted file mode 100644 index dd9c2689bbf2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Color information consists of RGB channels, score, and the fraction of
- * the image that the color occupies in the image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ColorInfo} - */ -public final class ColorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ColorInfo) - ColorInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use ColorInfo.newBuilder() to construct. - private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ColorInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ColorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Color.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 29: { - - pixelFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ColorInfo.class, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder.class); - } - - public static final int COLOR_FIELD_NUMBER = 1; - private com.google.type.Color color_; - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return color_ != null; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return getColor(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; - private float pixelFraction_; - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (color_ != null) { - output.writeMessage(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - output.writeFloat(3, pixelFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, pixelFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ColorInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.ColorInfo other = (com.google.cloud.vision.v1p2beta1.ColorInfo) obj; - - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor() - .equals(other.getColor())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getPixelFraction()) - != java.lang.Float.floatToIntBits( - other.getPixelFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPixelFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ColorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Color information consists of RGB channels, score, and the fraction of
-   * the image that the color occupies in the image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ColorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ColorInfo) - com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ColorInfo.class, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - score_ = 0F; - - pixelFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfo build() { - com.google.cloud.vision.v1p2beta1.ColorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfo buildPartial() { - com.google.cloud.vision.v1p2beta1.ColorInfo result = new com.google.cloud.vision.v1p2beta1.ColorInfo(this); - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - result.score_ = score_; - result.pixelFraction_ = pixelFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.ColorInfo) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.ColorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ColorInfo other) { - if (other == com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()) return this; - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getPixelFraction() != 0F) { - setPixelFraction(other.getPixelFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.ColorInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.ColorInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor( - com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.Color.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - - private float score_ ; - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float pixelFraction_ ; - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @param value The pixelFraction to set. - * @return This builder for chaining. - */ - public Builder setPixelFraction(float value) { - - pixelFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearPixelFraction() { - - pixelFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ColorInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ColorInfo) - private static final com.google.cloud.vision.v1p2beta1.ColorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ColorInfo(); - } - - public static com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java deleted file mode 100644 index f8504f6f4136..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfoOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ColorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ColorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - boolean hasColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - com.google.type.Color getColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - com.google.type.ColorOrBuilder getColorOrBuilder(); - - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - float getPixelFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java deleted file mode 100644 index 0c67762e0273..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java +++ /dev/null @@ -1,845 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Single crop hint that is used to generate a new crop when serving an image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHint} - */ -public final class CropHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHint) - CropHintOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHint.newBuilder() to construct. - private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHint() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - case 29: { - - importanceFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHint.class, com.google.cloud.vision.v1p2beta1.CropHint.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; - private float importanceFraction_; - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - output.writeFloat(3, importanceFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, importanceFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHint)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.CropHint other = (com.google.cloud.vision.v1p2beta1.CropHint) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getImportanceFraction()) - != java.lang.Float.floatToIntBits( - other.getImportanceFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImportanceFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Single crop hint that is used to generate a new crop when serving an image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHint) - com.google.cloud.vision.v1p2beta1.CropHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHint.class, com.google.cloud.vision.v1p2beta1.CropHint.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.CropHint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - confidence_ = 0F; - - importanceFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHint build() { - com.google.cloud.vision.v1p2beta1.CropHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHint buildPartial() { - com.google.cloud.vision.v1p2beta1.CropHint result = new com.google.cloud.vision.v1p2beta1.CropHint(this); - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.confidence_ = confidence_; - result.importanceFraction_ = importanceFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.CropHint) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHint other) { - if (other == com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getImportanceFraction() != 0F) { - setImportanceFraction(other.getImportanceFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.CropHint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float importanceFraction_ ; - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @param value The importanceFraction to set. - * @return This builder for chaining. - */ - public Builder setImportanceFraction(float value) { - - importanceFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearImportanceFraction() { - - importanceFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHint) - private static final com.google.cloud.vision.v1p2beta1.CropHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHint(); - } - - public static com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java deleted file mode 100644 index dd3ed9e88583..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface CropHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - float getImportanceFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java deleted file mode 100644 index 1d0643eb5654..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Set of crop hints that are used to generate new crops when serving images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsAnnotation} - */ -public final class CropHintsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - CropHintsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsAnnotation.newBuilder() to construct. - private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsAnnotation() { - cropHints_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cropHints_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.CropHint.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder.class); - } - - public static final int CROP_HINTS_FIELD_NUMBER = 1; - private java.util.List cropHints_; - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List getCropHintsList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List - getCropHintsOrBuilderList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public int getCropHintsCount() { - return cropHints_.size(); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index) { - return cropHints_.get(index); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - return cropHints_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < cropHints_.size(); i++) { - output.writeMessage(1, cropHints_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < cropHints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cropHints_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHintsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) obj; - - if (!getCropHintsList() - .equals(other.getCropHintsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCropHintsCount() > 0) { - hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of crop hints that are used to generate new crops when serving images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - com.google.cloud.vision.v1p2beta1.CropHintsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCropHintsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation build() { - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p2beta1.CropHintsAnnotation(this); - int from_bitField0_ = bitField0_; - if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cropHints_ = cropHints_; - } else { - result.cropHints_ = cropHintsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHintsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHintsAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.getDefaultInstance()) return this; - if (cropHintsBuilder_ == null) { - if (!other.cropHints_.isEmpty()) { - if (cropHints_.isEmpty()) { - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCropHintsIsMutable(); - cropHints_.addAll(other.cropHints_); - } - onChanged(); - } - } else { - if (!other.cropHints_.isEmpty()) { - if (cropHintsBuilder_.isEmpty()) { - cropHintsBuilder_.dispose(); - cropHintsBuilder_ = null; - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - cropHintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCropHintsFieldBuilder() : null; - } else { - cropHintsBuilder_.addAllMessages(other.cropHints_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.CropHintsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List cropHints_ = - java.util.Collections.emptyList(); - private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(cropHints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder> cropHintsBuilder_; - - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public java.util.List getCropHintsList() { - if (cropHintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cropHints_); - } else { - return cropHintsBuilder_.getMessageList(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public int getCropHintsCount() { - if (cropHintsBuilder_ == null) { - return cropHints_.size(); - } else { - return cropHintsBuilder_.getCount(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); - } else { - return cropHintsBuilder_.getMessage(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p2beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.set(index, value); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.set(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints(com.google.cloud.vision.v1p2beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p2beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(index, value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p2beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder addAllCropHints( - java.lang.Iterable values) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cropHints_); - onChanged(); - } else { - cropHintsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder clearCropHints() { - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public Builder removeCropHints(int index) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.remove(index); - onChanged(); - } else { - cropHintsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p2beta1.CropHint.Builder getCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().getBuilder(index); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); } else { - return cropHintsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsOrBuilderList() { - if (cropHintsBuilder_ != null) { - return cropHintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cropHints_); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder() { - return getCropHintsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsBuilderList() { - return getCropHintsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder> - getCropHintsFieldBuilder() { - if (cropHintsBuilder_ == null) { - cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cropHints_ = null; - } - return cropHintsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - private static final com.google.cloud.vision.v1p2beta1.CropHintsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHintsAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java deleted file mode 100644 index 5aeb3fb4336c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface CropHintsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p2beta1.CropHint getCropHints(int index); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - int getCropHintsCount(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsOrBuilderList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p2beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java deleted file mode 100644 index 9d91ec28766f..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Parameters for crop hints annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsParams} - */ -public final class CropHintsParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.CropHintsParams) - CropHintsParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsParams.newBuilder() to construct. - private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsParams() { - aspectRatios_ = emptyFloatList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - aspectRatios_.addFloat(input.readFloat()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - aspectRatios_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHintsParams.class, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder.class); - } - - public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList aspectRatios_; - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - @java.lang.Override - public java.util.List - getAspectRatiosList() { - return aspectRatios_; - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - private int aspectRatiosMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getAspectRatiosList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); - } - for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.getFloat(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getAspectRatiosList().size(); - size += dataSize; - if (!getAspectRatiosList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - aspectRatiosMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.CropHintsParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.CropHintsParams other = (com.google.cloud.vision.v1p2beta1.CropHintsParams) obj; - - if (!getAspectRatiosList() - .equals(other.getAspectRatiosList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAspectRatiosCount() > 0) { - hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatiosList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.CropHintsParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.CropHintsParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.CropHintsParams) - com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.CropHintsParams.class, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.CropHintsParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParams build() { - com.google.cloud.vision.v1p2beta1.CropHintsParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParams buildPartial() { - com.google.cloud.vision.v1p2beta1.CropHintsParams result = new com.google.cloud.vision.v1p2beta1.CropHintsParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aspectRatios_ = aspectRatios_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.CropHintsParams) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.CropHintsParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.CropHintsParams other) { - if (other == com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance()) return this; - if (!other.aspectRatios_.isEmpty()) { - if (aspectRatios_.isEmpty()) { - aspectRatios_ = other.aspectRatios_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAspectRatiosIsMutable(); - aspectRatios_.addAll(other.aspectRatios_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.CropHintsParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.CropHintsParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); - private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = mutableCopy(aspectRatios_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - public java.util.List - getAspectRatiosList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index to set the value at. - * @param value The aspectRatios to set. - * @return This builder for chaining. - */ - public Builder setAspectRatios( - int index, float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.setFloat(index, value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param value The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAspectRatios(float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.addFloat(value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param values The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAllAspectRatios( - java.lang.Iterable values) { - ensureAspectRatiosIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aspectRatios_); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return This builder for chaining. - */ - public Builder clearAspectRatios() { - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.CropHintsParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsParams) - private static final com.google.cloud.vision.v1p2beta1.CropHintsParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.CropHintsParams(); - } - - public static com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java deleted file mode 100644 index 74f0fc357716..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParamsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface CropHintsParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.CropHintsParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - java.util.List getAspectRatiosList(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - int getAspectRatiosCount(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - float getAspectRatios(int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java deleted file mode 100644 index ee8b9f8e0a77..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Set of dominant colors and their corresponding scores.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.DominantColorsAnnotation} - */ -public final class DominantColorsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - DominantColorsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DominantColorsAnnotation.newBuilder() to construct. - private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DominantColorsAnnotation() { - colors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DominantColorsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DominantColorsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colors_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.ColorInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder.class); - } - - public static final int COLORS_FIELD_NUMBER = 1; - private java.util.List colors_; - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List getColorsList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List - getColorsOrBuilderList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public int getColorsCount() { - return colors_.size(); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index) { - return colors_.get(index); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - return colors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < colors_.size(); i++) { - output.writeMessage(1, colors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < colors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, colors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) obj; - - if (!getColorsList() - .equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getColorsCount() > 0) { - hash = (37 * hash) + COLORS_FIELD_NUMBER; - hash = (53 * hash) + getColorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of dominant colors and their corresponding scores.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.DominantColorsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getColorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - colorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation build() { - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation(this); - int from_bitField0_ = bitField0_; - if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.colors_ = colors_; - } else { - result.colors_ = colorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance()) return this; - if (colorsBuilder_ == null) { - if (!other.colors_.isEmpty()) { - if (colors_.isEmpty()) { - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColorsIsMutable(); - colors_.addAll(other.colors_); - } - onChanged(); - } - } else { - if (!other.colors_.isEmpty()) { - if (colorsBuilder_.isEmpty()) { - colorsBuilder_.dispose(); - colorsBuilder_ = null; - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - colorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getColorsFieldBuilder() : null; - } else { - colorsBuilder_.addAllMessages(other.colors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List colors_ = - java.util.Collections.emptyList(); - private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(colors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder> colorsBuilder_; - - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public java.util.List getColorsList() { - if (colorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(colors_); - } else { - return colorsBuilder_.getMessageList(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public int getColorsCount() { - if (colorsBuilder_ == null) { - return colors_.size(); - } else { - return colorsBuilder_.getCount(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); - } else { - return colorsBuilder_.getMessage(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p2beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.set(index, value); - onChanged(); - } else { - colorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.set(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder addColors(com.google.cloud.vision.v1p2beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(value); - onChanged(); - } else { - colorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p2beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(index, value); - onChanged(); - } else { - colorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder addColors( - com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder addAllColors( - java.lang.Iterable values) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, colors_); - onChanged(); - } else { - colorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder clearColors() { - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - colorsBuilder_.clear(); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public Builder removeColors(int index) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.remove(index); - onChanged(); - } else { - colorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder getColorsBuilder( - int index) { - return getColorsFieldBuilder().getBuilder(index); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); } else { - return colorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsOrBuilderList() { - if (colorsBuilder_ != null) { - return colorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(colors_); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder() { - return getColorsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder( - int index) { - return getColorsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsBuilderList() { - return getColorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder> - getColorsFieldBuilder() { - if (colorsBuilder_ == null) { - colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - colors_ = null; - } - return colorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - private static final com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DominantColorsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DominantColorsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java deleted file mode 100644 index 69e28e73e98c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface DominantColorsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p2beta1.ColorInfo getColors(int index); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - int getColorsCount(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsOrBuilderList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java deleted file mode 100644 index d7eb4eb89c77..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java +++ /dev/null @@ -1,2472 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Set of detected entity features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.EntityAnnotation} - */ -public final class EntityAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.EntityAnnotation) - EntityAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityAnnotation.newBuilder() to construct. - private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityAnnotation() { - mid_ = ""; - locale_ = ""; - description_ = ""; - locations_ = java.util.Collections.emptyList(); - properties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - locale_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - case 53: { - - topicality_ = input.readFloat(); - break; - } - case 58: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.LocationInfo.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - properties_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Property.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.class, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCALE_FIELD_NUMBER = 2; - private volatile java.lang.Object locale_; - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - @java.lang.Override - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } - } - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int TOPICALITY_FIELD_NUMBER = 6; - private float topicality_; - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 7; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 8; - private java.util.List locations_; - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index) { - return locations_.get(index); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 9; - private java.util.List properties_; - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List getPropertiesList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List - getPropertiesOrBuilderList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - @java.lang.Override - public int getPropertiesCount() { - return properties_.size(); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Property getProperties(int index) { - return properties_.get(index); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - return properties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - output.writeFloat(6, topicality_); - } - if (boundingPoly_ != null) { - output.writeMessage(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - output.writeMessage(9, properties_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, topicality_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, properties_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.EntityAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.EntityAnnotation other = (com.google.cloud.vision.v1p2beta1.EntityAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLocale() - .equals(other.getLocale())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getTopicality()) - != java.lang.Float.floatToIntBits( - other.getTopicality())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getLocationsList() - .equals(other.getLocationsList())) return false; - if (!getPropertiesList() - .equals(other.getPropertiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LOCALE_FIELD_NUMBER; - hash = (53 * hash) + getLocale().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTopicality()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (getPropertiesCount() > 0) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getPropertiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.EntityAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected entity features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.EntityAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.EntityAnnotation) - com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.EntityAnnotation.class, com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.EntityAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - getPropertiesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - locale_ = ""; - - description_ = ""; - - score_ = 0F; - - confidence_ = 0F; - - topicality_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - propertiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation build() { - com.google.cloud.vision.v1p2beta1.EntityAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.EntityAnnotation result = new com.google.cloud.vision.v1p2beta1.EntityAnnotation(this); - int from_bitField0_ = bitField0_; - result.mid_ = mid_; - result.locale_ = locale_; - result.description_ = description_; - result.score_ = score_; - result.confidence_ = confidence_; - result.topicality_ = topicality_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.properties_ = properties_; - } else { - result.properties_ = propertiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.EntityAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.EntityAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.EntityAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.EntityAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLocale().isEmpty()) { - locale_ = other.locale_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getTopicality() != 0F) { - setTopicality(other.getTopicality()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (propertiesBuilder_ == null) { - if (!other.properties_.isEmpty()) { - if (properties_.isEmpty()) { - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePropertiesIsMutable(); - properties_.addAll(other.properties_); - } - onChanged(); - } - } else { - if (!other.properties_.isEmpty()) { - if (propertiesBuilder_.isEmpty()) { - propertiesBuilder_.dispose(); - propertiesBuilder_ = null; - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - propertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPropertiesFieldBuilder() : null; - } else { - propertiesBuilder_.addAllMessages(other.properties_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.EntityAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.EntityAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object mid_ = ""; - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object locale_ = ""; - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The locale. - */ - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The locale to set. - * @return This builder for chaining. - */ - public Builder setLocale( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locale_ = value; - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return This builder for chaining. - */ - public Builder clearLocale() { - - locale_ = getDefaultInstance().getLocale(); - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The bytes for locale to set. - * @return This builder for chaining. - */ - public Builder setLocaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locale_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float topicality_ ; - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @param value The topicality to set. - * @return This builder for chaining. - */ - public Builder setTopicality(float value) { - - topicality_ = value; - onChanged(); - return this; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return This builder for chaining. - */ - public Builder clearTopicality() { - - topicality_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder> locationsBuilder_; - - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p2beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder addLocations(com.google.cloud.vision.v1p2beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p2beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.util.List properties_ = - java.util.Collections.emptyList(); - private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(properties_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder> propertiesBuilder_; - - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public java.util.List getPropertiesList() { - if (propertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(properties_); - } else { - return propertiesBuilder_.getMessageList(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public int getPropertiesCount() { - if (propertiesBuilder_ == null) { - return properties_.size(); - } else { - return propertiesBuilder_.getCount(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p2beta1.Property getProperties(int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); - } else { - return propertiesBuilder_.getMessage(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p2beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.set(index, value); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.set(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder addProperties(com.google.cloud.vision.v1p2beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(value); - onChanged(); - } else { - propertiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p2beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(index, value); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder addProperties( - com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p2beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder addAllProperties( - java.lang.Iterable values) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, properties_); - onChanged(); - } else { - propertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder clearProperties() { - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - propertiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public Builder removeProperties(int index) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.remove(index); - onChanged(); - } else { - propertiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p2beta1.Property.Builder getPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); } else { - return propertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public java.util.List - getPropertiesOrBuilderList() { - if (propertiesBuilder_ != null) { - return propertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(properties_); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder() { - return getPropertiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - public java.util.List - getPropertiesBuilderList() { - return getPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder> - getPropertiesFieldBuilder() { - if (propertiesBuilder_ == null) { - propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - properties_ = null; - } - return propertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.EntityAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.EntityAnnotation) - private static final com.google.cloud.vision.v1p2beta1.EntityAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.EntityAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.EntityAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java deleted file mode 100644 index 5d6d50377ece..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotationOrBuilder.java +++ /dev/null @@ -1,256 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface EntityAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.EntityAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - java.lang.String getLocale(); - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - com.google.protobuf.ByteString - getLocaleBytes(); - - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - float getTopicality(); - - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 7; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p2beta1.LocationInfo getLocations(int index); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - int getLocationsCount(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsOrBuilderList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index); - - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - java.util.List - getPropertiesList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p2beta1.Property getProperties(int index); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - int getPropertiesCount(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - java.util.List - getPropertiesOrBuilderList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p2beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java deleted file mode 100644 index d82c429d0b09..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java +++ /dev/null @@ -1,4300 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A face annotation object contains the results of face detection.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation} - */ -public final class FaceAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.FaceAnnotation) - FaceAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceAnnotation.newBuilder() to construct. - private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceAnnotation() { - landmarks_ = java.util.Collections.emptyList(); - joyLikelihood_ = 0; - sorrowLikelihood_ = 0; - angerLikelihood_ = 0; - surpriseLikelihood_ = 0; - underExposedLikelihood_ = 0; - blurredLikelihood_ = 0; - headwearLikelihood_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (fdBoundingPoly_ != null) { - subBuilder = fdBoundingPoly_.toBuilder(); - } - fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fdBoundingPoly_); - fdBoundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - landmarks_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); - break; - } - case 37: { - - rollAngle_ = input.readFloat(); - break; - } - case 45: { - - panAngle_ = input.readFloat(); - break; - } - case 53: { - - tiltAngle_ = input.readFloat(); - break; - } - case 61: { - - detectionConfidence_ = input.readFloat(); - break; - } - case 69: { - - landmarkingConfidence_ = input.readFloat(); - break; - } - case 72: { - int rawValue = input.readEnum(); - - joyLikelihood_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sorrowLikelihood_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - angerLikelihood_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - surpriseLikelihood_ = rawValue; - break; - } - case 104: { - int rawValue = input.readEnum(); - - underExposedLikelihood_ = rawValue; - break; - } - case 112: { - int rawValue = input.readEnum(); - - blurredLikelihood_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - headwearLikelihood_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder.class); - } - - public interface LandmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType(); - - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return Whether the position field is set. - */ - boolean hasPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return The position. - */ - com.google.cloud.vision.v1p2beta1.Position getPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder(); - } - /** - *
-   * A face-specific landmark (for example, a face feature).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} - */ - public static final class Landmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - LandmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Landmark.newBuilder() to construct. - private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Landmark() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Landmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Landmark( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - com.google.cloud.vision.v1p2beta1.Position.Builder subBuilder = null; - if (position_ != null) { - subBuilder = position_.toBuilder(); - } - position_ = input.readMessage(com.google.cloud.vision.v1p2beta1.Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(position_); - position_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder.class); - } - - /** - *
-     * Face landmark (feature) type.
-     * Left and right are defined from the vantage of the viewer of the image
-     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
-     * typically, is the person's right eye.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - UNKNOWN_LANDMARK(0), - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - LEFT_EYE(1), - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - RIGHT_EYE(2), - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - LEFT_OF_LEFT_EYEBROW(3), - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - RIGHT_OF_LEFT_EYEBROW(4), - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - LEFT_OF_RIGHT_EYEBROW(5), - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - RIGHT_OF_RIGHT_EYEBROW(6), - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - MIDPOINT_BETWEEN_EYES(7), - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - NOSE_TIP(8), - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - UPPER_LIP(9), - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - LOWER_LIP(10), - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - MOUTH_LEFT(11), - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - MOUTH_RIGHT(12), - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - MOUTH_CENTER(13), - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - NOSE_BOTTOM_RIGHT(14), - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - NOSE_BOTTOM_LEFT(15), - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - NOSE_BOTTOM_CENTER(16), - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - LEFT_EYE_TOP_BOUNDARY(17), - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - LEFT_EYE_RIGHT_CORNER(18), - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - LEFT_EYE_BOTTOM_BOUNDARY(19), - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - LEFT_EYE_LEFT_CORNER(20), - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - RIGHT_EYE_TOP_BOUNDARY(21), - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - RIGHT_EYE_RIGHT_CORNER(22), - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - RIGHT_EYE_BOTTOM_BOUNDARY(23), - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - RIGHT_EYE_LEFT_CORNER(24), - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - LEFT_EYEBROW_UPPER_MIDPOINT(25), - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - RIGHT_EYEBROW_UPPER_MIDPOINT(26), - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - LEFT_EAR_TRAGION(27), - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - RIGHT_EAR_TRAGION(28), - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - LEFT_EYE_PUPIL(29), - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - RIGHT_EYE_PUPIL(30), - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - FOREHEAD_GLABELLA(31), - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - CHIN_GNATHION(32), - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - CHIN_LEFT_GONION(33), - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - CHIN_RIGHT_GONION(34), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - public static final int UNKNOWN_LANDMARK_VALUE = 0; - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - public static final int LEFT_EYE_VALUE = 1; - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - public static final int RIGHT_EYE_VALUE = 2; - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - public static final int NOSE_TIP_VALUE = 8; - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - public static final int UPPER_LIP_VALUE = 9; - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - public static final int LOWER_LIP_VALUE = 10; - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - public static final int MOUTH_LEFT_VALUE = 11; - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - public static final int MOUTH_RIGHT_VALUE = 12; - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - public static final int MOUTH_CENTER_VALUE = 13; - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - public static final int NOSE_BOTTOM_LEFT_VALUE = 15; - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - public static final int NOSE_BOTTOM_CENTER_VALUE = 16; - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - public static final int LEFT_EAR_TRAGION_VALUE = 27; - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - public static final int RIGHT_EAR_TRAGION_VALUE = 28; - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - public static final int LEFT_EYE_PUPIL_VALUE = 29; - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - public static final int RIGHT_EYE_PUPIL_VALUE = 30; - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - public static final int FOREHEAD_GLABELLA_VALUE = 31; - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - public static final int CHIN_GNATHION_VALUE = 32; - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - public static final int CHIN_LEFT_GONION_VALUE = 33; - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - public static final int CHIN_RIGHT_GONION_VALUE = 34; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN_LANDMARK; - case 1: return LEFT_EYE; - case 2: return RIGHT_EYE; - case 3: return LEFT_OF_LEFT_EYEBROW; - case 4: return RIGHT_OF_LEFT_EYEBROW; - case 5: return LEFT_OF_RIGHT_EYEBROW; - case 6: return RIGHT_OF_RIGHT_EYEBROW; - case 7: return MIDPOINT_BETWEEN_EYES; - case 8: return NOSE_TIP; - case 9: return UPPER_LIP; - case 10: return LOWER_LIP; - case 11: return MOUTH_LEFT; - case 12: return MOUTH_RIGHT; - case 13: return MOUTH_CENTER; - case 14: return NOSE_BOTTOM_RIGHT; - case 15: return NOSE_BOTTOM_LEFT; - case 16: return NOSE_BOTTOM_CENTER; - case 17: return LEFT_EYE_TOP_BOUNDARY; - case 18: return LEFT_EYE_RIGHT_CORNER; - case 19: return LEFT_EYE_BOTTOM_BOUNDARY; - case 20: return LEFT_EYE_LEFT_CORNER; - case 21: return RIGHT_EYE_TOP_BOUNDARY; - case 22: return RIGHT_EYE_RIGHT_CORNER; - case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; - case 24: return RIGHT_EYE_LEFT_CORNER; - case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; - case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; - case 27: return LEFT_EAR_TRAGION; - case 28: return RIGHT_EAR_TRAGION; - case 29: return LEFT_EYE_PUPIL; - case 30: return RIGHT_EYE_PUPIL; - case 31: return FOREHEAD_GLABELLA; - case 32: return CHIN_GNATHION; - case 33: return CHIN_LEFT_GONION; - case 34: return CHIN_RIGHT_GONION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type) - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - - public static final int POSITION_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p2beta1.Position position_; - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return Whether the position field is set. - */ - @java.lang.Override - public boolean hasPosition() { - return position_ != null; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return The position. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Position getPosition() { - return position_ == null ? com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder() { - return getPosition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - output.writeEnum(3, type_); - } - if (position_ != null) { - output.writeMessage(4, getPosition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (position_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPosition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) obj; - - if (type_ != other.type_) return false; - if (hasPosition() != other.hasPosition()) return false; - if (hasPosition()) { - if (!getPosition() - .equals(other.getPosition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasPosition()) { - hash = (37 * hash) + POSITION_FIELD_NUMBER; - hash = (53 * hash) + getPosition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A face-specific landmark (for example, a face feature).
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (positionBuilder_ == null) { - position_ = null; - } else { - position_ = null; - positionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark build() { - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark buildPartial() { - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark(this); - result.type_ = type_; - if (positionBuilder_ == null) { - result.position_ = position_; - } else { - result.position_ = positionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark other) { - if (other == com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasPosition()) { - mergePosition(other.getPosition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p2beta1.Position position_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder> positionBuilder_; - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return Whether the position field is set. - */ - public boolean hasPosition() { - return positionBuilder_ != null || position_ != null; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - * @return The position. - */ - public com.google.cloud.vision.v1p2beta1.Position getPosition() { - if (positionBuilder_ == null) { - return position_ == null ? com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; - } else { - return positionBuilder_.getMessage(); - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public Builder setPosition(com.google.cloud.vision.v1p2beta1.Position value) { - if (positionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - position_ = value; - onChanged(); - } else { - positionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public Builder setPosition( - com.google.cloud.vision.v1p2beta1.Position.Builder builderForValue) { - if (positionBuilder_ == null) { - position_ = builderForValue.build(); - onChanged(); - } else { - positionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public Builder mergePosition(com.google.cloud.vision.v1p2beta1.Position value) { - if (positionBuilder_ == null) { - if (position_ != null) { - position_ = - com.google.cloud.vision.v1p2beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); - } else { - position_ = value; - } - onChanged(); - } else { - positionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public Builder clearPosition() { - if (positionBuilder_ == null) { - position_ = null; - onChanged(); - } else { - position_ = null; - positionBuilder_ = null; - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p2beta1.Position.Builder getPositionBuilder() { - - onChanged(); - return getPositionFieldBuilder().getBuilder(); - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder() { - if (positionBuilder_ != null) { - return positionBuilder_.getMessageOrBuilder(); - } else { - return position_ == null ? - com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance() : position_; - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p2beta1.Position position = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder> - getPositionFieldBuilder() { - if (positionBuilder_ == null) { - positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, com.google.cloud.vision.v1p2beta1.PositionOrBuilder>( - getPosition(), - getParentForChildren(), - isClean()); - position_ = null; - } - return positionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - private static final com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark(); - } - - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Landmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Landmark(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_; - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - @java.lang.Override - public boolean hasFdBoundingPoly() { - return fdBoundingPoly_ != null; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly() { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - return getFdBoundingPoly(); - } - - public static final int LANDMARKS_FIELD_NUMBER = 3; - private java.util.List landmarks_; - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List getLandmarksList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List - getLandmarksOrBuilderList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public int getLandmarksCount() { - return landmarks_.size(); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index) { - return landmarks_.get(index); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - return landmarks_.get(index); - } - - public static final int ROLL_ANGLE_FIELD_NUMBER = 4; - private float rollAngle_; - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - - public static final int PAN_ANGLE_FIELD_NUMBER = 5; - private float panAngle_; - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - - public static final int TILT_ANGLE_FIELD_NUMBER = 6; - private float tiltAngle_; - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - - public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; - private float detectionConfidence_; - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - - public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; - private float landmarkingConfidence_; - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - - public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; - private int joyLikelihood_; - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; - private int sorrowLikelihood_; - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; - private int angerLikelihood_; - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; - private int surpriseLikelihood_; - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; - private int underExposedLikelihood_; - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; - private int blurredLikelihood_; - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; - private int headwearLikelihood_; - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - output.writeMessage(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - output.writeMessage(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - output.writeFloat(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - output.writeFloat(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - output.writeFloat(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - output.writeFloat(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - output.writeFloat(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(15, headwearLikelihood_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, headwearLikelihood_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.FaceAnnotation other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; - if (hasFdBoundingPoly()) { - if (!getFdBoundingPoly() - .equals(other.getFdBoundingPoly())) return false; - } - if (!getLandmarksList() - .equals(other.getLandmarksList())) return false; - if (java.lang.Float.floatToIntBits(getRollAngle()) - != java.lang.Float.floatToIntBits( - other.getRollAngle())) return false; - if (java.lang.Float.floatToIntBits(getPanAngle()) - != java.lang.Float.floatToIntBits( - other.getPanAngle())) return false; - if (java.lang.Float.floatToIntBits(getTiltAngle()) - != java.lang.Float.floatToIntBits( - other.getTiltAngle())) return false; - if (java.lang.Float.floatToIntBits(getDetectionConfidence()) - != java.lang.Float.floatToIntBits( - other.getDetectionConfidence())) return false; - if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - != java.lang.Float.floatToIntBits( - other.getLandmarkingConfidence())) return false; - if (joyLikelihood_ != other.joyLikelihood_) return false; - if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; - if (angerLikelihood_ != other.angerLikelihood_) return false; - if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; - if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; - if (blurredLikelihood_ != other.blurredLikelihood_) return false; - if (headwearLikelihood_ != other.headwearLikelihood_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (hasFdBoundingPoly()) { - hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getFdBoundingPoly().hashCode(); - } - if (getLandmarksCount() > 0) { - hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarksList().hashCode(); - } - hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRollAngle()); - hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPanAngle()); - hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTiltAngle()); - hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getDetectionConfidence()); - hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLandmarkingConfidence()); - hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + joyLikelihood_; - hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + sorrowLikelihood_; - hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + angerLikelihood_; - hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + surpriseLikelihood_; - hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + underExposedLikelihood_; - hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + blurredLikelihood_; - hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + headwearLikelihood_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.FaceAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A face annotation object contains the results of face detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.FaceAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.FaceAnnotation) - com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.class, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.FaceAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLandmarksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - landmarksBuilder_.clear(); - } - rollAngle_ = 0F; - - panAngle_ = 0F; - - tiltAngle_ = 0F; - - detectionConfidence_ = 0F; - - landmarkingConfidence_ = 0F; - - joyLikelihood_ = 0; - - sorrowLikelihood_ = 0; - - angerLikelihood_ = 0; - - surpriseLikelihood_ = 0; - - underExposedLikelihood_ = 0; - - blurredLikelihood_ = 0; - - headwearLikelihood_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation build() { - com.google.cloud.vision.v1p2beta1.FaceAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.FaceAnnotation result = new com.google.cloud.vision.v1p2beta1.FaceAnnotation(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (fdBoundingPolyBuilder_ == null) { - result.fdBoundingPoly_ = fdBoundingPoly_; - } else { - result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); - } - if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.landmarks_ = landmarks_; - } else { - result.landmarks_ = landmarksBuilder_.build(); - } - result.rollAngle_ = rollAngle_; - result.panAngle_ = panAngle_; - result.tiltAngle_ = tiltAngle_; - result.detectionConfidence_ = detectionConfidence_; - result.landmarkingConfidence_ = landmarkingConfidence_; - result.joyLikelihood_ = joyLikelihood_; - result.sorrowLikelihood_ = sorrowLikelihood_; - result.angerLikelihood_ = angerLikelihood_; - result.surpriseLikelihood_ = surpriseLikelihood_; - result.underExposedLikelihood_ = underExposedLikelihood_; - result.blurredLikelihood_ = blurredLikelihood_; - result.headwearLikelihood_ = headwearLikelihood_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.FaceAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.FaceAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.FaceAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.FaceAnnotation.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.hasFdBoundingPoly()) { - mergeFdBoundingPoly(other.getFdBoundingPoly()); - } - if (landmarksBuilder_ == null) { - if (!other.landmarks_.isEmpty()) { - if (landmarks_.isEmpty()) { - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLandmarksIsMutable(); - landmarks_.addAll(other.landmarks_); - } - onChanged(); - } - } else { - if (!other.landmarks_.isEmpty()) { - if (landmarksBuilder_.isEmpty()) { - landmarksBuilder_.dispose(); - landmarksBuilder_ = null; - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - landmarksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarksFieldBuilder() : null; - } else { - landmarksBuilder_.addAllMessages(other.landmarks_); - } - } - } - if (other.getRollAngle() != 0F) { - setRollAngle(other.getRollAngle()); - } - if (other.getPanAngle() != 0F) { - setPanAngle(other.getPanAngle()); - } - if (other.getTiltAngle() != 0F) { - setTiltAngle(other.getTiltAngle()); - } - if (other.getDetectionConfidence() != 0F) { - setDetectionConfidence(other.getDetectionConfidence()); - } - if (other.getLandmarkingConfidence() != 0F) { - setLandmarkingConfidence(other.getLandmarkingConfidence()); - } - if (other.joyLikelihood_ != 0) { - setJoyLikelihoodValue(other.getJoyLikelihoodValue()); - } - if (other.sorrowLikelihood_ != 0) { - setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); - } - if (other.angerLikelihood_ != 0) { - setAngerLikelihoodValue(other.getAngerLikelihoodValue()); - } - if (other.surpriseLikelihood_ != 0) { - setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); - } - if (other.underExposedLikelihood_ != 0) { - setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); - } - if (other.blurredLikelihood_ != 0) { - setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); - } - if (other.headwearLikelihood_ != 0) { - setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.FaceAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.FaceAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - public boolean hasFdBoundingPoly() { - return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } else { - return fdBoundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdBoundingPoly_ = value; - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = builderForValue.build(); - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (fdBoundingPoly_ != null) { - fdBoundingPoly_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); - } else { - fdBoundingPoly_ = value; - } - onChanged(); - } else { - fdBoundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder clearFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - onChanged(); - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { - - onChanged(); - return getFdBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - if (fdBoundingPolyBuilder_ != null) { - return fdBoundingPolyBuilder_.getMessageOrBuilder(); - } else { - return fdBoundingPoly_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getFdBoundingPolyFieldBuilder() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getFdBoundingPoly(), - getParentForChildren(), - isClean()); - fdBoundingPoly_ = null; - } - return fdBoundingPolyBuilder_; - } - - private java.util.List landmarks_ = - java.util.Collections.emptyList(); - private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(landmarks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; - - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List getLandmarksList() { - if (landmarksBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarks_); - } else { - return landmarksBuilder_.getMessageList(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public int getLandmarksCount() { - if (landmarksBuilder_ == null) { - return landmarks_.size(); - } else { - return landmarksBuilder_.getCount(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); - } else { - return landmarksBuilder_.getMessage(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.set(index, value); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks(com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(value); - onChanged(); - } else { - landmarksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(index, value); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addAllLandmarks( - java.lang.Iterable values) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarks_); - onChanged(); - } else { - landmarksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder clearLandmarks() { - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - landmarksBuilder_.clear(); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder removeLandmarks(int index) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.remove(index); - onChanged(); - } else { - landmarksBuilder_.remove(index); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().getBuilder(index); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); } else { - return landmarksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksOrBuilderList() { - if (landmarksBuilder_ != null) { - return landmarksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarks_); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { - return getLandmarksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksBuilderList() { - return getLandmarksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder> - getLandmarksFieldBuilder() { - if (landmarksBuilder_ == null) { - landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - landmarks_ = null; - } - return landmarksBuilder_; - } - - private float rollAngle_ ; - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @param value The rollAngle to set. - * @return This builder for chaining. - */ - public Builder setRollAngle(float value) { - - rollAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return This builder for chaining. - */ - public Builder clearRollAngle() { - - rollAngle_ = 0F; - onChanged(); - return this; - } - - private float panAngle_ ; - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @param value The panAngle to set. - * @return This builder for chaining. - */ - public Builder setPanAngle(float value) { - - panAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return This builder for chaining. - */ - public Builder clearPanAngle() { - - panAngle_ = 0F; - onChanged(); - return this; - } - - private float tiltAngle_ ; - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @param value The tiltAngle to set. - * @return This builder for chaining. - */ - public Builder setTiltAngle(float value) { - - tiltAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return This builder for chaining. - */ - public Builder clearTiltAngle() { - - tiltAngle_ = 0F; - onChanged(); - return this; - } - - private float detectionConfidence_ ; - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @param value The detectionConfidence to set. - * @return This builder for chaining. - */ - public Builder setDetectionConfidence(float value) { - - detectionConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return This builder for chaining. - */ - public Builder clearDetectionConfidence() { - - detectionConfidence_ = 0F; - onChanged(); - return this; - } - - private float landmarkingConfidence_ ; - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @param value The landmarkingConfidence to set. - * @return This builder for chaining. - */ - public Builder setLandmarkingConfidence(float value) { - - landmarkingConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return This builder for chaining. - */ - public Builder clearLandmarkingConfidence() { - - landmarkingConfidence_ = 0F; - onChanged(); - return this; - } - - private int joyLikelihood_ = 0; - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @param value The enum numeric value on the wire for joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihoodValue(int value) { - - joyLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @param value The joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - joyLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return This builder for chaining. - */ - public Builder clearJoyLikelihood() { - - joyLikelihood_ = 0; - onChanged(); - return this; - } - - private int sorrowLikelihood_ = 0; - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @param value The enum numeric value on the wire for sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihoodValue(int value) { - - sorrowLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @param value The sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - sorrowLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return This builder for chaining. - */ - public Builder clearSorrowLikelihood() { - - sorrowLikelihood_ = 0; - onChanged(); - return this; - } - - private int angerLikelihood_ = 0; - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @param value The enum numeric value on the wire for angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihoodValue(int value) { - - angerLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @param value The angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - angerLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return This builder for chaining. - */ - public Builder clearAngerLikelihood() { - - angerLikelihood_ = 0; - onChanged(); - return this; - } - - private int surpriseLikelihood_ = 0; - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @param value The enum numeric value on the wire for surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihoodValue(int value) { - - surpriseLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @param value The surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - surpriseLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return This builder for chaining. - */ - public Builder clearSurpriseLikelihood() { - - surpriseLikelihood_ = 0; - onChanged(); - return this; - } - - private int underExposedLikelihood_ = 0; - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @param value The enum numeric value on the wire for underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihoodValue(int value) { - - underExposedLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @param value The underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - underExposedLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return This builder for chaining. - */ - public Builder clearUnderExposedLikelihood() { - - underExposedLikelihood_ = 0; - onChanged(); - return this; - } - - private int blurredLikelihood_ = 0; - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @param value The enum numeric value on the wire for blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihoodValue(int value) { - - blurredLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @param value The blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - blurredLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return This builder for chaining. - */ - public Builder clearBlurredLikelihood() { - - blurredLikelihood_ = 0; - onChanged(); - return this; - } - - private int headwearLikelihood_ = 0; - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @param value The enum numeric value on the wire for headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihoodValue(int value) { - - headwearLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @param value The headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - headwearLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return This builder for chaining. - */ - public Builder clearHeadwearLikelihood() { - - headwearLikelihood_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.FaceAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation) - private static final com.google.cloud.vision.v1p2beta1.FaceAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.FaceAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.FaceAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java deleted file mode 100644 index 84e2c7755766..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotationOrBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface FaceAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.FaceAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - boolean hasFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); - - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark getLandmarks(int index); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - int getLandmarksCount(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksOrBuilderList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index); - - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - float getRollAngle(); - - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - float getPanAngle(); - - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - float getTiltAngle(); - - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - float getDetectionConfidence(); - - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - float getLandmarkingConfidence(); - - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - int getJoyLikelihoodValue(); - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getJoyLikelihood(); - - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - int getSorrowLikelihoodValue(); - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getSorrowLikelihood(); - - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - int getAngerLikelihoodValue(); - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getAngerLikelihood(); - - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - int getSurpriseLikelihoodValue(); - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getSurpriseLikelihood(); - - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - int getUnderExposedLikelihoodValue(); - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getUnderExposedLikelihood(); - - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - int getBlurredLikelihoodValue(); - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getBlurredLikelihood(); - - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - int getHeadwearLikelihoodValue(); - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getHeadwearLikelihood(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java deleted file mode 100644 index 6086c3e620f2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java +++ /dev/null @@ -1,1119 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The type of Google Cloud Vision API detection to perform, and the maximum
- * number of results to return for that type. Multiple `Feature` objects can
- * be specified in the `features` list.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Feature} - */ -public final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Feature) - FeatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feature.newBuilder() to construct. - private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feature() { - type_ = 0; - model_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - maxResults_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - model_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Feature.class, com.google.cloud.vision.v1p2beta1.Feature.Builder.class); - } - - /** - *
-   * Type of Google Cloud Vision API feature to be extracted.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.Feature.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - FACE_DETECTION(1), - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - LANDMARK_DETECTION(2), - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - LOGO_DETECTION(3), - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - LABEL_DETECTION(4), - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - TEXT_DETECTION(5), - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - DOCUMENT_TEXT_DETECTION(11), - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - SAFE_SEARCH_DETECTION(6), - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - IMAGE_PROPERTIES(7), - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - CROP_HINTS(9), - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - WEB_DETECTION(10), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - public static final int FACE_DETECTION_VALUE = 1; - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - public static final int LANDMARK_DETECTION_VALUE = 2; - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - public static final int LOGO_DETECTION_VALUE = 3; - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - public static final int LABEL_DETECTION_VALUE = 4; - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - public static final int TEXT_DETECTION_VALUE = 5; - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - public static final int SAFE_SEARCH_DETECTION_VALUE = 6; - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - public static final int IMAGE_PROPERTIES_VALUE = 7; - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - public static final int CROP_HINTS_VALUE = 9; - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - public static final int WEB_DETECTION_VALUE = 10; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return FACE_DETECTION; - case 2: return LANDMARK_DETECTION; - case 3: return LOGO_DETECTION; - case 4: return LABEL_DETECTION; - case 5: return TEXT_DETECTION; - case 11: return DOCUMENT_TEXT_DETECTION; - case 6: return SAFE_SEARCH_DETECTION; - case 7: return IMAGE_PROPERTIES; - case 9: return CROP_HINTS; - case 10: return WEB_DETECTION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.Feature.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Feature.Type) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Feature.Type result = com.google.cloud.vision.v1p2beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.Feature.Type.UNRECOGNIZED : result; - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 2; - private int maxResults_; - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int MODEL_FIELD_NUMBER = 3; - private volatile java.lang.Object model_; - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } - } - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p2beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (maxResults_ != 0) { - output.writeInt32(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p2beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Feature)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Feature other = (com.google.cloud.vision.v1p2beta1.Feature) obj; - - if (type_ != other.type_) return false; - if (getMaxResults() - != other.getMaxResults()) return false; - if (!getModel() - .equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Feature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The type of Google Cloud Vision API detection to perform, and the maximum
-   * number of results to return for that type. Multiple `Feature` objects can
-   * be specified in the `features` list.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Feature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Feature) - com.google.cloud.vision.v1p2beta1.FeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Feature.class, com.google.cloud.vision.v1p2beta1.Feature.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Feature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - maxResults_ = 0; - - model_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature build() { - com.google.cloud.vision.v1p2beta1.Feature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature buildPartial() { - com.google.cloud.vision.v1p2beta1.Feature result = new com.google.cloud.vision.v1p2beta1.Feature(this); - result.type_ = type_; - result.maxResults_ = maxResults_; - result.model_ = model_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Feature) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Feature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Feature other) { - if (other == com.google.cloud.vision.v1p2beta1.Feature.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Feature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Feature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Feature.Type result = com.google.cloud.vision.v1p2beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.Feature.Type.UNRECOGNIZED : result; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p2beta1.Feature.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int maxResults_ ; - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The bytes for model. - */ - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - model_ = value; - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return This builder for chaining. - */ - public Builder clearModel() { - - model_ = getDefaultInstance().getModel(); - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - model_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Feature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Feature) - private static final com.google.cloud.vision.v1p2beta1.Feature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Feature(); - } - - public static com.google.cloud.vision.v1p2beta1.Feature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Feature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java deleted file mode 100644 index f7c622a66b50..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FeatureOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Feature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Feature.Type type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p2beta1.Feature.Type getType(); - - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - int getMaxResults(); - - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - java.lang.String getModel(); - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - com.google.protobuf.ByteString - getModelBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java deleted file mode 100644 index 45689a4ff3e0..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java +++ /dev/null @@ -1,672 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The Google Cloud Storage location where the output will be written to.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.GcsDestination.class, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.GcsDestination other = (com.google.cloud.vision.v1p2beta1.GcsDestination) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the output will be written to.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.GcsDestination) - com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.GcsDestination.class, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestination build() { - com.google.cloud.vision.v1p2beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestination buildPartial() { - com.google.cloud.vision.v1p2beta1.GcsDestination result = new com.google.cloud.vision.v1p2beta1.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.GcsDestination) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.GcsDestination other) { - if (other == com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsDestination) - private static final com.google.cloud.vision.v1p2beta1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.GcsDestination(); - } - - public static com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index 43add1f4d65a..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java deleted file mode 100644 index 35f4b9c6f64a..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The Google Cloud Storage location where the input will be read from.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsSource} - */ -public final class GcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.GcsSource) - GcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsSource() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.GcsSource.class, com.google.cloud.vision.v1p2beta1.GcsSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a GCS
-   * object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a GCS
-   * object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.GcsSource other = (com.google.cloud.vision.v1p2beta1.GcsSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the input will be read from.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.GcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.GcsSource) - com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.GcsSource.class, com.google.cloud.vision.v1p2beta1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSource build() { - com.google.cloud.vision.v1p2beta1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSource buildPartial() { - com.google.cloud.vision.v1p2beta1.GcsSource result = new com.google.cloud.vision.v1p2beta1.GcsSource(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.GcsSource) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.GcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.GcsSource other) { - if (other == com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a GCS
-     * object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a GCS
-     * object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a GCS
-     * object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a GCS
-     * object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a GCS
-     * object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsSource) - private static final com.google.cloud.vision.v1p2beta1.GcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.GcsSource(); - } - - public static com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java deleted file mode 100644 index 5a6aa6e02552..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface GcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a GCS
-   * object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a GCS
-   * object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java deleted file mode 100644 index 7a71f64d4d27..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GeometryProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -public final class GeometryProto { - private GeometryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1p2beta1/geometry" + - ".proto\022\035google.cloud.vision.v1p2beta1\"\036\n" + - "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + - "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + - "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + - "d.vision.v1p2beta1.Vertex\022L\n\023normalized_" + - "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + - "2beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + - "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B|\n!com.goog" + - "le.cloud.vision.v1p2beta1B\rGeometryProto" + - "P\001ZCgoogle.golang.org/genproto/googleapi" + - "s/cloud/vision/v1p2beta1;vision\370\001\001b\006prot" + - "o3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_BoundingPoly_descriptor, - new java.lang.String[] { "Vertices", "NormalizedVertices", }); - internal_static_google_cloud_vision_v1p2beta1_Position_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Position_descriptor, - new java.lang.String[] { "X", "Y", "Z", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java deleted file mode 100644 index c69354d21f4d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java +++ /dev/null @@ -1,781 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Client image to perform Google Cloud Vision API tasks over.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Image} - */ -public final class Image extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Image) - ImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Image() { - content_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - content_ = input.readBytes(); - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.ImageSource.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.vision.v1p2beta1.ImageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Image.class, com.google.cloud.vision.v1p2beta1.Image.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString content_; - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.ImageSource source_; - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSource getSource() { - return source_ == null ? com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!content_.isEmpty()) { - output.writeBytes(1, content_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, content_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Image)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Image other = (com.google.cloud.vision.v1p2beta1.Image) obj; - - if (!getContent() - .equals(other.getContent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Client image to perform Google Cloud Vision API tasks over.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Image) - com.google.cloud.vision.v1p2beta1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Image.class, com.google.cloud.vision.v1p2beta1.Image.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = com.google.protobuf.ByteString.EMPTY; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Image getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Image build() { - com.google.cloud.vision.v1p2beta1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Image buildPartial() { - com.google.cloud.vision.v1p2beta1.Image result = new com.google.cloud.vision.v1p2beta1.Image(this); - result.content_ = content_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Image) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Image other) { - if (other == com.google.cloud.vision.v1p2beta1.Image.getDefaultInstance()) return this; - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p2beta1.ImageSource source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder> sourceBuilder_; - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return The source. - */ - public com.google.cloud.vision.v1p2beta1.ImageSource getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public Builder setSource(com.google.cloud.vision.v1p2beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public Builder setSource( - com.google.cloud.vision.v1p2beta1.ImageSource.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public Builder mergeSource(com.google.cloud.vision.v1p2beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.vision.v1p2beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p2beta1.ImageSource.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance() : source_; - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Image) - private static final com.google.cloud.vision.v1p2beta1.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Image(); - } - - public static com.google.cloud.vision.v1p2beta1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java deleted file mode 100644 index 003d2004acdf..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java +++ /dev/null @@ -1,681 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * If an image was produced from a file (e.g. a PDF), this message gives
- * information about the source of that image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageAnnotationContext} - */ -public final class ImageAnnotationContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - ImageAnnotationContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageAnnotationContext.newBuilder() to construct. - private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageAnnotationContext() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageAnnotationContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageAnnotationContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 16: { - - pageNumber_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 2; - private int pageNumber_; - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - if (pageNumber_ != 0) { - output.writeInt32(2, pageNumber_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageNumber_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageAnnotationContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (getPageNumber() - != other.getPageNumber()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * If an image was produced from a file (e.g. a PDF), this message gives
-   * information about the source of that image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageAnnotationContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - pageNumber_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext build() { - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext buildPartial() { - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p2beta1.ImageAnnotationContext(this); - result.uri_ = uri_; - result.pageNumber_ = pageNumber_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageAnnotationContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageAnnotationContext other) { - if (other == com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.ImageAnnotationContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private int pageNumber_ ; - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - - pageNumber_ = value; - onChanged(); - return this; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - - pageNumber_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - private static final com.google.cloud.vision.v1p2beta1.ImageAnnotationContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageAnnotationContext(); - } - - public static com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageAnnotationContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageAnnotationContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java deleted file mode 100644 index 52853ae62f0e..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContextOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ImageAnnotationContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - int getPageNumber(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java deleted file mode 100644 index 802ad3341f96..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorProto.java +++ /dev/null @@ -1,645 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public final class ImageAnnotatorProto { - private ImageAnnotatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Image_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p2beta1/image_an" + - "notator.proto\022\035google.cloud.vision.v1p2b" + - "eta1\032\034google/api/annotations.proto\032\027goog" + - "le/api/client.proto\032\037google/api/field_be" + - "havior.proto\032,google/cloud/vision/v1p2be" + - "ta1/geometry.proto\0323google/cloud/vision/" + - "v1p2beta1/text_annotation.proto\0321google/" + - "cloud/vision/v1p2beta1/web_detection.pro" + - "to\032#google/longrunning/operations.proto\032" + - "\037google/protobuf/timestamp.proto\032\027google" + - "/rpc/status.proto\032\027google/type/color.pro" + - "to\032\030google/type/latlng.proto\"\341\002\n\007Feature" + - "\0229\n\004type\030\001 \001(\0162+.google.cloud.vision.v1p" + - "2beta1.Feature.Type\022\023\n\013max_results\030\002 \001(\005" + - "\022\r\n\005model\030\003 \001(\t\"\366\001\n\004Type\022\024\n\020TYPE_UNSPECI" + - "FIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026\n\022LANDMARK_D" + - "ETECTION\020\002\022\022\n\016LOGO_DETECTION\020\003\022\023\n\017LABEL_" + - "DETECTION\020\004\022\022\n\016TEXT_DETECTION\020\005\022\033\n\027DOCUM" + - "ENT_TEXT_DETECTION\020\013\022\031\n\025SAFE_SEARCH_DETE" + - "CTION\020\006\022\024\n\020IMAGE_PROPERTIES\020\007\022\016\n\nCROP_HI" + - "NTS\020\t\022\021\n\rWEB_DETECTION\020\n\"7\n\013ImageSource\022" + - "\025\n\rgcs_image_uri\030\001 \001(\t\022\021\n\timage_uri\030\002 \001(" + - "\t\"T\n\005Image\022\017\n\007content\030\001 \001(\014\022:\n\006source\030\002 " + - "\001(\0132*.google.cloud.vision.v1p2beta1.Imag" + - "eSource\"\233\016\n\016FaceAnnotation\022B\n\rbounding_p" + - "oly\030\001 \001(\0132+.google.cloud.vision.v1p2beta" + - "1.BoundingPoly\022E\n\020fd_bounding_poly\030\002 \001(\013" + - "2+.google.cloud.vision.v1p2beta1.Boundin" + - "gPoly\022I\n\tlandmarks\030\003 \003(\01326.google.cloud." + - "vision.v1p2beta1.FaceAnnotation.Landmark" + - "\022\022\n\nroll_angle\030\004 \001(\002\022\021\n\tpan_angle\030\005 \001(\002\022" + - "\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024detection_confide" + - "nce\030\007 \001(\002\022\036\n\026landmarking_confidence\030\010 \001(" + - "\002\022A\n\016joy_likelihood\030\t \001(\0162).google.cloud" + - ".vision.v1p2beta1.Likelihood\022D\n\021sorrow_l" + - "ikelihood\030\n \001(\0162).google.cloud.vision.v1" + - "p2beta1.Likelihood\022C\n\020anger_likelihood\030\013" + - " \001(\0162).google.cloud.vision.v1p2beta1.Lik" + - "elihood\022F\n\023surprise_likelihood\030\014 \001(\0162).g" + - "oogle.cloud.vision.v1p2beta1.Likelihood\022" + - "K\n\030under_exposed_likelihood\030\r \001(\0162).goog" + - "le.cloud.vision.v1p2beta1.Likelihood\022E\n\022" + - "blurred_likelihood\030\016 \001(\0162).google.cloud." + - "vision.v1p2beta1.Likelihood\022F\n\023headwear_" + - "likelihood\030\017 \001(\0162).google.cloud.vision.v" + - "1p2beta1.Likelihood\032\307\007\n\010Landmark\022I\n\004type" + - "\030\003 \001(\0162;.google.cloud.vision.v1p2beta1.F" + - "aceAnnotation.Landmark.Type\0229\n\010position\030" + - "\004 \001(\0132\'.google.cloud.vision.v1p2beta1.Po" + - "sition\"\264\006\n\004Type\022\024\n\020UNKNOWN_LANDMARK\020\000\022\014\n" + - "\010LEFT_EYE\020\001\022\r\n\tRIGHT_EYE\020\002\022\030\n\024LEFT_OF_LE" + - "FT_EYEBROW\020\003\022\031\n\025RIGHT_OF_LEFT_EYEBROW\020\004\022" + - "\031\n\025LEFT_OF_RIGHT_EYEBROW\020\005\022\032\n\026RIGHT_OF_R" + - "IGHT_EYEBROW\020\006\022\031\n\025MIDPOINT_BETWEEN_EYES\020" + - "\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPER_LIP\020\t\022\r\n\tLOWER_" + - "LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020" + - "\n\014MOUTH_CENTER\020\r\022\025\n\021NOSE_BOTTOM_RIGHT\020\016\022" + - "\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026\n\022NOSE_BOTTOM_CEN" + - "TER\020\020\022\031\n\025LEFT_EYE_TOP_BOUNDARY\020\021\022\031\n\025LEFT" + - "_EYE_RIGHT_CORNER\020\022\022\034\n\030LEFT_EYE_BOTTOM_B" + - "OUNDARY\020\023\022\030\n\024LEFT_EYE_LEFT_CORNER\020\024\022\032\n\026R" + - "IGHT_EYE_TOP_BOUNDARY\020\025\022\032\n\026RIGHT_EYE_RIG" + - "HT_CORNER\020\026\022\035\n\031RIGHT_EYE_BOTTOM_BOUNDARY" + - "\020\027\022\031\n\025RIGHT_EYE_LEFT_CORNER\020\030\022\037\n\033LEFT_EY" + - "EBROW_UPPER_MIDPOINT\020\031\022 \n\034RIGHT_EYEBROW_" + - "UPPER_MIDPOINT\020\032\022\024\n\020LEFT_EAR_TRAGION\020\033\022\025" + - "\n\021RIGHT_EAR_TRAGION\020\034\022\022\n\016LEFT_EYE_PUPIL\020" + - "\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022\025\n\021FOREHEAD_GLABE" + - "LLA\020\037\022\021\n\rCHIN_GNATHION\020 \022\024\n\020CHIN_LEFT_GO" + - "NION\020!\022\025\n\021CHIN_RIGHT_GONION\020\"\"4\n\014Locatio" + - "nInfo\022$\n\007lat_lng\030\001 \001(\0132\023.google.type.Lat" + - "Lng\"=\n\010Property\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002" + - " \001(\t\022\024\n\014uint64_value\030\003 \001(\004\"\274\002\n\020EntityAnn" + - "otation\022\013\n\003mid\030\001 \001(\t\022\016\n\006locale\030\002 \001(\t\022\023\n\013" + - "description\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022\022\n\nconf" + - "idence\030\005 \001(\002\022\022\n\ntopicality\030\006 \001(\002\022B\n\rboun" + - "ding_poly\030\007 \001(\0132+.google.cloud.vision.v1" + - "p2beta1.BoundingPoly\022>\n\tlocations\030\010 \003(\0132" + - "+.google.cloud.vision.v1p2beta1.Location" + - "Info\022;\n\nproperties\030\t \003(\0132\'.google.cloud." + - "vision.v1p2beta1.Property\"\274\002\n\024SafeSearch" + - "Annotation\0228\n\005adult\030\001 \001(\0162).google.cloud" + - ".vision.v1p2beta1.Likelihood\0228\n\005spoof\030\002 " + - "\001(\0162).google.cloud.vision.v1p2beta1.Like" + - "lihood\022:\n\007medical\030\003 \001(\0162).google.cloud.v" + - "ision.v1p2beta1.Likelihood\022;\n\010violence\030\004" + - " \001(\0162).google.cloud.vision.v1p2beta1.Lik" + - "elihood\0227\n\004racy\030\t \001(\0162).google.cloud.vis" + - "ion.v1p2beta1.Likelihood\"a\n\013LatLongRect\022" + - "(\n\013min_lat_lng\030\001 \001(\0132\023.google.type.LatLn" + - "g\022(\n\013max_lat_lng\030\002 \001(\0132\023.google.type.Lat" + - "Lng\"U\n\tColorInfo\022!\n\005color\030\001 \001(\0132\022.google" + - ".type.Color\022\r\n\005score\030\002 \001(\002\022\026\n\016pixel_frac" + - "tion\030\003 \001(\002\"T\n\030DominantColorsAnnotation\0228" + - "\n\006colors\030\001 \003(\0132(.google.cloud.vision.v1p" + - "2beta1.ColorInfo\"c\n\017ImageProperties\022P\n\017d" + - "ominant_colors\030\001 \001(\01327.google.cloud.visi" + - "on.v1p2beta1.DominantColorsAnnotation\"\177\n" + - "\010CropHint\022B\n\rbounding_poly\030\001 \001(\0132+.googl" + - "e.cloud.vision.v1p2beta1.BoundingPoly\022\022\n" + - "\nconfidence\030\002 \001(\002\022\033\n\023importance_fraction" + - "\030\003 \001(\002\"R\n\023CropHintsAnnotation\022;\n\ncrop_hi" + - "nts\030\001 \003(\0132\'.google.cloud.vision.v1p2beta" + - "1.CropHint\"(\n\017CropHintsParams\022\025\n\raspect_" + - "ratios\030\001 \003(\002\"1\n\022WebDetectionParams\022\033\n\023in" + - "clude_geo_results\030\002 \001(\010\"c\n\023TextDetection" + - "Params\022.\n&enable_text_detection_confiden" + - "ce_score\030\t \001(\010\022\034\n\024advanced_ocr_options\030\013" + - " \003(\t\"\330\002\n\014ImageContext\022A\n\rlat_long_rect\030\001" + - " \001(\0132*.google.cloud.vision.v1p2beta1.Lat" + - "LongRect\022\026\n\016language_hints\030\002 \003(\t\022I\n\021crop" + - "_hints_params\030\004 \001(\0132..google.cloud.visio" + - "n.v1p2beta1.CropHintsParams\022O\n\024web_detec" + - "tion_params\030\006 \001(\01321.google.cloud.vision." + - "v1p2beta1.WebDetectionParams\022Q\n\025text_det" + - "ection_params\030\014 \001(\01322.google.cloud.visio" + - "n.v1p2beta1.TextDetectionParams\"\311\001\n\024Anno" + - "tateImageRequest\0223\n\005image\030\001 \001(\0132$.google" + - ".cloud.vision.v1p2beta1.Image\0228\n\010feature" + - "s\030\002 \003(\0132&.google.cloud.vision.v1p2beta1." + - "Feature\022B\n\rimage_context\030\003 \001(\0132+.google." + - "cloud.vision.v1p2beta1.ImageContext\":\n\026I" + - "mageAnnotationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013pa" + - "ge_number\030\002 \001(\005\"\212\007\n\025AnnotateImageRespons" + - "e\022G\n\020face_annotations\030\001 \003(\0132-.google.clo" + - "ud.vision.v1p2beta1.FaceAnnotation\022M\n\024la" + - "ndmark_annotations\030\002 \003(\0132/.google.cloud." + - "vision.v1p2beta1.EntityAnnotation\022I\n\020log" + - "o_annotations\030\003 \003(\0132/.google.cloud.visio" + - "n.v1p2beta1.EntityAnnotation\022J\n\021label_an" + - "notations\030\004 \003(\0132/.google.cloud.vision.v1" + - "p2beta1.EntityAnnotation\022I\n\020text_annotat" + - "ions\030\005 \003(\0132/.google.cloud.vision.v1p2bet" + - "a1.EntityAnnotation\022K\n\024full_text_annotat" + - "ion\030\014 \001(\0132-.google.cloud.vision.v1p2beta" + - "1.TextAnnotation\022S\n\026safe_search_annotati" + - "on\030\006 \001(\01323.google.cloud.vision.v1p2beta1" + - ".SafeSearchAnnotation\022S\n\033image_propertie" + - "s_annotation\030\010 \001(\0132..google.cloud.vision" + - ".v1p2beta1.ImageProperties\022Q\n\025crop_hints" + - "_annotation\030\013 \001(\01322.google.cloud.vision." + - "v1p2beta1.CropHintsAnnotation\022B\n\rweb_det" + - "ection\030\r \001(\0132+.google.cloud.vision.v1p2b" + - "eta1.WebDetection\022!\n\005error\030\t \001(\0132\022.googl" + - "e.rpc.Status\022F\n\007context\030\025 \001(\01325.google.c" + - "loud.vision.v1p2beta1.ImageAnnotationCon" + - "text\"\241\001\n\024AnnotateFileResponse\022@\n\014input_c" + - "onfig\030\001 \001(\0132*.google.cloud.vision.v1p2be" + - "ta1.InputConfig\022G\n\tresponses\030\002 \003(\01324.goo" + - "gle.cloud.vision.v1p2beta1.AnnotateImage" + - "Response\"h\n\032BatchAnnotateImagesRequest\022J" + - "\n\010requests\030\001 \003(\01323.google.cloud.vision.v" + - "1p2beta1.AnnotateImageRequestB\003\340A\002\"f\n\033Ba" + - "tchAnnotateImagesResponse\022G\n\tresponses\030\001" + - " \003(\01324.google.cloud.vision.v1p2beta1.Ann" + - "otateImageResponse\"\236\002\n\030AsyncAnnotateFile" + - "Request\022@\n\014input_config\030\001 \001(\0132*.google.c" + - "loud.vision.v1p2beta1.InputConfig\0228\n\010fea" + - "tures\030\002 \003(\0132&.google.cloud.vision.v1p2be" + - "ta1.Feature\022B\n\rimage_context\030\003 \001(\0132+.goo" + - "gle.cloud.vision.v1p2beta1.ImageContext\022" + - "B\n\routput_config\030\004 \001(\0132+.google.cloud.vi" + - "sion.v1p2beta1.OutputConfig\"_\n\031AsyncAnno" + - "tateFileResponse\022B\n\routput_config\030\001 \001(\0132" + - "+.google.cloud.vision.v1p2beta1.OutputCo" + - "nfig\"p\n\036AsyncBatchAnnotateFilesRequest\022N" + - "\n\010requests\030\001 \003(\01327.google.cloud.vision.v" + - "1p2beta1.AsyncAnnotateFileRequestB\003\340A\002\"n" + - "\n\037AsyncBatchAnnotateFilesResponse\022K\n\tres" + - "ponses\030\001 \003(\01328.google.cloud.vision.v1p2b" + - "eta1.AsyncAnnotateFileResponse\"^\n\013InputC" + - "onfig\022<\n\ngcs_source\030\001 \001(\0132(.google.cloud" + - ".vision.v1p2beta1.GcsSource\022\021\n\tmime_type" + - "\030\002 \001(\t\"j\n\014OutputConfig\022F\n\017gcs_destinatio" + - "n\030\001 \001(\0132-.google.cloud.vision.v1p2beta1." + - "GcsDestination\022\022\n\nbatch_size\030\002 \001(\005\"\030\n\tGc" + - "sSource\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestination\022\013" + - "\n\003uri\030\001 \001(\t\"\217\002\n\021OperationMetadata\022E\n\005sta" + - "te\030\001 \001(\01626.google.cloud.vision.v1p2beta1" + - ".OperationMetadata.State\022/\n\013create_time\030" + - "\005 \001(\0132\032.google.protobuf.Timestamp\022/\n\013upd" + - "ate_time\030\006 \001(\0132\032.google.protobuf.Timesta" + - "mp\"Q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007CR" + - "EATED\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\r\n\tCANCEL" + - "LED\020\004*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022\021\n\rVERY" + - "_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSSIBLE\020\003\022" + - "\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\265\004\n\016ImageAn" + - "notator\022\276\001\n\023BatchAnnotateImages\0229.google" + - ".cloud.vision.v1p2beta1.BatchAnnotateIma" + - "gesRequest\032:.google.cloud.vision.v1p2bet" + - "a1.BatchAnnotateImagesResponse\"0\202\323\344\223\002\037\"\032" + - "/v1p2beta1/images:annotate:\001*\332A\010requests" + - "\022\351\001\n\027AsyncBatchAnnotateFiles\022=.google.cl" + - "oud.vision.v1p2beta1.AsyncBatchAnnotateF" + - "ilesRequest\032\035.google.longrunning.Operati" + - "on\"p\202\323\344\223\002(\"#/v1p2beta1/files:asyncBatchA" + - "nnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnno" + - "tateFilesResponse\022\021OperationMetadata\032v\312A" + - "\025vision.googleapis.com\322A[https://www.goo" + - "gleapis.com/auth/cloud-platform,https://" + - "www.googleapis.com/auth/cloud-visionB\202\001\n" + - "!com.google.cloud.vision.v1p2beta1B\023Imag" + - "eAnnotatorProtoP\001ZCgoogle.golang.org/gen" + - "proto/googleapis/cloud/vision/v1p2beta1;" + - "vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p2beta1.TextAnnotationProto.getDescriptor(), - com.google.cloud.vision.v1p2beta1.WebDetectionProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.ColorProto.getDescriptor(), - com.google.type.LatLngProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_Feature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Feature_descriptor, - new java.lang.String[] { "Type", "MaxResults", "Model", }); - internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor, - new java.lang.String[] { "GcsImageUri", "ImageUri", }); - internal_static_google_cloud_vision_v1p2beta1_Image_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p2beta1_Image_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Image_descriptor, - new java.lang.String[] { "Content", "Source", }); - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor, - new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor = - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_FaceAnnotation_Landmark_descriptor, - new java.lang.String[] { "Type", "Position", }); - internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor, - new java.lang.String[] { "LatLng", }); - internal_static_google_cloud_vision_v1p2beta1_Property_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Property_descriptor, - new java.lang.String[] { "Name", "Value", "Uint64Value", }); - internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_EntityAnnotation_descriptor, - new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); - internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor, - new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); - internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor, - new java.lang.String[] { "MinLatLng", "MaxLatLng", }); - internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p2beta1_ColorInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_ColorInfo_descriptor, - new java.lang.String[] { "Color", "Score", "PixelFraction", }); - internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_DominantColorsAnnotation_descriptor, - new java.lang.String[] { "Colors", }); - internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor, - new java.lang.String[] { "DominantColors", }); - internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p2beta1_CropHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_CropHint_descriptor, - new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); - internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_CropHintsAnnotation_descriptor, - new java.lang.String[] { "CropHints", }); - internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_CropHintsParams_descriptor, - new java.lang.String[] { "AspectRatios", }); - internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor, - new java.lang.String[] { "IncludeGeoResults", }); - internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor, - new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); - internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor, - new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "WebDetectionParams", "TextDetectionParams", }); - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageRequest_descriptor, - new java.lang.String[] { "Image", "Features", "ImageContext", }); - internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_ImageAnnotationContext_descriptor, - new java.lang.String[] { "Uri", "PageNumber", }); - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AnnotateImageResponse_descriptor, - new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "Error", "Context", }); - internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AnnotateFileResponse_descriptor, - new java.lang.String[] { "InputConfig", "Responses", }); - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_BatchAnnotateImagesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileRequest_descriptor, - new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AsyncAnnotateFileResponse_descriptor, - new java.lang.String[] { "OutputConfig", }); - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_AsyncBatchAnnotateFilesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor, - new java.lang.String[] { "GcsSource", "MimeType", }); - internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BatchSize", }); - internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_vision_v1p2beta1_GcsSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_GcsSource_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_vision_v1p2beta1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor, - new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p2beta1.TextAnnotationProto.getDescriptor(); - com.google.cloud.vision.v1p2beta1.WebDetectionProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.ColorProto.getDescriptor(); - com.google.type.LatLngProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java deleted file mode 100644 index 9c1a913772ad..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java +++ /dev/null @@ -1,1711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Image context and/or feature-specific parameters.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageContext} - */ -public final class ImageContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageContext) - ImageContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageContext.newBuilder() to construct. - private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageContext() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.LatLongRect.Builder subBuilder = null; - if (latLongRect_ != null) { - subBuilder = latLongRect_.toBuilder(); - } - latLongRect_ = input.readMessage(com.google.cloud.vision.v1p2beta1.LatLongRect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLongRect_); - latLongRect_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageHints_.add(s); - break; - } - case 34: { - com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder subBuilder = null; - if (cropHintsParams_ != null) { - subBuilder = cropHintsParams_.toBuilder(); - } - cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.CropHintsParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsParams_); - cropHintsParams_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder subBuilder = null; - if (webDetectionParams_ != null) { - subBuilder = webDetectionParams_.toBuilder(); - } - webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetectionParams_); - webDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder subBuilder = null; - if (textDetectionParams_ != null) { - subBuilder = textDetectionParams_.toBuilder(); - } - textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textDetectionParams_); - textDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageContext.class, com.google.cloud.vision.v1p2beta1.ImageContext.Builder.class); - } - - public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_; - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - @java.lang.Override - public boolean hasLatLongRect() { - return latLongRect_ != null; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect() { - return latLongRect_ == null ? com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - return getLatLongRect(); - } - - public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList languageHints_; - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_; - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - - public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_; - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - @java.lang.Override - public boolean hasCropHintsParams() { - return cropHintsParams_ != null; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams() { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - return getCropHintsParams(); - } - - public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_; - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - @java.lang.Override - public boolean hasWebDetectionParams() { - return webDetectionParams_ != null; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams() { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - return getWebDetectionParams(); - } - - public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p2beta1.TextDetectionParams textDetectionParams_; - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - @java.lang.Override - public boolean hasTextDetectionParams() { - return textDetectionParams_ != null; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams() { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - return getTextDetectionParams(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLongRect_ != null) { - output.writeMessage(1, getLatLongRect()); - } - for (int i = 0; i < languageHints_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); - } - if (cropHintsParams_ != null) { - output.writeMessage(4, getCropHintsParams()); - } - if (webDetectionParams_ != null) { - output.writeMessage(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - output.writeMessage(12, getTextDetectionParams()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLongRect_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLongRect()); - } - { - int dataSize = 0; - for (int i = 0; i < languageHints_.size(); i++) { - dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); - } - size += dataSize; - size += 1 * getLanguageHintsList().size(); - } - if (cropHintsParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCropHintsParams()); - } - if (webDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getTextDetectionParams()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.ImageContext other = (com.google.cloud.vision.v1p2beta1.ImageContext) obj; - - if (hasLatLongRect() != other.hasLatLongRect()) return false; - if (hasLatLongRect()) { - if (!getLatLongRect() - .equals(other.getLatLongRect())) return false; - } - if (!getLanguageHintsList() - .equals(other.getLanguageHintsList())) return false; - if (hasCropHintsParams() != other.hasCropHintsParams()) return false; - if (hasCropHintsParams()) { - if (!getCropHintsParams() - .equals(other.getCropHintsParams())) return false; - } - if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; - if (hasWebDetectionParams()) { - if (!getWebDetectionParams() - .equals(other.getWebDetectionParams())) return false; - } - if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; - if (hasTextDetectionParams()) { - if (!getTextDetectionParams() - .equals(other.getTextDetectionParams())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLongRect()) { - hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; - hash = (53 * hash) + getLatLongRect().hashCode(); - } - if (getLanguageHintsCount() > 0) { - hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getLanguageHintsList().hashCode(); - } - if (hasCropHintsParams()) { - hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsParams().hashCode(); - } - if (hasWebDetectionParams()) { - hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getWebDetectionParams().hashCode(); - } - if (hasTextDetectionParams()) { - hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getTextDetectionParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Image context and/or feature-specific parameters.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageContext) - com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageContext.class, com.google.cloud.vision.v1p2beta1.ImageContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.ImageContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext build() { - com.google.cloud.vision.v1p2beta1.ImageContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext buildPartial() { - com.google.cloud.vision.v1p2beta1.ImageContext result = new com.google.cloud.vision.v1p2beta1.ImageContext(this); - int from_bitField0_ = bitField0_; - if (latLongRectBuilder_ == null) { - result.latLongRect_ = latLongRect_; - } else { - result.latLongRect_ = latLongRectBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.languageHints_ = languageHints_; - if (cropHintsParamsBuilder_ == null) { - result.cropHintsParams_ = cropHintsParams_; - } else { - result.cropHintsParams_ = cropHintsParamsBuilder_.build(); - } - if (webDetectionParamsBuilder_ == null) { - result.webDetectionParams_ = webDetectionParams_; - } else { - result.webDetectionParams_ = webDetectionParamsBuilder_.build(); - } - if (textDetectionParamsBuilder_ == null) { - result.textDetectionParams_ = textDetectionParams_; - } else { - result.textDetectionParams_ = textDetectionParamsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.ImageContext) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageContext other) { - if (other == com.google.cloud.vision.v1p2beta1.ImageContext.getDefaultInstance()) return this; - if (other.hasLatLongRect()) { - mergeLatLongRect(other.getLatLongRect()); - } - if (!other.languageHints_.isEmpty()) { - if (languageHints_.isEmpty()) { - languageHints_ = other.languageHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLanguageHintsIsMutable(); - languageHints_.addAll(other.languageHints_); - } - onChanged(); - } - if (other.hasCropHintsParams()) { - mergeCropHintsParams(other.getCropHintsParams()); - } - if (other.hasWebDetectionParams()) { - mergeWebDetectionParams(other.getWebDetectionParams()); - } - if (other.hasTextDetectionParams()) { - mergeTextDetectionParams(other.getTextDetectionParams()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.ImageContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder> latLongRectBuilder_; - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - public boolean hasLatLongRect() { - return latLongRectBuilder_ != null || latLongRect_ != null; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - public com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect() { - if (latLongRectBuilder_ == null) { - return latLongRect_ == null ? com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } else { - return latLongRectBuilder_.getMessage(); - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect(com.google.cloud.vision.v1p2beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLongRect_ = value; - onChanged(); - } else { - latLongRectBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect( - com.google.cloud.vision.v1p2beta1.LatLongRect.Builder builderForValue) { - if (latLongRectBuilder_ == null) { - latLongRect_ = builderForValue.build(); - onChanged(); - } else { - latLongRectBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public Builder mergeLatLongRect(com.google.cloud.vision.v1p2beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (latLongRect_ != null) { - latLongRect_ = - com.google.cloud.vision.v1p2beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); - } else { - latLongRect_ = value; - } - onChanged(); - } else { - latLongRectBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public Builder clearLatLongRect() { - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - onChanged(); - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p2beta1.LatLongRect.Builder getLatLongRectBuilder() { - - onChanged(); - return getLatLongRectFieldBuilder().getBuilder(); - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - if (latLongRectBuilder_ != null) { - return latLongRectBuilder_.getMessageOrBuilder(); - } else { - return latLongRect_ == null ? - com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder> - getLatLongRectFieldBuilder() { - if (latLongRectBuilder_ == null) { - latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder>( - getLatLongRect(), - getParentForChildren(), - isClean()); - latLongRect_ = null; - } - return latLongRectBuilder_; - } - - private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_.getUnmodifiableView(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index to set the value at. - * @param value The languageHints to set. - * @return This builder for chaining. - */ - public Builder setLanguageHints( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHints( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param values The languageHints to add. - * @return This builder for chaining. - */ - public Builder addAllLanguageHints( - java.lang.Iterable values) { - ensureLanguageHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, languageHints_); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageHints() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The bytes of the languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHintsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - public boolean hasCropHintsParams() { - return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - public com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } else { - return cropHintsParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams(com.google.cloud.vision.v1p2beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsParams_ = value; - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams( - com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder builderForValue) { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = builderForValue.build(); - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder mergeCropHintsParams(com.google.cloud.vision.v1p2beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (cropHintsParams_ != null) { - cropHintsParams_ = - com.google.cloud.vision.v1p2beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); - } else { - cropHintsParams_ = value; - } - onChanged(); - } else { - cropHintsParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder clearCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - onChanged(); - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { - - onChanged(); - return getCropHintsParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - if (cropHintsParamsBuilder_ != null) { - return cropHintsParamsBuilder_.getMessageOrBuilder(); - } else { - return cropHintsParams_ == null ? - com.google.cloud.vision.v1p2beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder> - getCropHintsParamsFieldBuilder() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder>( - getCropHintsParams(), - getParentForChildren(), - isClean()); - cropHintsParams_ = null; - } - return cropHintsParamsBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - public boolean hasWebDetectionParams() { - return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - public com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } else { - return webDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams(com.google.cloud.vision.v1p2beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetectionParams_ = value; - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams( - com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder builderForValue) { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p2beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (webDetectionParams_ != null) { - webDetectionParams_ = - com.google.cloud.vision.v1p2beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); - } else { - webDetectionParams_ = value; - } - onChanged(); - } else { - webDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder clearWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - onChanged(); - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { - - onChanged(); - return getWebDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - if (webDetectionParamsBuilder_ != null) { - return webDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return webDetectionParams_ == null ? - com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder> - getWebDetectionParamsFieldBuilder() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder>( - getWebDetectionParams(), - getParentForChildren(), - isClean()); - webDetectionParams_ = null; - } - return webDetectionParamsBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.TextDetectionParams textDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - public boolean hasTextDetectionParams() { - return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - public com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } else { - return textDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams(com.google.cloud.vision.v1p2beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textDetectionParams_ = value; - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams( - com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder builderForValue) { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p2beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (textDetectionParams_ != null) { - textDetectionParams_ = - com.google.cloud.vision.v1p2beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); - } else { - textDetectionParams_ = value; - } - onChanged(); - } else { - textDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder clearTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - onChanged(); - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { - - onChanged(); - return getTextDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - if (textDetectionParamsBuilder_ != null) { - return textDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return textDetectionParams_ == null ? - com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder> - getTextDetectionParamsFieldBuilder() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextDetectionParams, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder>( - getTextDetectionParams(), - getParentForChildren(), - isClean()); - textDetectionParams_ = null; - } - return textDetectionParamsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageContext) - private static final com.google.cloud.vision.v1p2beta1.ImageContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageContext(); - } - - public static com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java deleted file mode 100644 index c99820b85a8d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContextOrBuilder.java +++ /dev/null @@ -1,186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ImageContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - boolean hasLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - com.google.cloud.vision.v1p2beta1.LatLongRect getLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1; - */ - com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); - - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - java.util.List - getLanguageHintsList(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - int getLanguageHintsCount(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - java.lang.String getLanguageHints(int index); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - com.google.protobuf.ByteString - getLanguageHintsBytes(int index); - - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - boolean hasCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - com.google.cloud.vision.v1p2beta1.CropHintsParams getCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4; - */ - com.google.cloud.vision.v1p2beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); - - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - boolean hasWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - com.google.cloud.vision.v1p2beta1.WebDetectionParams getWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6; - */ - com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); - - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - boolean hasTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - com.google.cloud.vision.v1p2beta1.TextDetectionParams getTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12; - */ - com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java deleted file mode 100644 index 4f42706d0e8a..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - * @return The source. - */ - com.google.cloud.vision.v1p2beta1.ImageSource getSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p2beta1.ImageSource source = 2; - */ - com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java deleted file mode 100644 index bb8c98f2988d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Stores image properties, such as dominant colors.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageProperties} - */ -public final class ImageProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageProperties) - ImagePropertiesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageProperties.newBuilder() to construct. - private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageProperties() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder subBuilder = null; - if (dominantColors_ != null) { - subBuilder = dominantColors_.toBuilder(); - } - dominantColors_ = input.readMessage(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dominantColors_); - dominantColors_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageProperties.class, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder.class); - } - - public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_; - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - @java.lang.Override - public boolean hasDominantColors() { - return dominantColors_ != null; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors() { - return dominantColors_ == null ? com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - return getDominantColors(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dominantColors_ != null) { - output.writeMessage(1, getDominantColors()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dominantColors_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDominantColors()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageProperties)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.ImageProperties other = (com.google.cloud.vision.v1p2beta1.ImageProperties) obj; - - if (hasDominantColors() != other.hasDominantColors()) return false; - if (hasDominantColors()) { - if (!getDominantColors() - .equals(other.getDominantColors())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDominantColors()) { - hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; - hash = (53 * hash) + getDominantColors().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Stores image properties, such as dominant colors.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageProperties) - com.google.cloud.vision.v1p2beta1.ImagePropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageProperties.class, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.ImageProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageProperties build() { - com.google.cloud.vision.v1p2beta1.ImageProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageProperties buildPartial() { - com.google.cloud.vision.v1p2beta1.ImageProperties result = new com.google.cloud.vision.v1p2beta1.ImageProperties(this); - if (dominantColorsBuilder_ == null) { - result.dominantColors_ = dominantColors_; - } else { - result.dominantColors_ = dominantColorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.ImageProperties) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageProperties other) { - if (other == com.google.cloud.vision.v1p2beta1.ImageProperties.getDefaultInstance()) return this; - if (other.hasDominantColors()) { - mergeDominantColors(other.getDominantColors()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.ImageProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - public boolean hasDominantColors() { - return dominantColorsBuilder_ != null || dominantColors_ != null; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors() { - if (dominantColorsBuilder_ == null) { - return dominantColors_ == null ? com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } else { - return dominantColorsBuilder_.getMessage(); - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dominantColors_ = value; - onChanged(); - } else { - dominantColorsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors( - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder builderForValue) { - if (dominantColorsBuilder_ == null) { - dominantColors_ = builderForValue.build(); - onChanged(); - } else { - dominantColorsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder mergeDominantColors(com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (dominantColors_ != null) { - dominantColors_ = - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); - } else { - dominantColors_ = value; - } - onChanged(); - } else { - dominantColorsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder clearDominantColors() { - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - onChanged(); - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { - - onChanged(); - return getDominantColorsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - if (dominantColorsBuilder_ != null) { - return dominantColorsBuilder_.getMessageOrBuilder(); - } else { - return dominantColors_ == null ? - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder> - getDominantColorsFieldBuilder() { - if (dominantColorsBuilder_ == null) { - dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder>( - getDominantColors(), - getParentForChildren(), - isClean()); - dominantColors_ = null; - } - return dominantColorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageProperties) - private static final com.google.cloud.vision.v1p2beta1.ImageProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageProperties(); - } - - public static com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java deleted file mode 100644 index f0c47ac2806b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImagePropertiesOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ImagePropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - boolean hasDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation getDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominant_colors = 1; - */ - com.google.cloud.vision.v1p2beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java deleted file mode 100644 index 286311c4daf5..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java +++ /dev/null @@ -1,880 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * External image source (Google Cloud Storage or web URL image location).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageSource} - */ -public final class ImageSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.ImageSource) - ImageSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageSource.newBuilder() to construct. - private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageSource() { - gcsImageUri_ = ""; - imageUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - gcsImageUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageSource.class, com.google.cloud.vision.v1p2beta1.ImageSource.Builder.class); - } - - public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsImageUri_; - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - @java.lang.Override - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } - } - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object imageUri_; - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.ImageSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.ImageSource other = (com.google.cloud.vision.v1p2beta1.ImageSource) obj; - - if (!getGcsImageUri() - .equals(other.getGcsImageUri())) return false; - if (!getImageUri() - .equals(other.getImageUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsImageUri().hashCode(); - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.ImageSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * External image source (Google Cloud Storage or web URL image location).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.ImageSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.ImageSource) - com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.ImageSource.class, com.google.cloud.vision.v1p2beta1.ImageSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.ImageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - gcsImageUri_ = ""; - - imageUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_ImageSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSource build() { - com.google.cloud.vision.v1p2beta1.ImageSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSource buildPartial() { - com.google.cloud.vision.v1p2beta1.ImageSource result = new com.google.cloud.vision.v1p2beta1.ImageSource(this); - result.gcsImageUri_ = gcsImageUri_; - result.imageUri_ = imageUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.ImageSource) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.ImageSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.ImageSource other) { - if (other == com.google.cloud.vision.v1p2beta1.ImageSource.getDefaultInstance()) return this; - if (!other.getGcsImageUri().isEmpty()) { - gcsImageUri_ = other.gcsImageUri_; - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.ImageSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.ImageSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsImageUri_ = ""; - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcsImageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return This builder for chaining. - */ - public Builder clearGcsImageUri() { - - gcsImageUri_ = getDefaultInstance().getGcsImageUri(); - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The bytes for gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcsImageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.ImageSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageSource) - private static final com.google.cloud.vision.v1p2beta1.ImageSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.ImageSource(); - } - - public static com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.ImageSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java deleted file mode 100644 index 9d0c37d2b2b6..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSourceOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ImageSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.ImageSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - java.lang.String getGcsImageUri(); - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - com.google.protobuf.ByteString - getGcsImageUriBytes(); - - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString - getImageUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java deleted file mode 100644 index 6ed2447f6116..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The desired input location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.InputConfig} - */ -public final class InputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.InputConfig) - InputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InputConfig() { - mimeType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.GcsSource.Builder subBuilder = null; - if (gcsSource_ != null) { - subBuilder = gcsSource_.toBuilder(); - } - gcsSource_ = input.readMessage(com.google.cloud.vision.v1p2beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsSource_); - gcsSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.InputConfig.class, com.google.cloud.vision.v1p2beta1.InputConfig.Builder.class); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_; - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return gcsSource_ != null; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource() { - return gcsSource_ == null ? com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return getGcsSource(); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object mimeType_; - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } - } - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsSource_ != null) { - output.writeMessage(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.InputConfig other = (com.google.cloud.vision.v1p2beta1.InputConfig) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - } - if (!getMimeType() - .equals(other.getMimeType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired input location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.InputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.InputConfig) - com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.InputConfig.class, com.google.cloud.vision.v1p2beta1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - mimeType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig build() { - com.google.cloud.vision.v1p2beta1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig buildPartial() { - com.google.cloud.vision.v1p2beta1.InputConfig result = new com.google.cloud.vision.v1p2beta1.InputConfig(this); - if (gcsSourceBuilder_ == null) { - result.gcsSource_ = gcsSource_; - } else { - result.gcsSource_ = gcsSourceBuilder_.build(); - } - result.mimeType_ = mimeType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.InputConfig) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.InputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.InputConfig other) { - if (other == com.google.cloud.vision.v1p2beta1.InputConfig.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSourceBuilder_ != null || gcsSource_ != null; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - public com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null ? com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1p2beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1p2beta1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1p2beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (gcsSource_ != null) { - gcsSource_ = - com.google.cloud.vision.v1p2beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); - } else { - gcsSource_ = value; - } - onChanged(); - } else { - gcsSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - onChanged(); - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p2beta1.GcsSource.Builder getGcsSourceBuilder() { - - onChanged(); - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null ? - com.google.cloud.vision.v1p2beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder>( - getGcsSource(), - getParentForChildren(), - isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.InputConfig) - private static final com.google.cloud.vision.v1p2beta1.InputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.InputConfig(); - } - - public static com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java deleted file mode 100644 index 5a669943d957..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfigOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface InputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1p2beta1.GcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1p2beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java deleted file mode 100644 index d28d73c98a6e..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Rectangle determined by min and max `LatLng` pairs.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.LatLongRect} - */ -public final class LatLongRect extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.LatLongRect) - LatLongRectOrBuilder { -private static final long serialVersionUID = 0L; - // Use LatLongRect.newBuilder() to construct. - private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LatLongRect() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LatLongRect(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LatLongRect( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (minLatLng_ != null) { - subBuilder = minLatLng_.toBuilder(); - } - minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minLatLng_); - minLatLng_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.type.LatLng.Builder subBuilder = null; - if (maxLatLng_ != null) { - subBuilder = maxLatLng_.toBuilder(); - } - maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxLatLng_); - maxLatLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.LatLongRect.class, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder.class); - } - - public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng minLatLng_; - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - @java.lang.Override - public boolean hasMinLatLng() { - return minLatLng_ != null; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMinLatLng() { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - return getMinLatLng(); - } - - public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; - private com.google.type.LatLng maxLatLng_; - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - @java.lang.Override - public boolean hasMaxLatLng() { - return maxLatLng_ != null; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMaxLatLng() { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - return getMaxLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minLatLng_ != null) { - output.writeMessage(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - output.writeMessage(2, getMaxLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.LatLongRect)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.LatLongRect other = (com.google.cloud.vision.v1p2beta1.LatLongRect) obj; - - if (hasMinLatLng() != other.hasMinLatLng()) return false; - if (hasMinLatLng()) { - if (!getMinLatLng() - .equals(other.getMinLatLng())) return false; - } - if (hasMaxLatLng() != other.hasMaxLatLng()) return false; - if (hasMaxLatLng()) { - if (!getMaxLatLng() - .equals(other.getMaxLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinLatLng()) { - hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMinLatLng().hashCode(); - } - if (hasMaxLatLng()) { - hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMaxLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.LatLongRect prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rectangle determined by min and max `LatLng` pairs.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.LatLongRect} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.LatLongRect) - com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.LatLongRect.class, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.LatLongRect.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LatLongRect_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRect build() { - com.google.cloud.vision.v1p2beta1.LatLongRect result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRect buildPartial() { - com.google.cloud.vision.v1p2beta1.LatLongRect result = new com.google.cloud.vision.v1p2beta1.LatLongRect(this); - if (minLatLngBuilder_ == null) { - result.minLatLng_ = minLatLng_; - } else { - result.minLatLng_ = minLatLngBuilder_.build(); - } - if (maxLatLngBuilder_ == null) { - result.maxLatLng_ = maxLatLng_; - } else { - result.maxLatLng_ = maxLatLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.LatLongRect) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.LatLongRect)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.LatLongRect other) { - if (other == com.google.cloud.vision.v1p2beta1.LatLongRect.getDefaultInstance()) return this; - if (other.hasMinLatLng()) { - mergeMinLatLng(other.getMinLatLng()); - } - if (other.hasMaxLatLng()) { - mergeMaxLatLng(other.getMaxLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.LatLongRect parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.LatLongRect) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng minLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - public boolean hasMinLatLng() { - return minLatLngBuilder_ != null || minLatLng_ != null; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - public com.google.type.LatLng getMinLatLng() { - if (minLatLngBuilder_ == null) { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } else { - return minLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minLatLng_ = value; - onChanged(); - } else { - minLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (minLatLngBuilder_ == null) { - minLatLng_ = builderForValue.build(); - onChanged(); - } else { - minLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder mergeMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (minLatLng_ != null) { - minLatLng_ = - com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); - } else { - minLatLng_ = value; - } - onChanged(); - } else { - minLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder clearMinLatLng() { - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - onChanged(); - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLng.Builder getMinLatLngBuilder() { - - onChanged(); - return getMinLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - if (minLatLngBuilder_ != null) { - return minLatLngBuilder_.getMessageOrBuilder(); - } else { - return minLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMinLatLngFieldBuilder() { - if (minLatLngBuilder_ == null) { - minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMinLatLng(), - getParentForChildren(), - isClean()); - minLatLng_ = null; - } - return minLatLngBuilder_; - } - - private com.google.type.LatLng maxLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - public boolean hasMaxLatLng() { - return maxLatLngBuilder_ != null || maxLatLng_ != null; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - public com.google.type.LatLng getMaxLatLng() { - if (maxLatLngBuilder_ == null) { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } else { - return maxLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxLatLng_ = value; - onChanged(); - } else { - maxLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = builderForValue.build(); - onChanged(); - } else { - maxLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder mergeMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (maxLatLng_ != null) { - maxLatLng_ = - com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); - } else { - maxLatLng_ = value; - } - onChanged(); - } else { - maxLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder clearMaxLatLng() { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - onChanged(); - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLng.Builder getMaxLatLngBuilder() { - - onChanged(); - return getMaxLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - if (maxLatLngBuilder_ != null) { - return maxLatLngBuilder_.getMessageOrBuilder(); - } else { - return maxLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMaxLatLngFieldBuilder() { - if (maxLatLngBuilder_ == null) { - maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMaxLatLng(), - getParentForChildren(), - isClean()); - maxLatLng_ = null; - } - return maxLatLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.LatLongRect) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LatLongRect) - private static final com.google.cloud.vision.v1p2beta1.LatLongRect DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.LatLongRect(); - } - - public static com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LatLongRect parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LatLongRect(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LatLongRect getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java deleted file mode 100644 index 185c7c87dd57..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRectOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface LatLongRectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.LatLongRect) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - boolean hasMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - com.google.type.LatLng getMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); - - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - boolean hasMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - com.google.type.LatLng getMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java deleted file mode 100644 index c7172261531f..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Likelihood.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A bucketized representation of likelihood, which is intended to give clients
- * highly stable results across model upgrades.
- * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.Likelihood) -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java deleted file mode 100644 index 1e302763aec4..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Detected entity location information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.LocationInfo} - */ -public final class LocationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.LocationInfo) - LocationInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocationInfo.newBuilder() to construct. - private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocationInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (latLng_ != null) { - subBuilder = latLng_.toBuilder(); - } - latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLng_); - latLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.LocationInfo.class, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder.class); - } - - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return latLng_ != null; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return getLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLng_ != null) { - output.writeMessage(1, getLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.LocationInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.LocationInfo other = (com.google.cloud.vision.v1p2beta1.LocationInfo) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng() - .equals(other.getLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.LocationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected entity location information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.LocationInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.LocationInfo) - com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.LocationInfo.class, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.LocationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLngBuilder_ == null) { - latLng_ = null; - } else { - latLng_ = null; - latLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_LocationInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfo build() { - com.google.cloud.vision.v1p2beta1.LocationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfo buildPartial() { - com.google.cloud.vision.v1p2beta1.LocationInfo result = new com.google.cloud.vision.v1p2beta1.LocationInfo(this); - if (latLngBuilder_ == null) { - result.latLng_ = latLng_; - } else { - result.latLng_ = latLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.LocationInfo) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.LocationInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.LocationInfo other) { - if (other == com.google.cloud.vision.v1p2beta1.LocationInfo.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.LocationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.LocationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return latLngBuilder_ != null || latLng_ != null; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - onChanged(); - } else { - latLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - onChanged(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (latLng_ != null) { - latLng_ = - com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); - } else { - latLng_ = value; - } - onChanged(); - } else { - latLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - if (latLngBuilder_ == null) { - latLng_ = null; - onChanged(); - } else { - latLng_ = null; - latLngBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - - onChanged(); - return getLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getLatLng(), - getParentForChildren(), - isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.LocationInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LocationInfo) - private static final com.google.cloud.vision.v1p2beta1.LocationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.LocationInfo(); - } - - public static com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.LocationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java deleted file mode 100644 index 3504a4c087ff..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface LocationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.LocationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java deleted file mode 100644 index f2dc1dea703b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java +++ /dev/null @@ -1,597 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the normalized vertex coordinates are relative to the original image
- * and range from 0 to 1.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.NormalizedVertex} - */ -public final class NormalizedVertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.NormalizedVertex) - NormalizedVertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use NormalizedVertex.newBuilder() to construct. - private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NormalizedVertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NormalizedVertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedVertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.NormalizedVertex.class, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.NormalizedVertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.NormalizedVertex other = (com.google.cloud.vision.v1p2beta1.NormalizedVertex) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.NormalizedVertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the normalized vertex coordinates are relative to the original image
-   * and range from 0 to 1.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.NormalizedVertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.NormalizedVertex) - com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.NormalizedVertex.class, com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.NormalizedVertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertex build() { - com.google.cloud.vision.v1p2beta1.NormalizedVertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertex buildPartial() { - com.google.cloud.vision.v1p2beta1.NormalizedVertex result = new com.google.cloud.vision.v1p2beta1.NormalizedVertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.NormalizedVertex) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.NormalizedVertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.NormalizedVertex other) { - if (other == com.google.cloud.vision.v1p2beta1.NormalizedVertex.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.NormalizedVertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.NormalizedVertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.NormalizedVertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.NormalizedVertex) - private static final com.google.cloud.vision.v1p2beta1.NormalizedVertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.NormalizedVertex(); - } - - public static com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NormalizedVertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedVertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.NormalizedVertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java deleted file mode 100644 index 24008b11dd56..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface NormalizedVertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.NormalizedVertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java deleted file mode 100644 index f4945b6d3306..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java +++ /dev/null @@ -1,1204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Contains metadata for the BatchAnnotateImages operation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.OperationMetadata.class, com.google.cloud.vision.v1p2beta1.OperationMetadata.Builder.class); - } - - /** - *
-   * Batch operation states.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.OperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - CREATED(1), - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - public static final int CREATED_VALUE = 1; - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return CREATED; - case 2: return RUNNING; - case 3: return DONE; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.OperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.OperationMetadata.State result = com.google.cloud.vision.v1p2beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p2beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1p2beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1p2beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.OperationMetadata other = (com.google.cloud.vision.v1p2beta1.OperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains metadata for the BatchAnnotateImages operation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.OperationMetadata) - com.google.cloud.vision.v1p2beta1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.OperationMetadata.class, com.google.cloud.vision.v1p2beta1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OperationMetadata build() { - com.google.cloud.vision.v1p2beta1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OperationMetadata buildPartial() { - com.google.cloud.vision.v1p2beta1.OperationMetadata result = new com.google.cloud.vision.v1p2beta1.OperationMetadata(this); - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.OperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.OperationMetadata other) { - if (other == com.google.cloud.vision.v1p2beta1.OperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.OperationMetadata.State result = com.google.cloud.vision.v1p2beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p2beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1p2beta1.OperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OperationMetadata) - private static final com.google.cloud.vision.v1p2beta1.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.OperationMetadata(); - } - - public static com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java deleted file mode 100644 index c13f6c14c9a4..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p2beta1.OperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1p2beta1.OperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java deleted file mode 100644 index fc22563ed737..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java +++ /dev/null @@ -1,773 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * The desired output location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.GcsDestination.Builder subBuilder = null; - if (gcsDestination_ != null) { - subBuilder = gcsDestination_.toBuilder(); - } - gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p2beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsDestination_); - gcsDestination_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - batchSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.OutputConfig.class, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder.class); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_; - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return gcsDestination_ != null; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination() { - return gcsDestination_ == null ? com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return getGcsDestination(); - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 2; - private int batchSize_; - /** - *
-   * The max number of response protos to put into each output JSON file on GCS.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsDestination_ != null) { - output.writeMessage(1, getGcsDestination()); - } - if (batchSize_ != 0) { - output.writeInt32(2, batchSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsDestination_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsDestination()); - } - if (batchSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, batchSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.OutputConfig other = (com.google.cloud.vision.v1p2beta1.OutputConfig) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - } - if (getBatchSize() - != other.getBatchSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getBatchSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired output location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.OutputConfig) - com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.OutputConfig.class, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - batchSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig build() { - com.google.cloud.vision.v1p2beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig buildPartial() { - com.google.cloud.vision.v1p2beta1.OutputConfig result = new com.google.cloud.vision.v1p2beta1.OutputConfig(this); - if (gcsDestinationBuilder_ == null) { - result.gcsDestination_ = gcsDestination_; - } else { - result.gcsDestination_ = gcsDestinationBuilder_.build(); - } - result.batchSize_ = batchSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.OutputConfig) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.OutputConfig other) { - if (other == com.google.cloud.vision.v1p2beta1.OutputConfig.getDefaultInstance()) return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - if (other.getBatchSize() != 0) { - setBatchSize(other.getBatchSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return gcsDestinationBuilder_ != null || gcsDestination_ != null; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - public com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null ? com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.vision.v1p2beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.vision.v1p2beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.vision.v1p2beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (gcsDestination_ != null) { - gcsDestination_ = - com.google.cloud.vision.v1p2beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); - } else { - gcsDestination_ = value; - } - onChanged(); - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - onChanged(); - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p2beta1.GcsDestination.Builder getGcsDestinationBuilder() { - - onChanged(); - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null ? - com.google.cloud.vision.v1p2beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder>( - getGcsDestination(), - getParentForChildren(), - isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - private int batchSize_ ; - /** - *
-     * The max number of response protos to put into each output JSON file on GCS.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - /** - *
-     * The max number of response protos to put into each output JSON file on GCS.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @param value The batchSize to set. - * @return This builder for chaining. - */ - public Builder setBatchSize(int value) { - - batchSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The max number of response protos to put into each output JSON file on GCS.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return This builder for chaining. - */ - public Builder clearBatchSize() { - - batchSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OutputConfig) - private static final com.google.cloud.vision.v1p2beta1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.OutputConfig(); - } - - public static com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 1cf4dce48a97..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.vision.v1p2beta1.GcsDestination getGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p2beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.vision.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * The max number of response protos to put into each output JSON file on GCS.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - int getBatchSize(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java deleted file mode 100644 index 768c6ddcc478..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java +++ /dev/null @@ -1,1358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Detected page from OCR.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Page} - */ -public final class Page extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Page) - PageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Page() { - blocks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Page(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - height_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blocks_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Block.parser(), extensionRegistry)); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Page.class, com.google.cloud.vision.v1p2beta1.Page.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int BLOCKS_FIELD_NUMBER = 4; - private java.util.List blocks_; - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Block getBlocks(int index) { - return blocks_.get(index); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (height_ != 0) { - output.writeInt32(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Page)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Page other = (com.google.cloud.vision.v1p2beta1.Page) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!getBlocksList() - .equals(other.getBlocksList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected page from OCR.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Page} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Page) - com.google.cloud.vision.v1p2beta1.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Page.class, com.google.cloud.vision.v1p2beta1.Page.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - width_ = 0; - - height_ = 0; - - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Page getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Page build() { - com.google.cloud.vision.v1p2beta1.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Page buildPartial() { - com.google.cloud.vision.v1p2beta1.Page result = new com.google.cloud.vision.v1p2beta1.Page(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - result.width_ = width_; - result.height_ = height_; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Page) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Page other) { - if (other == com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Page) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private int width_ ; - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder> blocksBuilder_; - - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p2beta1.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p2beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder addBlocks(com.google.cloud.vision.v1p2beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p2beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder addBlocks( - com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p2beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder addAllBlocks( - java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p2beta1.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p2beta1.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p2beta1.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Page) - private static final com.google.cloud.vision.v1p2beta1.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Page(); - } - - public static com.google.cloud.vision.v1p2beta1.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Page(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java deleted file mode 100644 index 4e569749e881..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PageOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Page) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - int getHeight(); - - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - java.util.List - getBlocksList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p2beta1.Block getBlocks(int index); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - int getBlocksCount(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - java.util.List - getBlocksOrBuilderList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p2beta1.BlockOrBuilder getBlocksOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java deleted file mode 100644 index 2a133c8783b0..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Structural unit of text representing a number of words in certain order.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Paragraph} - */ -public final class Paragraph extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Paragraph) - ParagraphOrBuilder { -private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Paragraph() { - words_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Paragraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Paragraph( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Word.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Paragraph.class, com.google.cloud.vision.v1p2beta1.Paragraph.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int WORDS_FIELD_NUMBER = 3; - private java.util.List words_; - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List getWordsList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List - getWordsOrBuilderList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - @java.lang.Override - public int getWordsCount() { - return words_.size(); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Word getWords(int index) { - return words_.get(index); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( - int index) { - return words_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - output.writeMessage(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Paragraph)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Paragraph other = (com.google.cloud.vision.v1p2beta1.Paragraph) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Paragraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structural unit of text representing a number of words in certain order.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Paragraph} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Paragraph) - com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Paragraph.class, com.google.cloud.vision.v1p2beta1.Paragraph.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Paragraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWordsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - wordsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Paragraph build() { - com.google.cloud.vision.v1p2beta1.Paragraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Paragraph buildPartial() { - com.google.cloud.vision.v1p2beta1.Paragraph result = new com.google.cloud.vision.v1p2beta1.Paragraph(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - } else { - result.words_ = wordsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Paragraph) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Paragraph)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Paragraph other) { - if (other == com.google.cloud.vision.v1p2beta1.Paragraph.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (wordsBuilder_ == null) { - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - } else { - if (!other.words_.isEmpty()) { - if (wordsBuilder_.isEmpty()) { - wordsBuilder_.dispose(); - wordsBuilder_ = null; - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - wordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWordsFieldBuilder() : null; - } else { - wordsBuilder_.addAllMessages(other.words_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Paragraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Paragraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List words_ = - java.util.Collections.emptyList(); - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(words_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder> wordsBuilder_; - - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public java.util.List getWordsList() { - if (wordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(words_); - } else { - return wordsBuilder_.getMessageList(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public int getWordsCount() { - if (wordsBuilder_ == null) { - return words_.size(); - } else { - return wordsBuilder_.getCount(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p2beta1.Word getWords(int index) { - if (wordsBuilder_ == null) { - return words_.get(index); - } else { - return wordsBuilder_.getMessage(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p2beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - } else { - wordsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.set(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder addWords(com.google.cloud.vision.v1p2beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - } else { - wordsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p2beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(index, value); - onChanged(); - } else { - wordsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder addWords( - com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p2beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder addAllWords( - java.lang.Iterable values) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - } else { - wordsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder clearWords() { - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - wordsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public Builder removeWords(int index) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.remove(index); - onChanged(); - } else { - wordsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p2beta1.Word.Builder getWordsBuilder( - int index) { - return getWordsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( - int index) { - if (wordsBuilder_ == null) { - return words_.get(index); } else { - return wordsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public java.util.List - getWordsOrBuilderList() { - if (wordsBuilder_ != null) { - return wordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(words_); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p2beta1.Word.Builder addWordsBuilder() { - return getWordsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p2beta1.Word.Builder addWordsBuilder( - int index) { - return getWordsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - public java.util.List - getWordsBuilderList() { - return getWordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder> - getWordsFieldBuilder() { - if (wordsBuilder_ == null) { - wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - words_ = null; - } - return wordsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Paragraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Paragraph) - private static final com.google.cloud.vision.v1p2beta1.Paragraph DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Paragraph(); - } - - public static com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Paragraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paragraph(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Paragraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java deleted file mode 100644 index e989fcc671f5..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ParagraphOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Paragraph) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - java.util.List - getWordsList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - com.google.cloud.vision.v1p2beta1.Word getWords(int index); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - int getWordsCount(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - java.util.List - getWordsOrBuilderList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Word words = 3; - */ - com.google.cloud.vision.v1p2beta1.WordOrBuilder getWordsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java deleted file mode 100644 index 15b9ceea3aba..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A 3D position in the image, used primarily for Face detection landmarks.
- * A valid Position must have both x and y coordinates.
- * The position coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Position} - */ -public final class Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Position) - PositionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Position.newBuilder() to construct. - private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Position() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Position(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Position( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - case 29: { - - z_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Position.class, com.google.cloud.vision.v1p2beta1.Position.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - public static final int Z_FIELD_NUMBER = 3; - private float z_; - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - output.writeFloat(3, z_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, z_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Position)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Position other = (com.google.cloud.vision.v1p2beta1.Position) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (java.lang.Float.floatToIntBits(getZ()) - != java.lang.Float.floatToIntBits( - other.getZ())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getZ()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A 3D position in the image, used primarily for Face detection landmarks.
-   * A valid Position must have both x and y coordinates.
-   * The position coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Position) - com.google.cloud.vision.v1p2beta1.PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Position.class, com.google.cloud.vision.v1p2beta1.Position.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Position.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - z_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Position_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Position getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Position build() { - com.google.cloud.vision.v1p2beta1.Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Position buildPartial() { - com.google.cloud.vision.v1p2beta1.Position result = new com.google.cloud.vision.v1p2beta1.Position(this); - result.x_ = x_; - result.y_ = y_; - result.z_ = z_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Position) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Position other) { - if (other == com.google.cloud.vision.v1p2beta1.Position.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - if (other.getZ() != 0F) { - setZ(other.getZ()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Position parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - - private float z_ ; - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @param value The z to set. - * @return This builder for chaining. - */ - public Builder setZ(float value) { - - z_ = value; - onChanged(); - return this; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return This builder for chaining. - */ - public Builder clearZ() { - - z_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Position) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Position) - private static final com.google.cloud.vision.v1p2beta1.Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Position(); - } - - public static com.google.cloud.vision.v1p2beta1.Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Position parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java deleted file mode 100644 index 333b07f75a92..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PositionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Position) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); - - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - float getZ(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java deleted file mode 100644 index e8ee49620cc6..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java +++ /dev/null @@ -1,842 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A `Property` consists of a user-supplied name/value pair.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Property} - */ -public final class Property extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Property) - PropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Property.newBuilder() to construct. - private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Property() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Property(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Property( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 24: { - - uint64Value_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Property.class, com.google.cloud.vision.v1p2beta1.Property.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UINT64_VALUE_FIELD_NUMBER = 3; - private long uint64Value_; - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - if (uint64Value_ != 0L) { - output.writeUInt64(3, uint64Value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - if (uint64Value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, uint64Value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Property)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Property other = (com.google.cloud.vision.v1p2beta1.Property) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (getUint64Value() - != other.getUint64Value()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Value()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Property parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Property parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Property prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `Property` consists of a user-supplied name/value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Property} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Property) - com.google.cloud.vision.v1p2beta1.PropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Property.class, com.google.cloud.vision.v1p2beta1.Property.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Property.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - uint64Value_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_Property_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Property getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Property build() { - com.google.cloud.vision.v1p2beta1.Property result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Property buildPartial() { - com.google.cloud.vision.v1p2beta1.Property result = new com.google.cloud.vision.v1p2beta1.Property(this); - result.name_ = name_; - result.value_ = value_; - result.uint64Value_ = uint64Value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Property) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Property)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Property other) { - if (other == com.google.cloud.vision.v1p2beta1.Property.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getUint64Value() != 0L) { - setUint64Value(other.getUint64Value()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Property parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Property) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - - private long uint64Value_ ; - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @param value The uint64Value to set. - * @return This builder for chaining. - */ - public Builder setUint64Value(long value) { - - uint64Value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return This builder for chaining. - */ - public Builder clearUint64Value() { - - uint64Value_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Property) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Property) - private static final com.google.cloud.vision.v1p2beta1.Property DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Property(); - } - - public static com.google.cloud.vision.v1p2beta1.Property getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Property parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Property(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Property getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java deleted file mode 100644 index a6559a942f46..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/PropertyOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface PropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Property) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - long getUint64Value(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java deleted file mode 100644 index 5bce1f6280d3..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Set of features pertaining to the image, computed by computer vision
- * methods over safe-search verticals (for example, adult, spoof, medical,
- * violence).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.SafeSearchAnnotation} - */ -public final class SafeSearchAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - SafeSearchAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use SafeSearchAnnotation.newBuilder() to construct. - private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SafeSearchAnnotation() { - adult_ = 0; - spoof_ = 0; - medical_ = 0; - violence_ = 0; - racy_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SafeSearchAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SafeSearchAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - adult_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - spoof_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - medical_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - violence_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - racy_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder.class); - } - - public static final int ADULT_FIELD_NUMBER = 1; - private int adult_; - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SPOOF_FIELD_NUMBER = 2; - private int spoof_; - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int MEDICAL_FIELD_NUMBER = 3; - private int medical_; - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int VIOLENCE_FIELD_NUMBER = 4; - private int violence_; - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RACY_FIELD_NUMBER = 9; - private int racy_; - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adult_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, racy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adult_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p2beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, racy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) obj; - - if (adult_ != other.adult_) return false; - if (spoof_ != other.spoof_) return false; - if (medical_ != other.medical_) return false; - if (violence_ != other.violence_) return false; - if (racy_ != other.racy_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADULT_FIELD_NUMBER; - hash = (53 * hash) + adult_; - hash = (37 * hash) + SPOOF_FIELD_NUMBER; - hash = (53 * hash) + spoof_; - hash = (37 * hash) + MEDICAL_FIELD_NUMBER; - hash = (53 * hash) + medical_; - hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; - hash = (53 * hash) + violence_; - hash = (37 * hash) + RACY_FIELD_NUMBER; - hash = (53 * hash) + racy_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of features pertaining to the image, computed by computer vision
-   * methods over safe-search verticals (for example, adult, spoof, medical,
-   * violence).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.SafeSearchAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adult_ = 0; - - spoof_ = 0; - - medical_ = 0; - - violence_ = 0; - - racy_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation build() { - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation(this); - result.adult_ = adult_; - result.spoof_ = spoof_; - result.medical_ = medical_; - result.violence_ = violence_; - result.racy_ = racy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.getDefaultInstance()) return this; - if (other.adult_ != 0) { - setAdultValue(other.getAdultValue()); - } - if (other.spoof_ != 0) { - setSpoofValue(other.getSpoofValue()); - } - if (other.medical_ != 0) { - setMedicalValue(other.getMedicalValue()); - } - if (other.violence_ != 0) { - setViolenceValue(other.getViolenceValue()); - } - if (other.racy_ != 0) { - setRacyValue(other.getRacyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int adult_ = 0; - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @param value The enum numeric value on the wire for adult to set. - * @return This builder for chaining. - */ - public Builder setAdultValue(int value) { - - adult_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @param value The adult to set. - * @return This builder for chaining. - */ - public Builder setAdult(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - adult_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return This builder for chaining. - */ - public Builder clearAdult() { - - adult_ = 0; - onChanged(); - return this; - } - - private int spoof_ = 0; - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @param value The enum numeric value on the wire for spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoofValue(int value) { - - spoof_ = value; - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @param value The spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoof(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - spoof_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return This builder for chaining. - */ - public Builder clearSpoof() { - - spoof_ = 0; - onChanged(); - return this; - } - - private int medical_ = 0; - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @param value The enum numeric value on the wire for medical to set. - * @return This builder for chaining. - */ - public Builder setMedicalValue(int value) { - - medical_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @param value The medical to set. - * @return This builder for chaining. - */ - public Builder setMedical(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - medical_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return This builder for chaining. - */ - public Builder clearMedical() { - - medical_ = 0; - onChanged(); - return this; - } - - private int violence_ = 0; - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @param value The enum numeric value on the wire for violence to set. - * @return This builder for chaining. - */ - public Builder setViolenceValue(int value) { - - violence_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @param value The violence to set. - * @return This builder for chaining. - */ - public Builder setViolence(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - violence_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return This builder for chaining. - */ - public Builder clearViolence() { - - violence_ = 0; - onChanged(); - return this; - } - - private int racy_ = 0; - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @param value The enum numeric value on the wire for racy to set. - * @return This builder for chaining. - */ - public Builder setRacyValue(int value) { - - racy_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.Likelihood result = com.google.cloud.vision.v1p2beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p2beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @param value The racy to set. - * @return This builder for chaining. - */ - public Builder setRacy(com.google.cloud.vision.v1p2beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - racy_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return This builder for chaining. - */ - public Builder clearRacy() { - - racy_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - private static final com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafeSearchAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SafeSearchAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java deleted file mode 100644 index 2f97a54c675d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotationOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface SafeSearchAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - int getAdultValue(); - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood adult = 1; - * @return The adult. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getAdult(); - - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - int getSpoofValue(); - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood spoof = 2; - * @return The spoof. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getSpoof(); - - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - int getMedicalValue(); - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood medical = 3; - * @return The medical. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getMedical(); - - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - int getViolenceValue(); - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood violence = 4; - * @return The violence. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getViolence(); - - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - int getRacyValue(); - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p2beta1.Likelihood racy = 9; - * @return The racy. - */ - com.google.cloud.vision.v1p2beta1.Likelihood getRacy(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java deleted file mode 100644 index a0ee829c942b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A single symbol representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Symbol} - */ -public final class Symbol extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Symbol) - SymbolOrBuilder { -private static final long serialVersionUID = 0L; - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Symbol() { - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Symbol(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Symbol( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Symbol.class, com.google.cloud.vision.v1p2beta1.Symbol.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object text_; - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Symbol)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Symbol other = (com.google.cloud.vision.v1p2beta1.Symbol) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Symbol prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single symbol representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Symbol} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Symbol) - com.google.cloud.vision.v1p2beta1.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Symbol.class, com.google.cloud.vision.v1p2beta1.Symbol.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - text_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Symbol build() { - com.google.cloud.vision.v1p2beta1.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Symbol buildPartial() { - com.google.cloud.vision.v1p2beta1.Symbol result = new com.google.cloud.vision.v1p2beta1.Symbol(this); - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.text_ = text_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Symbol) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Symbol other) { - if (other == com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Symbol) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Symbol) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Symbol) - private static final com.google.cloud.vision.v1p2beta1.Symbol DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Symbol(); - } - - public static com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Symbol getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java deleted file mode 100644 index a192c7ee7ba8..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SymbolOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Symbol) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java deleted file mode 100644 index a75c31a2379b..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java +++ /dev/null @@ -1,3814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * TextAnnotation contains a structured representation of OCR extracted text.
- * The hierarchy of an OCR extracted text structure is like this:
- *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
- * Each structural component, starting from Page, may further have their own
- * properties. Properties describe detected languages, breaks etc.. Please refer
- * to the
- * [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty]
- * message definition below for more detail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation} - */ -public final class TextAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation) - TextAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextAnnotation.newBuilder() to construct. - private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextAnnotation() { - pages_ = java.util.Collections.emptyList(); - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Page.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder.class); - } - - public interface DetectedLanguageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - } - /** - *
-   * Detected language for a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} - */ - public static final class DetectedLanguage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedLanguage() { - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedLanguage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedLanguage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) obj; - - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - languageCode_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage build() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage buildPartial() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage(this); - result.languageCode_ = languageCode_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage other) { - if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage(); - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedLanguage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectedBreakOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType(); - - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - boolean getIsPrefix(); - } - /** - *
-   * Detected start or end of a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} - */ - public static final class DetectedBreak extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedBreak() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedBreak(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedBreak( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - isPrefix_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - /** - *
-     * Enum to denote the type of break found. New line, space etc.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType} - */ - public enum BreakType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - SURE_SPACE(2), - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - EOL_SURE_SPACE(3), - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - HYPHEN(4), - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - LINE_BREAK(5), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - public static final int SURE_SPACE_VALUE = 2; - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - public static final int EOL_SURE_SPACE_VALUE = 3; - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - public static final int HYPHEN_VALUE = 4; - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - public static final int LINE_BREAK_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BreakType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BreakType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SPACE; - case 2: return SURE_SPACE; - case 3: return EOL_SURE_SPACE; - case 4: return HYPHEN; - case 5: return LINE_BREAK; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BreakType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BreakType findValueByNumber(int number) { - return BreakType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); - } - - private static final BreakType[] VALUES = values(); - - public static BreakType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BreakType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - - public static final int IS_PREFIX_FIELD_NUMBER = 2; - private boolean isPrefix_; - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (isPrefix_ != false) { - output.writeBool(2, isPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (isPrefix_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, isPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) obj; - - if (type_ != other.type_) return false; - if (getIsPrefix() - != other.getIsPrefix()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPrefix()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected start or end of a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - isPrefix_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak build() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak buildPartial() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak(this); - result.type_ = type_; - result.isPrefix_ = isPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak other) { - if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsPrefix() != false) { - setIsPrefix(other.getIsPrefix()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isPrefix_ ; - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @param value The isPrefix to set. - * @return This builder for chaining. - */ - public Builder setIsPrefix(boolean value) { - - isPrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearIsPrefix() { - - isPrefix_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak(); - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedBreak(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TextPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - int getDetectedLanguagesCount(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesOrBuilderList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index); - - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - boolean hasDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); - } - /** - *
-   * Additional information detected on the structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} - */ - public static final class TextProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - TextPropertyOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextProperty.newBuilder() to construct. - private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextProperty() { - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextProperty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextProperty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectedLanguages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; - if (detectedBreak_ != null) { - subBuilder = detectedBreak_.toBuilder(); - } - detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectedBreak_); - detectedBreak_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder.class); - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; - private java.util.List detectedLanguages_; - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - return detectedLanguages_.get(index); - } - - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_; - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - return detectedBreak_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - return getDetectedBreak(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetectedBreak()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) obj; - - if (!getDetectedLanguagesList() - .equals(other.getDetectedLanguagesList())) return false; - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak() - .equals(other.getDetectedBreak())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Additional information detected on the structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectedLanguagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectedLanguagesBuilder_.clear(); - } - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty build() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty buildPartial() { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty(this); - int from_bitField0_ = bitField0_; - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (detectedBreakBuilder_ == null) { - result.detectedBreak_ = detectedBreak_; - } else { - result.detectedBreak_ = detectedBreakBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty other) { - if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectedLanguagesFieldBuilder() : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List detectedLanguages_ = - java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; - - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return detectedBreakBuilder_ != null || detectedBreak_ != null; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - onChanged(); - } else { - detectedBreakBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak( - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - onChanged(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder mergeDetectedBreak(com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (detectedBreak_ != null) { - detectedBreak_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); - } else { - detectedBreak_ = value; - } - onChanged(); - } else { - detectedBreakBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder clearDetectedBreak() { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - onChanged(); - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { - - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreakOrBuilder>( - getDetectedBreak(), - getParentForChildren(), - isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - private static final com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty(); - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextProperty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PAGES_FIELD_NUMBER = 1; - private java.util.List pages_; - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List getPagesList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - @java.lang.Override - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Page getPages(int index) { - return pages_.get(index); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.TextAnnotation other = (com.google.cloud.vision.v1p2beta1.TextAnnotation) obj; - - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!getText() - .equals(other.getText())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * TextAnnotation contains a structured representation of OCR extracted text.
-   * The hierarchy of an OCR extracted text structure is like this:
-   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
-   * Each structural component, starting from Page, may further have their own
-   * properties. Properties describe detected languages, breaks etc.. Please refer
-   * to the
-   * [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty]
-   * message definition below for more detail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextAnnotation) - com.google.cloud.vision.v1p2beta1.TextAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextAnnotation.class, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.TextAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pagesBuilder_.clear(); - } - text_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation build() { - com.google.cloud.vision.v1p2beta1.TextAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation buildPartial() { - com.google.cloud.vision.v1p2beta1.TextAnnotation result = new com.google.cloud.vision.v1p2beta1.TextAnnotation(this); - int from_bitField0_ = bitField0_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - result.text_ = text_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.TextAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.TextAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextAnnotation other) { - if (other == com.google.cloud.vision.v1p2beta1.TextAnnotation.getDefaultInstance()) return this; - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - pagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.TextAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.TextAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder> pagesBuilder_; - - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p2beta1.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p2beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder addPages(com.google.cloud.vision.v1p2beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p2beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder addPages( - com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p2beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p2beta1.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p2beta1.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p2beta1.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation) - private static final com.google.cloud.vision.v1p2beta1.TextAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextAnnotation(); - } - - public static com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java deleted file mode 100644 index 993383596b57..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface TextAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - java.util.List - getPagesList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p2beta1.Page getPages(int index); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - int getPagesCount(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - java.util.List - getPagesOrBuilderList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p2beta1.PageOrBuilder getPagesOrBuilder( - int index); - - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java deleted file mode 100644 index 308d4dc72da2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotationProto.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public final class TextAnnotationProto { - private TextAnnotationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Page_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Block_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p2beta1/text_ann" + - "otation.proto\022\035google.cloud.vision.v1p2b" + - "eta1\032,google/cloud/vision/v1p2beta1/geom" + - "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + - " \003(\0132#.google.cloud.vision.v1p2beta1.Pag" + - "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + - "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + - "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + - "cloud.vision.v1p2beta1.TextAnnotation.De" + - "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + - "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + - "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + - "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + - "\n\022detected_languages\030\001 \003(\0132>.google.clou" + - "d.vision.v1p2beta1.TextAnnotation.Detect" + - "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + - "gle.cloud.vision.v1p2beta1.TextAnnotatio" + - "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + - "(\0132:.google.cloud.vision.v1p2beta1.TextA" + - "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + - "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + - "loud.vision.v1p2beta1.Block\022\022\n\nconfidenc" + - "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + - "ogle.cloud.vision.v1p2beta1.TextAnnotati" + - "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + - "google.cloud.vision.v1p2beta1.BoundingPo" + - "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + - "sion.v1p2beta1.Paragraph\022B\n\nblock_type\030\004" + - " \001(\0162..google.cloud.vision.v1p2beta1.Blo" + - "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + - "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + - "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + - "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + - "oud.vision.v1p2beta1.TextAnnotation.Text" + - "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + - "cloud.vision.v1p2beta1.BoundingPoly\0222\n\005w" + - "ords\030\003 \003(\0132#.google.cloud.vision.v1p2bet" + - "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + - "property\030\001 \001(\0132:.google.cloud.vision.v1p" + - "2beta1.TextAnnotation.TextProperty\022A\n\014bo" + - "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + - "1p2beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + - ".google.cloud.vision.v1p2beta1.Symbol\022\022\n" + - "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + - "\030\001 \001(\0132:.google.cloud.vision.v1p2beta1.T" + - "extAnnotation.TextProperty\022A\n\014bounding_b" + - "ox\030\002 \001(\0132+.google.cloud.vision.v1p2beta1" + - ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + - "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p2" + - "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + - "ang.org/genproto/googleapis/cloud/vision" + - "/v1p2beta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor, - new java.lang.String[] { "Pages", "Text", }); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor = - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedLanguage_descriptor, - new java.lang.String[] { "LanguageCode", "Confidence", }); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor = - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_DetectedBreak_descriptor, - new java.lang.String[] { "Type", "IsPrefix", }); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor = - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_TextAnnotation_TextProperty_descriptor, - new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); - internal_static_google_cloud_vision_v1p2beta1_Page_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p2beta1_Page_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Page_descriptor, - new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); - internal_static_google_cloud_vision_v1p2beta1_Block_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p2beta1_Block_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Block_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); - internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p2beta1_Paragraph_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Paragraph_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); - internal_static_google_cloud_vision_v1p2beta1_Word_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Word_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); - internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p2beta1_Symbol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_Symbol_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.cloud.vision.v1p2beta1.GeometryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java deleted file mode 100644 index a62c85f83d46..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParams.java +++ /dev/null @@ -1,767 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Parameters for text detections. This is used to control TEXT_DETECTION and
- * DOCUMENT_TEXT_DETECTION features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextDetectionParams} - */ -public final class TextDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.TextDetectionParams) - TextDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextDetectionParams.newBuilder() to construct. - private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextDetectionParams() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 72: { - - enableTextDetectionConfidenceScore_ = input.readBool(); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advancedOcrOptions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextDetectionParams.class, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder.class); - } - - public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; - private boolean enableTextDetectionConfidenceScore_; - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - - public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList advancedOcrOptions_; - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_; - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enableTextDetectionConfidenceScore_ != false) { - output.writeBool(9, enableTextDetectionConfidenceScore_); - } - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableTextDetectionConfidenceScore_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, enableTextDetectionConfidenceScore_); - } - { - int dataSize = 0; - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdvancedOcrOptionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.TextDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.TextDetectionParams other = (com.google.cloud.vision.v1p2beta1.TextDetectionParams) obj; - - if (getEnableTextDetectionConfidenceScore() - != other.getEnableTextDetectionConfidenceScore()) return false; - if (!getAdvancedOcrOptionsList() - .equals(other.getAdvancedOcrOptionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableTextDetectionConfidenceScore()); - if (getAdvancedOcrOptionsCount() > 0) { - hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.TextDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for text detections. This is used to control TEXT_DETECTION and
-   * DOCUMENT_TEXT_DETECTION features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.TextDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.TextDetectionParams) - com.google.cloud.vision.v1p2beta1.TextDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.TextDetectionParams.class, com.google.cloud.vision.v1p2beta1.TextDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.TextDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - enableTextDetectionConfidenceScore_ = false; - - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParams build() { - com.google.cloud.vision.v1p2beta1.TextDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParams buildPartial() { - com.google.cloud.vision.v1p2beta1.TextDetectionParams result = new com.google.cloud.vision.v1p2beta1.TextDetectionParams(this); - int from_bitField0_ = bitField0_; - result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; - if (((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.advancedOcrOptions_ = advancedOcrOptions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.TextDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.TextDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.TextDetectionParams other) { - if (other == com.google.cloud.vision.v1p2beta1.TextDetectionParams.getDefaultInstance()) return this; - if (other.getEnableTextDetectionConfidenceScore() != false) { - setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); - } - if (!other.advancedOcrOptions_.isEmpty()) { - if (advancedOcrOptions_.isEmpty()) { - advancedOcrOptions_ = other.advancedOcrOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.addAll(other.advancedOcrOptions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.TextDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.TextDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean enableTextDetectionConfidenceScore_ ; - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @param value The enableTextDetectionConfidenceScore to set. - * @return This builder for chaining. - */ - public Builder setEnableTextDetectionConfidenceScore(boolean value) { - - enableTextDetectionConfidenceScore_ = value; - onChanged(); - return this; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return This builder for chaining. - */ - public Builder clearEnableTextDetectionConfidenceScore() { - - enableTextDetectionConfidenceScore_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdvancedOcrOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_.getUnmodifiableView(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index to set the value at. - * @param value The advancedOcrOptions to set. - * @return This builder for chaining. - */ - public Builder setAdvancedOcrOptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param values The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAllAdvancedOcrOptions( - java.lang.Iterable values) { - ensureAdvancedOcrOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, advancedOcrOptions_); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return This builder for chaining. - */ - public Builder clearAdvancedOcrOptions() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The bytes of the advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.TextDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextDetectionParams) - private static final com.google.cloud.vision.v1p2beta1.TextDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.TextDetectionParams(); - } - - public static com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java deleted file mode 100644 index a4c66feb3478..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextDetectionParamsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface TextDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.TextDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - boolean getEnableTextDetectionConfidenceScore(); - - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - java.util.List - getAdvancedOcrOptionsList(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - int getAdvancedOcrOptionsCount(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - java.lang.String getAdvancedOcrOptions(int index); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java deleted file mode 100644 index 17505587fbd2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the vertex coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Vertex} - */ -public final class Vertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Vertex) - VertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use Vertex.newBuilder() to construct. - private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Vertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Vertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - x_ = input.readInt32(); - break; - } - case 16: { - - y_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Vertex.class, com.google.cloud.vision.v1p2beta1.Vertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private int x_; - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private int y_; - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (x_ != 0) { - output.writeInt32(1, x_); - } - if (y_ != 0) { - output.writeInt32(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, x_); - } - if (y_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Vertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Vertex other = (com.google.cloud.vision.v1p2beta1.Vertex) obj; - - if (getX() - != other.getX()) return false; - if (getY() - != other.getY()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX(); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Vertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the vertex coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Vertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Vertex) - com.google.cloud.vision.v1p2beta1.VertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Vertex.class, com.google.cloud.vision.v1p2beta1.Vertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Vertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0; - - y_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.GeometryProto.internal_static_google_cloud_vision_v1p2beta1_Vertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Vertex build() { - com.google.cloud.vision.v1p2beta1.Vertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Vertex buildPartial() { - com.google.cloud.vision.v1p2beta1.Vertex result = new com.google.cloud.vision.v1p2beta1.Vertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Vertex) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Vertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Vertex other) { - if (other == com.google.cloud.vision.v1p2beta1.Vertex.getDefaultInstance()) return this; - if (other.getX() != 0) { - setX(other.getX()); - } - if (other.getY() != 0) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Vertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Vertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(int value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0; - onChanged(); - return this; - } - - private int y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Vertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Vertex) - private static final com.google.cloud.vision.v1p2beta1.Vertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Vertex(); - } - - public static com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Vertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Vertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Vertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java deleted file mode 100644 index e57428d2a212..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/VertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/geometry.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface VertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Vertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - int getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - int getY(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java deleted file mode 100644 index ef9fa9675bbd..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java +++ /dev/null @@ -1,7537 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/web_detection.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Relevant information for the image from the Internet.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection} - */ -public final class WebDetection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection) - WebDetectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetection.newBuilder() to construct. - private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetection() { - webEntities_ = java.util.Collections.emptyList(); - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - visuallySimilarImages_ = java.util.Collections.emptyList(); - bestGuessLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - webEntities_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pagesWithMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - visuallySimilarImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bestGuessLabels_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.class, com.google.cloud.vision.v1p2beta1.WebDetection.Builder.class); - } - - public interface WebEntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - *
-   * Entity deduced from similar images on the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebEntity} - */ - public static final class WebEntity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - WebEntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebEntity.newBuilder() to construct. - private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebEntity() { - entityId_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebEntity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebEntity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - entityId_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object entityId_; - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Entity deduced from similar images on the Internet.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebEntity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - entityId_ = ""; - - score_ = 0F; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity build() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity(this); - result.entityId_ = entityId_; - result.score_ = score_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object entityId_ = ""; - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - entityId_ = value; - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - - entityId_ = getDefaultInstance().getEntityId(); - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - entityId_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebEntity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebEntity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Metadata for online images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebImage} - */ - public static final class WebImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - WebImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebImage.newBuilder() to construct. - private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebImage() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for online images.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage build() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebImage(this); - result.url_ = url_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebImage(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebPageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - java.lang.String getPageTitle(); - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - com.google.protobuf.ByteString - getPageTitleBytes(); - - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - int getFullMatchingImagesCount(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - int getPartialMatchingImagesCount(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - } - /** - *
-   * Metadata for web pages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebPage} - */ - public static final class WebPage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - WebPageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebPage.newBuilder() to construct. - private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebPage() { - url_ = ""; - pageTitle_ = ""; - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebPage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebPage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageTitle_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PAGE_TITLE_FIELD_NUMBER = 3; - private volatile java.lang.Object pageTitle_; - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - @java.lang.Override - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } - } - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List fullMatchingImages_; - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; - private java.util.List partialMatchingImages_; - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(5, partialMatchingImages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, partialMatchingImages_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebPage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getPageTitle() - .equals(other.getPageTitle())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; - hash = (53 * hash) + getPageTitle().hashCode(); - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for web pages.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebPage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - pageTitle_ = ""; - - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage build() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebPage(this); - int from_bitField0_ = bitField0_; - result.url_ = url_; - result.score_ = score_; - result.pageTitle_ = pageTitle_; - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebPage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getPageTitle().isEmpty()) { - pageTitle_ = other.pageTitle_; - onChanged(); - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object pageTitle_ = ""; - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageTitle_ = value; - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return This builder for chaining. - */ - public Builder clearPageTitle() { - - pageTitle_ = getDefaultInstance().getPageTitle(); - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The bytes for pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageTitle_ = value; - onChanged(); - return this; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebPage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebPage(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebPage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebPage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - } - /** - *
-   * Label to provide extra metadata for the web detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebLabel} - */ - public static final class WebLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) - WebLabelOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebLabel.newBuilder() to construct. - private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebLabel() { - label_ = ""; - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - private volatile java.lang.Object label_; - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) obj; - - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Label to provide extra metadata for the web detection.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection.WebLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - label_ = ""; - - languageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel build() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel(this); - result.label_ = label_; - result.languageCode_ = languageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()) return this; - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebLabel) - private static final com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int WEB_ENTITIES_FIELD_NUMBER = 1; - private java.util.List webEntities_; - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List getWebEntitiesList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List - getWebEntitiesOrBuilderList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public int getWebEntitiesCount() { - return webEntities_.size(); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index) { - return webEntities_.get(index); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - return webEntities_.get(index); - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; - private java.util.List fullMatchingImages_; - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; - private java.util.List partialMatchingImages_; - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List pagesWithMatchingImages_; - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List getPagesWithMatchingImagesList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public int getPagesWithMatchingImagesCount() { - return pagesWithMatchingImages_.size(); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - return pagesWithMatchingImages_.get(index); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - return pagesWithMatchingImages_.get(index); - } - - public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; - private java.util.List visuallySimilarImages_; - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List getVisuallySimilarImagesList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public int getVisuallySimilarImagesCount() { - return visuallySimilarImages_.size(); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - return visuallySimilarImages_.get(index); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - return visuallySimilarImages_.get(index); - } - - public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; - private java.util.List bestGuessLabels_; - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List getBestGuessLabelsList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List - getBestGuessLabelsOrBuilderList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public int getBestGuessLabelsCount() { - return bestGuessLabels_.size(); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - return bestGuessLabels_.get(index); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - return bestGuessLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < webEntities_.size(); i++) { - output.writeMessage(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - output.writeMessage(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - output.writeMessage(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - output.writeMessage(8, bestGuessLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < webEntities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, bestGuessLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetection)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetection other = (com.google.cloud.vision.v1p2beta1.WebDetection) obj; - - if (!getWebEntitiesList() - .equals(other.getWebEntitiesList())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!getPagesWithMatchingImagesList() - .equals(other.getPagesWithMatchingImagesList())) return false; - if (!getVisuallySimilarImagesList() - .equals(other.getVisuallySimilarImagesList())) return false; - if (!getBestGuessLabelsList() - .equals(other.getBestGuessLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWebEntitiesCount() > 0) { - hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getWebEntitiesList().hashCode(); - } - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - if (getPagesWithMatchingImagesCount() > 0) { - hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); - } - if (getVisuallySimilarImagesCount() > 0) { - hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); - } - if (getBestGuessLabelsCount() > 0) { - hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getBestGuessLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Relevant information for the image from the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetection) - com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetection.class, com.google.cloud.vision.v1p2beta1.WebDetection.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWebEntitiesFieldBuilder(); - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - getPagesWithMatchingImagesFieldBuilder(); - getVisuallySimilarImagesFieldBuilder(); - getBestGuessLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - webEntitiesBuilder_.clear(); - } - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - partialMatchingImagesBuilder_.clear(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - visuallySimilarImagesBuilder_.clear(); - } - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection build() { - com.google.cloud.vision.v1p2beta1.WebDetection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetection result = new com.google.cloud.vision.v1p2beta1.WebDetection(this); - int from_bitField0_ = bitField0_; - if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.webEntities_ = webEntities_; - } else { - result.webEntities_ = webEntitiesBuilder_.build(); - } - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.pagesWithMatchingImages_ = pagesWithMatchingImages_; - } else { - result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); - } - if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.visuallySimilarImages_ = visuallySimilarImages_; - } else { - result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); - } - if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bestGuessLabels_ = bestGuessLabels_; - } else { - result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetection) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetection other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetection.getDefaultInstance()) return this; - if (webEntitiesBuilder_ == null) { - if (!other.webEntities_.isEmpty()) { - if (webEntities_.isEmpty()) { - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWebEntitiesIsMutable(); - webEntities_.addAll(other.webEntities_); - } - onChanged(); - } - } else { - if (!other.webEntities_.isEmpty()) { - if (webEntitiesBuilder_.isEmpty()) { - webEntitiesBuilder_.dispose(); - webEntitiesBuilder_ = null; - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - webEntitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWebEntitiesFieldBuilder() : null; - } else { - webEntitiesBuilder_.addAllMessages(other.webEntities_); - } - } - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImages_.isEmpty()) { - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); - } - onChanged(); - } - } else { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImagesBuilder_.isEmpty()) { - pagesWithMatchingImagesBuilder_.dispose(); - pagesWithMatchingImagesBuilder_ = null; - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - pagesWithMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesWithMatchingImagesFieldBuilder() : null; - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); - } - } - } - if (visuallySimilarImagesBuilder_ == null) { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImages_.isEmpty()) { - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.addAll(other.visuallySimilarImages_); - } - onChanged(); - } - } else { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImagesBuilder_.isEmpty()) { - visuallySimilarImagesBuilder_.dispose(); - visuallySimilarImagesBuilder_ = null; - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - visuallySimilarImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVisuallySimilarImagesFieldBuilder() : null; - } else { - visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); - } - } - } - if (bestGuessLabelsBuilder_ == null) { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabels_.isEmpty()) { - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.addAll(other.bestGuessLabels_); - } - onChanged(); - } - } else { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabelsBuilder_.isEmpty()) { - bestGuessLabelsBuilder_.dispose(); - bestGuessLabelsBuilder_ = null; - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - bestGuessLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBestGuessLabelsFieldBuilder() : null; - } else { - bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List webEntities_ = - java.util.Collections.emptyList(); - private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(webEntities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; - - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List getWebEntitiesList() { - if (webEntitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webEntities_); - } else { - return webEntitiesBuilder_.getMessageList(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public int getWebEntitiesCount() { - if (webEntitiesBuilder_ == null) { - return webEntities_.size(); - } else { - return webEntitiesBuilder_.getCount(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); - } else { - return webEntitiesBuilder_.getMessage(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.set(index, value); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.set(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities(com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(index, value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addAllWebEntities( - java.lang.Iterable values) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, webEntities_); - onChanged(); - } else { - webEntitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder clearWebEntities() { - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - webEntitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder removeWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.remove(index); - onChanged(); - } else { - webEntitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); } else { - return webEntitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesOrBuilderList() { - if (webEntitiesBuilder_ != null) { - return webEntitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webEntities_); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { - return getWebEntitiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesBuilderList() { - return getWebEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder> - getWebEntitiesFieldBuilder() { - if (webEntitiesBuilder_ == null) { - webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - webEntities_ = null; - } - return webEntitiesBuilder_; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - - private java.util.List pagesWithMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; - - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List getPagesWithMatchingImagesList() { - if (pagesWithMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } else { - return pagesWithMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public int getPagesWithMatchingImagesCount() { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.size(); - } else { - return pagesWithMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); - } else { - return pagesWithMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addAllPagesWithMatchingImages( - java.lang.Iterable values) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pagesWithMatchingImages_); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder clearPagesWithMatchingImages() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder removePagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.remove(index); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); } else { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - if (pagesWithMatchingImagesBuilder_ != null) { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesBuilderList() { - return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder> - getPagesWithMatchingImagesFieldBuilder() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage, com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder>( - pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - pagesWithMatchingImages_ = null; - } - return pagesWithMatchingImagesBuilder_; - } - - private java.util.List visuallySimilarImages_ = - java.util.Collections.emptyList(); - private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; - - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List getVisuallySimilarImagesList() { - if (visuallySimilarImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } else { - return visuallySimilarImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public int getVisuallySimilarImagesCount() { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.size(); - } else { - return visuallySimilarImagesBuilder_.getCount(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); - } else { - return visuallySimilarImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addAllVisuallySimilarImages( - java.lang.Iterable values) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visuallySimilarImages_); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder clearVisuallySimilarImages() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - visuallySimilarImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder removeVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.remove(index); - onChanged(); - } else { - visuallySimilarImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); } else { - return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - if (visuallySimilarImagesBuilder_ != null) { - return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesBuilderList() { - return getVisuallySimilarImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder> - getVisuallySimilarImagesFieldBuilder() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage, com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( - visuallySimilarImages_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - visuallySimilarImages_ = null; - } - return visuallySimilarImagesBuilder_; - } - - private java.util.List bestGuessLabels_ = - java.util.Collections.emptyList(); - private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; - - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List getBestGuessLabelsList() { - if (bestGuessLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } else { - return bestGuessLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public int getBestGuessLabelsCount() { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.size(); - } else { - return bestGuessLabelsBuilder_.getCount(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); - } else { - return bestGuessLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels(com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addAllBestGuessLabels( - java.lang.Iterable values) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bestGuessLabels_); - onChanged(); - } else { - bestGuessLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder clearBestGuessLabels() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder removeBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.remove(index); - onChanged(); - } else { - bestGuessLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); } else { - return bestGuessLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsOrBuilderList() { - if (bestGuessLabelsBuilder_ != null) { - return bestGuessLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { - return getBestGuessLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsBuilderList() { - return getBestGuessLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder> - getBestGuessLabelsFieldBuilder() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder>( - bestGuessLabels_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - bestGuessLabels_ = null; - } - return bestGuessLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection) - private static final com.google.cloud.vision.v1p2beta1.WebDetection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetection(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java deleted file mode 100644 index be22ed9f4276..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionOrBuilder.java +++ /dev/null @@ -1,288 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/web_detection.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface WebDetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity getWebEntities(int index); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - int getWebEntitiesCount(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesOrBuilderList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index); - - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - int getFullMatchingImagesCount(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - int getPartialMatchingImagesCount(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - int getPagesWithMatchingImagesCount(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesOrBuilderList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index); - - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImage getVisuallySimilarImages(int index); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - int getVisuallySimilarImagesCount(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesOrBuilderList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index); - - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel getBestGuessLabels(int index); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - int getBestGuessLabelsCount(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsOrBuilderList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java deleted file mode 100644 index 08326401d14c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * Parameters for web detection request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetectionParams} - */ -public final class WebDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.WebDetectionParams) - WebDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetectionParams.newBuilder() to construct. - private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetectionParams() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - includeGeoResults_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetectionParams.class, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder.class); - } - - public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; - private boolean includeGeoResults_; - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (includeGeoResults_ != false) { - output.writeBool(2, includeGeoResults_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGeoResults_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeGeoResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.WebDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.WebDetectionParams other = (com.google.cloud.vision.v1p2beta1.WebDetectionParams) obj; - - if (getIncludeGeoResults() - != other.getIncludeGeoResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeGeoResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.WebDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for web detection request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.WebDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.WebDetectionParams) - com.google.cloud.vision.v1p2beta1.WebDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.WebDetectionParams.class, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.WebDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - includeGeoResults_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p2beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParams build() { - com.google.cloud.vision.v1p2beta1.WebDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParams buildPartial() { - com.google.cloud.vision.v1p2beta1.WebDetectionParams result = new com.google.cloud.vision.v1p2beta1.WebDetectionParams(this); - result.includeGeoResults_ = includeGeoResults_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.WebDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.WebDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.WebDetectionParams other) { - if (other == com.google.cloud.vision.v1p2beta1.WebDetectionParams.getDefaultInstance()) return this; - if (other.getIncludeGeoResults() != false) { - setIncludeGeoResults(other.getIncludeGeoResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.WebDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.WebDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean includeGeoResults_ ; - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @param value The includeGeoResults to set. - * @return This builder for chaining. - */ - public Builder setIncludeGeoResults(boolean value) { - - includeGeoResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeGeoResults() { - - includeGeoResults_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.WebDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetectionParams) - private static final com.google.cloud.vision.v1p2beta1.WebDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.WebDetectionParams(); - } - - public static com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.WebDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java deleted file mode 100644 index f47b8b19f642..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParamsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/image_annotator.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface WebDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.WebDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - boolean getIncludeGeoResults(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java deleted file mode 100644 index 1be17273cc36..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionProto.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/web_detection.proto - -package com.google.cloud.vision.v1p2beta1; - -public final class WebDetectionProto { - private WebDetectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/vision/v1p2beta1/web_dete" + - "ction.proto\022\035google.cloud.vision.v1p2bet" + - "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + - "\01325.google.cloud.vision.v1p2beta1.WebDet" + - "ection.WebEntity\022R\n\024full_matching_images" + - "\030\002 \003(\01324.google.cloud.vision.v1p2beta1.W" + - "ebDetection.WebImage\022U\n\027partial_matching" + - "_images\030\003 \003(\01324.google.cloud.vision.v1p2" + - "beta1.WebDetection.WebImage\022W\n\032pages_wit" + - "h_matching_images\030\004 \003(\01323.google.cloud.v" + - "ision.v1p2beta1.WebDetection.WebPage\022U\n\027" + - "visually_similar_images\030\006 \003(\01324.google.c" + - "loud.vision.v1p2beta1.WebDetection.WebIm" + - "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + - "cloud.vision.v1p2beta1.WebDetection.WebL" + - "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + - "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + - "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + - "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + - "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + - "(\01324.google.cloud.vision.v1p2beta1.WebDe" + - "tection.WebImage\022U\n\027partial_matching_ima" + - "ges\030\005 \003(\01324.google.cloud.vision.v1p2beta" + - "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + - "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + - "m.google.cloud.vision.v1p2beta1B\021WebDete" + - "ctionProtoP\001ZCgoogle.golang.org/genproto" + - "/googleapis/cloud/vision/v1p2beta1;visio" + - "n\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor, - new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor = - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebEntity_descriptor, - new java.lang.String[] { "EntityId", "Score", "Description", }); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor = - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebImage_descriptor, - new java.lang.String[] { "Url", "Score", }); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor = - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebPage_descriptor, - new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor = - internal_static_google_cloud_vision_v1p2beta1_WebDetection_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p2beta1_WebDetection_WebLabel_descriptor, - new java.lang.String[] { "Label", "LanguageCode", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java deleted file mode 100644 index 35213ba52494..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java +++ /dev/null @@ -1,1617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -/** - *
- * A word representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Word} - */ -public final class Word extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p2beta1.Word) - WordOrBuilder { -private static final long serialVersionUID = 0L; - // Use Word.newBuilder() to construct. - private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Word() { - symbols_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Word(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Word( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p2beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - symbols_.add( - input.readMessage(com.google.cloud.vision.v1p2beta1.Symbol.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Word.class, com.google.cloud.vision.v1p2beta1.Word.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SYMBOLS_FIELD_NUMBER = 3; - private java.util.List symbols_; - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List getSymbolsList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List - getSymbolsOrBuilderList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - @java.lang.Override - public int getSymbolsCount() { - return symbols_.size(); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index) { - return symbols_.get(index); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - return symbols_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - output.writeMessage(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p2beta1.Word)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p2beta1.Word other = (com.google.cloud.vision.v1p2beta1.Word) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getSymbolsList() - .equals(other.getSymbolsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getSymbolsCount() > 0) { - hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; - hash = (53 * hash) + getSymbolsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Word parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Word parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p2beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p2beta1.Word prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A word representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p2beta1.Word} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p2beta1.Word) - com.google.cloud.vision.v1p2beta1.WordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p2beta1.Word.class, com.google.cloud.vision.v1p2beta1.Word.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p2beta1.Word.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSymbolsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - symbolsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p2beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p2beta1_Word_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Word getDefaultInstanceForType() { - return com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Word build() { - com.google.cloud.vision.v1p2beta1.Word result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Word buildPartial() { - com.google.cloud.vision.v1p2beta1.Word result = new com.google.cloud.vision.v1p2beta1.Word(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.symbols_ = symbols_; - } else { - result.symbols_ = symbolsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p2beta1.Word) { - return mergeFrom((com.google.cloud.vision.v1p2beta1.Word)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p2beta1.Word other) { - if (other == com.google.cloud.vision.v1p2beta1.Word.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (symbolsBuilder_ == null) { - if (!other.symbols_.isEmpty()) { - if (symbols_.isEmpty()) { - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSymbolsIsMutable(); - symbols_.addAll(other.symbols_); - } - onChanged(); - } - } else { - if (!other.symbols_.isEmpty()) { - if (symbolsBuilder_.isEmpty()) { - symbolsBuilder_.dispose(); - symbolsBuilder_ = null; - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - symbolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSymbolsFieldBuilder() : null; - } else { - symbolsBuilder_.addAllMessages(other.symbols_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p2beta1.Word parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p2beta1.Word) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p2beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p2beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p2beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List symbols_ = - java.util.Collections.emptyList(); - private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(symbols_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder> symbolsBuilder_; - - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public java.util.List getSymbolsList() { - if (symbolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbols_); - } else { - return symbolsBuilder_.getMessageList(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public int getSymbolsCount() { - if (symbolsBuilder_ == null) { - return symbols_.size(); - } else { - return symbolsBuilder_.getCount(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); - } else { - return symbolsBuilder_.getMessage(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p2beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.set(index, value); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.set(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder addSymbols(com.google.cloud.vision.v1p2beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(value); - onChanged(); - } else { - symbolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p2beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(index, value); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p2beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder addAllSymbols( - java.lang.Iterable values) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbols_); - onChanged(); - } else { - symbolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder clearSymbols() { - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - symbolsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public Builder removeSymbols(int index) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.remove(index); - onChanged(); - } else { - symbolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p2beta1.Symbol.Builder getSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); } else { - return symbolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsOrBuilderList() { - if (symbolsBuilder_ != null) { - return symbolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(symbols_); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p2beta1.Symbol.Builder addSymbolsBuilder() { - return getSymbolsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p2beta1.Symbol.Builder addSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p2beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsBuilderList() { - return getSymbolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder> - getSymbolsFieldBuilder() { - if (symbolsBuilder_ == null) { - symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - symbols_ = null; - } - return symbolsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p2beta1.Word) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Word) - private static final com.google.cloud.vision.v1p2beta1.Word DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p2beta1.Word(); - } - - public static com.google.cloud.vision.v1p2beta1.Word getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Word parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Word(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p2beta1.Word getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java deleted file mode 100644 index a02556d317b5..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WordOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p2beta1/text_annotation.proto - -package com.google.cloud.vision.v1p2beta1; - -public interface WordOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p2beta1.Word) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p2beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p2beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p2beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p2beta1.Symbol getSymbols(int index); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - int getSymbolsCount(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsOrBuilderList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p2beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p2beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto deleted file mode 100644 index e9fec20bda76..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/geometry.proto +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p2beta1; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.cloud.vision.v1p2beta1"; - -// A vertex represents a 2D point in the image. -// NOTE: the vertex coordinates are in the same scale as the original image. -message Vertex { - // X coordinate. - int32 x = 1; - - // Y coordinate. - int32 y = 2; -} - -// A vertex represents a 2D point in the image. -// NOTE: the normalized vertex coordinates are relative to the original image -// and range from 0 to 1. -message NormalizedVertex { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; -} - -// A bounding polygon for the detected image annotation. -message BoundingPoly { - // The bounding polygon vertices. - repeated Vertex vertices = 1; - - // The bounding polygon normalized vertices. - repeated NormalizedVertex normalized_vertices = 2; -} - -// A 3D position in the image, used primarily for Face detection landmarks. -// A valid Position must have both x and y coordinates. -// The position coordinates are in the same scale as the original image. -message Position { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; - - // Z coordinate (or depth). - float z = 3; -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto deleted file mode 100644 index 264462d48438..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/image_annotator.proto +++ /dev/null @@ -1,794 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p2beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/vision/v1p2beta1/geometry.proto"; -import "google/cloud/vision/v1p2beta1/text_annotation.proto"; -import "google/cloud/vision/v1p2beta1/web_detection.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/color.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ImageAnnotatorProto"; -option java_package = "com.google.cloud.vision.v1p2beta1"; - -// Service that performs Google Cloud Vision API detection tasks over client -// images, such as face, landmark, logo, label, and text detection. The -// ImageAnnotator service returns detected entities from the images. -service ImageAnnotator { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { - option (google.api.http) = { - post: "/v1p2beta1/images:annotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - } - - // Run async image detection and annotation for a list of generic files (e.g. - // PDF) which may contain multiple pages and multiple images per page. - // Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p2beta1/files:asyncBatchAnnotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateFilesResponse" - metadata_type: "OperationMetadata" - }; - } -} - -// The type of Google Cloud Vision API detection to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message Feature { - // Type of Google Cloud Vision API feature to be extracted. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run face detection. - FACE_DETECTION = 1; - - // Run landmark detection. - LANDMARK_DETECTION = 2; - - // Run logo detection. - LOGO_DETECTION = 3; - - // Run label detection. - LABEL_DETECTION = 4; - - // Run text detection / optical character recognition (OCR). Text detection - // is optimized for areas of text within a larger image; if the image is - // a document, use `DOCUMENT_TEXT_DETECTION` instead. - TEXT_DETECTION = 5; - - // Run dense text document OCR. Takes precedence when both - // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - DOCUMENT_TEXT_DETECTION = 11; - - // Run Safe Search to detect potentially unsafe - // or undesirable content. - SAFE_SEARCH_DETECTION = 6; - - // Compute a set of image properties, such as the - // image's dominant colors. - IMAGE_PROPERTIES = 7; - - // Run crop hints. - CROP_HINTS = 9; - - // Run web detection. - WEB_DETECTION = 10; - } - - // The feature type. - Type type = 1; - - // Maximum number of results of this type. Does not apply to - // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - int32 max_results = 2; - - // Model to use for the feature. - // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - // support "builtin/weekly" for the bleeding edge release updated weekly. - string model = 3; -} - -// External image source (Google Cloud Storage or web URL image location). -message ImageSource { - // **Use `image_uri` instead.** - // - // The Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - string gcs_image_uri = 1; - - // The URI of the source image. Can be either: - // - // 1. A Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more - // info. - // - // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - // HTTP/HTTPS URLs, Google cannot guarantee that the request will be - // completed. Your request may fail if the specified host denies the - // request (e.g. due to request throttling or DOS prevention), or if Google - // throttles requests to the site for abuse prevention. You should not - // depend on externally-hosted images for production applications. - // - // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - // precedence. - string image_uri = 2; -} - -// Client image to perform Google Cloud Vision API tasks over. -message Image { - // Image content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - bytes content = 1; - - // Google Cloud Storage image location, or publicly-accessible image - // URL. If both `content` and `source` are provided for an image, `content` - // takes precedence and is used to perform the image annotation request. - ImageSource source = 2; -} - -// A face annotation object contains the results of face detection. -message FaceAnnotation { - // A face-specific landmark (for example, a face feature). - message Landmark { - // Face landmark (feature) type. - // Left and right are defined from the vantage of the viewer of the image - // without considering mirror projections typical of photos. So, `LEFT_EYE`, - // typically, is the person's right eye. - enum Type { - // Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0; - - // Left eye. - LEFT_EYE = 1; - - // Right eye. - RIGHT_EYE = 2; - - // Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3; - - // Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4; - - // Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5; - - // Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6; - - // Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7; - - // Nose tip. - NOSE_TIP = 8; - - // Upper lip. - UPPER_LIP = 9; - - // Lower lip. - LOWER_LIP = 10; - - // Mouth left. - MOUTH_LEFT = 11; - - // Mouth right. - MOUTH_RIGHT = 12; - - // Mouth center. - MOUTH_CENTER = 13; - - // Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14; - - // Nose, bottom left. - NOSE_BOTTOM_LEFT = 15; - - // Nose, bottom center. - NOSE_BOTTOM_CENTER = 16; - - // Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17; - - // Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18; - - // Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19; - - // Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20; - - // Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21; - - // Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22; - - // Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23; - - // Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24; - - // Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25; - - // Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - - // Left ear tragion. - LEFT_EAR_TRAGION = 27; - - // Right ear tragion. - RIGHT_EAR_TRAGION = 28; - - // Left eye pupil. - LEFT_EYE_PUPIL = 29; - - // Right eye pupil. - RIGHT_EYE_PUPIL = 30; - - // Forehead glabella. - FOREHEAD_GLABELLA = 31; - - // Chin gnathion. - CHIN_GNATHION = 32; - - // Chin left gonion. - CHIN_LEFT_GONION = 33; - - // Chin right gonion. - CHIN_RIGHT_GONION = 34; - } - - // Face landmark type. - Type type = 3; - - // Face landmark position. - Position position = 4; - } - - // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale, as returned in `ImageParams`. - // The bounding box is computed to "frame" the face in accordance with human - // expectations. It is based on the landmarker results. - // Note that one or more x and/or y coordinates may not be generated in the - // `BoundingPoly` (the polygon will be unbounded) if only a partial face - // appears in the image to be annotated. - BoundingPoly bounding_poly = 1; - - // The `fd_bounding_poly` bounding polygon is tighter than the - // `boundingPoly`, and encloses only the skin part of the face. Typically, it - // is used to eliminate the face from any image analysis that detects the - // "amount of skin" visible in an image. It is not based on the - // landmarker results, only on the initial face detection, hence - // the fd (face detection) prefix. - BoundingPoly fd_bounding_poly = 2; - - // Detected face landmarks. - repeated Landmark landmarks = 3; - - // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - // of the face relative to the image vertical about the axis perpendicular to - // the face. Range [-180,180]. - float roll_angle = 4; - - // Yaw angle, which indicates the leftward/rightward angle that the face is - // pointing relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - float pan_angle = 5; - - // Pitch angle, which indicates the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - float tilt_angle = 6; - - // Detection confidence. Range [0, 1]. - float detection_confidence = 7; - - // Face landmarking confidence. Range [0, 1]. - float landmarking_confidence = 8; - - // Joy likelihood. - Likelihood joy_likelihood = 9; - - // Sorrow likelihood. - Likelihood sorrow_likelihood = 10; - - // Anger likelihood. - Likelihood anger_likelihood = 11; - - // Surprise likelihood. - Likelihood surprise_likelihood = 12; - - // Under-exposed likelihood. - Likelihood under_exposed_likelihood = 13; - - // Blurred likelihood. - Likelihood blurred_likelihood = 14; - - // Headwear likelihood. - Likelihood headwear_likelihood = 15; -} - -// Detected entity location information. -message LocationInfo { - // lat/long location coordinates. - google.type.LatLng lat_lng = 1; -} - -// A `Property` consists of a user-supplied name/value pair. -message Property { - // Name of the property. - string name = 1; - - // Value of the property. - string value = 2; - - // Value of numeric properties. - uint64 uint64_value = 3; -} - -// Set of detected entity features. -message EntityAnnotation { - // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search - // API](https://developers.google.com/knowledge-graph/). - string mid = 1; - - // The language code for the locale in which the entity textual - // `description` is expressed. - string locale = 2; - - // Entity textual description, expressed in its `locale` language. - string description = 3; - - // Overall score of the result. Range [0, 1]. - float score = 4; - - // **Deprecated. Use `score` instead.** - // The accuracy of the entity detection in an image. - // For example, for an image in which the "Eiffel Tower" entity is detected, - // this field represents the confidence that there is a tower in the query - // image. Range [0, 1]. - float confidence = 5; - - // The relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of "tower" is likely higher to an image - // containing the detected "Eiffel Tower" than to an image containing a - // detected distant towering building, even though the confidence that - // there is a tower in each image may be the same. Range [0, 1]. - float topicality = 6; - - // Image region to which this entity belongs. Not produced - // for `LABEL_DETECTION` features. - BoundingPoly bounding_poly = 7; - - // The location information for the detected entity. Multiple - // `LocationInfo` elements can be present because one location may - // indicate the location of the scene in the image, and another location - // may indicate the location of the place where the image was taken. - // Location information is usually present for landmarks. - repeated LocationInfo locations = 8; - - // Some entities may have optional user-supplied `Property` (name/value) - // fields, such a score or string that qualifies the entity. - repeated Property properties = 9; -} - -// Set of features pertaining to the image, computed by computer vision -// methods over safe-search verticals (for example, adult, spoof, medical, -// violence). -message SafeSearchAnnotation { - // Represents the adult content likelihood for the image. Adult content may - // contain elements such as nudity, pornographic images or cartoons, or - // sexual activities. - Likelihood adult = 1; - - // Spoof likelihood. The likelihood that an modification - // was made to the image's canonical version to make it appear - // funny or offensive. - Likelihood spoof = 2; - - // Likelihood that this is a medical image. - Likelihood medical = 3; - - // Likelihood that this image contains violent content. - Likelihood violence = 4; - - // Likelihood that the request image contains racy content. Racy content may - // include (but is not limited to) skimpy or sheer clothing, strategically - // covered nudity, lewd or provocative poses, or close-ups of sensitive - // body areas. - Likelihood racy = 9; -} - -// Rectangle determined by min and max `LatLng` pairs. -message LatLongRect { - // Min lat/long pair. - google.type.LatLng min_lat_lng = 1; - - // Max lat/long pair. - google.type.LatLng max_lat_lng = 2; -} - -// Color information consists of RGB channels, score, and the fraction of -// the image that the color occupies in the image. -message ColorInfo { - // RGB components of the color. - google.type.Color color = 1; - - // Image-specific score for this color. Value in range [0, 1]. - float score = 2; - - // The fraction of pixels the color occupies in the image. - // Value in range [0, 1]. - float pixel_fraction = 3; -} - -// Set of dominant colors and their corresponding scores. -message DominantColorsAnnotation { - // RGB color values with their score and pixel fraction. - repeated ColorInfo colors = 1; -} - -// Stores image properties, such as dominant colors. -message ImageProperties { - // If present, dominant colors completed successfully. - DominantColorsAnnotation dominant_colors = 1; -} - -// Single crop hint that is used to generate a new crop when serving an image. -message CropHint { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale, as returned in `ImageParams`. - BoundingPoly bounding_poly = 1; - - // Confidence of this being a salient region. Range [0, 1]. - float confidence = 2; - - // Fraction of importance of this salient region with respect to the original - // image. - float importance_fraction = 3; -} - -// Set of crop hints that are used to generate new crops when serving images. -message CropHintsAnnotation { - // Crop hint results. - repeated CropHint crop_hints = 1; -} - -// Parameters for crop hints annotation request. -message CropHintsParams { - // Aspect ratios in floats, representing the ratio of the width to the height - // of the image. For example, if the desired aspect ratio is 4/3, the - // corresponding float value should be 1.33333. If not specified, the - // best possible crop is returned. The number of provided aspect ratios is - // limited to a maximum of 16; any aspect ratios provided after the 16th are - // ignored. - repeated float aspect_ratios = 1; -} - -// Parameters for web detection request. -message WebDetectionParams { - // Whether to include results derived from the geo information in the image. - bool include_geo_results = 2; -} - -// Parameters for text detections. This is used to control TEXT_DETECTION and -// DOCUMENT_TEXT_DETECTION features. -message TextDetectionParams { - - // By default, Cloud Vision API only includes confidence score for - // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - // score for TEXT_DETECTION as well. - bool enable_text_detection_confidence_score = 9; - - // A list of advanced OCR options to fine-tune OCR behavior. - repeated string advanced_ocr_options = 11; -} - -// Image context and/or feature-specific parameters. -message ImageContext { - // Not used. - LatLongRect lat_long_rect = 1; - - // List of languages to use for TEXT_DETECTION. In most cases, an empty value - // yields the best results since it enables automatic language detection. For - // languages based on the Latin alphabet, setting `language_hints` is not - // needed. In rare cases, when the language of the text in the image is known, - // setting a hint will help get better results (although it will be a - // significant hindrance if the hint is wrong). Text detection returns an - // error if one or more of the specified languages is not one of the - // [supported languages](https://cloud.google.com/vision/docs/languages). - repeated string language_hints = 2; - - // Parameters for crop hints annotation request. - CropHintsParams crop_hints_params = 4; - - // Parameters for web detection. - WebDetectionParams web_detection_params = 6; - - // Parameters for text detection and document text detection. - TextDetectionParams text_detection_params = 12; -} - -// Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features. -message AnnotateImageRequest { - // The image to be processed. - Image image = 1; - - // Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image. - ImageContext image_context = 3; -} - -// If an image was produced from a file (e.g. a PDF), this message gives -// information about the source of that image. -message ImageAnnotationContext { - // The URI of the file used to produce the image. - string uri = 1; - - // If the file was a PDF or TIFF, this field gives the page number within - // the file used to produce the image. - int32 page_number = 2; -} - -// Response to an image annotation request. -message AnnotateImageResponse { - // If present, face detection has completed successfully. - repeated FaceAnnotation face_annotations = 1; - - // If present, landmark detection has completed successfully. - repeated EntityAnnotation landmark_annotations = 2; - - // If present, logo detection has completed successfully. - repeated EntityAnnotation logo_annotations = 3; - - // If present, label detection has completed successfully. - repeated EntityAnnotation label_annotations = 4; - - // If present, text (OCR) detection has completed successfully. - repeated EntityAnnotation text_annotations = 5; - - // If present, text (OCR) detection or document (OCR) text detection has - // completed successfully. - // This annotation provides the structural hierarchy for the OCR detected - // text. - TextAnnotation full_text_annotation = 12; - - // If present, safe-search annotation has completed successfully. - SafeSearchAnnotation safe_search_annotation = 6; - - // If present, image properties were extracted successfully. - ImageProperties image_properties_annotation = 8; - - // If present, crop hints have completed successfully. - CropHintsAnnotation crop_hints_annotation = 11; - - // If present, web detection has completed successfully. - WebDetection web_detection = 13; - - // If set, represents the error message for the operation. - // Note that filled-in image annotations are guaranteed to be - // correct, even when `error` is set. - google.rpc.Status error = 9; - - // If present, contextual information is needed to understand where this image - // comes from. - ImageAnnotationContext context = 21; -} - -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. - repeated AnnotateImageResponse responses = 2; -} - -// Multiple image annotation requests are batched into a single service call. -message BatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to a batch image annotation request. -message BatchAnnotateImagesResponse { - // Individual responses to image annotation requests within the batch. - repeated AnnotateImageResponse responses = 1; -} - -// An offline file annotation request. -message AsyncAnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 4; -} - -// The response for a single offline file annotation request. -message AsyncAnnotateFileResponse { - // The output location and metadata from AsyncAnnotateFileRequest. - OutputConfig output_config = 1; -} - -// Multiple async file annotation requests are batched into a single service -// call. -message AsyncBatchAnnotateFilesRequest { - // Required. Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to an async batch file annotation request. -message AsyncBatchAnnotateFilesResponse { - // The list of file annotation responses, one for each request in - // AsyncBatchAnnotateFilesRequest. - repeated AsyncAnnotateFileResponse responses = 1; -} - -// The desired input location and metadata. -message InputConfig { - // The Google Cloud Storage location to read the input from. - GcsSource gcs_source = 1; - - // The type of the file. Currently only "application/pdf" and "image/tiff" - // are supported. Wildcards are not supported. - string mime_type = 2; -} - -// The desired output location and metadata. -message OutputConfig { - // The Google Cloud Storage location to write the output(s) to. - GcsDestination gcs_destination = 1; - - // The max number of response protos to put into each output JSON file on GCS. - // The valid range is [1, 100]. If not specified, the default value is 20. - // - // For example, for one pdf file with 100 pages, 100 response protos will - // be generated. If `batch_size` = 20, then 5 json files each - // containing 20 response protos will be written under the prefix - // `gcs_destination`.`uri`. - // - // Currently, batch_size only applies to GcsDestination, with potential future - // support for other output configurations. - int32 batch_size = 2; -} - -// The Google Cloud Storage location where the input will be read from. -message GcsSource { - // Google Cloud Storage URI for the input file. This must only be a GCS - // object. Wildcards are not currently supported. - string uri = 1; -} - -// The Google Cloud Storage location where the output will be written to. -message GcsDestination { - // Google Cloud Storage URI where the results will be stored. Results will - // be in JSON format and preceded by its corresponding input URI. This field - // can either represent a single file, or a prefix for multiple outputs. - // Prefixes must end in a `/`. - // - // Examples: - // - // * File: gs://bucket-name/filename.json - // * Prefix: gs://bucket-name/prefix/here/ - // * File: gs://bucket-name/prefix/here - // - // If multiple outputs, each response is still AnnotateFileResponse, each of - // which contains some subset of the full list of AnnotateImageResponse. - // Multiple outputs can happen if, for example, the output JSON is too large - // and overflows into multiple sharded files. - string uri = 1; -} - -// Contains metadata for the BatchAnnotateImages operation. -message OperationMetadata { - // Batch operation states. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is received. - CREATED = 1; - - // Request is actively being processed. - RUNNING = 2; - - // The batch processing is done. - DONE = 3; - - // The batch processing was cancelled. - CANCELLED = 4; - } - - // Current state of the batch operation. - State state = 1; - - // The time when the batch request was received. - google.protobuf.Timestamp create_time = 5; - - // The time when the operation result was last updated. - google.protobuf.Timestamp update_time = 6; -} - -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely that the image belongs to the specified vertical. - VERY_UNLIKELY = 1; - - // It is unlikely that the image belongs to the specified vertical. - UNLIKELY = 2; - - // It is possible that the image belongs to the specified vertical. - POSSIBLE = 3; - - // It is likely that the image belongs to the specified vertical. - LIKELY = 4; - - // It is very likely that the image belongs to the specified vertical. - VERY_LIKELY = 5; -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto deleted file mode 100644 index af568194aa8d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/text_annotation.proto +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p2beta1; - -import "google/cloud/vision/v1p2beta1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "TextAnnotationProto"; -option java_package = "com.google.cloud.vision.v1p2beta1"; - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure is like this: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have their own -// properties. Properties describe detected languages, breaks etc.. Please refer -// to the -// [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] -// message definition below for more detail. -message TextAnnotation { - // Detected language for a structural component. - message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 1; - - // Confidence of detected language. Range [0, 1]. - float confidence = 2; - } - - // Detected start or end of a structural component. - message DetectedBreak { - // Enum to denote the type of break found. New line, space etc. - enum BreakType { - // Unknown break label type. - UNKNOWN = 0; - - // Regular space. - SPACE = 1; - - // Sure space (very wide). - SURE_SPACE = 2; - - // Line-wrapping break. - EOL_SURE_SPACE = 3; - - // End-line hyphen that is not present in text; does not co-occur with - // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4; - - // Line break that ends a paragraph. - LINE_BREAK = 5; - } - - // Detected break type. - BreakType type = 1; - - // True if break prepends the element. - bool is_prefix = 2; - } - - // Additional information detected on the structural component. - message TextProperty { - // A list of detected languages together with confidence. - repeated DetectedLanguage detected_languages = 1; - - // Detected start or end of a text segment. - DetectedBreak detected_break = 2; - } - - // List of pages detected by OCR. - repeated Page pages = 1; - - // UTF-8 text detected on the pages. - string text = 2; -} - -// Detected page from OCR. -message Page { - // Additional information detected on the page. - TextAnnotation.TextProperty property = 1; - - // Page width. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 width = 2; - - // Page height. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 height = 3; - - // List of blocks of text, images etc on this page. - repeated Block blocks = 4; - - // Confidence of the OCR results on the page. Range [0, 1]. - float confidence = 5; -} - -// Logical element on the page. -message Block { - // Type of a block (text, image etc) as identified by OCR. - enum BlockType { - // Unknown block type. - UNKNOWN = 0; - - // Regular text block. - TEXT = 1; - - // Table block. - TABLE = 2; - - // Image block. - PICTURE = 3; - - // Horizontal/vertical line box. - RULER = 4; - - // Barcode block. - BARCODE = 5; - } - - // Additional information detected for the block. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // - // * when the text is horizontal it might look like: - // - // 0----1 - // | | - // 3----2 - // - // * when it's rotated 180 degrees around the top-left corner it becomes: - // - // 2----3 - // | | - // 1----0 - // - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of paragraphs in this block (if this blocks is of type text). - repeated Paragraph paragraphs = 3; - - // Detected block type (text, image etc) for this block. - BlockType block_type = 4; - - // Confidence of the OCR results on the block. Range [0, 1]. - float confidence = 5; -} - -// Structural unit of text representing a number of words in certain order. -message Paragraph { - // Additional information detected for the paragraph. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of words in this paragraph. - repeated Word words = 3; - - // Confidence of the OCR results for the paragraph. Range [0, 1]. - float confidence = 4; -} - -// A word representation. -message Word { - // Additional information detected for the word. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - repeated Symbol symbols = 3; - - // Confidence of the OCR results for the word. Range [0, 1]. - float confidence = 4; -} - -// A single symbol representation. -message Symbol { - // Additional information detected for the symbol. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // The actual UTF-8 representation of the symbol. - string text = 3; - - // Confidence of the OCR results for the symbol. Range [0, 1]. - float confidence = 4; -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto deleted file mode 100644 index 2decb8596ef2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/proto-google-cloud-vision-v1p2beta1/src/main/proto/google/cloud/vision/v1p2beta1/web_detection.proto +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p2beta1; - - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "WebDetectionProto"; -option java_package = "com.google.cloud.vision.v1p2beta1"; - -// Relevant information for the image from the Internet. -message WebDetection { - // Entity deduced from similar images on the Internet. - message WebEntity { - // Opaque entity ID. - string entity_id = 1; - - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - float score = 2; - - // Canonical description of the entity, in English. - string description = 3; - } - - // Metadata for online images. - message WebImage { - // The result image URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the image. - float score = 2; - } - - // Metadata for web pages. - message WebPage { - // The result web page URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the web page. - float score = 2; - - // Title for the web page, may contain HTML markups. - string page_title = 3; - - // Fully matching images on the page. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 4; - - // Partial matching images on the page. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its - // crops. - repeated WebImage partial_matching_images = 5; - } - - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - - // Deduced entities from similar images on the Internet. - repeated WebEntity web_entities = 1; - - // Fully matching images from the Internet. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 2; - - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - repeated WebImage partial_matching_images = 3; - - // Web pages containing the matching images from the Internet. - repeated WebPage pages_with_matching_images = 4; - - // The visually similar image results. - repeated WebImage visually_similar_images = 6; - - // Best guess text labels for the request image. - repeated WebLabel best_guess_labels = 8; -} diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index 05d786512262..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFiles(); - } - - public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java deleted file mode 100644 index bb6cf7b6b4e9..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p2beta1.OperationMetadata; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFilesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFilesLRO(); - } - - public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index 2c2a830b9139..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] -import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFiles(); - } - - public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java deleted file mode 100644 index 4dcfe27f26d2..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] -import com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); - } - - public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java deleted file mode 100644 index 645d8703aa05..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateImages(); - } - - public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); - // Do something. - BatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index d5a912c6e10c..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_sync] -import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java deleted file mode 100644 index d0c92735b810..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] -import com.google.cloud.vision.v1p2beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateImagesListannotateimagerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImagesListannotateimagerequest(); - } - - public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); - } - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index c9da22a74b4f..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p2beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index f53a19c572ce..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 7cca27fe6e9d..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p2beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p2beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 3d4ab2bbf979..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.samples; - -// [START vision_v1p2beta1_generated_imageannotatorsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p2beta1.ImageAnnotatorSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p2beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index e5e0fd50fdb9..000000000000 --- a/owl-bot-staging/java-vision/v1p2beta1/samples/snippets/generated/com/google/cloud/vision/v1p2beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p2beta1.stub.samples; - -// [START vision_v1p2beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p2beta1.stub.ImageAnnotatorStubSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorStubSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p2beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java deleted file mode 100644 index fb9e74cb83a6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStub; -import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorClient implements BackgroundResource { - private final ImageAnnotatorSettings settings; - private final ImageAnnotatorStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ImageAnnotatorClient with default settings. */ - public static final ImageAnnotatorClient create() throws IOException { - return create(ImageAnnotatorSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) - throws IOException { - return new ImageAnnotatorClient(settings); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ImageAnnotatorSettings). - */ - public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { - return new ImageAnnotatorClient(stub); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ImageAnnotatorClient(ImageAnnotatorStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ImageAnnotatorSettings getSettings() { - return settings; - } - - public ImageAnnotatorStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
-   * }
-   * }
- * - * @param requests Individual image annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages( - List requests) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { - return batchAnnotateImagesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateImagesCallable() { - return stub.batchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
-   * }
-   * }
- * - * @param requests Required. Individual async file annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(List requests) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return asyncBatchAnnotateFilesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { - return asyncBatchAnnotateFilesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return stub.asyncBatchAnnotateFilesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateFilesCallable() { - return stub.asyncBatchAnnotateFilesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java deleted file mode 100644 index 6306339f9f9f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateFilesOperationSettings(); - } - - public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) - throws IOException { - return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ImageAnnotatorStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ImageAnnotatorStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ImageAnnotatorSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ImageAnnotatorStubSettings.newBuilder(clientContext)); - } - - protected Builder(ImageAnnotatorSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ImageAnnotatorStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); - } - - public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { - return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return getStubSettingsBuilder().batchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); - } - - @Override - public ImageAnnotatorSettings build() throws IOException { - return new ImageAnnotatorSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java deleted file mode 100644 index c12c902cc268..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java +++ /dev/null @@ -1,3731 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStub; -import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] - * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put - * different products into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, - * named `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- * - *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ProductSearchSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchClient implements BackgroundResource { - private final ProductSearchSettings settings; - private final ProductSearchStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ProductSearchClient with default settings. */ - public static final ProductSearchClient create() throws IOException { - return create(ProductSearchSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ProductSearchClient create(ProductSearchSettings settings) - throws IOException { - return new ProductSearchClient(settings); - } - - /** - * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ProductSearchSettings). - */ - public static final ProductSearchClient create(ProductSearchStub stub) { - return new ProductSearchClient(stub); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ProductSearchClient(ProductSearchSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ProductSearchClient(ProductSearchStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ProductSearchSettings getSettings() { - return settings; - } - - public ProductSearchStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - LocationName parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - String parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ProductSet response = productSearchClient.createProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet(CreateProductSetRequest request) { - return createProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductSetCallable() { - return stub.createProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(LocationName parent) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(String parent) { - ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { - return listProductSetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ProductSet element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsPagedCallable() { - return stub.listProductSetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductSetsResponse response =
-   *         productSearchClient.listProductSetsCallable().call(request);
-   *     for (ProductSet element : response.getProductSetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsCallable() { - return stub.listProductSetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(ProductSetName name) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(String name) { - GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ProductSet response = productSearchClient.getProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(GetProductSetRequest request) { - return getProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductSetCallable() { - return stub.getProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
-   * }
-   * }
- * - * @param productSet Required. The ProductSet resource which replaces the one on the server. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * path is `display_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(productSet) - .setUpdateMask(updateMask) - .build(); - return updateProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ProductSet response = productSearchClient.updateProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(UpdateProductSetRequest request) { - return updateProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.updateProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductSetCallable() { - return stub.updateProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(ProductSetName name) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(String name) { - DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   productSearchClient.deleteProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(DeleteProductSetRequest request) { - deleteProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductSetCallable() { - return stub.deleteProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(LocationName parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(String parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   Product response = productSearchClient.createProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(CreateProductRequest request) { - return createProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductCallable() { - return stub.createProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(LocationName parent) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(String parent) { - ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(ListProductsRequest request) { - return listProductsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsPagedCallable() { - return stub.listProductsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listProductsCallable() { - return stub.listProductsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(ProductName name) { - GetProductRequest request = - GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(String name) { - GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   Product response = productSearchClient.getProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(GetProductRequest request) { - return getProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductCallable() { - return stub.getProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only display_name, description and labels can be updated - * right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   Product product = Product.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Product response = productSearchClient.updateProduct(product, updateMask);
-   * }
-   * }
- * - * @param product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * paths include `product_labels`, `display_name`, and `description`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(Product product, FieldMask updateMask) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); - return updateProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only display_name, description and labels can be updated - * right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Product response = productSearchClient.updateProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(UpdateProductRequest request) { - return updateProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only display_name, description and labels can be updated - * right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductCallable() { - return stub.updateProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(ProductName name) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(String name) { - DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.deleteProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(DeleteProductRequest request) { - deleteProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductCallable() { - return stub.deleteProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - ProductName parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - String parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { - return createReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createReferenceImageCallable() { - return stub.createReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the reference image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(ReferenceImageName name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the reference image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(String name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder().setName(name).build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the reference image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   productSearchClient.deleteReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(DeleteReferenceImageRequest request) { - deleteReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the reference image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteReferenceImageCallable() { - return stub.deleteReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder().setParent(parent).build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages( - ListReferenceImagesRequest request) { - return listReferenceImagesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ReferenceImage element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesPagedCallable() { - return stub.listReferenceImagesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListReferenceImagesResponse response =
-   *         productSearchClient.listReferenceImagesCallable().call(request);
-   *     for (ReferenceImage element : response.getReferenceImagesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesCallable() { - return stub.listReferenceImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(ReferenceImageName name) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(String name) { - GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { - return getReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getReferenceImageCallable() { - return stub.getReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.addProductToProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(AddProductToProductSetRequest request) { - addProductToProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - addProductToProductSetCallable() { - return stub.addProductToProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.removeProductFromProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { - removeProductFromProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND If the Product is not found under the ProductSet. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - removeProductFromProductSetCallable() { - return stub.removeProductFromProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder().setName(name).build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet( - ListProductsInProductSetRequest request) { - return listProductsInProductSetPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetPagedCallable() { - return stub.listProductsInProductSetPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsInProductSetResponse response =
-   *         productSearchClient.listProductsInProductSetCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetCallable() { - return stub.listProductsInProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInputConfig(inputConfig) - .build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(ImportProductSetsRequest request) { - return importProductSetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   ImportProductSetsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return stub.importProductSetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.importProductSetsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable importProductSetsCallable() { - return stub.importProductSetsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListProductSetsPagedResponse - extends AbstractPagedListResponse< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductSetsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductSetsPagedResponse(ListProductSetsPage page) { - super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductSetsPage - extends AbstractPage< - ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { - - private ListProductSetsPage( - PageContext context, - ListProductSetsResponse response) { - super(context, response); - } - - private static ListProductSetsPage createEmptyPage() { - return new ListProductSetsPage(null, null); - } - - @Override - protected ListProductSetsPage createPage( - PageContext context, - ListProductSetsResponse response) { - return new ListProductSetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductSetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - private ListProductSetsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductSetsFixedSizeCollection createEmptyCollection() { - return new ListProductSetsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductSetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductSetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsPagedResponse - extends AbstractPagedListResponse< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsPagedResponse(ListProductsPage page) { - super(page, ListProductsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsPage - extends AbstractPage { - - private ListProductsPage( - PageContext context, - ListProductsResponse response) { - super(context, response); - } - - private static ListProductsPage createEmptyPage() { - return new ListProductsPage(null, null); - } - - @Override - protected ListProductsPage createPage( - PageContext context, - ListProductsResponse response) { - return new ListProductsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - private ListProductsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsFixedSizeCollection createEmptyCollection() { - return new ListProductsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListReferenceImagesPagedResponse - extends AbstractPagedListResponse< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListReferenceImagesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { - super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListReferenceImagesPage - extends AbstractPage< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage> { - - private ListReferenceImagesPage( - PageContext - context, - ListReferenceImagesResponse response) { - super(context, response); - } - - private static ListReferenceImagesPage createEmptyPage() { - return new ListReferenceImagesPage(null, null); - } - - @Override - protected ListReferenceImagesPage createPage( - PageContext - context, - ListReferenceImagesResponse response) { - return new ListReferenceImagesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListReferenceImagesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - private ListReferenceImagesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { - return new ListReferenceImagesFixedSizeCollection(null, 0); - } - - @Override - protected ListReferenceImagesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsInProductSetPagedResponse - extends AbstractPagedListResponse< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsInProductSetPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { - super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsInProductSetPage - extends AbstractPage< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage> { - - private ListProductsInProductSetPage( - PageContext - context, - ListProductsInProductSetResponse response) { - super(context, response); - } - - private static ListProductsInProductSetPage createEmptyPage() { - return new ListProductsInProductSetPage(null, null); - } - - @Override - protected ListProductsInProductSetPage createPage( - PageContext - context, - ListProductsInProductSetResponse response) { - return new ListProductsInProductSetPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsInProductSetFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - private ListProductsInProductSetFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { - return new ListProductsInProductSetFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsInProductSetFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java deleted file mode 100644 index f00f1fc452c7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); - } - - public static final ProductSearchSettings create(ProductSearchStubSettings stub) - throws IOException { - return new ProductSearchSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ProductSearchStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ProductSearchStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ProductSearchStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ProductSearchStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ProductSearchSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ProductSearchStubSettings.newBuilder(clientContext)); - } - - protected Builder(ProductSearchSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ProductSearchStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ProductSearchStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); - } - - public ProductSearchStubSettings.Builder getStubSettingsBuilder() { - return ((ProductSearchStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return getStubSettingsBuilder().createProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return getStubSettingsBuilder().listProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getStubSettingsBuilder().getProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return getStubSettingsBuilder().updateProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return getStubSettingsBuilder().deleteProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return getStubSettingsBuilder().createProductSettings(); - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return getStubSettingsBuilder().listProductsSettings(); - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getStubSettingsBuilder().getProductSettings(); - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return getStubSettingsBuilder().updateProductSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return getStubSettingsBuilder().deleteProductSettings(); - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return getStubSettingsBuilder().createReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return getStubSettingsBuilder().deleteReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return getStubSettingsBuilder().listReferenceImagesSettings(); - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getStubSettingsBuilder().getReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return getStubSettingsBuilder().addProductToProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return getStubSettingsBuilder().removeProductFromProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return getStubSettingsBuilder().listProductsInProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return getStubSettingsBuilder().importProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return getStubSettingsBuilder().importProductSetsOperationSettings(); - } - - @Override - public ProductSearchSettings build() throws IOException { - return new ProductSearchSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json deleted file mode 100644 index a21bf53f72c9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vision.v1p3beta1", - "libraryPackage": "com.google.cloud.vision.v1p3beta1", - "services": { - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "ImageAnnotatorClient", - "rpcs": { - "AsyncBatchAnnotateFiles": { - "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] - }, - "BatchAnnotateImages": { - "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] - } - } - } - } - }, - "ProductSearch": { - "clients": { - "grpc": { - "libraryClient": "ProductSearchClient", - "rpcs": { - "AddProductToProductSet": { - "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] - }, - "CreateProduct": { - "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] - }, - "CreateProductSet": { - "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] - }, - "CreateReferenceImage": { - "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] - }, - "DeleteProduct": { - "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] - }, - "DeleteProductSet": { - "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] - }, - "DeleteReferenceImage": { - "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] - }, - "GetProduct": { - "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] - }, - "GetProductSet": { - "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] - }, - "GetReferenceImage": { - "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] - }, - "ImportProductSets": { - "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] - }, - "ListProductSets": { - "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] - }, - "ListProducts": { - "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] - }, - "ListProductsInProductSet": { - "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] - }, - "ListReferenceImages": { - "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] - }, - "RemoveProductFromProductSet": { - "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] - }, - "UpdateProduct": { - "methods": ["updateProduct", "updateProduct", "updateProductCallable"] - }, - "UpdateProductSet": { - "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java deleted file mode 100644 index 705b0cc2846c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/package-info.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= ImageAnnotatorClient ======================= - * - *

Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

Sample for ImageAnnotatorClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

======================= ProductSearchClient ======================= - * - *

Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] - * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put - * different products into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, - * named `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

Sample for ProductSearchClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vision.v1p3beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java deleted file mode 100644 index 2214e27dcc85..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java deleted file mode 100644 index 53337a430542..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcImageAnnotatorStub.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { - private static final MethodDescriptor - batchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final GrpcImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcImageAnnotatorStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - batchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .build(); - GrpcCallSettings - asyncBatchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java deleted file mode 100644 index decbc368d8c0..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java deleted file mode 100644 index b5933ac501d5..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/GrpcProductSearchStub.java +++ /dev/null @@ -1,787 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsResponse; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcProductSearchStub extends ProductSearchStub { - private static final MethodDescriptor - createProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProducts") - .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProduct") - .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProduct") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listReferenceImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListReferenceImages") - .setRequestMarshaller( - ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - addProductToProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/AddProductToProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - removeProductFromProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/RemoveProductFromProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/ListProductsInProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - importProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ImportProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new GrpcProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { - return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcProductSearchStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcProductSearchStub( - ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcProductSearchCallableFactory()); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product_set.name", String.valueOf(request.getProductSet().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listProductsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product.name", String.valueOf(request.getProduct().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listReferenceImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings addProductToProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - removeProductFromProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductsInProductSetTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings importProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java deleted file mode 100644 index f172d07f79f5..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java deleted file mode 100644 index fdddecf79c69..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonImageAnnotatorStub.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(OperationMetadata.getDescriptor()) - .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/images:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/files:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateFilesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonImageAnnotatorStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - batchAnnotateImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(batchAnnotateImagesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java deleted file mode 100644 index ca5283f4cb82..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonProductSearchCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java deleted file mode 100644 index d5c8df64767f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/HttpJsonProductSearchStub.java +++ /dev/null @@ -1,1199 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsResponse; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonProductSearchStub extends ProductSearchStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(ImportProductSetsResponse.getDescriptor()) - .add(BatchOperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - createProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "productSetId", request.getProductSetId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProductSets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProductSet") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{productSet.name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "productSet.name", request.getProductSet().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProductSet") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateProduct") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "productId", request.getProductId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListProducts") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetProduct") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/UpdateProduct") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{product.name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "product.name", request.getProduct().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteProduct") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/CreateReferenceImage") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "referenceImageId", request.getReferenceImageId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("referenceImage", request.getReferenceImage(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/DeleteReferenceImage") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listReferenceImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ListReferenceImages") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/GetReferenceImage") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - addProductToProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/AddProductToProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - removeProductFromProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/RemoveProductFromProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p3beta1.ProductSearch/ListProductsInProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - importProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p3beta1.ProductSearch/ImportProductSets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ImportProductSetsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonProductSearchStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonProductSearchStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings createProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listProductsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listReferenceImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - addProductToProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - removeProductFromProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductsInProductSetTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings importProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createProductSetMethodDescriptor); - methodDescriptors.add(listProductSetsMethodDescriptor); - methodDescriptors.add(getProductSetMethodDescriptor); - methodDescriptors.add(updateProductSetMethodDescriptor); - methodDescriptors.add(deleteProductSetMethodDescriptor); - methodDescriptors.add(createProductMethodDescriptor); - methodDescriptors.add(listProductsMethodDescriptor); - methodDescriptors.add(getProductMethodDescriptor); - methodDescriptors.add(updateProductMethodDescriptor); - methodDescriptors.add(deleteProductMethodDescriptor); - methodDescriptors.add(createReferenceImageMethodDescriptor); - methodDescriptors.add(deleteReferenceImageMethodDescriptor); - methodDescriptors.add(listReferenceImagesMethodDescriptor); - methodDescriptors.add(getReferenceImageMethodDescriptor); - methodDescriptors.add(addProductToProductSetMethodDescriptor); - methodDescriptors.add(removeProductFromProductSetMethodDescriptor); - methodDescriptors.add(listProductsInProductSetMethodDescriptor); - methodDescriptors.add(importProductSetsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java deleted file mode 100644 index f8f0c7fab4cb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStub.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ImageAnnotatorStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - batchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java deleted file mode 100644 index 27d08b00d327..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ImageAnnotatorStubSettings.java +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.OperationMetadata; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorStubSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings - batchAnnotateImagesSettings; - private final UnaryCallSettings - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - public ImageAnnotatorStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcImageAnnotatorStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonImageAnnotatorStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); - asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); - asyncBatchAnnotateFilesOperationSettings = - settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); - } - - /** Builder for ImageAnnotatorStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - batchAnnotateImagesSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - definitions.put( - "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_3_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); - initDefaults(this); - } - - protected Builder(ImageAnnotatorStubSettings settings) { - super(settings); - - batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); - asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateFilesOperationSettings = - settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, asyncBatchAnnotateFilesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .batchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .asyncBatchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateFilesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateFilesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - @Override - public ImageAnnotatorStubSettings build() throws IOException { - return new ImageAnnotatorStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java deleted file mode 100644 index a3b6294a3982..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStub.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsResponse; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ProductSearchStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable createProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); - } - - public UnaryCallable - listProductSetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); - } - - public UnaryCallable listProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); - } - - public UnaryCallable getProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); - } - - public UnaryCallable updateProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); - } - - public UnaryCallable deleteProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); - } - - public UnaryCallable createProductCallable() { - throw new UnsupportedOperationException("Not implemented: createProductCallable()"); - } - - public UnaryCallable listProductsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); - } - - public UnaryCallable listProductsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); - } - - public UnaryCallable getProductCallable() { - throw new UnsupportedOperationException("Not implemented: getProductCallable()"); - } - - public UnaryCallable updateProductCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); - } - - public UnaryCallable deleteProductCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); - } - - public UnaryCallable createReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); - } - - public UnaryCallable deleteReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); - } - - public UnaryCallable - listReferenceImagesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); - } - - public UnaryCallable - listReferenceImagesCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); - } - - public UnaryCallable getReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); - } - - public UnaryCallable addProductToProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); - } - - public UnaryCallable - removeProductFromProductSetCallable() { - throw new UnsupportedOperationException( - "Not implemented: removeProductFromProductSetCallable()"); - } - - public UnaryCallable - listProductsInProductSetPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listProductsInProductSetPagedCallable()"); - } - - public UnaryCallable - listProductsInProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); - } - - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: importProductSetsOperationCallable()"); - } - - public UnaryCallable importProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java deleted file mode 100644 index 485c0939f8e3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/stub/ProductSearchStubSettings.java +++ /dev/null @@ -1,1120 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsResponse; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
- *     ProductSearchStubSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings createProductSetSettings; - private final PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings getProductSetSettings; - private final UnaryCallSettings updateProductSetSettings; - private final UnaryCallSettings deleteProductSetSettings; - private final UnaryCallSettings createProductSettings; - private final PagedCallSettings< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings getProductSettings; - private final UnaryCallSettings updateProductSettings; - private final UnaryCallSettings deleteProductSettings; - private final UnaryCallSettings - createReferenceImageSettings; - private final UnaryCallSettings deleteReferenceImageSettings; - private final PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings - getReferenceImageSettings; - private final UnaryCallSettings - addProductToProductSetSettings; - private final UnaryCallSettings - removeProductFromProductSetSettings; - private final PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings importProductSetsSettings; - private final OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - - private static final PagedListDescriptor< - ListProductSetsRequest, ListProductSetsResponse, ProductSet> - LIST_PRODUCT_SETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductSetsRequest injectToken( - ListProductSetsRequest payload, String token) { - return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductSetsRequest injectPageSize( - ListProductSetsRequest payload, int pageSize) { - return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductSetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductSetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductSetsResponse payload) { - return payload.getProductSetsList() == null - ? ImmutableList.of() - : payload.getProductSetsList(); - } - }; - - private static final PagedListDescriptor - LIST_PRODUCTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsRequest injectToken(ListProductsRequest payload, String token) { - return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { - return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> - LIST_REFERENCE_IMAGES_PAGE_STR_DESC = - new PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListReferenceImagesRequest injectToken( - ListReferenceImagesRequest payload, String token) { - return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListReferenceImagesRequest injectPageSize( - ListReferenceImagesRequest payload, int pageSize) { - return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListReferenceImagesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListReferenceImagesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListReferenceImagesResponse payload) { - return payload.getReferenceImagesList() == null - ? ImmutableList.of() - : payload.getReferenceImagesList(); - } - }; - - private static final PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = - new PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsInProductSetRequest injectToken( - ListProductsInProductSetRequest payload, String token) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } - - @Override - public ListProductsInProductSetRequest injectPageSize( - ListProductsInProductSetRequest payload, int pageSize) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListProductsInProductSetRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsInProductSetResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsInProductSetResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - LIST_PRODUCT_SETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductSetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); - return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - LIST_PRODUCTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); - return ListProductsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - LIST_REFERENCE_IMAGES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListReferenceImagesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); - return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListProductsInProductSetRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - pageContext = - PageContext.create( - callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); - return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return createProductSettings; - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return getProductSettings; - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return updateProductSettings; - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - public ProductSearchStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcProductSearchStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonProductSearchStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createProductSetSettings = settingsBuilder.createProductSetSettings().build(); - listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); - getProductSetSettings = settingsBuilder.getProductSetSettings().build(); - updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); - deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); - createProductSettings = settingsBuilder.createProductSettings().build(); - listProductsSettings = settingsBuilder.listProductsSettings().build(); - getProductSettings = settingsBuilder.getProductSettings().build(); - updateProductSettings = settingsBuilder.updateProductSettings().build(); - deleteProductSettings = settingsBuilder.deleteProductSettings().build(); - createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); - deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); - listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); - getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); - addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); - removeProductFromProductSetSettings = - settingsBuilder.removeProductFromProductSetSettings().build(); - listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); - importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); - importProductSetsOperationSettings = - settingsBuilder.importProductSetsOperationSettings().build(); - } - - /** Builder for ProductSearchStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createProductSetSettings; - private final PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings.Builder getProductSetSettings; - private final UnaryCallSettings.Builder - updateProductSetSettings; - private final UnaryCallSettings.Builder - deleteProductSetSettings; - private final UnaryCallSettings.Builder createProductSettings; - private final PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings.Builder getProductSettings; - private final UnaryCallSettings.Builder updateProductSettings; - private final UnaryCallSettings.Builder deleteProductSettings; - private final UnaryCallSettings.Builder - createReferenceImageSettings; - private final UnaryCallSettings.Builder - deleteReferenceImageSettings; - private final PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings.Builder - getReferenceImageSettings; - private final UnaryCallSettings.Builder - addProductToProductSetSettings; - private final UnaryCallSettings.Builder - removeProductFromProductSetSettings; - private final PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings.Builder - importProductSetsSettings; - private final OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_2_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); - getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); - getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listReferenceImagesSettings = - PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); - getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsInProductSetSettings = - PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); - importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - importProductSetsOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings); - initDefaults(this); - } - - protected Builder(ProductSearchStubSettings settings) { - super(settings); - - createProductSetSettings = settings.createProductSetSettings.toBuilder(); - listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); - getProductSetSettings = settings.getProductSetSettings.toBuilder(); - updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); - deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); - createProductSettings = settings.createProductSettings.toBuilder(); - listProductsSettings = settings.listProductsSettings.toBuilder(); - getProductSettings = settings.getProductSettings.toBuilder(); - updateProductSettings = settings.updateProductSettings.toBuilder(); - deleteProductSettings = settings.deleteProductSettings.toBuilder(); - createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); - deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); - listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); - getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); - addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); - removeProductFromProductSetSettings = - settings.removeProductFromProductSetSettings.toBuilder(); - listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); - importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); - importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .listReferenceImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .addProductToProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .removeProductFromProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductsInProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .importProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .importProductSetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - ImportProductSetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return createProductSettings; - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getProductSettings; - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return updateProductSettings; - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - @Override - public ProductSearchStubSettings build() throws IOException { - return new ProductSearchStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java deleted file mode 100644 index 6cd55ee1fb1d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientHttpJsonTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p3beta1.stub.HttpJsonImageAnnotatorStub; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientHttpJsonTest { - private static MockHttpService mockService; - private static ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonImageAnnotatorStub.getMethodDescriptors(), - ImageAnnotatorSettings.getDefaultEndpoint()); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java deleted file mode 100644 index 1e89677df179..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClientTest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientTest { - private static MockImageAnnotator mockImageAnnotator; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() { - mockImageAnnotator = new MockImageAnnotator(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateFilesRequest actualRequest = - ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java deleted file mode 100644 index acabae859819..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotator implements MockGrpcService { - private final MockImageAnnotatorImpl serviceImpl; - - public MockImageAnnotator() { - serviceImpl = new MockImageAnnotatorImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java deleted file mode 100644 index ba0aa26d8ee4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockImageAnnotatorImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { - private List requests; - private Queue responses; - - public MockImageAnnotatorImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void batchAnnotateImages( - BatchAnnotateImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateImagesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateFiles( - AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java deleted file mode 100644 index 8deddbde0983..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearch.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearch implements MockGrpcService { - private final MockProductSearchImpl serviceImpl; - - public MockProductSearch() { - serviceImpl = new MockProductSearchImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java deleted file mode 100644 index bc2df0d7cbee..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/MockProductSearchImpl.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p3beta1.ProductSearchGrpc.ProductSearchImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearchImpl extends ProductSearchImplBase { - private List requests; - private Queue responses; - - public MockProductSearchImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void createProductSet( - CreateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductSets( - ListProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductSetsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductSetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductSetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProductSet( - GetProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProductSet( - UpdateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProductSet( - DeleteProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createProduct( - CreateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProducts( - ListProductsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProducts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProduct(GetProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProduct( - UpdateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createReferenceImage( - CreateReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteReferenceImage( - DeleteReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listReferenceImages( - ListReferenceImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListReferenceImagesResponse) { - requests.add(request); - responseObserver.onNext(((ListReferenceImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListReferenceImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getReferenceImage( - GetReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void addProductToProductSet( - AddProductToProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void removeProductFromProductSet( - RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductsInProductSet( - ListProductsInProductSetRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsInProductSetResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsInProductSetResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsInProductSetResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void importProductSets( - ImportProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ImportProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java deleted file mode 100644 index 57159bb8a364..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientHttpJsonTest.java +++ /dev/null @@ -1,1901 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p3beta1.stub.HttpJsonProductSearchStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientHttpJsonTest { - private static MockHttpService mockService; - private static ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonProductSearchStub.getMethodDescriptors(), - ProductSearchSettings.getDefaultEndpoint()); - ProductSearchSettings settings = - ProductSearchSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java deleted file mode 100644 index 193e7cdf624f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p3beta1/ProductSearchClientTest.java +++ /dev/null @@ -1,1691 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p3beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientTest { - private static MockProductSearch mockProductSearch; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() { - mockProductSearch = new MockProductSearch(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ProductSearchSettings settings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java deleted file mode 100644 index 78d31aefc6e4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorGrpc.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.google.cloud.vision.v1p3beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Service that performs Google Cloud Vision API detection tasks over client
- * images, such as face, landmark, logo, label, and text detection. The
- * ImageAnnotator service returns detected entities from the images.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p3beta1/image_annotator.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ImageAnnotatorGrpc { - - private ImageAnnotatorGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p3beta1.ImageAnnotator"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", - requestType = com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) - .build(); - } - } - } - return getBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", - requestType = com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) - .build(); - } - } - } - return getAsyncBatchAnnotateFilesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - }; - return ImageAnnotatorStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ImageAnnotatorBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - }; - return ImageAnnotatorBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ImageAnnotatorFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - }; - return ImageAnnotatorFutureStub.newStub(factory, channel); - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest, - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse>( - this, METHODID_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getAsyncBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) - .build(); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { - private ImageAnnotatorStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ImageAnnotatorBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { - private ImageAnnotatorFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 1; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ImageAnnotatorImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BATCH_ANNOTATE_IMAGES: - serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_FILES: - serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ImageAnnotatorBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ImageAnnotator"); - } - } - - private static final class ImageAnnotatorFileDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier { - ImageAnnotatorFileDescriptorSupplier() {} - } - - private static final class ImageAnnotatorMethodDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ImageAnnotatorMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ImageAnnotatorGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) - .addMethod(getBatchAnnotateImagesMethod()) - .addMethod(getAsyncBatchAnnotateFilesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java deleted file mode 100644 index 1cffb8449b68..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/grpc-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchGrpc.java +++ /dev/null @@ -1,2150 +0,0 @@ -package com.google.cloud.vision.v1p3beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Manages Products and ProductSets of reference images for use in product
- * search. It uses the following resource model:
- * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
- * `projects/*/locations/*/productSets/*`, which acts as a way to put different
- * products into groups to limit identification.
- * In parallel,
- * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
- *   `projects/*/locations/*/products/*`
- * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
- *   `projects/*/locations/*/products/*/referenceImages/*`
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p3beta1/product_search_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ProductSearchGrpc { - - private ProductSearchGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p3beta1.ProductSearch"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", - requestType = com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductSetMethod() { - io.grpc.MethodDescriptor getCreateProductSetMethod; - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) - .build(); - } - } - } - return getCreateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductSets", - requestType = com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductSetsMethod() { - io.grpc.MethodDescriptor getListProductSetsMethod; - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) - .build(); - } - } - } - return getListProductSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProductSet", - requestType = com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductSetMethod() { - io.grpc.MethodDescriptor getGetProductSetMethod; - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) - .build(); - } - } - } - return getGetProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", - requestType = com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { - io.grpc.MethodDescriptor getUpdateProductSetMethod; - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) - .build(); - } - } - } - return getUpdateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", - requestType = com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { - io.grpc.MethodDescriptor getDeleteProductSetMethod; - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) - .build(); - } - } - } - return getDeleteProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProduct", - requestType = com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductMethod() { - io.grpc.MethodDescriptor getCreateProductMethod; - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) - .build(); - } - } - } - return getCreateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProducts", - requestType = com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsMethod() { - io.grpc.MethodDescriptor getListProductsMethod; - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - ProductSearchGrpc.getListProductsMethod = getListProductsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) - .build(); - } - } - } - return getListProductsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProduct", - requestType = com.google.cloud.vision.v1p3beta1.GetProductRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductMethod() { - io.grpc.MethodDescriptor getGetProductMethod; - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - ProductSearchGrpc.getGetProductMethod = getGetProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) - .build(); - } - } - } - return getGetProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", - requestType = com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductMethod() { - io.grpc.MethodDescriptor getUpdateProductMethod; - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) - .build(); - } - } - } - return getUpdateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", - requestType = com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductMethod() { - io.grpc.MethodDescriptor getDeleteProductMethod; - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) - .build(); - } - } - } - return getDeleteProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", - requestType = com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { - io.grpc.MethodDescriptor getCreateReferenceImageMethod; - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) - .build(); - } - } - } - return getCreateReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", - requestType = com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { - io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) - .build(); - } - } - } - return getDeleteReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", - requestType = com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { - io.grpc.MethodDescriptor getListReferenceImagesMethod; - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) - .build(); - } - } - } - return getListReferenceImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", - requestType = com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { - io.grpc.MethodDescriptor getGetReferenceImageMethod; - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) - .build(); - } - } - } - return getGetReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", - requestType = com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { - io.grpc.MethodDescriptor getAddProductToProductSetMethod; - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) - .build(); - } - } - } - return getAddProductToProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", - requestType = com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { - io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) - .build(); - } - } - } - return getRemoveProductFromProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", - requestType = com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, - responseType = com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { - io.grpc.MethodDescriptor getListProductsInProductSetMethod; - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) - .build(); - } - } - } - return getListProductsInProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", - requestType = com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getImportProductSetsMethod() { - io.grpc.MethodDescriptor getImportProductSetsMethod; - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) - .build(); - } - } - } - return getImportProductSetsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ProductSearchStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - }; - return ProductSearchStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ProductSearchBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - }; - return ProductSearchBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ProductSearchFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - }; - return ProductSearchFutureStub.newStub(factory, channel); - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static abstract class ProductSearchImplBase implements io.grpc.BindableService { - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
-     * ProductSet will be deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only display_name, description and labels can be updated right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * Possible errors:
-     * * Returns NOT_FOUND if the product does not exist.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the reference image does not exist.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest, - com.google.cloud.vision.v1p3beta1.ProductSet>( - this, METHODID_CREATE_PRODUCT_SET))) - .addMethod( - getListProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest, - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse>( - this, METHODID_LIST_PRODUCT_SETS))) - .addMethod( - getGetProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.GetProductSetRequest, - com.google.cloud.vision.v1p3beta1.ProductSet>( - this, METHODID_GET_PRODUCT_SET))) - .addMethod( - getUpdateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest, - com.google.cloud.vision.v1p3beta1.ProductSet>( - this, METHODID_UPDATE_PRODUCT_SET))) - .addMethod( - getDeleteProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT_SET))) - .addMethod( - getCreateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.CreateProductRequest, - com.google.cloud.vision.v1p3beta1.Product>( - this, METHODID_CREATE_PRODUCT))) - .addMethod( - getListProductsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.ListProductsRequest, - com.google.cloud.vision.v1p3beta1.ListProductsResponse>( - this, METHODID_LIST_PRODUCTS))) - .addMethod( - getGetProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.GetProductRequest, - com.google.cloud.vision.v1p3beta1.Product>( - this, METHODID_GET_PRODUCT))) - .addMethod( - getUpdateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.UpdateProductRequest, - com.google.cloud.vision.v1p3beta1.Product>( - this, METHODID_UPDATE_PRODUCT))) - .addMethod( - getDeleteProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.DeleteProductRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT))) - .addMethod( - getCreateReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest, - com.google.cloud.vision.v1p3beta1.ReferenceImage>( - this, METHODID_CREATE_REFERENCE_IMAGE))) - .addMethod( - getDeleteReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_REFERENCE_IMAGE))) - .addMethod( - getListReferenceImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest, - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse>( - this, METHODID_LIST_REFERENCE_IMAGES))) - .addMethod( - getGetReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest, - com.google.cloud.vision.v1p3beta1.ReferenceImage>( - this, METHODID_GET_REFERENCE_IMAGE))) - .addMethod( - getAddProductToProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) - .addMethod( - getRemoveProductFromProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) - .addMethod( - getListProductsInProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest, - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse>( - this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) - .addMethod( - getImportProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest, - com.google.longrunning.Operation>( - this, METHODID_IMPORT_PRODUCT_SETS))) - .build(); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { - private ProductSearchStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
-     * ProductSet will be deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only display_name, description and labels can be updated right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * Possible errors:
-     * * Returns NOT_FOUND if the product does not exist.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the reference image does not exist.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ProductSearchBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ProductSet createProductSet(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductSetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(com.google.cloud.vision.v1p3beta1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ProductSet updateProductSet(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
-     * ProductSet will be deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.Product createProduct(com.google.cloud.vision.v1p3beta1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ListProductsResponse listProducts(com.google.cloud.vision.v1p3beta1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.Product getProduct(com.google.cloud.vision.v1p3beta1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only display_name, description and labels can be updated right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.Product updateProduct(com.google.cloud.vision.v1p3beta1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * Possible errors:
-     * * Returns NOT_FOUND if the product does not exist.
-     * 
- */ - public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1p3beta1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the reference image does not exist.
-     * 
- */ - public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
-     * 
- */ - public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getImportProductSetsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { - private ProductSearchFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProductSet( - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductSets( - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProductSet( - com.google.cloud.vision.v1p3beta1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProductSet( - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a ProductSet. All Products and ReferenceImages in the
-     * ProductSet will be deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProductSet( - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProduct( - com.google.cloud.vision.v1p3beta1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProducts( - com.google.cloud.vision.v1p3beta1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProduct( - com.google.cloud.vision.v1p3beta1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only display_name, description and labels can be updated right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProduct( - com.google.cloud.vision.v1p3beta1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * Possible errors:
-     * * Returns NOT_FOUND if the product does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProduct( - com.google.cloud.vision.v1p3beta1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createReferenceImage( - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the reference image does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listReferenceImages( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getReferenceImage( - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND If the Product is not found under the ProductSet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture importProductSets( - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_PRODUCT_SET = 0; - private static final int METHODID_LIST_PRODUCT_SETS = 1; - private static final int METHODID_GET_PRODUCT_SET = 2; - private static final int METHODID_UPDATE_PRODUCT_SET = 3; - private static final int METHODID_DELETE_PRODUCT_SET = 4; - private static final int METHODID_CREATE_PRODUCT = 5; - private static final int METHODID_LIST_PRODUCTS = 6; - private static final int METHODID_GET_PRODUCT = 7; - private static final int METHODID_UPDATE_PRODUCT = 8; - private static final int METHODID_DELETE_PRODUCT = 9; - private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; - private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; - private static final int METHODID_LIST_REFERENCE_IMAGES = 12; - private static final int METHODID_GET_REFERENCE_IMAGE = 13; - private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; - private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; - private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; - private static final int METHODID_IMPORT_PRODUCT_SETS = 17; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ProductSearchImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_PRODUCT_SET: - serviceImpl.createProductSet((com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCT_SETS: - serviceImpl.listProductSets((com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT_SET: - serviceImpl.getProductSet((com.google.cloud.vision.v1p3beta1.GetProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT_SET: - serviceImpl.updateProductSet((com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT_SET: - serviceImpl.deleteProductSet((com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_PRODUCT: - serviceImpl.createProduct((com.google.cloud.vision.v1p3beta1.CreateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS: - serviceImpl.listProducts((com.google.cloud.vision.v1p3beta1.ListProductsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT: - serviceImpl.getProduct((com.google.cloud.vision.v1p3beta1.GetProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT: - serviceImpl.updateProduct((com.google.cloud.vision.v1p3beta1.UpdateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT: - serviceImpl.deleteProduct((com.google.cloud.vision.v1p3beta1.DeleteProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_REFERENCE_IMAGE: - serviceImpl.createReferenceImage((com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_REFERENCE_IMAGE: - serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_REFERENCE_IMAGES: - serviceImpl.listReferenceImages((com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_REFERENCE_IMAGE: - serviceImpl.getReferenceImage((com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: - serviceImpl.addProductToProductSet((com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: - serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: - serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_IMPORT_PRODUCT_SETS: - serviceImpl.importProductSets((com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ProductSearchBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ProductSearch"); - } - } - - private static final class ProductSearchFileDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier { - ProductSearchFileDescriptorSupplier() {} - } - - private static final class ProductSearchMethodDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ProductSearchMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ProductSearchGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) - .addMethod(getCreateProductSetMethod()) - .addMethod(getListProductSetsMethod()) - .addMethod(getGetProductSetMethod()) - .addMethod(getUpdateProductSetMethod()) - .addMethod(getDeleteProductSetMethod()) - .addMethod(getCreateProductMethod()) - .addMethod(getListProductsMethod()) - .addMethod(getGetProductMethod()) - .addMethod(getUpdateProductMethod()) - .addMethod(getDeleteProductMethod()) - .addMethod(getCreateReferenceImageMethod()) - .addMethod(getDeleteReferenceImageMethod()) - .addMethod(getListReferenceImagesMethod()) - .addMethod(getGetReferenceImageMethod()) - .addMethod(getAddProductToProductSetMethod()) - .addMethod(getRemoveProductFromProductSetMethod()) - .addMethod(getListProductsInProductSetMethod()) - .addMethod(getImportProductSetsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java deleted file mode 100644 index 56e1397e1dbe..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `AddProductToProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} - */ -public final class AddProductToProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - AddProductToProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AddProductToProductSetRequest.newBuilder() to construct. - private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AddProductToProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AddProductToProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AddProductToProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `AddProductToProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AddProductToProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AddProductToProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java deleted file mode 100644 index bf1c105b29d2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AddProductToProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java deleted file mode 100644 index 0f7da8e9bbcc..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response to a single file annotation request. A file may contain one or more
- * images, which individually have their own responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateFileResponse} - */ -public final class AnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - AnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileResponse.newBuilder() to construct. - private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int RESPONSES_FIELD_NUMBER = 2; - private java.util.List responses_; - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(2, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a single file annotation request. A file may contain one or more
-   * images, which individually have their own responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - com.google.cloud.vision.v1p3beta1.AnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse build() { - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p3beta1.AnnotateFileResponse(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.AnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p3beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - private static final com.google.cloud.vision.v1p3beta1.AnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java deleted file mode 100644 index 4802be97cd6d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to images found within the file.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java deleted file mode 100644 index 8598209987b4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java +++ /dev/null @@ -1,1346 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request for performing Google Cloud Vision API tasks over a user-provided
- * image, with user-requested features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageRequest} - */ -public final class AnnotateImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - AnnotateImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageRequest.newBuilder() to construct. - private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.Image.Builder subBuilder = null; - if (image_ != null) { - subBuilder = image_.toBuilder(); - } - image_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p3beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder.class); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.Image image_; - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return image_ != null; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return The image. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Image getImage() { - return image_ == null ? com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder() { - return getImage(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (image_ != null) { - output.writeMessage(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (image_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) obj; - - if (hasImage() != other.hasImage()) return false; - if (hasImage()) { - if (!getImage() - .equals(other.getImage())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasImage()) { - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for performing Google Cloud Vision API tasks over a user-provided
-   * image, with user-requested features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (imageBuilder_ == null) { - image_ = null; - } else { - image_ = null; - imageBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest build() { - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p3beta1.AnnotateImageRequest(this); - int from_bitField0_ = bitField0_; - if (imageBuilder_ == null) { - result.image_ = image_; - } else { - result.image_ = imageBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()) return this; - if (other.hasImage()) { - mergeImage(other.getImage()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.Image image_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder> imageBuilder_; - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return Whether the image field is set. - */ - public boolean hasImage() { - return imageBuilder_ != null || image_ != null; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return The image. - */ - public com.google.cloud.vision.v1p3beta1.Image getImage() { - if (imageBuilder_ == null) { - return image_ == null ? com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; - } else { - return imageBuilder_.getMessage(); - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.vision.v1p3beta1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - image_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public Builder setImage( - com.google.cloud.vision.v1p3beta1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - image_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.vision.v1p3beta1.Image value) { - if (imageBuilder_ == null) { - if (image_ != null) { - image_ = - com.google.cloud.vision.v1p3beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); - } else { - image_ = value; - } - onChanged(); - } else { - imageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - image_ = null; - onChanged(); - } else { - image_ = null; - imageBuilder_ = null; - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p3beta1.Image.Builder getImageBuilder() { - - onChanged(); - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder() { - if (imageBuilder_ != null) { - return imageBuilder_.getMessageOrBuilder(); - } else { - return image_ == null ? - com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance() : image_; - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, com.google.cloud.vision.v1p3beta1.ImageOrBuilder>( - getImage(), - getParentForChildren(), - isClean()); - image_ = null; - } - return imageBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p3beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p3beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - private static final com.google.cloud.vision.v1p3beta1.AnnotateImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateImageRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java deleted file mode 100644 index 1d1e24c31b7c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AnnotateImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - * @return The image. - */ - com.google.cloud.vision.v1p3beta1.Image getImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Image image = 1; - */ - com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder(); - - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p3beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java deleted file mode 100644 index 1a12c846ac0a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java +++ /dev/null @@ -1,5055 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response to an image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageResponse} - */ -public final class AnnotateImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - AnnotateImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageResponse.newBuilder() to construct. - private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageResponse() { - faceAnnotations_ = java.util.Collections.emptyList(); - landmarkAnnotations_ = java.util.Collections.emptyList(); - logoAnnotations_ = java.util.Collections.emptyList(); - labelAnnotations_ = java.util.Collections.emptyList(); - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - textAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - faceAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.FaceAnnotation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - landmarkAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - logoAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labelAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - textAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder subBuilder = null; - if (safeSearchAnnotation_ != null) { - subBuilder = safeSearchAnnotation_.toBuilder(); - } - safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(safeSearchAnnotation_); - safeSearchAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.cloud.vision.v1p3beta1.ImageProperties.Builder subBuilder = null; - if (imagePropertiesAnnotation_ != null) { - subBuilder = imagePropertiesAnnotation_.toBuilder(); - } - imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imagePropertiesAnnotation_); - imagePropertiesAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder subBuilder = null; - if (cropHintsAnnotation_ != null) { - subBuilder = cropHintsAnnotation_.toBuilder(); - } - cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsAnnotation_); - cropHintsAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder subBuilder = null; - if (fullTextAnnotation_ != null) { - subBuilder = fullTextAnnotation_.toBuilder(); - } - fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fullTextAnnotation_); - fullTextAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.vision.v1p3beta1.WebDetection.Builder subBuilder = null; - if (webDetection_ != null) { - subBuilder = webDetection_.toBuilder(); - } - webDetection_ = input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetection_); - webDetection_ = subBuilder.buildPartial(); - } - - break; - } - case 114: { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder subBuilder = null; - if (productSearchResults_ != null) { - subBuilder = productSearchResults_.toBuilder(); - } - productSearchResults_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchResults_); - productSearchResults_ = subBuilder.buildPartial(); - } - - break; - } - case 170: { - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - localizedObjectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder.class); - } - - public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; - private java.util.List faceAnnotations_; - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List getFaceAnnotationsList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List - getFaceAnnotationsOrBuilderList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public int getFaceAnnotationsCount() { - return faceAnnotations_.size(); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index) { - return faceAnnotations_.get(index); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - return faceAnnotations_.get(index); - } - - public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; - private java.util.List landmarkAnnotations_; - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List getLandmarkAnnotationsList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public int getLandmarkAnnotationsCount() { - return landmarkAnnotations_.size(); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index) { - return landmarkAnnotations_.get(index); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - return landmarkAnnotations_.get(index); - } - - public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List logoAnnotations_; - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List getLogoAnnotationsList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List - getLogoAnnotationsOrBuilderList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public int getLogoAnnotationsCount() { - return logoAnnotations_.size(); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index) { - return logoAnnotations_.get(index); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - return logoAnnotations_.get(index); - } - - public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; - private java.util.List labelAnnotations_; - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List getLabelAnnotationsList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List - getLabelAnnotationsOrBuilderList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public int getLabelAnnotationsCount() { - return labelAnnotations_.size(); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index) { - return labelAnnotations_.get(index); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - return labelAnnotations_.get(index); - } - - public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; - private java.util.List localizedObjectAnnotations_; - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List getLocalizedObjectAnnotationsList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public int getLocalizedObjectAnnotationsCount() { - return localizedObjectAnnotations_.size(); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - return localizedObjectAnnotations_.get(index); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - return localizedObjectAnnotations_.get(index); - } - - public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; - private java.util.List textAnnotations_; - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List getTextAnnotationsList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List - getTextAnnotationsOrBuilderList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public int getTextAnnotationsCount() { - return textAnnotations_.size(); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index) { - return textAnnotations_.get(index); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - return textAnnotations_.get(index); - } - - public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_; - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - @java.lang.Override - public boolean hasFullTextAnnotation() { - return fullTextAnnotation_ != null; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation() { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - return getFullTextAnnotation(); - } - - public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_; - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - @java.lang.Override - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotation_ != null; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - return getSafeSearchAnnotation(); - } - - public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; - private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_; - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - @java.lang.Override - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ != null; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - return getImagePropertiesAnnotation(); - } - - public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; - private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_; - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - @java.lang.Override - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotation_ != null; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation() { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - return getCropHintsAnnotation(); - } - - public static final int WEB_DETECTION_FIELD_NUMBER = 13; - private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_; - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - @java.lang.Override - public boolean hasWebDetection() { - return webDetection_ != null; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection() { - return webDetection_ == null ? com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - return getWebDetection(); - } - - public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; - private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_; - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - @java.lang.Override - public boolean hasProductSearchResults() { - return productSearchResults_ != null; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults() { - return productSearchResults_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - return getProductSearchResults(); - } - - public static final int ERROR_FIELD_NUMBER = 9; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - public static final int CONTEXT_FIELD_NUMBER = 21; - private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_; - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext() { - return context_ == null ? com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - return getContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < faceAnnotations_.size(); i++) { - output.writeMessage(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - output.writeMessage(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - output.writeMessage(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - output.writeMessage(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - output.writeMessage(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - output.writeMessage(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - output.writeMessage(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - output.writeMessage(9, getError()); - } - if (cropHintsAnnotation_ != null) { - output.writeMessage(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - output.writeMessage(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - output.writeMessage(13, getWebDetection()); - } - if (productSearchResults_ != null) { - output.writeMessage(14, getProductSearchResults()); - } - if (context_ != null) { - output.writeMessage(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - output.writeMessage(22, localizedObjectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < faceAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getError()); - } - if (cropHintsAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getWebDetection()); - } - if (productSearchResults_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getProductSearchResults()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, localizedObjectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) obj; - - if (!getFaceAnnotationsList() - .equals(other.getFaceAnnotationsList())) return false; - if (!getLandmarkAnnotationsList() - .equals(other.getLandmarkAnnotationsList())) return false; - if (!getLogoAnnotationsList() - .equals(other.getLogoAnnotationsList())) return false; - if (!getLabelAnnotationsList() - .equals(other.getLabelAnnotationsList())) return false; - if (!getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList())) return false; - if (!getTextAnnotationsList() - .equals(other.getTextAnnotationsList())) return false; - if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; - if (hasFullTextAnnotation()) { - if (!getFullTextAnnotation() - .equals(other.getFullTextAnnotation())) return false; - } - if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; - if (hasSafeSearchAnnotation()) { - if (!getSafeSearchAnnotation() - .equals(other.getSafeSearchAnnotation())) return false; - } - if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; - if (hasImagePropertiesAnnotation()) { - if (!getImagePropertiesAnnotation() - .equals(other.getImagePropertiesAnnotation())) return false; - } - if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; - if (hasCropHintsAnnotation()) { - if (!getCropHintsAnnotation() - .equals(other.getCropHintsAnnotation())) return false; - } - if (hasWebDetection() != other.hasWebDetection()) return false; - if (hasWebDetection()) { - if (!getWebDetection() - .equals(other.getWebDetection())) return false; - } - if (hasProductSearchResults() != other.hasProductSearchResults()) return false; - if (hasProductSearchResults()) { - if (!getProductSearchResults() - .equals(other.getProductSearchResults())) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFaceAnnotationsCount() > 0) { - hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFaceAnnotationsList().hashCode(); - } - if (getLandmarkAnnotationsCount() > 0) { - hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); - } - if (getLogoAnnotationsCount() > 0) { - hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLogoAnnotationsList().hashCode(); - } - if (getLabelAnnotationsCount() > 0) { - hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLabelAnnotationsList().hashCode(); - } - if (getLocalizedObjectAnnotationsCount() > 0) { - hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); - } - if (getTextAnnotationsCount() > 0) { - hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTextAnnotationsList().hashCode(); - } - if (hasFullTextAnnotation()) { - hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getFullTextAnnotation().hashCode(); - } - if (hasSafeSearchAnnotation()) { - hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); - } - if (hasImagePropertiesAnnotation()) { - hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); - } - if (hasCropHintsAnnotation()) { - hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsAnnotation().hashCode(); - } - if (hasWebDetection()) { - hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getWebDetection().hashCode(); - } - if (hasProductSearchResults()) { - hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchResults().hashCode(); - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AnnotateImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFaceAnnotationsFieldBuilder(); - getLandmarkAnnotationsFieldBuilder(); - getLogoAnnotationsFieldBuilder(); - getLabelAnnotationsFieldBuilder(); - getLocalizedObjectAnnotationsFieldBuilder(); - getTextAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - faceAnnotationsBuilder_.clear(); - } - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - landmarkAnnotationsBuilder_.clear(); - } - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - logoAnnotationsBuilder_.clear(); - } - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelAnnotationsBuilder_.clear(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - textAnnotationsBuilder_.clear(); - } - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - if (webDetectionBuilder_ == null) { - webDetection_ = null; - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse build() { - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p3beta1.AnnotateImageResponse(this); - int from_bitField0_ = bitField0_; - if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.faceAnnotations_ = faceAnnotations_; - } else { - result.faceAnnotations_ = faceAnnotationsBuilder_.build(); - } - if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.landmarkAnnotations_ = landmarkAnnotations_; - } else { - result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); - } - if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.logoAnnotations_ = logoAnnotations_; - } else { - result.logoAnnotations_ = logoAnnotationsBuilder_.build(); - } - if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labelAnnotations_ = labelAnnotations_; - } else { - result.labelAnnotations_ = labelAnnotationsBuilder_.build(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.localizedObjectAnnotations_ = localizedObjectAnnotations_; - } else { - result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); - } - if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.textAnnotations_ = textAnnotations_; - } else { - result.textAnnotations_ = textAnnotationsBuilder_.build(); - } - if (fullTextAnnotationBuilder_ == null) { - result.fullTextAnnotation_ = fullTextAnnotation_; - } else { - result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); - } - if (safeSearchAnnotationBuilder_ == null) { - result.safeSearchAnnotation_ = safeSearchAnnotation_; - } else { - result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); - } - if (imagePropertiesAnnotationBuilder_ == null) { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; - } else { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); - } - if (cropHintsAnnotationBuilder_ == null) { - result.cropHintsAnnotation_ = cropHintsAnnotation_; - } else { - result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); - } - if (webDetectionBuilder_ == null) { - result.webDetection_ = webDetection_; - } else { - result.webDetection_ = webDetectionBuilder_.build(); - } - if (productSearchResultsBuilder_ == null) { - result.productSearchResults_ = productSearchResults_; - } else { - result.productSearchResults_ = productSearchResultsBuilder_.build(); - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AnnotateImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()) return this; - if (faceAnnotationsBuilder_ == null) { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotations_.isEmpty()) { - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.addAll(other.faceAnnotations_); - } - onChanged(); - } - } else { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotationsBuilder_.isEmpty()) { - faceAnnotationsBuilder_.dispose(); - faceAnnotationsBuilder_ = null; - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - faceAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFaceAnnotationsFieldBuilder() : null; - } else { - faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); - } - } - } - if (landmarkAnnotationsBuilder_ == null) { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotations_.isEmpty()) { - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.addAll(other.landmarkAnnotations_); - } - onChanged(); - } - } else { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotationsBuilder_.isEmpty()) { - landmarkAnnotationsBuilder_.dispose(); - landmarkAnnotationsBuilder_ = null; - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - landmarkAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarkAnnotationsFieldBuilder() : null; - } else { - landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); - } - } - } - if (logoAnnotationsBuilder_ == null) { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotations_.isEmpty()) { - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.addAll(other.logoAnnotations_); - } - onChanged(); - } - } else { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotationsBuilder_.isEmpty()) { - logoAnnotationsBuilder_.dispose(); - logoAnnotationsBuilder_ = null; - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - logoAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLogoAnnotationsFieldBuilder() : null; - } else { - logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); - } - } - } - if (labelAnnotationsBuilder_ == null) { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotations_.isEmpty()) { - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.addAll(other.labelAnnotations_); - } - onChanged(); - } - } else { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotationsBuilder_.isEmpty()) { - labelAnnotationsBuilder_.dispose(); - labelAnnotationsBuilder_ = null; - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - labelAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelAnnotationsFieldBuilder() : null; - } else { - labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); - } - } - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotations_.isEmpty()) { - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); - } - onChanged(); - } - } else { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotationsBuilder_.isEmpty()) { - localizedObjectAnnotationsBuilder_.dispose(); - localizedObjectAnnotationsBuilder_ = null; - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - localizedObjectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocalizedObjectAnnotationsFieldBuilder() : null; - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); - } - } - } - if (textAnnotationsBuilder_ == null) { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotations_.isEmpty()) { - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTextAnnotationsIsMutable(); - textAnnotations_.addAll(other.textAnnotations_); - } - onChanged(); - } - } else { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotationsBuilder_.isEmpty()) { - textAnnotationsBuilder_.dispose(); - textAnnotationsBuilder_ = null; - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - textAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTextAnnotationsFieldBuilder() : null; - } else { - textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); - } - } - } - if (other.hasFullTextAnnotation()) { - mergeFullTextAnnotation(other.getFullTextAnnotation()); - } - if (other.hasSafeSearchAnnotation()) { - mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); - } - if (other.hasImagePropertiesAnnotation()) { - mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); - } - if (other.hasCropHintsAnnotation()) { - mergeCropHintsAnnotation(other.getCropHintsAnnotation()); - } - if (other.hasWebDetection()) { - mergeWebDetection(other.getWebDetection()); - } - if (other.hasProductSearchResults()) { - mergeProductSearchResults(other.getProductSearchResults()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List faceAnnotations_ = - java.util.Collections.emptyList(); - private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; - - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List getFaceAnnotationsList() { - if (faceAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } else { - return faceAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public int getFaceAnnotationsCount() { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.size(); - } else { - return faceAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); - } else { - return faceAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations(com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addAllFaceAnnotations( - java.lang.Iterable values) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, faceAnnotations_); - onChanged(); - } else { - faceAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder clearFaceAnnotations() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - faceAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public Builder removeFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.remove(index); - onChanged(); - } else { - faceAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); } else { - return faceAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsOrBuilderList() { - if (faceAnnotationsBuilder_ != null) { - return faceAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { - return getFaceAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsBuilderList() { - return getFaceAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder> - getFaceAnnotationsFieldBuilder() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder>( - faceAnnotations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - faceAnnotations_ = null; - } - return faceAnnotationsBuilder_; - } - - private java.util.List landmarkAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; - - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List getLandmarkAnnotationsList() { - if (landmarkAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } else { - return landmarkAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public int getLandmarkAnnotationsCount() { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.size(); - } else { - return landmarkAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); - } else { - return landmarkAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addAllLandmarkAnnotations( - java.lang.Iterable values) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarkAnnotations_); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder clearLandmarkAnnotations() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - landmarkAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder removeLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.remove(index); - onChanged(); - } else { - landmarkAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); } else { - return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - if (landmarkAnnotationsBuilder_ != null) { - return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsBuilderList() { - return getLandmarkAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> - getLandmarkAnnotationsFieldBuilder() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( - landmarkAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - landmarkAnnotations_ = null; - } - return landmarkAnnotationsBuilder_; - } - - private java.util.List logoAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; - - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List getLogoAnnotationsList() { - if (logoAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } else { - return logoAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public int getLogoAnnotationsCount() { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.size(); - } else { - return logoAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); - } else { - return logoAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addAllLogoAnnotations( - java.lang.Iterable values) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logoAnnotations_); - onChanged(); - } else { - logoAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder clearLogoAnnotations() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - logoAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder removeLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.remove(index); - onChanged(); - } else { - logoAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); } else { - return logoAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsOrBuilderList() { - if (logoAnnotationsBuilder_ != null) { - return logoAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { - return getLogoAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsBuilderList() { - return getLogoAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> - getLogoAnnotationsFieldBuilder() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( - logoAnnotations_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - logoAnnotations_ = null; - } - return logoAnnotationsBuilder_; - } - - private java.util.List labelAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; - - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List getLabelAnnotationsList() { - if (labelAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } else { - return labelAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public int getLabelAnnotationsCount() { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.size(); - } else { - return labelAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); - } else { - return labelAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addAllLabelAnnotations( - java.lang.Iterable values) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelAnnotations_); - onChanged(); - } else { - labelAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder clearLabelAnnotations() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public Builder removeLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.remove(index); - onChanged(); - } else { - labelAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); } else { - return labelAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsOrBuilderList() { - if (labelAnnotationsBuilder_ != null) { - return labelAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { - return getLabelAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsBuilderList() { - return getLabelAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> - getLabelAnnotationsFieldBuilder() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( - labelAnnotations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - labelAnnotations_ = null; - } - return labelAnnotationsBuilder_; - } - - private java.util.List localizedObjectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; - - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List getLocalizedObjectAnnotationsList() { - if (localizedObjectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } else { - return localizedObjectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public int getLocalizedObjectAnnotationsCount() { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.size(); - } else { - return localizedObjectAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); - } else { - return localizedObjectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addAllLocalizedObjectAnnotations( - java.lang.Iterable values) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, localizedObjectAnnotations_); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder clearLocalizedObjectAnnotations() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder removeLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.remove(index); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); } else { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - if (localizedObjectAnnotationsBuilder_ != null) { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsBuilderList() { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder> - getLocalizedObjectAnnotationsFieldBuilder() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder>( - localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - localizedObjectAnnotations_ = null; - } - return localizedObjectAnnotationsBuilder_; - } - - private java.util.List textAnnotations_ = - java.util.Collections.emptyList(); - private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(textAnnotations_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; - - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List getTextAnnotationsList() { - if (textAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textAnnotations_); - } else { - return textAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public int getTextAnnotationsCount() { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.size(); - } else { - return textAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); - } else { - return textAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations(com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addAllTextAnnotations( - java.lang.Iterable values) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, textAnnotations_); - onChanged(); - } else { - textAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder clearTextAnnotations() { - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - textAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public Builder removeTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.remove(index); - onChanged(); - } else { - textAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); } else { - return textAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsOrBuilderList() { - if (textAnnotationsBuilder_ != null) { - return textAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textAnnotations_); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { - return getTextAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsBuilderList() { - return getTextAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder> - getTextAnnotationsFieldBuilder() { - if (textAnnotationsBuilder_ == null) { - textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.EntityAnnotation, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( - textAnnotations_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - textAnnotations_ = null; - } - return textAnnotationsBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - public boolean hasFullTextAnnotation() { - return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } else { - return fullTextAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation(com.google.cloud.vision.v1p3beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fullTextAnnotation_ = value; - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation( - com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder builderForValue) { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = builderForValue.build(); - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p3beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (fullTextAnnotation_ != null) { - fullTextAnnotation_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); - } else { - fullTextAnnotation_ = value; - } - onChanged(); - } else { - fullTextAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder clearFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - onChanged(); - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { - - onChanged(); - return getFullTextAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - if (fullTextAnnotationBuilder_ != null) { - return fullTextAnnotationBuilder_.getMessageOrBuilder(); - } else { - return fullTextAnnotation_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder> - getFullTextAnnotationFieldBuilder() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder>( - getFullTextAnnotation(), - getParentForChildren(), - isClean()); - fullTextAnnotation_ = null; - } - return fullTextAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } else { - return safeSearchAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - safeSearchAnnotation_ = value; - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation( - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder builderForValue) { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = builderForValue.build(); - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (safeSearchAnnotation_ != null) { - safeSearchAnnotation_ = - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); - } else { - safeSearchAnnotation_ = value; - } - onChanged(); - } else { - safeSearchAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder clearSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - onChanged(); - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { - - onChanged(); - return getSafeSearchAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - if (safeSearchAnnotationBuilder_ != null) { - return safeSearchAnnotationBuilder_.getMessageOrBuilder(); - } else { - return safeSearchAnnotation_ == null ? - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder> - getSafeSearchAnnotationFieldBuilder() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder>( - getSafeSearchAnnotation(), - getParentForChildren(), - isClean()); - safeSearchAnnotation_ = null; - } - return safeSearchAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - public com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } else { - return imagePropertiesAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p3beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imagePropertiesAnnotation_ = value; - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation( - com.google.cloud.vision.v1p3beta1.ImageProperties.Builder builderForValue) { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = builderForValue.build(); - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p3beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (imagePropertiesAnnotation_ != null) { - imagePropertiesAnnotation_ = - com.google.cloud.vision.v1p3beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); - } else { - imagePropertiesAnnotation_ = value; - } - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder clearImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - onChanged(); - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p3beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { - - onChanged(); - return getImagePropertiesAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - if (imagePropertiesAnnotationBuilder_ != null) { - return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); - } else { - return imagePropertiesAnnotation_ == null ? - com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder> - getImagePropertiesAnnotationFieldBuilder() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder>( - getImagePropertiesAnnotation(), - getParentForChildren(), - isClean()); - imagePropertiesAnnotation_ = null; - } - return imagePropertiesAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } else { - return cropHintsAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsAnnotation_ = value; - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation( - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder builderForValue) { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = builderForValue.build(); - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (cropHintsAnnotation_ != null) { - cropHintsAnnotation_ = - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); - } else { - cropHintsAnnotation_ = value; - } - onChanged(); - } else { - cropHintsAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder clearCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - onChanged(); - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { - - onChanged(); - return getCropHintsAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - if (cropHintsAnnotationBuilder_ != null) { - return cropHintsAnnotationBuilder_.getMessageOrBuilder(); - } else { - return cropHintsAnnotation_ == null ? - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder> - getCropHintsAnnotationFieldBuilder() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder>( - getCropHintsAnnotation(), - getParentForChildren(), - isClean()); - cropHintsAnnotation_ = null; - } - return cropHintsAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder> webDetectionBuilder_; - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - public boolean hasWebDetection() { - return webDetectionBuilder_ != null || webDetection_ != null; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - public com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection() { - if (webDetectionBuilder_ == null) { - return webDetection_ == null ? com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; - } else { - return webDetectionBuilder_.getMessage(); - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection(com.google.cloud.vision.v1p3beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetection_ = value; - onChanged(); - } else { - webDetectionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection( - com.google.cloud.vision.v1p3beta1.WebDetection.Builder builderForValue) { - if (webDetectionBuilder_ == null) { - webDetection_ = builderForValue.build(); - onChanged(); - } else { - webDetectionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public Builder mergeWebDetection(com.google.cloud.vision.v1p3beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (webDetection_ != null) { - webDetection_ = - com.google.cloud.vision.v1p3beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); - } else { - webDetection_ = value; - } - onChanged(); - } else { - webDetectionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public Builder clearWebDetection() { - if (webDetectionBuilder_ == null) { - webDetection_ = null; - onChanged(); - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.Builder getWebDetectionBuilder() { - - onChanged(); - return getWebDetectionFieldBuilder().getBuilder(); - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - if (webDetectionBuilder_ != null) { - return webDetectionBuilder_.getMessageOrBuilder(); - } else { - return webDetection_ == null ? - com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance() : webDetection_; - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder> - getWebDetectionFieldBuilder() { - if (webDetectionBuilder_ == null) { - webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder>( - getWebDetection(), - getParentForChildren(), - isClean()); - webDetection_ = null; - } - return webDetectionBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - public boolean hasProductSearchResults() { - return productSearchResultsBuilder_ != null || productSearchResults_ != null; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - return productSearchResults_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } else { - return productSearchResultsBuilder_.getMessage(); - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchResults_ = value; - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder builderForValue) { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = builderForValue.build(); - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public Builder mergeProductSearchResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (productSearchResults_ != null) { - productSearchResults_ = - com.google.cloud.vision.v1p3beta1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); - } else { - productSearchResults_ = value; - } - onChanged(); - } else { - productSearchResultsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public Builder clearProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - onChanged(); - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder getProductSearchResultsBuilder() { - - onChanged(); - return getProductSearchResultsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - if (productSearchResultsBuilder_ != null) { - return productSearchResultsBuilder_.getMessageOrBuilder(); - } else { - return productSearchResults_ == null ? - com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder> - getProductSearchResultsFieldBuilder() { - if (productSearchResultsBuilder_ == null) { - productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder>( - getProductSearchResults(), - getParentForChildren(), - isClean()); - productSearchResults_ = null; - } - return productSearchResultsBuilder_; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder> contextBuilder_; - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext( - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public Builder mergeContext(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - private static final com.google.cloud.vision.v1p3beta1.AnnotateImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AnnotateImageResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java deleted file mode 100644 index 84d2c0a38b08..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponseOrBuilder.java +++ /dev/null @@ -1,512 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AnnotateImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p3beta1.FaceAnnotation getFaceAnnotations(int index); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - int getFaceAnnotationsCount(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsOrBuilderList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotation getLandmarkAnnotations(int index); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - int getLandmarkAnnotationsCount(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsOrBuilderList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotation getLogoAnnotations(int index); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - int getLogoAnnotationsCount(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsOrBuilderList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotation getLabelAnnotations(int index); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - int getLabelAnnotationsCount(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsOrBuilderList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - int getLocalizedObjectAnnotationsCount(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsOrBuilderList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotation getTextAnnotations(int index); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - int getTextAnnotationsCount(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsOrBuilderList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - boolean hasFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation getFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation full_text_annotation = 12; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); - - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - boolean hasSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); - - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - boolean hasImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - com.google.cloud.vision.v1p3beta1.ImageProperties getImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageProperties image_properties_annotation = 8; - */ - com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); - - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - boolean hasCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); - - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - boolean hasWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - com.google.cloud.vision.v1p3beta1.WebDetection getWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetection web_detection = 13; - */ - com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); - - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - boolean hasProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults getProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = 14; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); - - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageAnnotationContext context = 21; - */ - com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java deleted file mode 100644 index 074be7e820a1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java +++ /dev/null @@ -1,1580 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * An offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} - */ -public final class AsyncAnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - AsyncAnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileRequest.newBuilder() to construct. - private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p3beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.vision.v1p3beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (outputConfig_ != null) { - output.writeMessage(4, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest build() { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p3beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p3beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p3beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p3beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p3beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - private static final com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java deleted file mode 100644 index bfb260d5889c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AsyncAnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p3beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 4; - */ - com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java deleted file mode 100644 index 412076dc190b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The response for a single offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} - */ -public final class AsyncAnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - AsyncAnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileResponse.newBuilder() to construct. - private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response for a single offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse build() { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p3beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - private static final com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java deleted file mode 100644 index 5cf4065edf2e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AsyncAnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java deleted file mode 100644 index 0a5f39d1f6b0..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java +++ /dev/null @@ -1,874 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Multiple async file annotation requests are batched into a single service
- * call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} - */ -public final class AsyncBatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - AsyncBatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. - private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple async file annotation requests are batched into a single service
-   * call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index d6d57acfdadb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AsyncBatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getRequests(int index); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java deleted file mode 100644 index f4c257d0711b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response to an async batch file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} - */ -public final class AsyncBatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - AsyncBatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. - private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index 67cf67b372aa..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface AsyncBatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java deleted file mode 100644 index e78683043d48..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Multiple image annotation requests are batched into a single service call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} - */ -public final class BatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - BatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesRequest.newBuilder() to construct. - private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple image annotation requests are batched into a single service call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index b669bf8f4a86..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface BatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java deleted file mode 100644 index 658f0d445778..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response to a batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} - */ -public final class BatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - BatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesResponse.newBuilder() to construct. - private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index 7b145922c2f6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface BatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java deleted file mode 100644 index 881734218515..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java +++ /dev/null @@ -1,1238 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Metadata for the batch operations such as the current state.
- * This is included in the `metadata` field of the `Operation` returned by the
- * `GetOperation` call of the `google::longrunning::Operations` service.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata} - */ -public final class BatchOperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - BatchOperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchOperationMetadata.newBuilder() to construct. - private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchOperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (submitTime_ != null) { - subBuilder = submitTime_.toBuilder(); - } - submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(submitTime_); - submitTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.Builder.class); - } - - /** - *
-   * Enumerates the possible states that the batch request can be in.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - PROCESSING(1), - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - SUCCESSFUL(2), - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - public static final int PROCESSING_VALUE = 1; - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - public static final int SUCCESSFUL_VALUE = 2; - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return PROCESSING; - case 2: return SUCCESSFUL; - case 3: return FAILED; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int SUBMIT_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp submitTime_; - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - @java.lang.Override - public boolean hasSubmitTime() { - return submitTime_ != null; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSubmitTime() { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - return getSubmitTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (submitTime_ != null) { - output.writeMessage(2, getSubmitTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (submitTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubmitTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEndTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BatchOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasSubmitTime() != other.hasSubmitTime()) return false; - if (hasSubmitTime()) { - if (!getSubmitTime() - .equals(other.getSubmitTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasSubmitTime()) { - hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSubmitTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata for the batch operations such as the current state.
-   * This is included in the `metadata` field of the `Operation` returned by the
-   * `GetOperation` call of the `google::longrunning::Operations` service.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BatchOperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - com.google.cloud.vision.v1p3beta1.BatchOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (submitTimeBuilder_ == null) { - submitTime_ = null; - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata build() { - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata buildPartial() { - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata result = new com.google.cloud.vision.v1p3beta1.BatchOperationMetadata(this); - result.state_ = state_; - if (submitTimeBuilder_ == null) { - result.submitTime_ = submitTime_; - } else { - result.submitTime_ = submitTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.BatchOperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata other) { - if (other == com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasSubmitTime()) { - mergeSubmitTime(other.getSubmitTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp submitTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - public boolean hasSubmitTime() { - return submitTimeBuilder_ != null || submitTime_ != null; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - public com.google.protobuf.Timestamp getSubmitTime() { - if (submitTimeBuilder_ == null) { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } else { - return submitTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - submitTime_ = value; - onChanged(); - } else { - submitTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (submitTimeBuilder_ == null) { - submitTime_ = builderForValue.build(); - onChanged(); - } else { - submitTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (submitTime_ != null) { - submitTime_ = - com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); - } else { - submitTime_ = value; - } - onChanged(); - } else { - submitTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder clearSubmitTime() { - if (submitTimeBuilder_ == null) { - submitTime_ = null; - onChanged(); - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { - - onChanged(); - return getSubmitTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - if (submitTimeBuilder_ != null) { - return submitTimeBuilder_.getMessageOrBuilder(); - } else { - return submitTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSubmitTimeFieldBuilder() { - if (submitTimeBuilder_ == null) { - submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSubmitTime(), - getParentForChildren(), - isClean()); - submitTime_ = null; - } - return submitTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - private static final com.google.cloud.vision.v1p3beta1.BatchOperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BatchOperationMetadata(); - } - - public static com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java deleted file mode 100644 index a85a94371c46..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadataOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface BatchOperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - boolean hasSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - com.google.protobuf.Timestamp getSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); - - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java deleted file mode 100644 index 2be514108d71..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java +++ /dev/null @@ -1,1914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Logical element on the page.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Block} - */ -public final class Block extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Block) - BlockOrBuilder { -private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Block() { - paragraphs_ = java.util.Collections.emptyList(); - blockType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Block(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Block( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paragraphs_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Paragraph.parser(), extensionRegistry)); - break; - } - case 32: { - int rawValue = input.readEnum(); - - blockType_ = rawValue; - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Block.class, com.google.cloud.vision.v1p3beta1.Block.Builder.class); - } - - /** - *
-   * Type of a block (text, image etc) as identified by OCR.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.Block.BlockType} - */ - public enum BlockType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - TABLE(2), - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - PICTURE(3), - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - RULER(4), - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - BARCODE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - public static final int TABLE_VALUE = 2; - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - public static final int PICTURE_VALUE = 3; - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - public static final int RULER_VALUE = 4; - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - public static final int BARCODE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TEXT; - case 2: return TABLE; - case 3: return PICTURE; - case 4: return RULER; - case 5: return BARCODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockType findValueByNumber(int number) { - return BlockType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.Block.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockType[] VALUES = values(); - - public static BlockType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Block.BlockType) - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int PARAGRAPHS_FIELD_NUMBER = 3; - private java.util.List paragraphs_; - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List getParagraphsList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - return paragraphs_.get(index); - } - - public static final int BLOCK_TYPE_FIELD_NUMBER = 4; - private int blockType_; - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Block.BlockType result = com.google.cloud.vision.v1p3beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p3beta1.Block.BlockType.UNRECOGNIZED : result; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p3beta1.Block.BlockType.UNKNOWN.getNumber()) { - output.writeEnum(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p3beta1.Block.BlockType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Block)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Block other = (com.google.cloud.vision.v1p3beta1.Block) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getParagraphsList() - .equals(other.getParagraphsList())) return false; - if (blockType_ != other.blockType_) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + blockType_; - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Block parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Block parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Block prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Logical element on the page.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Block} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Block) - com.google.cloud.vision.v1p3beta1.BlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Block.class, com.google.cloud.vision.v1p3beta1.Block.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Block.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParagraphsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - paragraphsBuilder_.clear(); - } - blockType_ = 0; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block build() { - com.google.cloud.vision.v1p3beta1.Block result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block buildPartial() { - com.google.cloud.vision.v1p3beta1.Block result = new com.google.cloud.vision.v1p3beta1.Block(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - result.blockType_ = blockType_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Block) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Block)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Block other) { - if (other == com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParagraphsFieldBuilder() : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (other.blockType_ != 0) { - setBlockTypeValue(other.getBlockTypeValue()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Block parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Block) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List paragraphs_ = - java.util.Collections.emptyList(); - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(paragraphs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder> paragraphsBuilder_; - - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public java.util.List getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); - } else { - return paragraphsBuilder_.getMessageList(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p3beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs(com.google.cloud.vision.v1p3beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p3beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p3beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder addAllParagraphs( - java.lang.Iterable values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p3beta1.Paragraph.Builder getParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(paragraphs_); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p3beta1.Paragraph.Builder addParagraphsBuilder() { - return getParagraphsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p3beta1.Paragraph.Builder addParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - paragraphs_ = null; - } - return paragraphsBuilder_; - } - - private int blockType_ = 0; - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @param value The enum numeric value on the wire for blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockTypeValue(int value) { - - blockType_ = value; - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Block.BlockType result = com.google.cloud.vision.v1p3beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p3beta1.Block.BlockType.UNRECOGNIZED : result; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @param value The blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockType(com.google.cloud.vision.v1p3beta1.Block.BlockType value) { - if (value == null) { - throw new NullPointerException(); - } - - blockType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return This builder for chaining. - */ - public Builder clearBlockType() { - - blockType_ = 0; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Block) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Block) - private static final com.google.cloud.vision.v1p3beta1.Block DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Block(); - } - - public static com.google.cloud.vision.v1p3beta1.Block getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Block parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Block(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java deleted file mode 100644 index 1a5ecb47b307..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BlockOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Block) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p3beta1.Paragraph getParagraphs(int index); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - int getParagraphsCount(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsOrBuilderList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index); - - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - int getBlockTypeValue(); - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - com.google.cloud.vision.v1p3beta1.Block.BlockType getBlockType(); - - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java deleted file mode 100644 index 851eac3e878f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java +++ /dev/null @@ -1,1312 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A bounding polygon for the detected image annotation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BoundingPoly} - */ -public final class BoundingPoly extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.BoundingPoly) - BoundingPolyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingPoly() { - vertices_ = java.util.Collections.emptyList(); - normalizedVertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vertices_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Vertex.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - normalizedVertices_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.NormalizedVertex.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BoundingPoly.class, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder.class); - } - - public static final int VERTICES_FIELD_NUMBER = 1; - private java.util.List vertices_; - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List getVerticesList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List - getVerticesOrBuilderList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - @java.lang.Override - public int getVerticesCount() { - return vertices_.size(); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index) { - return vertices_.get(index); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - return vertices_.get(index); - } - - public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; - private java.util.List normalizedVertices_; - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List getNormalizedVerticesList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List - getNormalizedVerticesOrBuilderList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public int getNormalizedVerticesCount() { - return normalizedVertices_.size(); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index) { - return normalizedVertices_.get(index); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - return normalizedVertices_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < vertices_.size(); i++) { - output.writeMessage(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - output.writeMessage(2, normalizedVertices_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < vertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, normalizedVertices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.BoundingPoly other = (com.google.cloud.vision.v1p3beta1.BoundingPoly) obj; - - if (!getVerticesList() - .equals(other.getVerticesList())) return false; - if (!getNormalizedVerticesList() - .equals(other.getNormalizedVerticesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVerticesCount() > 0) { - hash = (37 * hash) + VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getVerticesList().hashCode(); - } - if (getNormalizedVerticesCount() > 0) { - hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getNormalizedVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A bounding polygon for the detected image annotation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.BoundingPoly} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.BoundingPoly) - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.BoundingPoly.class, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVerticesFieldBuilder(); - getNormalizedVerticesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - verticesBuilder_.clear(); - } - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly build() { - com.google.cloud.vision.v1p3beta1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly buildPartial() { - com.google.cloud.vision.v1p3beta1.BoundingPoly result = new com.google.cloud.vision.v1p3beta1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.vertices_ = vertices_; - } else { - result.vertices_ = verticesBuilder_.build(); - } - if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.normalizedVertices_ = normalizedVertices_; - } else { - result.normalizedVertices_ = normalizedVerticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.BoundingPoly) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.BoundingPoly)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.BoundingPoly other) { - if (other == com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()) return this; - if (verticesBuilder_ == null) { - if (!other.vertices_.isEmpty()) { - if (vertices_.isEmpty()) { - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVerticesIsMutable(); - vertices_.addAll(other.vertices_); - } - onChanged(); - } - } else { - if (!other.vertices_.isEmpty()) { - if (verticesBuilder_.isEmpty()) { - verticesBuilder_.dispose(); - verticesBuilder_ = null; - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - verticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVerticesFieldBuilder() : null; - } else { - verticesBuilder_.addAllMessages(other.vertices_); - } - } - } - if (normalizedVerticesBuilder_ == null) { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVertices_.isEmpty()) { - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.addAll(other.normalizedVertices_); - } - onChanged(); - } - } else { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVerticesBuilder_.isEmpty()) { - normalizedVerticesBuilder_.dispose(); - normalizedVerticesBuilder_ = null; - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - normalizedVerticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNormalizedVerticesFieldBuilder() : null; - } else { - normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List vertices_ = - java.util.Collections.emptyList(); - private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(vertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder> verticesBuilder_; - - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public java.util.List getVerticesList() { - if (verticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(vertices_); - } else { - return verticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public int getVerticesCount() { - if (verticesBuilder_ == null) { - return vertices_.size(); - } else { - return verticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); - } else { - return verticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p3beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.set(index, value); - onChanged(); - } else { - verticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.set(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder addVertices(com.google.cloud.vision.v1p3beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(value); - onChanged(); - } else { - verticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p3beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(index, value); - onChanged(); - } else { - verticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder addVertices( - com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p3beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder addAllVertices( - java.lang.Iterable values) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vertices_); - onChanged(); - } else { - verticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder clearVertices() { - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - verticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public Builder removeVertices(int index) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.remove(index); - onChanged(); - } else { - verticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p3beta1.Vertex.Builder getVerticesBuilder( - int index) { - return getVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); } else { - return verticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesOrBuilderList() { - if (verticesBuilder_ != null) { - return verticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(vertices_); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder() { - return getVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder( - int index) { - return getVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesBuilderList() { - return getVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder> - getVerticesFieldBuilder() { - if (verticesBuilder_ == null) { - verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - vertices_ = null; - } - return verticesBuilder_; - } - - private java.util.List normalizedVertices_ = - java.util.Collections.emptyList(); - private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; - - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List getNormalizedVerticesList() { - if (normalizedVerticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } else { - return normalizedVerticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.size(); - } else { - return normalizedVerticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices(com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addAllNormalizedVertices( - java.lang.Iterable values) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, normalizedVertices_); - onChanged(); - } else { - normalizedVerticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder clearNormalizedVertices() { - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder removeNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.remove(index); - onChanged(); - } else { - normalizedVerticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); } else { - return normalizedVerticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - if (normalizedVerticesBuilder_ != null) { - return normalizedVerticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { - return getNormalizedVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesBuilderList() { - return getNormalizedVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder> - getNormalizedVerticesFieldBuilder() { - if (normalizedVerticesBuilder_ == null) { - normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder>( - normalizedVertices_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - normalizedVertices_ = null; - } - return normalizedVerticesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BoundingPoly) - private static final com.google.cloud.vision.v1p3beta1.BoundingPoly DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.BoundingPoly(); - } - - public static com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java deleted file mode 100644 index 8fa2aef81e73..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface BoundingPolyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p3beta1.Vertex getVertices(int index); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - int getVerticesCount(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesOrBuilderList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p3beta1.VertexOrBuilder getVerticesOrBuilder( - int index); - - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p3beta1.NormalizedVertex getNormalizedVertices(int index); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - int getNormalizedVerticesCount(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesOrBuilderList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java deleted file mode 100644 index c33bedf34547..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Color information consists of RGB channels, score, and the fraction of
- * the image that the color occupies in the image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ColorInfo} - */ -public final class ColorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ColorInfo) - ColorInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use ColorInfo.newBuilder() to construct. - private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ColorInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ColorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Color.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 29: { - - pixelFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ColorInfo.class, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder.class); - } - - public static final int COLOR_FIELD_NUMBER = 1; - private com.google.type.Color color_; - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return color_ != null; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return getColor(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; - private float pixelFraction_; - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (color_ != null) { - output.writeMessage(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - output.writeFloat(3, pixelFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, pixelFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ColorInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ColorInfo other = (com.google.cloud.vision.v1p3beta1.ColorInfo) obj; - - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor() - .equals(other.getColor())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getPixelFraction()) - != java.lang.Float.floatToIntBits( - other.getPixelFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPixelFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ColorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Color information consists of RGB channels, score, and the fraction of
-   * the image that the color occupies in the image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ColorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ColorInfo) - com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ColorInfo.class, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - score_ = 0F; - - pixelFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfo build() { - com.google.cloud.vision.v1p3beta1.ColorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfo buildPartial() { - com.google.cloud.vision.v1p3beta1.ColorInfo result = new com.google.cloud.vision.v1p3beta1.ColorInfo(this); - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - result.score_ = score_; - result.pixelFraction_ = pixelFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ColorInfo) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ColorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ColorInfo other) { - if (other == com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()) return this; - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getPixelFraction() != 0F) { - setPixelFraction(other.getPixelFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ColorInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ColorInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor( - com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.Color.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - - private float score_ ; - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float pixelFraction_ ; - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @param value The pixelFraction to set. - * @return This builder for chaining. - */ - public Builder setPixelFraction(float value) { - - pixelFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearPixelFraction() { - - pixelFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ColorInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ColorInfo) - private static final com.google.cloud.vision.v1p3beta1.ColorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ColorInfo(); - } - - public static com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java deleted file mode 100644 index 9273013cf1fd..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfoOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ColorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ColorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - boolean hasColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - com.google.type.Color getColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - com.google.type.ColorOrBuilder getColorOrBuilder(); - - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - float getPixelFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java deleted file mode 100644 index beee2d52da1b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `CreateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductRequest} - */ -public final class CreateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateProductRequest) - CreateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductRequest.newBuilder() to construct. - private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductRequest() { - parent_ = ""; - productId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.Product product_; - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int PRODUCT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productId_; - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - @java.lang.Override - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (product_ != null) { - output.writeMessage(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CreateProductRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (!getProductId() - .equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateProductRequest) - com.google.cloud.vision.v1p3beta1.CreateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateProductRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - productId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductRequest build() { - com.google.cloud.vision.v1p3beta1.CreateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.CreateProductRequest result = new com.google.cloud.vision.v1p3beta1.CreateProductRequest(this); - result.parent_ = parent_; - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.productId_ = productId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CreateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateProductRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.CreateProductRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (!other.getProductId().isEmpty()) { - productId_ = other.productId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CreateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private java.lang.Object productId_ = ""; - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The productId. - */ - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The productId to set. - * @return This builder for chaining. - */ - public Builder setProductId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductId() { - - productId_ = getDefaultInstance().getProductId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The bytes for productId to set. - * @return This builder for chaining. - */ - public Builder setProductIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductRequest) - private static final com.google.cloud.vision.v1p3beta1.CreateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateProductRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java deleted file mode 100644 index 9804a4951272..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CreateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1p3beta1.Product getProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - java.lang.String getProductId(); - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - com.google.protobuf.ByteString - getProductIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java deleted file mode 100644 index ea635434a5f7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java +++ /dev/null @@ -1,1025 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `CreateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductSetRequest} - */ -public final class CreateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - CreateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductSetRequest.newBuilder() to construct. - private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductSetRequest() { - parent_ = ""; - productSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productSetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productSetId_; - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - @java.lang.Override - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (productSet_ != null) { - output.writeMessage(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (!getProductSetId() - .equals(other.getProductSetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductSetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - com.google.cloud.vision.v1p3beta1.CreateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - productSetId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest result = new com.google.cloud.vision.v1p3beta1.CreateProductSetRequest(this); - result.parent_ = parent_; - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - result.productSetId_ = productSetId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.CreateProductSetRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (!other.getProductSetId().isEmpty()) { - productSetId_ = other.productSetId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CreateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private java.lang.Object productSetId_ = ""; - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSetId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductSetId() { - - productSetId_ = getDefaultInstance().getProductSetId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The bytes for productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSetId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.CreateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java deleted file mode 100644 index fc0c0172f9bf..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CreateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - java.lang.String getProductSetId(); - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - com.google.protobuf.ByteString - getProductSetIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java deleted file mode 100644 index 42b61b8914d2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java +++ /dev/null @@ -1,1044 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `CreateReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} - */ -public final class CreateReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - CreateReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateReferenceImageRequest.newBuilder() to construct. - private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateReferenceImageRequest() { - parent_ = ""; - referenceImageId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder subBuilder = null; - if (referenceImage_ != null) { - subBuilder = referenceImage_.toBuilder(); - } - referenceImage_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(referenceImage_); - referenceImage_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - referenceImageId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_; - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - @java.lang.Override - public boolean hasReferenceImage() { - return referenceImage_ != null; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage() { - return referenceImage_ == null ? com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - return getReferenceImage(); - } - - public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object referenceImageId_; - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - @java.lang.Override - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (referenceImage_ != null) { - output.writeMessage(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (referenceImage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReferenceImage() != other.hasReferenceImage()) return false; - if (hasReferenceImage()) { - if (!getReferenceImage() - .equals(other.getReferenceImage())) return false; - } - if (!getReferenceImageId() - .equals(other.getReferenceImageId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReferenceImage()) { - hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImage().hashCode(); - } - hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImageId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - referenceImageId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest build() { - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest(this); - result.parent_ = parent_; - if (referenceImageBuilder_ == null) { - result.referenceImage_ = referenceImage_; - } else { - result.referenceImage_ = referenceImageBuilder_.build(); - } - result.referenceImageId_ = referenceImageId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReferenceImage()) { - mergeReferenceImage(other.getReferenceImage()); - } - if (!other.getReferenceImageId().isEmpty()) { - referenceImageId_ = other.referenceImageId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImageBuilder_; - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - public boolean hasReferenceImage() { - return referenceImageBuilder_ != null || referenceImage_ != null; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage() { - if (referenceImageBuilder_ == null) { - return referenceImage_ == null ? com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } else { - return referenceImageBuilder_.getMessage(); - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - referenceImage_ = value; - onChanged(); - } else { - referenceImageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage( - com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImageBuilder_ == null) { - referenceImage_ = builderForValue.build(); - onChanged(); - } else { - referenceImageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeReferenceImage(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (referenceImage_ != null) { - referenceImage_ = - com.google.cloud.vision.v1p3beta1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); - } else { - referenceImage_ = value; - } - onChanged(); - } else { - referenceImageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearReferenceImage() { - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - onChanged(); - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImageBuilder() { - - onChanged(); - return getReferenceImageFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - if (referenceImageBuilder_ != null) { - return referenceImageBuilder_.getMessageOrBuilder(); - } else { - return referenceImage_ == null ? - com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> - getReferenceImageFieldBuilder() { - if (referenceImageBuilder_ == null) { - referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( - getReferenceImage(), - getParentForChildren(), - isClean()); - referenceImage_ = null; - } - return referenceImageBuilder_; - } - - private java.lang.Object referenceImageId_ = ""; - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - referenceImageId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return This builder for chaining. - */ - public Builder clearReferenceImageId() { - - referenceImageId_ = getDefaultInstance().getReferenceImageId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The bytes for referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - referenceImageId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - private static final com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java deleted file mode 100644 index 25fdcd67841b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CreateReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product in which to create the reference image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - boolean hasReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); - - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - java.lang.String getReferenceImageId(); - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - com.google.protobuf.ByteString - getReferenceImageIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java deleted file mode 100644 index 4446c72f0460..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java +++ /dev/null @@ -1,845 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Single crop hint that is used to generate a new crop when serving an image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHint} - */ -public final class CropHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHint) - CropHintOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHint.newBuilder() to construct. - private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHint() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - case 29: { - - importanceFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHint.class, com.google.cloud.vision.v1p3beta1.CropHint.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; - private float importanceFraction_; - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - output.writeFloat(3, importanceFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, importanceFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHint)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CropHint other = (com.google.cloud.vision.v1p3beta1.CropHint) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getImportanceFraction()) - != java.lang.Float.floatToIntBits( - other.getImportanceFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImportanceFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Single crop hint that is used to generate a new crop when serving an image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHint) - com.google.cloud.vision.v1p3beta1.CropHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHint.class, com.google.cloud.vision.v1p3beta1.CropHint.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CropHint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - confidence_ = 0F; - - importanceFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHint build() { - com.google.cloud.vision.v1p3beta1.CropHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHint buildPartial() { - com.google.cloud.vision.v1p3beta1.CropHint result = new com.google.cloud.vision.v1p3beta1.CropHint(this); - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.confidence_ = confidence_; - result.importanceFraction_ = importanceFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CropHint) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHint other) { - if (other == com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getImportanceFraction() != 0F) { - setImportanceFraction(other.getImportanceFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CropHint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale, as returned in `ImageParams`.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float importanceFraction_ ; - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @param value The importanceFraction to set. - * @return This builder for chaining. - */ - public Builder setImportanceFraction(float value) { - - importanceFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearImportanceFraction() { - - importanceFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHint) - private static final com.google.cloud.vision.v1p3beta1.CropHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHint(); - } - - public static com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java deleted file mode 100644 index bfc39c882c9e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CropHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale, as returned in `ImageParams`.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - float getImportanceFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java deleted file mode 100644 index d34e538fdb61..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Set of crop hints that are used to generate new crops when serving images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsAnnotation} - */ -public final class CropHintsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - CropHintsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsAnnotation.newBuilder() to construct. - private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsAnnotation() { - cropHints_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cropHints_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.CropHint.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder.class); - } - - public static final int CROP_HINTS_FIELD_NUMBER = 1; - private java.util.List cropHints_; - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List getCropHintsList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List - getCropHintsOrBuilderList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public int getCropHintsCount() { - return cropHints_.size(); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index) { - return cropHints_.get(index); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - return cropHints_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < cropHints_.size(); i++) { - output.writeMessage(1, cropHints_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < cropHints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cropHints_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHintsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) obj; - - if (!getCropHintsList() - .equals(other.getCropHintsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCropHintsCount() > 0) { - hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of crop hints that are used to generate new crops when serving images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - com.google.cloud.vision.v1p3beta1.CropHintsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCropHintsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation build() { - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p3beta1.CropHintsAnnotation(this); - int from_bitField0_ = bitField0_; - if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cropHints_ = cropHints_; - } else { - result.cropHints_ = cropHintsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHintsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHintsAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.getDefaultInstance()) return this; - if (cropHintsBuilder_ == null) { - if (!other.cropHints_.isEmpty()) { - if (cropHints_.isEmpty()) { - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCropHintsIsMutable(); - cropHints_.addAll(other.cropHints_); - } - onChanged(); - } - } else { - if (!other.cropHints_.isEmpty()) { - if (cropHintsBuilder_.isEmpty()) { - cropHintsBuilder_.dispose(); - cropHintsBuilder_ = null; - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - cropHintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCropHintsFieldBuilder() : null; - } else { - cropHintsBuilder_.addAllMessages(other.cropHints_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CropHintsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List cropHints_ = - java.util.Collections.emptyList(); - private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(cropHints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder> cropHintsBuilder_; - - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public java.util.List getCropHintsList() { - if (cropHintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cropHints_); - } else { - return cropHintsBuilder_.getMessageList(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public int getCropHintsCount() { - if (cropHintsBuilder_ == null) { - return cropHints_.size(); - } else { - return cropHintsBuilder_.getCount(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); - } else { - return cropHintsBuilder_.getMessage(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p3beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.set(index, value); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.set(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints(com.google.cloud.vision.v1p3beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p3beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(index, value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p3beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder addAllCropHints( - java.lang.Iterable values) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cropHints_); - onChanged(); - } else { - cropHintsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder clearCropHints() { - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public Builder removeCropHints(int index) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.remove(index); - onChanged(); - } else { - cropHintsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p3beta1.CropHint.Builder getCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().getBuilder(index); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); } else { - return cropHintsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsOrBuilderList() { - if (cropHintsBuilder_ != null) { - return cropHintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cropHints_); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder() { - return getCropHintsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsBuilderList() { - return getCropHintsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder> - getCropHintsFieldBuilder() { - if (cropHintsBuilder_ == null) { - cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cropHints_ = null; - } - return cropHintsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - private static final com.google.cloud.vision.v1p3beta1.CropHintsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHintsAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java deleted file mode 100644 index 9192acbf2006..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CropHintsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p3beta1.CropHint getCropHints(int index); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - int getCropHintsCount(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsOrBuilderList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p3beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java deleted file mode 100644 index 35f411c116df..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Parameters for crop hints annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsParams} - */ -public final class CropHintsParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.CropHintsParams) - CropHintsParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsParams.newBuilder() to construct. - private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsParams() { - aspectRatios_ = emptyFloatList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - aspectRatios_.addFloat(input.readFloat()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - aspectRatios_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHintsParams.class, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder.class); - } - - public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList aspectRatios_; - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - @java.lang.Override - public java.util.List - getAspectRatiosList() { - return aspectRatios_; - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - private int aspectRatiosMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getAspectRatiosList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); - } - for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.getFloat(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getAspectRatiosList().size(); - size += dataSize; - if (!getAspectRatiosList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - aspectRatiosMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.CropHintsParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.CropHintsParams other = (com.google.cloud.vision.v1p3beta1.CropHintsParams) obj; - - if (!getAspectRatiosList() - .equals(other.getAspectRatiosList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAspectRatiosCount() > 0) { - hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatiosList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.CropHintsParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.CropHintsParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.CropHintsParams) - com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.CropHintsParams.class, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.CropHintsParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParams build() { - com.google.cloud.vision.v1p3beta1.CropHintsParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParams buildPartial() { - com.google.cloud.vision.v1p3beta1.CropHintsParams result = new com.google.cloud.vision.v1p3beta1.CropHintsParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aspectRatios_ = aspectRatios_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.CropHintsParams) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.CropHintsParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.CropHintsParams other) { - if (other == com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance()) return this; - if (!other.aspectRatios_.isEmpty()) { - if (aspectRatios_.isEmpty()) { - aspectRatios_ = other.aspectRatios_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAspectRatiosIsMutable(); - aspectRatios_.addAll(other.aspectRatios_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.CropHintsParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.CropHintsParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); - private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = mutableCopy(aspectRatios_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - public java.util.List - getAspectRatiosList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index to set the value at. - * @param value The aspectRatios to set. - * @return This builder for chaining. - */ - public Builder setAspectRatios( - int index, float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.setFloat(index, value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param value The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAspectRatios(float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.addFloat(value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param values The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAllAspectRatios( - java.lang.Iterable values) { - ensureAspectRatiosIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aspectRatios_); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return This builder for chaining. - */ - public Builder clearAspectRatios() { - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.CropHintsParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsParams) - private static final com.google.cloud.vision.v1p3beta1.CropHintsParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.CropHintsParams(); - } - - public static com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java deleted file mode 100644 index a653d0de77da..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParamsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface CropHintsParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.CropHintsParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - java.util.List getAspectRatiosList(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - int getAspectRatiosCount(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - float getAspectRatios(int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java deleted file mode 100644 index 719318c2ace9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `DeleteProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductRequest} - */ -public final class DeleteProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteProductRequest) - DeleteProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductRequest.newBuilder() to construct. - private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteProductRequest) - com.google.cloud.vision.v1p3beta1.DeleteProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductRequest build() { - com.google.cloud.vision.v1p3beta1.DeleteProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.DeleteProductRequest result = new com.google.cloud.vision.v1p3beta1.DeleteProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteProductRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.DeleteProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.DeleteProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductRequest) - private static final com.google.cloud.vision.v1p3beta1.DeleteProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteProductRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java deleted file mode 100644 index 7f8ba581ae92..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface DeleteProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java deleted file mode 100644 index 8235fd8f94f2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `DeleteProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductSetRequest} - */ -public final class DeleteProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - DeleteProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductSetRequest.newBuilder() to construct. - private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest result = new com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java deleted file mode 100644 index 0467f25bc398..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface DeleteProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java deleted file mode 100644 index 8a6f19c9c97e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `DeleteReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} - */ -public final class DeleteReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - DeleteReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteReferenceImageRequest.newBuilder() to construct. - private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest build() { - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - private static final com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java deleted file mode 100644 index da3ee934e47e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface DeleteReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java deleted file mode 100644 index 8ea9a6af680c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Set of dominant colors and their corresponding scores.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DominantColorsAnnotation} - */ -public final class DominantColorsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - DominantColorsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DominantColorsAnnotation.newBuilder() to construct. - private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DominantColorsAnnotation() { - colors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DominantColorsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DominantColorsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colors_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ColorInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder.class); - } - - public static final int COLORS_FIELD_NUMBER = 1; - private java.util.List colors_; - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List getColorsList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List - getColorsOrBuilderList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public int getColorsCount() { - return colors_.size(); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index) { - return colors_.get(index); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - return colors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < colors_.size(); i++) { - output.writeMessage(1, colors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < colors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, colors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) obj; - - if (!getColorsList() - .equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getColorsCount() > 0) { - hash = (37 * hash) + COLORS_FIELD_NUMBER; - hash = (53 * hash) + getColorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of dominant colors and their corresponding scores.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.DominantColorsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getColorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - colorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation build() { - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation(this); - int from_bitField0_ = bitField0_; - if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.colors_ = colors_; - } else { - result.colors_ = colorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance()) return this; - if (colorsBuilder_ == null) { - if (!other.colors_.isEmpty()) { - if (colors_.isEmpty()) { - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColorsIsMutable(); - colors_.addAll(other.colors_); - } - onChanged(); - } - } else { - if (!other.colors_.isEmpty()) { - if (colorsBuilder_.isEmpty()) { - colorsBuilder_.dispose(); - colorsBuilder_ = null; - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - colorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getColorsFieldBuilder() : null; - } else { - colorsBuilder_.addAllMessages(other.colors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List colors_ = - java.util.Collections.emptyList(); - private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(colors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder> colorsBuilder_; - - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public java.util.List getColorsList() { - if (colorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(colors_); - } else { - return colorsBuilder_.getMessageList(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public int getColorsCount() { - if (colorsBuilder_ == null) { - return colors_.size(); - } else { - return colorsBuilder_.getCount(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); - } else { - return colorsBuilder_.getMessage(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p3beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.set(index, value); - onChanged(); - } else { - colorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.set(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder addColors(com.google.cloud.vision.v1p3beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(value); - onChanged(); - } else { - colorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p3beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(index, value); - onChanged(); - } else { - colorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder addColors( - com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder addAllColors( - java.lang.Iterable values) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, colors_); - onChanged(); - } else { - colorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder clearColors() { - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - colorsBuilder_.clear(); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public Builder removeColors(int index) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.remove(index); - onChanged(); - } else { - colorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder getColorsBuilder( - int index) { - return getColorsFieldBuilder().getBuilder(index); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); } else { - return colorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsOrBuilderList() { - if (colorsBuilder_ != null) { - return colorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(colors_); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder() { - return getColorsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder( - int index) { - return getColorsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsBuilderList() { - return getColorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder> - getColorsFieldBuilder() { - if (colorsBuilder_ == null) { - colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - colors_ = null; - } - return colorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - private static final com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DominantColorsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DominantColorsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java deleted file mode 100644 index 56cf0dfcc742..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface DominantColorsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p3beta1.ColorInfo getColors(int index); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - int getColorsCount(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsOrBuilderList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java deleted file mode 100644 index b3aa0bcc4373..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java +++ /dev/null @@ -1,2472 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Set of detected entity features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.EntityAnnotation} - */ -public final class EntityAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.EntityAnnotation) - EntityAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityAnnotation.newBuilder() to construct. - private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityAnnotation() { - mid_ = ""; - locale_ = ""; - description_ = ""; - locations_ = java.util.Collections.emptyList(); - properties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - locale_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - case 53: { - - topicality_ = input.readFloat(); - break; - } - case 58: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.LocationInfo.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - properties_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Property.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.class, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCALE_FIELD_NUMBER = 2; - private volatile java.lang.Object locale_; - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - @java.lang.Override - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } - } - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int TOPICALITY_FIELD_NUMBER = 6; - private float topicality_; - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 7; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 8; - private java.util.List locations_; - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index) { - return locations_.get(index); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 9; - private java.util.List properties_; - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List getPropertiesList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List - getPropertiesOrBuilderList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - @java.lang.Override - public int getPropertiesCount() { - return properties_.size(); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Property getProperties(int index) { - return properties_.get(index); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - return properties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - output.writeFloat(6, topicality_); - } - if (boundingPoly_ != null) { - output.writeMessage(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - output.writeMessage(9, properties_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, topicality_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, properties_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.EntityAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.EntityAnnotation other = (com.google.cloud.vision.v1p3beta1.EntityAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLocale() - .equals(other.getLocale())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getTopicality()) - != java.lang.Float.floatToIntBits( - other.getTopicality())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getLocationsList() - .equals(other.getLocationsList())) return false; - if (!getPropertiesList() - .equals(other.getPropertiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LOCALE_FIELD_NUMBER; - hash = (53 * hash) + getLocale().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTopicality()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (getPropertiesCount() > 0) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getPropertiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.EntityAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected entity features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.EntityAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.EntityAnnotation) - com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.EntityAnnotation.class, com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.EntityAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - getPropertiesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - locale_ = ""; - - description_ = ""; - - score_ = 0F; - - confidence_ = 0F; - - topicality_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - propertiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation build() { - com.google.cloud.vision.v1p3beta1.EntityAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.EntityAnnotation result = new com.google.cloud.vision.v1p3beta1.EntityAnnotation(this); - int from_bitField0_ = bitField0_; - result.mid_ = mid_; - result.locale_ = locale_; - result.description_ = description_; - result.score_ = score_; - result.confidence_ = confidence_; - result.topicality_ = topicality_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.properties_ = properties_; - } else { - result.properties_ = propertiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.EntityAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.EntityAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.EntityAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.EntityAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLocale().isEmpty()) { - locale_ = other.locale_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getTopicality() != 0F) { - setTopicality(other.getTopicality()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (propertiesBuilder_ == null) { - if (!other.properties_.isEmpty()) { - if (properties_.isEmpty()) { - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePropertiesIsMutable(); - properties_.addAll(other.properties_); - } - onChanged(); - } - } else { - if (!other.properties_.isEmpty()) { - if (propertiesBuilder_.isEmpty()) { - propertiesBuilder_.dispose(); - propertiesBuilder_ = null; - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - propertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPropertiesFieldBuilder() : null; - } else { - propertiesBuilder_.addAllMessages(other.properties_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.EntityAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.EntityAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object mid_ = ""; - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object locale_ = ""; - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The locale. - */ - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The locale to set. - * @return This builder for chaining. - */ - public Builder setLocale( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locale_ = value; - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return This builder for chaining. - */ - public Builder clearLocale() { - - locale_ = getDefaultInstance().getLocale(); - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The bytes for locale to set. - * @return This builder for chaining. - */ - public Builder setLocaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locale_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float topicality_ ; - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @param value The topicality to set. - * @return This builder for chaining. - */ - public Builder setTopicality(float value) { - - topicality_ = value; - onChanged(); - return this; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return This builder for chaining. - */ - public Builder clearTopicality() { - - topicality_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder> locationsBuilder_; - - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p3beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder addLocations(com.google.cloud.vision.v1p3beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p3beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.util.List properties_ = - java.util.Collections.emptyList(); - private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(properties_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder> propertiesBuilder_; - - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public java.util.List getPropertiesList() { - if (propertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(properties_); - } else { - return propertiesBuilder_.getMessageList(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public int getPropertiesCount() { - if (propertiesBuilder_ == null) { - return properties_.size(); - } else { - return propertiesBuilder_.getCount(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p3beta1.Property getProperties(int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); - } else { - return propertiesBuilder_.getMessage(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p3beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.set(index, value); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.set(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder addProperties(com.google.cloud.vision.v1p3beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(value); - onChanged(); - } else { - propertiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p3beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(index, value); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder addProperties( - com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p3beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder addAllProperties( - java.lang.Iterable values) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, properties_); - onChanged(); - } else { - propertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder clearProperties() { - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - propertiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public Builder removeProperties(int index) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.remove(index); - onChanged(); - } else { - propertiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p3beta1.Property.Builder getPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); } else { - return propertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public java.util.List - getPropertiesOrBuilderList() { - if (propertiesBuilder_ != null) { - return propertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(properties_); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder() { - return getPropertiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - public java.util.List - getPropertiesBuilderList() { - return getPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder> - getPropertiesFieldBuilder() { - if (propertiesBuilder_ == null) { - propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - properties_ = null; - } - return propertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.EntityAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.EntityAnnotation) - private static final com.google.cloud.vision.v1p3beta1.EntityAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.EntityAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.EntityAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java deleted file mode 100644 index a8b7a9b69a13..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotationOrBuilder.java +++ /dev/null @@ -1,256 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface EntityAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.EntityAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - java.lang.String getLocale(); - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - com.google.protobuf.ByteString - getLocaleBytes(); - - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - float getTopicality(); - - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 7; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p3beta1.LocationInfo getLocations(int index); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - int getLocationsCount(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsOrBuilderList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index); - - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - java.util.List - getPropertiesList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p3beta1.Property getProperties(int index); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - int getPropertiesCount(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - java.util.List - getPropertiesOrBuilderList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p3beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java deleted file mode 100644 index 2df9bc02055f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java +++ /dev/null @@ -1,4300 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A face annotation object contains the results of face detection.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} - */ -public final class FaceAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) - FaceAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceAnnotation.newBuilder() to construct. - private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceAnnotation() { - landmarks_ = java.util.Collections.emptyList(); - joyLikelihood_ = 0; - sorrowLikelihood_ = 0; - angerLikelihood_ = 0; - surpriseLikelihood_ = 0; - underExposedLikelihood_ = 0; - blurredLikelihood_ = 0; - headwearLikelihood_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (fdBoundingPoly_ != null) { - subBuilder = fdBoundingPoly_.toBuilder(); - } - fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fdBoundingPoly_); - fdBoundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - landmarks_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); - break; - } - case 37: { - - rollAngle_ = input.readFloat(); - break; - } - case 45: { - - panAngle_ = input.readFloat(); - break; - } - case 53: { - - tiltAngle_ = input.readFloat(); - break; - } - case 61: { - - detectionConfidence_ = input.readFloat(); - break; - } - case 69: { - - landmarkingConfidence_ = input.readFloat(); - break; - } - case 72: { - int rawValue = input.readEnum(); - - joyLikelihood_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sorrowLikelihood_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - angerLikelihood_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - surpriseLikelihood_ = rawValue; - break; - } - case 104: { - int rawValue = input.readEnum(); - - underExposedLikelihood_ = rawValue; - break; - } - case 112: { - int rawValue = input.readEnum(); - - blurredLikelihood_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - headwearLikelihood_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); - } - - public interface LandmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType(); - - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return Whether the position field is set. - */ - boolean hasPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return The position. - */ - com.google.cloud.vision.v1p3beta1.Position getPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder(); - } - /** - *
-   * A face-specific landmark (for example, a face feature).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} - */ - public static final class Landmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - LandmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Landmark.newBuilder() to construct. - private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Landmark() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Landmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Landmark( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - com.google.cloud.vision.v1p3beta1.Position.Builder subBuilder = null; - if (position_ != null) { - subBuilder = position_.toBuilder(); - } - position_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(position_); - position_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); - } - - /** - *
-     * Face landmark (feature) type.
-     * Left and right are defined from the vantage of the viewer of the image
-     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
-     * typically, is the person's right eye.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - UNKNOWN_LANDMARK(0), - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - LEFT_EYE(1), - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - RIGHT_EYE(2), - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - LEFT_OF_LEFT_EYEBROW(3), - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - RIGHT_OF_LEFT_EYEBROW(4), - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - LEFT_OF_RIGHT_EYEBROW(5), - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - RIGHT_OF_RIGHT_EYEBROW(6), - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - MIDPOINT_BETWEEN_EYES(7), - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - NOSE_TIP(8), - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - UPPER_LIP(9), - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - LOWER_LIP(10), - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - MOUTH_LEFT(11), - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - MOUTH_RIGHT(12), - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - MOUTH_CENTER(13), - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - NOSE_BOTTOM_RIGHT(14), - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - NOSE_BOTTOM_LEFT(15), - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - NOSE_BOTTOM_CENTER(16), - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - LEFT_EYE_TOP_BOUNDARY(17), - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - LEFT_EYE_RIGHT_CORNER(18), - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - LEFT_EYE_BOTTOM_BOUNDARY(19), - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - LEFT_EYE_LEFT_CORNER(20), - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - RIGHT_EYE_TOP_BOUNDARY(21), - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - RIGHT_EYE_RIGHT_CORNER(22), - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - RIGHT_EYE_BOTTOM_BOUNDARY(23), - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - RIGHT_EYE_LEFT_CORNER(24), - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - LEFT_EYEBROW_UPPER_MIDPOINT(25), - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - RIGHT_EYEBROW_UPPER_MIDPOINT(26), - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - LEFT_EAR_TRAGION(27), - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - RIGHT_EAR_TRAGION(28), - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - LEFT_EYE_PUPIL(29), - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - RIGHT_EYE_PUPIL(30), - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - FOREHEAD_GLABELLA(31), - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - CHIN_GNATHION(32), - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - CHIN_LEFT_GONION(33), - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - CHIN_RIGHT_GONION(34), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - public static final int UNKNOWN_LANDMARK_VALUE = 0; - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - public static final int LEFT_EYE_VALUE = 1; - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - public static final int RIGHT_EYE_VALUE = 2; - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - public static final int NOSE_TIP_VALUE = 8; - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - public static final int UPPER_LIP_VALUE = 9; - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - public static final int LOWER_LIP_VALUE = 10; - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - public static final int MOUTH_LEFT_VALUE = 11; - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - public static final int MOUTH_RIGHT_VALUE = 12; - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - public static final int MOUTH_CENTER_VALUE = 13; - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - public static final int NOSE_BOTTOM_LEFT_VALUE = 15; - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - public static final int NOSE_BOTTOM_CENTER_VALUE = 16; - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - public static final int LEFT_EAR_TRAGION_VALUE = 27; - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - public static final int RIGHT_EAR_TRAGION_VALUE = 28; - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - public static final int LEFT_EYE_PUPIL_VALUE = 29; - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - public static final int RIGHT_EYE_PUPIL_VALUE = 30; - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - public static final int FOREHEAD_GLABELLA_VALUE = 31; - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - public static final int CHIN_GNATHION_VALUE = 32; - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - public static final int CHIN_LEFT_GONION_VALUE = 33; - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - public static final int CHIN_RIGHT_GONION_VALUE = 34; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN_LANDMARK; - case 1: return LEFT_EYE; - case 2: return RIGHT_EYE; - case 3: return LEFT_OF_LEFT_EYEBROW; - case 4: return RIGHT_OF_LEFT_EYEBROW; - case 5: return LEFT_OF_RIGHT_EYEBROW; - case 6: return RIGHT_OF_RIGHT_EYEBROW; - case 7: return MIDPOINT_BETWEEN_EYES; - case 8: return NOSE_TIP; - case 9: return UPPER_LIP; - case 10: return LOWER_LIP; - case 11: return MOUTH_LEFT; - case 12: return MOUTH_RIGHT; - case 13: return MOUTH_CENTER; - case 14: return NOSE_BOTTOM_RIGHT; - case 15: return NOSE_BOTTOM_LEFT; - case 16: return NOSE_BOTTOM_CENTER; - case 17: return LEFT_EYE_TOP_BOUNDARY; - case 18: return LEFT_EYE_RIGHT_CORNER; - case 19: return LEFT_EYE_BOTTOM_BOUNDARY; - case 20: return LEFT_EYE_LEFT_CORNER; - case 21: return RIGHT_EYE_TOP_BOUNDARY; - case 22: return RIGHT_EYE_RIGHT_CORNER; - case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; - case 24: return RIGHT_EYE_LEFT_CORNER; - case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; - case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; - case 27: return LEFT_EAR_TRAGION; - case 28: return RIGHT_EAR_TRAGION; - case 29: return LEFT_EYE_PUPIL; - case 30: return RIGHT_EYE_PUPIL; - case 31: return FOREHEAD_GLABELLA; - case 32: return CHIN_GNATHION; - case 33: return CHIN_LEFT_GONION; - case 34: return CHIN_RIGHT_GONION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type) - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - - public static final int POSITION_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p3beta1.Position position_; - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return Whether the position field is set. - */ - @java.lang.Override - public boolean hasPosition() { - return position_ != null; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return The position. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Position getPosition() { - return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { - return getPosition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - output.writeEnum(3, type_); - } - if (position_ != null) { - output.writeMessage(4, getPosition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (position_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPosition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) obj; - - if (type_ != other.type_) return false; - if (hasPosition() != other.hasPosition()) return false; - if (hasPosition()) { - if (!getPosition() - .equals(other.getPosition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasPosition()) { - hash = (37 * hash) + POSITION_FIELD_NUMBER; - hash = (53 * hash) + getPosition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A face-specific landmark (for example, a face feature).
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (positionBuilder_ == null) { - position_ = null; - } else { - position_ = null; - positionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark build() { - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark buildPartial() { - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(this); - result.type_ = type_; - if (positionBuilder_ == null) { - result.position_ = position_; - } else { - result.position_ = positionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other) { - if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasPosition()) { - mergePosition(other.getPosition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.Position position_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> positionBuilder_; - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return Whether the position field is set. - */ - public boolean hasPosition() { - return positionBuilder_ != null || position_ != null; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - * @return The position. - */ - public com.google.cloud.vision.v1p3beta1.Position getPosition() { - if (positionBuilder_ == null) { - return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; - } else { - return positionBuilder_.getMessage(); - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public Builder setPosition(com.google.cloud.vision.v1p3beta1.Position value) { - if (positionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - position_ = value; - onChanged(); - } else { - positionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public Builder setPosition( - com.google.cloud.vision.v1p3beta1.Position.Builder builderForValue) { - if (positionBuilder_ == null) { - position_ = builderForValue.build(); - onChanged(); - } else { - positionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public Builder mergePosition(com.google.cloud.vision.v1p3beta1.Position value) { - if (positionBuilder_ == null) { - if (position_ != null) { - position_ = - com.google.cloud.vision.v1p3beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); - } else { - position_ = value; - } - onChanged(); - } else { - positionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public Builder clearPosition() { - if (positionBuilder_ == null) { - position_ = null; - onChanged(); - } else { - position_ = null; - positionBuilder_ = null; - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p3beta1.Position.Builder getPositionBuilder() { - - onChanged(); - return getPositionFieldBuilder().getBuilder(); - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { - if (positionBuilder_ != null) { - return positionBuilder_.getMessageOrBuilder(); - } else { - return position_ == null ? - com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Position position = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> - getPositionFieldBuilder() { - if (positionBuilder_ == null) { - positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder>( - getPosition(), - getParentForChildren(), - isClean()); - position_ = null; - } - return positionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(); - } - - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Landmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Landmark(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - @java.lang.Override - public boolean hasFdBoundingPoly() { - return fdBoundingPoly_ != null; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - return getFdBoundingPoly(); - } - - public static final int LANDMARKS_FIELD_NUMBER = 3; - private java.util.List landmarks_; - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List getLandmarksList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List - getLandmarksOrBuilderList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public int getLandmarksCount() { - return landmarks_.size(); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { - return landmarks_.get(index); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - return landmarks_.get(index); - } - - public static final int ROLL_ANGLE_FIELD_NUMBER = 4; - private float rollAngle_; - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - - public static final int PAN_ANGLE_FIELD_NUMBER = 5; - private float panAngle_; - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - - public static final int TILT_ANGLE_FIELD_NUMBER = 6; - private float tiltAngle_; - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - - public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; - private float detectionConfidence_; - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - - public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; - private float landmarkingConfidence_; - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - - public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; - private int joyLikelihood_; - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; - private int sorrowLikelihood_; - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; - private int angerLikelihood_; - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; - private int surpriseLikelihood_; - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; - private int underExposedLikelihood_; - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; - private int blurredLikelihood_; - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; - private int headwearLikelihood_; - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - output.writeMessage(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - output.writeMessage(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - output.writeFloat(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - output.writeFloat(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - output.writeFloat(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - output.writeFloat(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - output.writeFloat(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(15, headwearLikelihood_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, headwearLikelihood_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.FaceAnnotation other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; - if (hasFdBoundingPoly()) { - if (!getFdBoundingPoly() - .equals(other.getFdBoundingPoly())) return false; - } - if (!getLandmarksList() - .equals(other.getLandmarksList())) return false; - if (java.lang.Float.floatToIntBits(getRollAngle()) - != java.lang.Float.floatToIntBits( - other.getRollAngle())) return false; - if (java.lang.Float.floatToIntBits(getPanAngle()) - != java.lang.Float.floatToIntBits( - other.getPanAngle())) return false; - if (java.lang.Float.floatToIntBits(getTiltAngle()) - != java.lang.Float.floatToIntBits( - other.getTiltAngle())) return false; - if (java.lang.Float.floatToIntBits(getDetectionConfidence()) - != java.lang.Float.floatToIntBits( - other.getDetectionConfidence())) return false; - if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - != java.lang.Float.floatToIntBits( - other.getLandmarkingConfidence())) return false; - if (joyLikelihood_ != other.joyLikelihood_) return false; - if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; - if (angerLikelihood_ != other.angerLikelihood_) return false; - if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; - if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; - if (blurredLikelihood_ != other.blurredLikelihood_) return false; - if (headwearLikelihood_ != other.headwearLikelihood_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (hasFdBoundingPoly()) { - hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getFdBoundingPoly().hashCode(); - } - if (getLandmarksCount() > 0) { - hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarksList().hashCode(); - } - hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRollAngle()); - hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPanAngle()); - hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTiltAngle()); - hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getDetectionConfidence()); - hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLandmarkingConfidence()); - hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + joyLikelihood_; - hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + sorrowLikelihood_; - hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + angerLikelihood_; - hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + surpriseLikelihood_; - hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + underExposedLikelihood_; - hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + blurredLikelihood_; - hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + headwearLikelihood_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.FaceAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A face annotation object contains the results of face detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) - com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLandmarksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - landmarksBuilder_.clear(); - } - rollAngle_ = 0F; - - panAngle_ = 0F; - - tiltAngle_ = 0F; - - detectionConfidence_ = 0F; - - landmarkingConfidence_ = 0F; - - joyLikelihood_ = 0; - - sorrowLikelihood_ = 0; - - angerLikelihood_ = 0; - - surpriseLikelihood_ = 0; - - underExposedLikelihood_ = 0; - - blurredLikelihood_ = 0; - - headwearLikelihood_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation build() { - com.google.cloud.vision.v1p3beta1.FaceAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.FaceAnnotation result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (fdBoundingPolyBuilder_ == null) { - result.fdBoundingPoly_ = fdBoundingPoly_; - } else { - result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); - } - if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.landmarks_ = landmarks_; - } else { - result.landmarks_ = landmarksBuilder_.build(); - } - result.rollAngle_ = rollAngle_; - result.panAngle_ = panAngle_; - result.tiltAngle_ = tiltAngle_; - result.detectionConfidence_ = detectionConfidence_; - result.landmarkingConfidence_ = landmarkingConfidence_; - result.joyLikelihood_ = joyLikelihood_; - result.sorrowLikelihood_ = sorrowLikelihood_; - result.angerLikelihood_ = angerLikelihood_; - result.surpriseLikelihood_ = surpriseLikelihood_; - result.underExposedLikelihood_ = underExposedLikelihood_; - result.blurredLikelihood_ = blurredLikelihood_; - result.headwearLikelihood_ = headwearLikelihood_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.hasFdBoundingPoly()) { - mergeFdBoundingPoly(other.getFdBoundingPoly()); - } - if (landmarksBuilder_ == null) { - if (!other.landmarks_.isEmpty()) { - if (landmarks_.isEmpty()) { - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLandmarksIsMutable(); - landmarks_.addAll(other.landmarks_); - } - onChanged(); - } - } else { - if (!other.landmarks_.isEmpty()) { - if (landmarksBuilder_.isEmpty()) { - landmarksBuilder_.dispose(); - landmarksBuilder_ = null; - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - landmarksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarksFieldBuilder() : null; - } else { - landmarksBuilder_.addAllMessages(other.landmarks_); - } - } - } - if (other.getRollAngle() != 0F) { - setRollAngle(other.getRollAngle()); - } - if (other.getPanAngle() != 0F) { - setPanAngle(other.getPanAngle()); - } - if (other.getTiltAngle() != 0F) { - setTiltAngle(other.getTiltAngle()); - } - if (other.getDetectionConfidence() != 0F) { - setDetectionConfidence(other.getDetectionConfidence()); - } - if (other.getLandmarkingConfidence() != 0F) { - setLandmarkingConfidence(other.getLandmarkingConfidence()); - } - if (other.joyLikelihood_ != 0) { - setJoyLikelihoodValue(other.getJoyLikelihoodValue()); - } - if (other.sorrowLikelihood_ != 0) { - setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); - } - if (other.angerLikelihood_ != 0) { - setAngerLikelihoodValue(other.getAngerLikelihoodValue()); - } - if (other.surpriseLikelihood_ != 0) { - setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); - } - if (other.underExposedLikelihood_ != 0) { - setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); - } - if (other.blurredLikelihood_ != 0) { - setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); - } - if (other.headwearLikelihood_ != 0) { - setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.FaceAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale, as returned in `ImageParams`.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - public boolean hasFdBoundingPoly() { - return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } else { - return fdBoundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdBoundingPoly_ = value; - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = builderForValue.build(); - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (fdBoundingPoly_ != null) { - fdBoundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); - } else { - fdBoundingPoly_ = value; - } - onChanged(); - } else { - fdBoundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder clearFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - onChanged(); - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { - - onChanged(); - return getFdBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - if (fdBoundingPolyBuilder_ != null) { - return fdBoundingPolyBuilder_.getMessageOrBuilder(); - } else { - return fdBoundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getFdBoundingPolyFieldBuilder() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getFdBoundingPoly(), - getParentForChildren(), - isClean()); - fdBoundingPoly_ = null; - } - return fdBoundingPolyBuilder_; - } - - private java.util.List landmarks_ = - java.util.Collections.emptyList(); - private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(landmarks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; - - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List getLandmarksList() { - if (landmarksBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarks_); - } else { - return landmarksBuilder_.getMessageList(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public int getLandmarksCount() { - if (landmarksBuilder_ == null) { - return landmarks_.size(); - } else { - return landmarksBuilder_.getCount(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); - } else { - return landmarksBuilder_.getMessage(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.set(index, value); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(value); - onChanged(); - } else { - landmarksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(index, value); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addAllLandmarks( - java.lang.Iterable values) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarks_); - onChanged(); - } else { - landmarksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder clearLandmarks() { - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - landmarksBuilder_.clear(); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder removeLandmarks(int index) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.remove(index); - onChanged(); - } else { - landmarksBuilder_.remove(index); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().getBuilder(index); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); } else { - return landmarksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksOrBuilderList() { - if (landmarksBuilder_ != null) { - return landmarksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarks_); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { - return getLandmarksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksBuilderList() { - return getLandmarksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> - getLandmarksFieldBuilder() { - if (landmarksBuilder_ == null) { - landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - landmarks_ = null; - } - return landmarksBuilder_; - } - - private float rollAngle_ ; - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @param value The rollAngle to set. - * @return This builder for chaining. - */ - public Builder setRollAngle(float value) { - - rollAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return This builder for chaining. - */ - public Builder clearRollAngle() { - - rollAngle_ = 0F; - onChanged(); - return this; - } - - private float panAngle_ ; - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @param value The panAngle to set. - * @return This builder for chaining. - */ - public Builder setPanAngle(float value) { - - panAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return This builder for chaining. - */ - public Builder clearPanAngle() { - - panAngle_ = 0F; - onChanged(); - return this; - } - - private float tiltAngle_ ; - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @param value The tiltAngle to set. - * @return This builder for chaining. - */ - public Builder setTiltAngle(float value) { - - tiltAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return This builder for chaining. - */ - public Builder clearTiltAngle() { - - tiltAngle_ = 0F; - onChanged(); - return this; - } - - private float detectionConfidence_ ; - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @param value The detectionConfidence to set. - * @return This builder for chaining. - */ - public Builder setDetectionConfidence(float value) { - - detectionConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return This builder for chaining. - */ - public Builder clearDetectionConfidence() { - - detectionConfidence_ = 0F; - onChanged(); - return this; - } - - private float landmarkingConfidence_ ; - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @param value The landmarkingConfidence to set. - * @return This builder for chaining. - */ - public Builder setLandmarkingConfidence(float value) { - - landmarkingConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return This builder for chaining. - */ - public Builder clearLandmarkingConfidence() { - - landmarkingConfidence_ = 0F; - onChanged(); - return this; - } - - private int joyLikelihood_ = 0; - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @param value The enum numeric value on the wire for joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihoodValue(int value) { - - joyLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @param value The joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - joyLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return This builder for chaining. - */ - public Builder clearJoyLikelihood() { - - joyLikelihood_ = 0; - onChanged(); - return this; - } - - private int sorrowLikelihood_ = 0; - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @param value The enum numeric value on the wire for sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihoodValue(int value) { - - sorrowLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @param value The sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - sorrowLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return This builder for chaining. - */ - public Builder clearSorrowLikelihood() { - - sorrowLikelihood_ = 0; - onChanged(); - return this; - } - - private int angerLikelihood_ = 0; - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @param value The enum numeric value on the wire for angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihoodValue(int value) { - - angerLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @param value The angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - angerLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return This builder for chaining. - */ - public Builder clearAngerLikelihood() { - - angerLikelihood_ = 0; - onChanged(); - return this; - } - - private int surpriseLikelihood_ = 0; - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @param value The enum numeric value on the wire for surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihoodValue(int value) { - - surpriseLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @param value The surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - surpriseLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return This builder for chaining. - */ - public Builder clearSurpriseLikelihood() { - - surpriseLikelihood_ = 0; - onChanged(); - return this; - } - - private int underExposedLikelihood_ = 0; - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @param value The enum numeric value on the wire for underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihoodValue(int value) { - - underExposedLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @param value The underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - underExposedLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return This builder for chaining. - */ - public Builder clearUnderExposedLikelihood() { - - underExposedLikelihood_ = 0; - onChanged(); - return this; - } - - private int blurredLikelihood_ = 0; - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @param value The enum numeric value on the wire for blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihoodValue(int value) { - - blurredLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @param value The blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - blurredLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return This builder for chaining. - */ - public Builder clearBlurredLikelihood() { - - blurredLikelihood_ = 0; - onChanged(); - return this; - } - - private int headwearLikelihood_ = 0; - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @param value The enum numeric value on the wire for headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihoodValue(int value) { - - headwearLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @param value The headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - headwearLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return This builder for chaining. - */ - public Builder clearHeadwearLikelihood() { - - headwearLikelihood_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) - private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java deleted file mode 100644 index 575709920991..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java +++ /dev/null @@ -1,328 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface FaceAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale, as returned in `ImageParams`.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - boolean hasFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); - - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - int getLandmarksCount(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksOrBuilderList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index); - - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - float getRollAngle(); - - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - float getPanAngle(); - - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - float getTiltAngle(); - - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - float getDetectionConfidence(); - - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - float getLandmarkingConfidence(); - - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - int getJoyLikelihoodValue(); - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood(); - - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - int getSorrowLikelihoodValue(); - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood(); - - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - int getAngerLikelihoodValue(); - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood(); - - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - int getSurpriseLikelihoodValue(); - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood(); - - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - int getUnderExposedLikelihoodValue(); - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood(); - - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - int getBlurredLikelihoodValue(); - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood(); - - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - int getHeadwearLikelihoodValue(); - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java deleted file mode 100644 index 30cb5ed46d71..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java +++ /dev/null @@ -1,1153 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The type of Google Cloud Vision API detection to perform, and the maximum
- * number of results to return for that type. Multiple `Feature` objects can
- * be specified in the `features` list.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Feature} - */ -public final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Feature) - FeatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feature.newBuilder() to construct. - private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feature() { - type_ = 0; - model_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - maxResults_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - model_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Feature.class, com.google.cloud.vision.v1p3beta1.Feature.Builder.class); - } - - /** - *
-   * Type of Google Cloud Vision API feature to be extracted.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.Feature.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - FACE_DETECTION(1), - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - LANDMARK_DETECTION(2), - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - LOGO_DETECTION(3), - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - LABEL_DETECTION(4), - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - TEXT_DETECTION(5), - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - DOCUMENT_TEXT_DETECTION(11), - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - SAFE_SEARCH_DETECTION(6), - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - IMAGE_PROPERTIES(7), - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - CROP_HINTS(9), - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - WEB_DETECTION(10), - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - PRODUCT_SEARCH(12), - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - OBJECT_LOCALIZATION(19), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - public static final int FACE_DETECTION_VALUE = 1; - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - public static final int LANDMARK_DETECTION_VALUE = 2; - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - public static final int LOGO_DETECTION_VALUE = 3; - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - public static final int LABEL_DETECTION_VALUE = 4; - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - public static final int TEXT_DETECTION_VALUE = 5; - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - public static final int SAFE_SEARCH_DETECTION_VALUE = 6; - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - public static final int IMAGE_PROPERTIES_VALUE = 7; - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - public static final int CROP_HINTS_VALUE = 9; - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - public static final int WEB_DETECTION_VALUE = 10; - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - public static final int PRODUCT_SEARCH_VALUE = 12; - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - public static final int OBJECT_LOCALIZATION_VALUE = 19; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return FACE_DETECTION; - case 2: return LANDMARK_DETECTION; - case 3: return LOGO_DETECTION; - case 4: return LABEL_DETECTION; - case 5: return TEXT_DETECTION; - case 11: return DOCUMENT_TEXT_DETECTION; - case 6: return SAFE_SEARCH_DETECTION; - case 7: return IMAGE_PROPERTIES; - case 9: return CROP_HINTS; - case 10: return WEB_DETECTION; - case 12: return PRODUCT_SEARCH; - case 19: return OBJECT_LOCALIZATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.Feature.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Feature.Type) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Feature.Type result = com.google.cloud.vision.v1p3beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.Feature.Type.UNRECOGNIZED : result; - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 2; - private int maxResults_; - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int MODEL_FIELD_NUMBER = 3; - private volatile java.lang.Object model_; - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } - } - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p3beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (maxResults_ != 0) { - output.writeInt32(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p3beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Feature)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Feature other = (com.google.cloud.vision.v1p3beta1.Feature) obj; - - if (type_ != other.type_) return false; - if (getMaxResults() - != other.getMaxResults()) return false; - if (!getModel() - .equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Feature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The type of Google Cloud Vision API detection to perform, and the maximum
-   * number of results to return for that type. Multiple `Feature` objects can
-   * be specified in the `features` list.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Feature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Feature) - com.google.cloud.vision.v1p3beta1.FeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Feature.class, com.google.cloud.vision.v1p3beta1.Feature.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Feature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - maxResults_ = 0; - - model_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature build() { - com.google.cloud.vision.v1p3beta1.Feature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature buildPartial() { - com.google.cloud.vision.v1p3beta1.Feature result = new com.google.cloud.vision.v1p3beta1.Feature(this); - result.type_ = type_; - result.maxResults_ = maxResults_; - result.model_ = model_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Feature) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Feature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Feature other) { - if (other == com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Feature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Feature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Feature.Type result = com.google.cloud.vision.v1p3beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.Feature.Type.UNRECOGNIZED : result; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p3beta1.Feature.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int maxResults_ ; - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The bytes for model. - */ - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - model_ = value; - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return This builder for chaining. - */ - public Builder clearModel() { - - model_ = getDefaultInstance().getModel(); - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - model_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Feature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Feature) - private static final com.google.cloud.vision.v1p3beta1.Feature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Feature(); - } - - public static com.google.cloud.vision.v1p3beta1.Feature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Feature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java deleted file mode 100644 index a8f1cefb58d7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FeatureOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Feature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Feature.Type type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p3beta1.Feature.Type getType(); - - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - int getMaxResults(); - - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - java.lang.String getModel(); - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - com.google.protobuf.ByteString - getModelBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java deleted file mode 100644 index 13ad7742ff1f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java +++ /dev/null @@ -1,672 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The Google Cloud Storage location where the output will be written to.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GcsDestination.class, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.GcsDestination other = (com.google.cloud.vision.v1p3beta1.GcsDestination) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the output will be written to.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GcsDestination) - com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GcsDestination.class, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestination build() { - com.google.cloud.vision.v1p3beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestination buildPartial() { - com.google.cloud.vision.v1p3beta1.GcsDestination result = new com.google.cloud.vision.v1p3beta1.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.GcsDestination) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GcsDestination other) { - if (other == com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI where the results will be stored. Results will
-     * be in JSON format and preceded by its corresponding input URI. This field
-     * can either represent a single file, or a prefix for multiple outputs.
-     * Prefixes must end in a `/`.
-     * Examples:
-     * *    File: gs://bucket-name/filename.json
-     * *    Prefix: gs://bucket-name/prefix/here/
-     * *    File: gs://bucket-name/prefix/here
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsDestination) - private static final com.google.cloud.vision.v1p3beta1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GcsDestination(); - } - - public static com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index a1c55c5f63bf..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI where the results will be stored. Results will
-   * be in JSON format and preceded by its corresponding input URI. This field
-   * can either represent a single file, or a prefix for multiple outputs.
-   * Prefixes must end in a `/`.
-   * Examples:
-   * *    File: gs://bucket-name/filename.json
-   * *    Prefix: gs://bucket-name/prefix/here/
-   * *    File: gs://bucket-name/prefix/here
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java deleted file mode 100644 index ee6f2fd82424..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The Google Cloud Storage location where the input will be read from.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsSource} - */ -public final class GcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GcsSource) - GcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsSource() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GcsSource.class, com.google.cloud.vision.v1p3beta1.GcsSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.GcsSource other = (com.google.cloud.vision.v1p3beta1.GcsSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the input will be read from.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GcsSource) - com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GcsSource.class, com.google.cloud.vision.v1p3beta1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSource build() { - com.google.cloud.vision.v1p3beta1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSource buildPartial() { - com.google.cloud.vision.v1p3beta1.GcsSource result = new com.google.cloud.vision.v1p3beta1.GcsSource(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.GcsSource) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.GcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GcsSource other) { - if (other == com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsSource) - private static final com.google.cloud.vision.v1p3beta1.GcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GcsSource(); - } - - public static com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java deleted file mode 100644 index 72e211a1be6b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface GcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java deleted file mode 100644 index 842a475477f5..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GeometryProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class GeometryProto { - private GeometryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1p3beta1/geometry" + - ".proto\022\035google.cloud.vision.v1p3beta1\"\036\n" + - "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + - "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + - "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + - "d.vision.v1p3beta1.Vertex\022L\n\023normalized_" + - "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + - "3beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + - "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.goo" + - "gle.cloud.vision.v1p3beta1B\rGeometryProt" + - "oP\001ZCgoogle.golang.org/genproto/googleap" + - "is/cloud/vision/v1p3beta1;vision\370\001\001\242\002\004GC" + - "VNb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_BoundingPoly_descriptor, - new java.lang.String[] { "Vertices", "NormalizedVertices", }); - internal_static_google_cloud_vision_v1p3beta1_Position_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Position_descriptor, - new java.lang.String[] { "X", "Y", "Z", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java deleted file mode 100644 index 9a085c0abf0d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `GetProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductRequest} - */ -public final class GetProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetProductRequest) - GetProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductRequest.newBuilder() to construct. - private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetProductRequest.class, com.google.cloud.vision.v1p3beta1.GetProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.GetProductRequest other = (com.google.cloud.vision.v1p3beta1.GetProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetProductRequest) - com.google.cloud.vision.v1p3beta1.GetProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetProductRequest.class, com.google.cloud.vision.v1p3beta1.GetProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductRequest build() { - com.google.cloud.vision.v1p3beta1.GetProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.GetProductRequest result = new com.google.cloud.vision.v1p3beta1.GetProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.GetProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.GetProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetProductRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.GetProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.GetProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.GetProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductRequest) - private static final com.google.cloud.vision.v1p3beta1.GetProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetProductRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java deleted file mode 100644 index 95d3405bace7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface GetProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java deleted file mode 100644 index f2c4da83b95e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `GetProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductSetRequest} - */ -public final class GetProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetProductSetRequest) - GetProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductSetRequest.newBuilder() to construct. - private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p3beta1.GetProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p3beta1.GetProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetProductSetRequest) - com.google.cloud.vision.v1p3beta1.GetProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p3beta1.GetProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.GetProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.GetProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.GetProductSetRequest result = new com.google.cloud.vision.v1p3beta1.GetProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.GetProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.GetProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.GetProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.GetProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.GetProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.GetProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java deleted file mode 100644 index eadfb3714b1d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface GetProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java deleted file mode 100644 index 9aa221b1e4eb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `GetReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetReferenceImageRequest} - */ -public final class GetReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - GetReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetReferenceImageRequest.newBuilder() to construct. - private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.GetReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest build() { - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest result = new com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - private static final com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java deleted file mode 100644 index de9c89d5cc0b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface GetReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java deleted file mode 100644 index 7e3f7392c7a4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java +++ /dev/null @@ -1,781 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Client image to perform Google Cloud Vision API tasks over.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Image} - */ -public final class Image extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Image) - ImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Image() { - content_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - content_ = input.readBytes(); - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.ImageSource.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Image.class, com.google.cloud.vision.v1p3beta1.Image.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString content_; - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.ImageSource source_; - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSource getSource() { - return source_ == null ? com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!content_.isEmpty()) { - output.writeBytes(1, content_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, content_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Image)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Image other = (com.google.cloud.vision.v1p3beta1.Image) obj; - - if (!getContent() - .equals(other.getContent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Client image to perform Google Cloud Vision API tasks over.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Image) - com.google.cloud.vision.v1p3beta1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Image.class, com.google.cloud.vision.v1p3beta1.Image.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = com.google.protobuf.ByteString.EMPTY; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Image getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Image build() { - com.google.cloud.vision.v1p3beta1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Image buildPartial() { - com.google.cloud.vision.v1p3beta1.Image result = new com.google.cloud.vision.v1p3beta1.Image(this); - result.content_ = content_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Image) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Image other) { - if (other == com.google.cloud.vision.v1p3beta1.Image.getDefaultInstance()) return this; - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.ImageSource source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder> sourceBuilder_; - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return The source. - */ - public com.google.cloud.vision.v1p3beta1.ImageSource getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public Builder setSource(com.google.cloud.vision.v1p3beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public Builder setSource( - com.google.cloud.vision.v1p3beta1.ImageSource.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public Builder mergeSource(com.google.cloud.vision.v1p3beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.vision.v1p3beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p3beta1.ImageSource.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance() : source_; - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Image) - private static final com.google.cloud.vision.v1p3beta1.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Image(); - } - - public static com.google.cloud.vision.v1p3beta1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java deleted file mode 100644 index c2df44d8e5a7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java +++ /dev/null @@ -1,681 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * If an image was produced from a file (e.g. a PDF), this message gives
- * information about the source of that image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageAnnotationContext} - */ -public final class ImageAnnotationContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - ImageAnnotationContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageAnnotationContext.newBuilder() to construct. - private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageAnnotationContext() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageAnnotationContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageAnnotationContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 16: { - - pageNumber_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 2; - private int pageNumber_; - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - if (pageNumber_ != 0) { - output.writeInt32(2, pageNumber_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageNumber_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageAnnotationContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (getPageNumber() - != other.getPageNumber()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * If an image was produced from a file (e.g. a PDF), this message gives
-   * information about the source of that image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageAnnotationContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - pageNumber_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext build() { - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext buildPartial() { - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p3beta1.ImageAnnotationContext(this); - result.uri_ = uri_; - result.pageNumber_ = pageNumber_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageAnnotationContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageAnnotationContext other) { - if (other == com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImageAnnotationContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private int pageNumber_ ; - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - - pageNumber_ = value; - onChanged(); - return this; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - - pageNumber_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - private static final com.google.cloud.vision.v1p3beta1.ImageAnnotationContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageAnnotationContext(); - } - - public static com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageAnnotationContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageAnnotationContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java deleted file mode 100644 index 07bbbabadf80..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContextOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImageAnnotationContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - int getPageNumber(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java deleted file mode 100644 index 5c81e8c624d7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorProto.java +++ /dev/null @@ -1,671 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class ImageAnnotatorProto { - private ImageAnnotatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Image_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p3beta1/image_an" + - "notator.proto\022\035google.cloud.vision.v1p3b" + - "eta1\032\034google/api/annotations.proto\032\027goog" + - "le/api/client.proto\032\037google/api/field_be" + - "havior.proto\032,google/cloud/vision/v1p3be" + - "ta1/geometry.proto\0322google/cloud/vision/" + - "v1p3beta1/product_search.proto\0323google/c" + - "loud/vision/v1p3beta1/text_annotation.pr" + - "oto\0321google/cloud/vision/v1p3beta1/web_d" + - "etection.proto\032#google/longrunning/opera" + - "tions.proto\032\037google/protobuf/timestamp.p" + - "roto\032\027google/rpc/status.proto\032\027google/ty" + - "pe/color.proto\032\030google/type/latlng.proto" + - "\"\216\003\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.clou" + - "d.vision.v1p3beta1.Feature.Type\022\023\n\013max_r" + - "esults\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024\n\020" + - "TYPE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001\022\026" + - "\n\022LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTION" + - "\020\003\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECTIO" + - "N\020\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SAFE" + - "_SEARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIES\020" + - "\007\022\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022\n\016" + - "PRODUCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATION\020" + - "\023\"7\n\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(\t\022" + - "\021\n\timage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content\030\001" + - " \001(\014\022:\n\006source\030\002 \001(\0132*.google.cloud.visi" + - "on.v1p3beta1.ImageSource\"\233\016\n\016FaceAnnotat" + - "ion\022B\n\rbounding_poly\030\001 \001(\0132+.google.clou" + - "d.vision.v1p3beta1.BoundingPoly\022E\n\020fd_bo" + - "unding_poly\030\002 \001(\0132+.google.cloud.vision." + - "v1p3beta1.BoundingPoly\022I\n\tlandmarks\030\003 \003(" + - "\01326.google.cloud.vision.v1p3beta1.FaceAn" + - "notation.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022\021\n" + - "\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034\n\024" + - "detection_confidence\030\007 \001(\002\022\036\n\026landmarkin" + - "g_confidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t \001" + - "(\0162).google.cloud.vision.v1p3beta1.Likel" + - "ihood\022D\n\021sorrow_likelihood\030\n \001(\0162).googl" + - "e.cloud.vision.v1p3beta1.Likelihood\022C\n\020a" + - "nger_likelihood\030\013 \001(\0162).google.cloud.vis" + - "ion.v1p3beta1.Likelihood\022F\n\023surprise_lik" + - "elihood\030\014 \001(\0162).google.cloud.vision.v1p3" + - "beta1.Likelihood\022K\n\030under_exposed_likeli" + - "hood\030\r \001(\0162).google.cloud.vision.v1p3bet" + - "a1.Likelihood\022E\n\022blurred_likelihood\030\016 \001(" + - "\0162).google.cloud.vision.v1p3beta1.Likeli" + - "hood\022F\n\023headwear_likelihood\030\017 \001(\0162).goog" + - "le.cloud.vision.v1p3beta1.Likelihood\032\307\007\n" + - "\010Landmark\022I\n\004type\030\003 \001(\0162;.google.cloud.v" + - "ision.v1p3beta1.FaceAnnotation.Landmark." + - "Type\0229\n\010position\030\004 \001(\0132\'.google.cloud.vi" + - "sion.v1p3beta1.Position\"\264\006\n\004Type\022\024\n\020UNKN" + - "OWN_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGHT_EY" + - "E\020\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIGHT_O" + - "F_LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EYEBRO" + - "W\020\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025MIDPO" + - "INT_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\tUPPE" + - "R_LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT\020\013\022\017" + - "\n\013MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n\021NOS" + - "E_BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT\020\017\022\026" + - "\n\022NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_TOP_B" + - "OUNDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022\022\034\n\030" + - "LEFT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_EYE_L" + - "EFT_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDARY\020\025" + - "\022\032\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGHT_EY" + - "E_BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEFT_CO" + - "RNER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOINT\020\031\022" + - " \n\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n\020LEF" + - "T_EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION\020\034\022\022" + - "\n\016LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPIL\020\036\022" + - "\025\n\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATHION\020" + - " \022\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGHT_GO" + - "NION\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 \001(\0132" + - "\023.google.type.LatLng\"=\n\010Property\022\014\n\004name" + - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_value\030\003 " + - "\001(\004\"\274\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(\t\022\016\n" + - "\006locale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r\n\005sc" + - "ore\030\004 \001(\002\022\022\n\nconfidence\030\005 \001(\002\022\022\n\ntopical" + - "ity\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\0132+.googl" + - "e.cloud.vision.v1p3beta1.BoundingPoly\022>\n" + - "\tlocations\030\010 \003(\0132+.google.cloud.vision.v" + - "1p3beta1.LocationInfo\022;\n\nproperties\030\t \003(" + - "\0132\'.google.cloud.vision.v1p3beta1.Proper" + - "ty\"\240\001\n\031LocalizedObjectAnnotation\022\013\n\003mid\030" + - "\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004name\030\003 \001" + - "(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_poly\030\005 \001(\013" + - "2+.google.cloud.vision.v1p3beta1.Boundin" + - "gPoly\"\274\002\n\024SafeSearchAnnotation\0228\n\005adult\030" + - "\001 \001(\0162).google.cloud.vision.v1p3beta1.Li" + - "kelihood\0228\n\005spoof\030\002 \001(\0162).google.cloud.v" + - "ision.v1p3beta1.Likelihood\022:\n\007medical\030\003 " + - "\001(\0162).google.cloud.vision.v1p3beta1.Like" + - "lihood\022;\n\010violence\030\004 \001(\0162).google.cloud." + - "vision.v1p3beta1.Likelihood\0227\n\004racy\030\t \001(" + - "\0162).google.cloud.vision.v1p3beta1.Likeli" + - "hood\"a\n\013LatLongRect\022(\n\013min_lat_lng\030\001 \001(\013" + - "2\023.google.type.LatLng\022(\n\013max_lat_lng\030\002 \001" + - "(\0132\023.google.type.LatLng\"U\n\tColorInfo\022!\n\005" + - "color\030\001 \001(\0132\022.google.type.Color\022\r\n\005score" + - "\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T\n\030Domina" + - "ntColorsAnnotation\0228\n\006colors\030\001 \003(\0132(.goo" + - "gle.cloud.vision.v1p3beta1.ColorInfo\"c\n\017" + - "ImageProperties\022P\n\017dominant_colors\030\001 \001(\013" + - "27.google.cloud.vision.v1p3beta1.Dominan" + - "tColorsAnnotation\"\177\n\010CropHint\022B\n\rboundin" + - "g_poly\030\001 \001(\0132+.google.cloud.vision.v1p3b" + - "eta1.BoundingPoly\022\022\n\nconfidence\030\002 \001(\002\022\033\n" + - "\023importance_fraction\030\003 \001(\002\"R\n\023CropHintsA" + - "nnotation\022;\n\ncrop_hints\030\001 \003(\0132\'.google.c" + - "loud.vision.v1p3beta1.CropHint\"(\n\017CropHi" + - "ntsParams\022\025\n\raspect_ratios\030\001 \003(\002\"1\n\022WebD" + - "etectionParams\022\033\n\023include_geo_results\030\002 " + - "\001(\010\"c\n\023TextDetectionParams\022.\n&enable_tex" + - "t_detection_confidence_score\030\t \001(\010\022\034\n\024ad" + - "vanced_ocr_options\030\013 \003(\t\"\253\003\n\014ImageContex" + - "t\022A\n\rlat_long_rect\030\001 \001(\0132*.google.cloud." + - "vision.v1p3beta1.LatLongRect\022\026\n\016language" + - "_hints\030\002 \003(\t\022I\n\021crop_hints_params\030\004 \001(\0132" + - "..google.cloud.vision.v1p3beta1.CropHint" + - "sParams\022Q\n\025product_search_params\030\005 \001(\01322" + - ".google.cloud.vision.v1p3beta1.ProductSe" + - "archParams\022O\n\024web_detection_params\030\006 \001(\013" + - "21.google.cloud.vision.v1p3beta1.WebDete" + - "ctionParams\022Q\n\025text_detection_params\030\014 \001" + - "(\01322.google.cloud.vision.v1p3beta1.TextD" + - "etectionParams\"\311\001\n\024AnnotateImageRequest\022" + - "3\n\005image\030\001 \001(\0132$.google.cloud.vision.v1p" + - "3beta1.Image\0228\n\010features\030\002 \003(\0132&.google." + - "cloud.vision.v1p3beta1.Feature\022B\n\rimage_" + - "context\030\003 \001(\0132+.google.cloud.vision.v1p3" + - "beta1.ImageContext\":\n\026ImageAnnotationCon" + - "text\022\013\n\003uri\030\001 \001(\t\022\023\n\013page_number\030\002 \001(\005\"\277" + - "\010\n\025AnnotateImageResponse\022G\n\020face_annotat" + - "ions\030\001 \003(\0132-.google.cloud.vision.v1p3bet" + - "a1.FaceAnnotation\022M\n\024landmark_annotation" + - "s\030\002 \003(\0132/.google.cloud.vision.v1p3beta1." + - "EntityAnnotation\022I\n\020logo_annotations\030\003 \003" + - "(\0132/.google.cloud.vision.v1p3beta1.Entit" + - "yAnnotation\022J\n\021label_annotations\030\004 \003(\0132/" + - ".google.cloud.vision.v1p3beta1.EntityAnn" + - "otation\022^\n\034localized_object_annotations\030" + - "\026 \003(\01328.google.cloud.vision.v1p3beta1.Lo" + - "calizedObjectAnnotation\022I\n\020text_annotati" + - "ons\030\005 \003(\0132/.google.cloud.vision.v1p3beta" + - "1.EntityAnnotation\022K\n\024full_text_annotati" + - "on\030\014 \001(\0132-.google.cloud.vision.v1p3beta1" + - ".TextAnnotation\022S\n\026safe_search_annotatio" + - "n\030\006 \001(\01323.google.cloud.vision.v1p3beta1." + - "SafeSearchAnnotation\022S\n\033image_properties" + - "_annotation\030\010 \001(\0132..google.cloud.vision." + - "v1p3beta1.ImageProperties\022Q\n\025crop_hints_" + - "annotation\030\013 \001(\01322.google.cloud.vision.v" + - "1p3beta1.CropHintsAnnotation\022B\n\rweb_dete" + - "ction\030\r \001(\0132+.google.cloud.vision.v1p3be" + - "ta1.WebDetection\022S\n\026product_search_resul" + - "ts\030\016 \001(\01323.google.cloud.vision.v1p3beta1" + - ".ProductSearchResults\022!\n\005error\030\t \001(\0132\022.g" + - "oogle.rpc.Status\022F\n\007context\030\025 \001(\01325.goog" + - "le.cloud.vision.v1p3beta1.ImageAnnotatio" + - "nContext\"\241\001\n\024AnnotateFileResponse\022@\n\014inp" + - "ut_config\030\001 \001(\0132*.google.cloud.vision.v1" + - "p3beta1.InputConfig\022G\n\tresponses\030\002 \003(\01324" + - ".google.cloud.vision.v1p3beta1.AnnotateI" + - "mageResponse\"h\n\032BatchAnnotateImagesReque" + - "st\022J\n\010requests\030\001 \003(\01323.google.cloud.visi" + - "on.v1p3beta1.AnnotateImageRequestB\003\340A\002\"f" + - "\n\033BatchAnnotateImagesResponse\022G\n\trespons" + - "es\030\001 \003(\01324.google.cloud.vision.v1p3beta1" + - ".AnnotateImageResponse\"\236\002\n\030AsyncAnnotate" + - "FileRequest\022@\n\014input_config\030\001 \001(\0132*.goog" + - "le.cloud.vision.v1p3beta1.InputConfig\0228\n" + - "\010features\030\002 \003(\0132&.google.cloud.vision.v1" + - "p3beta1.Feature\022B\n\rimage_context\030\003 \001(\0132+" + - ".google.cloud.vision.v1p3beta1.ImageCont" + - "ext\022B\n\routput_config\030\004 \001(\0132+.google.clou" + - "d.vision.v1p3beta1.OutputConfig\"_\n\031Async" + - "AnnotateFileResponse\022B\n\routput_config\030\001 " + - "\001(\0132+.google.cloud.vision.v1p3beta1.Outp" + - "utConfig\"p\n\036AsyncBatchAnnotateFilesReque" + - "st\022N\n\010requests\030\001 \003(\01327.google.cloud.visi" + - "on.v1p3beta1.AsyncAnnotateFileRequestB\003\340" + - "A\002\"n\n\037AsyncBatchAnnotateFilesResponse\022K\n" + - "\tresponses\030\001 \003(\01328.google.cloud.vision.v" + - "1p3beta1.AsyncAnnotateFileResponse\"^\n\013In" + - "putConfig\022<\n\ngcs_source\030\001 \001(\0132(.google.c" + - "loud.vision.v1p3beta1.GcsSource\022\021\n\tmime_" + - "type\030\002 \001(\t\"j\n\014OutputConfig\022F\n\017gcs_destin" + - "ation\030\001 \001(\0132-.google.cloud.vision.v1p3be" + - "ta1.GcsDestination\022\022\n\nbatch_size\030\002 \001(\005\"\030" + - "\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035\n\016GcsDestinati" + - "on\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021OperationMetadata\022E\n" + - "\005state\030\001 \001(\01626.google.cloud.vision.v1p3b" + - "eta1.OperationMetadata.State\022/\n\013create_t" + - "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\022/\n" + - "\013update_time\030\006 \001(\0132\032.google.protobuf.Tim" + - "estamp\"Q\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013" + - "\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\r\n\tCA" + - "NCELLED\020\004*e\n\nLikelihood\022\013\n\007UNKNOWN\020\000\022\021\n\r" + - "VERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSSIBL" + - "E\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\0052\265\004\n\016Ima" + - "geAnnotator\022\276\001\n\023BatchAnnotateImages\0229.go" + - "ogle.cloud.vision.v1p3beta1.BatchAnnotat" + - "eImagesRequest\032:.google.cloud.vision.v1p" + - "3beta1.BatchAnnotateImagesResponse\"0\202\323\344\223" + - "\002\037\"\032/v1p3beta1/images:annotate:\001*\332A\010requ" + - "ests\022\351\001\n\027AsyncBatchAnnotateFiles\022=.googl" + - "e.cloud.vision.v1p3beta1.AsyncBatchAnnot" + - "ateFilesRequest\032\035.google.longrunning.Ope" + - "ration\"p\202\323\344\223\002(\"#/v1p3beta1/files:asyncBa" + - "tchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatch" + - "AnnotateFilesResponse\022\021OperationMetadata" + - "\032v\312A\025vision.googleapis.com\322A[https://www" + - ".googleapis.com/auth/cloud-platform,http" + - "s://www.googleapis.com/auth/cloud-vision" + - "B\202\001\n!com.google.cloud.vision.v1p3beta1B\023" + - "ImageAnnotatorProtoP\001ZCgoogle.golang.org" + - "/genproto/googleapis/cloud/vision/v1p3be" + - "ta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.ProductSearchProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.TextAnnotationProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.WebDetectionProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.ColorProto.getDescriptor(), - com.google.type.LatLngProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_Feature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Feature_descriptor, - new java.lang.String[] { "Type", "MaxResults", "Model", }); - internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor, - new java.lang.String[] { "GcsImageUri", "ImageUri", }); - internal_static_google_cloud_vision_v1p3beta1_Image_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_Image_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Image_descriptor, - new java.lang.String[] { "Content", "Source", }); - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor, - new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", }); - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor = - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor, - new java.lang.String[] { "Type", "Position", }); - internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor, - new java.lang.String[] { "LatLng", }); - internal_static_google_cloud_vision_v1p3beta1_Property_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Property_descriptor, - new java.lang.String[] { "Name", "Value", "Uint64Value", }); - internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_EntityAnnotation_descriptor, - new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); - internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor, - new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", "BoundingPoly", }); - internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor, - new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); - internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor, - new java.lang.String[] { "MinLatLng", "MaxLatLng", }); - internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p3beta1_ColorInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ColorInfo_descriptor, - new java.lang.String[] { "Color", "Score", "PixelFraction", }); - internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_DominantColorsAnnotation_descriptor, - new java.lang.String[] { "Colors", }); - internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor, - new java.lang.String[] { "DominantColors", }); - internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p3beta1_CropHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CropHint_descriptor, - new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); - internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CropHintsAnnotation_descriptor, - new java.lang.String[] { "CropHints", }); - internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CropHintsParams_descriptor, - new java.lang.String[] { "AspectRatios", }); - internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor, - new java.lang.String[] { "IncludeGeoResults", }); - internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor, - new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); - internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor, - new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "ProductSearchParams", "WebDetectionParams", "TextDetectionParams", }); - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageRequest_descriptor, - new java.lang.String[] { "Image", "Features", "ImageContext", }); - internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImageAnnotationContext_descriptor, - new java.lang.String[] { "Uri", "PageNumber", }); - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AnnotateImageResponse_descriptor, - new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "LocalizedObjectAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "ProductSearchResults", "Error", "Context", }); - internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AnnotateFileResponse_descriptor, - new java.lang.String[] { "InputConfig", "Responses", }); - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_BatchAnnotateImagesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor, - new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileResponse_descriptor, - new java.lang.String[] { "OutputConfig", }); - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AsyncBatchAnnotateFilesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor, - new java.lang.String[] { "GcsSource", "MimeType", }); - internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BatchSize", }); - internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_vision_v1p3beta1_GcsSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_GcsSource_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_vision_v1p3beta1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor, - new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.ProductSearchProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.TextAnnotationProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.WebDetectionProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.ColorProto.getDescriptor(); - com.google.type.LatLngProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java deleted file mode 100644 index f6ca3fd2e3a4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java +++ /dev/null @@ -1,1947 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Image context and/or feature-specific parameters.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageContext} - */ -public final class ImageContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageContext) - ImageContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageContext.newBuilder() to construct. - private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageContext() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.LatLongRect.Builder subBuilder = null; - if (latLongRect_ != null) { - subBuilder = latLongRect_.toBuilder(); - } - latLongRect_ = input.readMessage(com.google.cloud.vision.v1p3beta1.LatLongRect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLongRect_); - latLongRect_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageHints_.add(s); - break; - } - case 34: { - com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder subBuilder = null; - if (cropHintsParams_ != null) { - subBuilder = cropHintsParams_.toBuilder(); - } - cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.CropHintsParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsParams_); - cropHintsParams_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder subBuilder = null; - if (productSearchParams_ != null) { - subBuilder = productSearchParams_.toBuilder(); - } - productSearchParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchParams_); - productSearchParams_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder subBuilder = null; - if (webDetectionParams_ != null) { - subBuilder = webDetectionParams_.toBuilder(); - } - webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetectionParams_); - webDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder subBuilder = null; - if (textDetectionParams_ != null) { - subBuilder = textDetectionParams_.toBuilder(); - } - textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textDetectionParams_); - textDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageContext.class, com.google.cloud.vision.v1p3beta1.ImageContext.Builder.class); - } - - public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_; - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - @java.lang.Override - public boolean hasLatLongRect() { - return latLongRect_ != null; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect() { - return latLongRect_ == null ? com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - return getLatLongRect(); - } - - public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList languageHints_; - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_; - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - - public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_; - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - @java.lang.Override - public boolean hasCropHintsParams() { - return cropHintsParams_ != null; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams() { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - return getCropHintsParams(); - } - - public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_; - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - @java.lang.Override - public boolean hasProductSearchParams() { - return productSearchParams_ != null; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams() { - return productSearchParams_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - return getProductSearchParams(); - } - - public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_; - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - @java.lang.Override - public boolean hasWebDetectionParams() { - return webDetectionParams_ != null; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams() { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - return getWebDetectionParams(); - } - - public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p3beta1.TextDetectionParams textDetectionParams_; - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - @java.lang.Override - public boolean hasTextDetectionParams() { - return textDetectionParams_ != null; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams() { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - return getTextDetectionParams(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLongRect_ != null) { - output.writeMessage(1, getLatLongRect()); - } - for (int i = 0; i < languageHints_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); - } - if (cropHintsParams_ != null) { - output.writeMessage(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - output.writeMessage(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - output.writeMessage(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - output.writeMessage(12, getTextDetectionParams()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLongRect_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLongRect()); - } - { - int dataSize = 0; - for (int i = 0; i < languageHints_.size(); i++) { - dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); - } - size += dataSize; - size += 1 * getLanguageHintsList().size(); - } - if (cropHintsParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getWebDetectionParams()); - } - if (textDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getTextDetectionParams()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImageContext other = (com.google.cloud.vision.v1p3beta1.ImageContext) obj; - - if (hasLatLongRect() != other.hasLatLongRect()) return false; - if (hasLatLongRect()) { - if (!getLatLongRect() - .equals(other.getLatLongRect())) return false; - } - if (!getLanguageHintsList() - .equals(other.getLanguageHintsList())) return false; - if (hasCropHintsParams() != other.hasCropHintsParams()) return false; - if (hasCropHintsParams()) { - if (!getCropHintsParams() - .equals(other.getCropHintsParams())) return false; - } - if (hasProductSearchParams() != other.hasProductSearchParams()) return false; - if (hasProductSearchParams()) { - if (!getProductSearchParams() - .equals(other.getProductSearchParams())) return false; - } - if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; - if (hasWebDetectionParams()) { - if (!getWebDetectionParams() - .equals(other.getWebDetectionParams())) return false; - } - if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; - if (hasTextDetectionParams()) { - if (!getTextDetectionParams() - .equals(other.getTextDetectionParams())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLongRect()) { - hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; - hash = (53 * hash) + getLatLongRect().hashCode(); - } - if (getLanguageHintsCount() > 0) { - hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getLanguageHintsList().hashCode(); - } - if (hasCropHintsParams()) { - hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsParams().hashCode(); - } - if (hasProductSearchParams()) { - hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchParams().hashCode(); - } - if (hasWebDetectionParams()) { - hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getWebDetectionParams().hashCode(); - } - if (hasTextDetectionParams()) { - hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getTextDetectionParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Image context and/or feature-specific parameters.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageContext) - com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageContext.class, com.google.cloud.vision.v1p3beta1.ImageContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext build() { - com.google.cloud.vision.v1p3beta1.ImageContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext buildPartial() { - com.google.cloud.vision.v1p3beta1.ImageContext result = new com.google.cloud.vision.v1p3beta1.ImageContext(this); - int from_bitField0_ = bitField0_; - if (latLongRectBuilder_ == null) { - result.latLongRect_ = latLongRect_; - } else { - result.latLongRect_ = latLongRectBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.languageHints_ = languageHints_; - if (cropHintsParamsBuilder_ == null) { - result.cropHintsParams_ = cropHintsParams_; - } else { - result.cropHintsParams_ = cropHintsParamsBuilder_.build(); - } - if (productSearchParamsBuilder_ == null) { - result.productSearchParams_ = productSearchParams_; - } else { - result.productSearchParams_ = productSearchParamsBuilder_.build(); - } - if (webDetectionParamsBuilder_ == null) { - result.webDetectionParams_ = webDetectionParams_; - } else { - result.webDetectionParams_ = webDetectionParamsBuilder_.build(); - } - if (textDetectionParamsBuilder_ == null) { - result.textDetectionParams_ = textDetectionParams_; - } else { - result.textDetectionParams_ = textDetectionParamsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImageContext) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageContext other) { - if (other == com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance()) return this; - if (other.hasLatLongRect()) { - mergeLatLongRect(other.getLatLongRect()); - } - if (!other.languageHints_.isEmpty()) { - if (languageHints_.isEmpty()) { - languageHints_ = other.languageHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLanguageHintsIsMutable(); - languageHints_.addAll(other.languageHints_); - } - onChanged(); - } - if (other.hasCropHintsParams()) { - mergeCropHintsParams(other.getCropHintsParams()); - } - if (other.hasProductSearchParams()) { - mergeProductSearchParams(other.getProductSearchParams()); - } - if (other.hasWebDetectionParams()) { - mergeWebDetectionParams(other.getWebDetectionParams()); - } - if (other.hasTextDetectionParams()) { - mergeTextDetectionParams(other.getTextDetectionParams()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImageContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder> latLongRectBuilder_; - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - public boolean hasLatLongRect() { - return latLongRectBuilder_ != null || latLongRect_ != null; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - public com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect() { - if (latLongRectBuilder_ == null) { - return latLongRect_ == null ? com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } else { - return latLongRectBuilder_.getMessage(); - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect(com.google.cloud.vision.v1p3beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLongRect_ = value; - onChanged(); - } else { - latLongRectBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect( - com.google.cloud.vision.v1p3beta1.LatLongRect.Builder builderForValue) { - if (latLongRectBuilder_ == null) { - latLongRect_ = builderForValue.build(); - onChanged(); - } else { - latLongRectBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public Builder mergeLatLongRect(com.google.cloud.vision.v1p3beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (latLongRect_ != null) { - latLongRect_ = - com.google.cloud.vision.v1p3beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); - } else { - latLongRect_ = value; - } - onChanged(); - } else { - latLongRectBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public Builder clearLatLongRect() { - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - onChanged(); - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p3beta1.LatLongRect.Builder getLatLongRectBuilder() { - - onChanged(); - return getLatLongRectFieldBuilder().getBuilder(); - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - if (latLongRectBuilder_ != null) { - return latLongRectBuilder_.getMessageOrBuilder(); - } else { - return latLongRect_ == null ? - com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder> - getLatLongRectFieldBuilder() { - if (latLongRectBuilder_ == null) { - latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder>( - getLatLongRect(), - getParentForChildren(), - isClean()); - latLongRect_ = null; - } - return latLongRectBuilder_; - } - - private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_.getUnmodifiableView(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index to set the value at. - * @param value The languageHints to set. - * @return This builder for chaining. - */ - public Builder setLanguageHints( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHints( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param values The languageHints to add. - * @return This builder for chaining. - */ - public Builder addAllLanguageHints( - java.lang.Iterable values) { - ensureLanguageHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, languageHints_); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageHints() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The bytes of the languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHintsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - public boolean hasCropHintsParams() { - return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - public com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } else { - return cropHintsParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams(com.google.cloud.vision.v1p3beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsParams_ = value; - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams( - com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder builderForValue) { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = builderForValue.build(); - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder mergeCropHintsParams(com.google.cloud.vision.v1p3beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (cropHintsParams_ != null) { - cropHintsParams_ = - com.google.cloud.vision.v1p3beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); - } else { - cropHintsParams_ = value; - } - onChanged(); - } else { - cropHintsParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder clearCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - onChanged(); - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { - - onChanged(); - return getCropHintsParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - if (cropHintsParamsBuilder_ != null) { - return cropHintsParamsBuilder_.getMessageOrBuilder(); - } else { - return cropHintsParams_ == null ? - com.google.cloud.vision.v1p3beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder> - getCropHintsParamsFieldBuilder() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder>( - getCropHintsParams(), - getParentForChildren(), - isClean()); - cropHintsParams_ = null; - } - return cropHintsParamsBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - public boolean hasProductSearchParams() { - return productSearchParamsBuilder_ != null || productSearchParams_ != null; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - return productSearchParams_ == null ? com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } else { - return productSearchParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams(com.google.cloud.vision.v1p3beta1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchParams_ = value; - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams( - com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder builderForValue) { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = builderForValue.build(); - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public Builder mergeProductSearchParams(com.google.cloud.vision.v1p3beta1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (productSearchParams_ != null) { - productSearchParams_ = - com.google.cloud.vision.v1p3beta1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); - } else { - productSearchParams_ = value; - } - onChanged(); - } else { - productSearchParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public Builder clearProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - onChanged(); - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder getProductSearchParamsBuilder() { - - onChanged(); - return getProductSearchParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - if (productSearchParamsBuilder_ != null) { - return productSearchParamsBuilder_.getMessageOrBuilder(); - } else { - return productSearchParams_ == null ? - com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder> - getProductSearchParamsFieldBuilder() { - if (productSearchParamsBuilder_ == null) { - productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder>( - getProductSearchParams(), - getParentForChildren(), - isClean()); - productSearchParams_ = null; - } - return productSearchParamsBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - public boolean hasWebDetectionParams() { - return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - public com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } else { - return webDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams(com.google.cloud.vision.v1p3beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetectionParams_ = value; - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams( - com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder builderForValue) { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p3beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (webDetectionParams_ != null) { - webDetectionParams_ = - com.google.cloud.vision.v1p3beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); - } else { - webDetectionParams_ = value; - } - onChanged(); - } else { - webDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder clearWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - onChanged(); - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { - - onChanged(); - return getWebDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - if (webDetectionParamsBuilder_ != null) { - return webDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return webDetectionParams_ == null ? - com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder> - getWebDetectionParamsFieldBuilder() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder>( - getWebDetectionParams(), - getParentForChildren(), - isClean()); - webDetectionParams_ = null; - } - return webDetectionParamsBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.TextDetectionParams textDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - public boolean hasTextDetectionParams() { - return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - public com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } else { - return textDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams(com.google.cloud.vision.v1p3beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textDetectionParams_ = value; - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams( - com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder builderForValue) { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p3beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (textDetectionParams_ != null) { - textDetectionParams_ = - com.google.cloud.vision.v1p3beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); - } else { - textDetectionParams_ = value; - } - onChanged(); - } else { - textDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder clearTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - onChanged(); - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { - - onChanged(); - return getTextDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - if (textDetectionParamsBuilder_ != null) { - return textDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return textDetectionParams_ == null ? - com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder> - getTextDetectionParamsFieldBuilder() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextDetectionParams, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder>( - getTextDetectionParams(), - getParentForChildren(), - isClean()); - textDetectionParams_ = null; - } - return textDetectionParamsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageContext) - private static final com.google.cloud.vision.v1p3beta1.ImageContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageContext(); - } - - public static com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java deleted file mode 100644 index 2e2e5fc02057..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContextOrBuilder.java +++ /dev/null @@ -1,213 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImageContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - boolean hasLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - com.google.cloud.vision.v1p3beta1.LatLongRect getLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1; - */ - com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); - - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - java.util.List - getLanguageHintsList(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - int getLanguageHintsCount(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - java.lang.String getLanguageHints(int index); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - com.google.protobuf.ByteString - getLanguageHintsBytes(int index); - - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - boolean hasCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - com.google.cloud.vision.v1p3beta1.CropHintsParams getCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4; - */ - com.google.cloud.vision.v1p3beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); - - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - boolean hasProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - com.google.cloud.vision.v1p3beta1.ProductSearchParams getProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); - - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - boolean hasWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - com.google.cloud.vision.v1p3beta1.WebDetectionParams getWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6; - */ - com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); - - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - boolean hasTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - com.google.cloud.vision.v1p3beta1.TextDetectionParams getTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12; - */ - com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java deleted file mode 100644 index f4b4b6f0eadb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - * @return The source. - */ - com.google.cloud.vision.v1p3beta1.ImageSource getSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImageSource source = 2; - */ - com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java deleted file mode 100644 index 7772d5dc3ec9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Stores image properties, such as dominant colors.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageProperties} - */ -public final class ImageProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageProperties) - ImagePropertiesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageProperties.newBuilder() to construct. - private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageProperties() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder subBuilder = null; - if (dominantColors_ != null) { - subBuilder = dominantColors_.toBuilder(); - } - dominantColors_ = input.readMessage(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dominantColors_); - dominantColors_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageProperties.class, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder.class); - } - - public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_; - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - @java.lang.Override - public boolean hasDominantColors() { - return dominantColors_ != null; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors() { - return dominantColors_ == null ? com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - return getDominantColors(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dominantColors_ != null) { - output.writeMessage(1, getDominantColors()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dominantColors_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDominantColors()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageProperties)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImageProperties other = (com.google.cloud.vision.v1p3beta1.ImageProperties) obj; - - if (hasDominantColors() != other.hasDominantColors()) return false; - if (hasDominantColors()) { - if (!getDominantColors() - .equals(other.getDominantColors())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDominantColors()) { - hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; - hash = (53 * hash) + getDominantColors().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Stores image properties, such as dominant colors.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageProperties) - com.google.cloud.vision.v1p3beta1.ImagePropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageProperties.class, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImageProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageProperties build() { - com.google.cloud.vision.v1p3beta1.ImageProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageProperties buildPartial() { - com.google.cloud.vision.v1p3beta1.ImageProperties result = new com.google.cloud.vision.v1p3beta1.ImageProperties(this); - if (dominantColorsBuilder_ == null) { - result.dominantColors_ = dominantColors_; - } else { - result.dominantColors_ = dominantColorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImageProperties) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageProperties other) { - if (other == com.google.cloud.vision.v1p3beta1.ImageProperties.getDefaultInstance()) return this; - if (other.hasDominantColors()) { - mergeDominantColors(other.getDominantColors()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImageProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - public boolean hasDominantColors() { - return dominantColorsBuilder_ != null || dominantColors_ != null; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors() { - if (dominantColorsBuilder_ == null) { - return dominantColors_ == null ? com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } else { - return dominantColorsBuilder_.getMessage(); - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dominantColors_ = value; - onChanged(); - } else { - dominantColorsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors( - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder builderForValue) { - if (dominantColorsBuilder_ == null) { - dominantColors_ = builderForValue.build(); - onChanged(); - } else { - dominantColorsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder mergeDominantColors(com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (dominantColors_ != null) { - dominantColors_ = - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); - } else { - dominantColors_ = value; - } - onChanged(); - } else { - dominantColorsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder clearDominantColors() { - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - onChanged(); - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { - - onChanged(); - return getDominantColorsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - if (dominantColorsBuilder_ != null) { - return dominantColorsBuilder_.getMessageOrBuilder(); - } else { - return dominantColors_ == null ? - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder> - getDominantColorsFieldBuilder() { - if (dominantColorsBuilder_ == null) { - dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder>( - getDominantColors(), - getParentForChildren(), - isClean()); - dominantColors_ = null; - } - return dominantColorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageProperties) - private static final com.google.cloud.vision.v1p3beta1.ImageProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageProperties(); - } - - public static com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java deleted file mode 100644 index 51261f94c151..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImagePropertiesOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImagePropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - boolean hasDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation getDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominant_colors = 1; - */ - com.google.cloud.vision.v1p3beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java deleted file mode 100644 index bdbdb8302b88..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java +++ /dev/null @@ -1,880 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * External image source (Google Cloud Storage or web URL image location).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageSource} - */ -public final class ImageSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImageSource) - ImageSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageSource.newBuilder() to construct. - private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageSource() { - gcsImageUri_ = ""; - imageUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - gcsImageUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageSource.class, com.google.cloud.vision.v1p3beta1.ImageSource.Builder.class); - } - - public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsImageUri_; - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - @java.lang.Override - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } - } - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object imageUri_; - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImageSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImageSource other = (com.google.cloud.vision.v1p3beta1.ImageSource) obj; - - if (!getGcsImageUri() - .equals(other.getGcsImageUri())) return false; - if (!getImageUri() - .equals(other.getImageUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsImageUri().hashCode(); - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImageSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * External image source (Google Cloud Storage or web URL image location).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImageSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImageSource) - com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImageSource.class, com.google.cloud.vision.v1p3beta1.ImageSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - gcsImageUri_ = ""; - - imageUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_ImageSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSource build() { - com.google.cloud.vision.v1p3beta1.ImageSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSource buildPartial() { - com.google.cloud.vision.v1p3beta1.ImageSource result = new com.google.cloud.vision.v1p3beta1.ImageSource(this); - result.gcsImageUri_ = gcsImageUri_; - result.imageUri_ = imageUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImageSource) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImageSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImageSource other) { - if (other == com.google.cloud.vision.v1p3beta1.ImageSource.getDefaultInstance()) return this; - if (!other.getGcsImageUri().isEmpty()) { - gcsImageUri_ = other.gcsImageUri_; - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImageSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImageSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsImageUri_ = ""; - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcsImageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return This builder for chaining. - */ - public Builder clearGcsImageUri() { - - gcsImageUri_ = getDefaultInstance().getGcsImageUri(); - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The bytes for gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcsImageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImageSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageSource) - private static final com.google.cloud.vision.v1p3beta1.ImageSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImageSource(); - } - - public static com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImageSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java deleted file mode 100644 index feacbe05b190..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSourceOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImageSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImageSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - java.lang.String getGcsImageUri(); - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - com.google.protobuf.ByteString - getGcsImageUriBytes(); - - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString - getImageUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java deleted file mode 100644 index 3e48dda77da3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java +++ /dev/null @@ -1,905 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The Google Cloud Storage location for a csv file which preserves a list of
- * ImportProductSetRequests in each line.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} - */ -public final class ImportProductSetsGcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - ImportProductSetsGcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsGcsSource.newBuilder() to construct. - private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsGcsSource() { - csvFileUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsGcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsGcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - csvFileUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder.class); - } - - public static final int CSV_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object csvFileUri_; - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 6 columns.
-   * 1. image_uri
-   * 2, image_id
-   * 3. product_set_id
-   * 4. product_id
-   * 5, product_category
-   * 6, product_display_name
-   * 7, labels
-   * 8. bounding_poly
-   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-   * ProductSet/Product with the same id will be created on the fly
-   * if the ProductSet/Product specified by product_set_id/product_id does not
-   * exist.
-   * The image_id field is optional but has to be unique if provided. If it is
-   * empty, we will automatically assign an unique id to the image.
-   * The product_display_name field is optional. If it is empty, a space (" ")
-   * is used as the place holder for the product display_name, which can
-   * be updated later through the realtime API.
-   * If the Product with product_id already exists, the fields
-   * product_display_name, product_category and labels are ignored.
-   * If a Product doesn't exist and needs to be created on the fly, the
-   * product_display_name field refers to
-   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-   * the product_category field refers to
-   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-   * and the labels field refers to [Product.labels][].
-   * Labels (optional) should be a line containing a list of comma-separated
-   * key-value pairs, with the format
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-   * The bounding_poly (optional) field is used to identify one region of
-   * interest from the image in the same manner as CreateReferenceImage. If no
-   * bounding_poly is specified, the system will try to detect regions of
-   * interest automatically.
-   * Note that the pipeline will resize the image if the image resolution is too
-   * large to process (above 20MP).
-   * Also note that at most one bounding_poly is allowed per line. If the image
-   * contains multiple regions of interest, the csv should contain one line per
-   * region of interest.
-   * The bounding_poly column should contain an even number of comma-separated
-   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-   * integers should be used for absolute bounding polygons, and float values
-   * in [0, 1] should be used for normalized bounding polygons.
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - @java.lang.Override - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } - } - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 6 columns.
-   * 1. image_uri
-   * 2, image_id
-   * 3. product_set_id
-   * 4. product_id
-   * 5, product_category
-   * 6, product_display_name
-   * 7, labels
-   * 8. bounding_poly
-   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-   * ProductSet/Product with the same id will be created on the fly
-   * if the ProductSet/Product specified by product_set_id/product_id does not
-   * exist.
-   * The image_id field is optional but has to be unique if provided. If it is
-   * empty, we will automatically assign an unique id to the image.
-   * The product_display_name field is optional. If it is empty, a space (" ")
-   * is used as the place holder for the product display_name, which can
-   * be updated later through the realtime API.
-   * If the Product with product_id already exists, the fields
-   * product_display_name, product_category and labels are ignored.
-   * If a Product doesn't exist and needs to be created on the fly, the
-   * product_display_name field refers to
-   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-   * the product_category field refers to
-   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-   * and the labels field refers to [Product.labels][].
-   * Labels (optional) should be a line containing a list of comma-separated
-   * key-value pairs, with the format
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-   * The bounding_poly (optional) field is used to identify one region of
-   * interest from the image in the same manner as CreateReferenceImage. If no
-   * bounding_poly is specified, the system will try to detect regions of
-   * interest automatically.
-   * Note that the pipeline will resize the image if the image resolution is too
-   * large to process (above 20MP).
-   * Also note that at most one bounding_poly is allowed per line. If the image
-   * contains multiple regions of interest, the csv should contain one line per
-   * region of interest.
-   * The bounding_poly column should contain an even number of comma-separated
-   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-   * integers should be used for absolute bounding polygons, and float values
-   * in [0, 1] should be used for normalized bounding polygons.
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) obj; - - if (!getCsvFileUri() - .equals(other.getCsvFileUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCsvFileUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list of
-   * ImportProductSetRequests in each line.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - csvFileUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource build() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource buildPartial() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource(this); - result.csvFileUri_ = csvFileUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource other) { - if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance()) return this; - if (!other.getCsvFileUri().isEmpty()) { - csvFileUri_ = other.csvFileUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object csvFileUri_ = ""; - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 6 columns.
-     * 1. image_uri
-     * 2, image_id
-     * 3. product_set_id
-     * 4. product_id
-     * 5, product_category
-     * 6, product_display_name
-     * 7, labels
-     * 8. bounding_poly
-     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-     * ProductSet/Product with the same id will be created on the fly
-     * if the ProductSet/Product specified by product_set_id/product_id does not
-     * exist.
-     * The image_id field is optional but has to be unique if provided. If it is
-     * empty, we will automatically assign an unique id to the image.
-     * The product_display_name field is optional. If it is empty, a space (" ")
-     * is used as the place holder for the product display_name, which can
-     * be updated later through the realtime API.
-     * If the Product with product_id already exists, the fields
-     * product_display_name, product_category and labels are ignored.
-     * If a Product doesn't exist and needs to be created on the fly, the
-     * product_display_name field refers to
-     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-     * the product_category field refers to
-     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-     * and the labels field refers to [Product.labels][].
-     * Labels (optional) should be a line containing a list of comma-separated
-     * key-value pairs, with the format
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-     * The bounding_poly (optional) field is used to identify one region of
-     * interest from the image in the same manner as CreateReferenceImage. If no
-     * bounding_poly is specified, the system will try to detect regions of
-     * interest automatically.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 20MP).
-     * Also note that at most one bounding_poly is allowed per line. If the image
-     * contains multiple regions of interest, the csv should contain one line per
-     * region of interest.
-     * The bounding_poly column should contain an even number of comma-separated
-     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-     * integers should be used for absolute bounding polygons, and float values
-     * in [0, 1] should be used for normalized bounding polygons.
-     * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 6 columns.
-     * 1. image_uri
-     * 2, image_id
-     * 3. product_set_id
-     * 4. product_id
-     * 5, product_category
-     * 6, product_display_name
-     * 7, labels
-     * 8. bounding_poly
-     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-     * ProductSet/Product with the same id will be created on the fly
-     * if the ProductSet/Product specified by product_set_id/product_id does not
-     * exist.
-     * The image_id field is optional but has to be unique if provided. If it is
-     * empty, we will automatically assign an unique id to the image.
-     * The product_display_name field is optional. If it is empty, a space (" ")
-     * is used as the place holder for the product display_name, which can
-     * be updated later through the realtime API.
-     * If the Product with product_id already exists, the fields
-     * product_display_name, product_category and labels are ignored.
-     * If a Product doesn't exist and needs to be created on the fly, the
-     * product_display_name field refers to
-     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-     * the product_category field refers to
-     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-     * and the labels field refers to [Product.labels][].
-     * Labels (optional) should be a line containing a list of comma-separated
-     * key-value pairs, with the format
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-     * The bounding_poly (optional) field is used to identify one region of
-     * interest from the image in the same manner as CreateReferenceImage. If no
-     * bounding_poly is specified, the system will try to detect regions of
-     * interest automatically.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 20MP).
-     * Also note that at most one bounding_poly is allowed per line. If the image
-     * contains multiple regions of interest, the csv should contain one line per
-     * region of interest.
-     * The bounding_poly column should contain an even number of comma-separated
-     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-     * integers should be used for absolute bounding polygons, and float values
-     * in [0, 1] should be used for normalized bounding polygons.
-     * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 6 columns.
-     * 1. image_uri
-     * 2, image_id
-     * 3. product_set_id
-     * 4. product_id
-     * 5, product_category
-     * 6, product_display_name
-     * 7, labels
-     * 8. bounding_poly
-     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-     * ProductSet/Product with the same id will be created on the fly
-     * if the ProductSet/Product specified by product_set_id/product_id does not
-     * exist.
-     * The image_id field is optional but has to be unique if provided. If it is
-     * empty, we will automatically assign an unique id to the image.
-     * The product_display_name field is optional. If it is empty, a space (" ")
-     * is used as the place holder for the product display_name, which can
-     * be updated later through the realtime API.
-     * If the Product with product_id already exists, the fields
-     * product_display_name, product_category and labels are ignored.
-     * If a Product doesn't exist and needs to be created on the fly, the
-     * product_display_name field refers to
-     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-     * the product_category field refers to
-     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-     * and the labels field refers to [Product.labels][].
-     * Labels (optional) should be a line containing a list of comma-separated
-     * key-value pairs, with the format
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-     * The bounding_poly (optional) field is used to identify one region of
-     * interest from the image in the same manner as CreateReferenceImage. If no
-     * bounding_poly is specified, the system will try to detect regions of
-     * interest automatically.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 20MP).
-     * Also note that at most one bounding_poly is allowed per line. If the image
-     * contains multiple regions of interest, the csv should contain one line per
-     * region of interest.
-     * The bounding_poly column should contain an even number of comma-separated
-     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-     * integers should be used for absolute bounding polygons, and float values
-     * in [0, 1] should be used for normalized bounding polygons.
-     * 
- * - * string csv_file_uri = 1; - * @param value The csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - csvFileUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 6 columns.
-     * 1. image_uri
-     * 2, image_id
-     * 3. product_set_id
-     * 4. product_id
-     * 5, product_category
-     * 6, product_display_name
-     * 7, labels
-     * 8. bounding_poly
-     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-     * ProductSet/Product with the same id will be created on the fly
-     * if the ProductSet/Product specified by product_set_id/product_id does not
-     * exist.
-     * The image_id field is optional but has to be unique if provided. If it is
-     * empty, we will automatically assign an unique id to the image.
-     * The product_display_name field is optional. If it is empty, a space (" ")
-     * is used as the place holder for the product display_name, which can
-     * be updated later through the realtime API.
-     * If the Product with product_id already exists, the fields
-     * product_display_name, product_category and labels are ignored.
-     * If a Product doesn't exist and needs to be created on the fly, the
-     * product_display_name field refers to
-     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-     * the product_category field refers to
-     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-     * and the labels field refers to [Product.labels][].
-     * Labels (optional) should be a line containing a list of comma-separated
-     * key-value pairs, with the format
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-     * The bounding_poly (optional) field is used to identify one region of
-     * interest from the image in the same manner as CreateReferenceImage. If no
-     * bounding_poly is specified, the system will try to detect regions of
-     * interest automatically.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 20MP).
-     * Also note that at most one bounding_poly is allowed per line. If the image
-     * contains multiple regions of interest, the csv should contain one line per
-     * region of interest.
-     * The bounding_poly column should contain an even number of comma-separated
-     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-     * integers should be used for absolute bounding polygons, and float values
-     * in [0, 1] should be used for normalized bounding polygons.
-     * 
- * - * string csv_file_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCsvFileUri() { - - csvFileUri_ = getDefaultInstance().getCsvFileUri(); - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 6 columns.
-     * 1. image_uri
-     * 2, image_id
-     * 3. product_set_id
-     * 4. product_id
-     * 5, product_category
-     * 6, product_display_name
-     * 7, labels
-     * 8. bounding_poly
-     * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-     * ProductSet/Product with the same id will be created on the fly
-     * if the ProductSet/Product specified by product_set_id/product_id does not
-     * exist.
-     * The image_id field is optional but has to be unique if provided. If it is
-     * empty, we will automatically assign an unique id to the image.
-     * The product_display_name field is optional. If it is empty, a space (" ")
-     * is used as the place holder for the product display_name, which can
-     * be updated later through the realtime API.
-     * If the Product with product_id already exists, the fields
-     * product_display_name, product_category and labels are ignored.
-     * If a Product doesn't exist and needs to be created on the fly, the
-     * product_display_name field refers to
-     * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-     * the product_category field refers to
-     * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-     * and the labels field refers to [Product.labels][].
-     * Labels (optional) should be a line containing a list of comma-separated
-     * key-value pairs, with the format
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-     * The bounding_poly (optional) field is used to identify one region of
-     * interest from the image in the same manner as CreateReferenceImage. If no
-     * bounding_poly is specified, the system will try to detect regions of
-     * interest automatically.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 20MP).
-     * Also note that at most one bounding_poly is allowed per line. If the image
-     * contains multiple regions of interest, the csv should contain one line per
-     * region of interest.
-     * The bounding_poly column should contain an even number of comma-separated
-     * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-     * integers should be used for absolute bounding polygons, and float values
-     * in [0, 1] should be used for normalized bounding polygons.
-     * 
- * - * string csv_file_uri = 1; - * @param value The bytes for csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - csvFileUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource(); - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsGcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsGcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java deleted file mode 100644 index 0b064fea9bf7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSourceOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImportProductSetsGcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 6 columns.
-   * 1. image_uri
-   * 2, image_id
-   * 3. product_set_id
-   * 4. product_id
-   * 5, product_category
-   * 6, product_display_name
-   * 7, labels
-   * 8. bounding_poly
-   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-   * ProductSet/Product with the same id will be created on the fly
-   * if the ProductSet/Product specified by product_set_id/product_id does not
-   * exist.
-   * The image_id field is optional but has to be unique if provided. If it is
-   * empty, we will automatically assign an unique id to the image.
-   * The product_display_name field is optional. If it is empty, a space (" ")
-   * is used as the place holder for the product display_name, which can
-   * be updated later through the realtime API.
-   * If the Product with product_id already exists, the fields
-   * product_display_name, product_category and labels are ignored.
-   * If a Product doesn't exist and needs to be created on the fly, the
-   * product_display_name field refers to
-   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-   * the product_category field refers to
-   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-   * and the labels field refers to [Product.labels][].
-   * Labels (optional) should be a line containing a list of comma-separated
-   * key-value pairs, with the format
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-   * The bounding_poly (optional) field is used to identify one region of
-   * interest from the image in the same manner as CreateReferenceImage. If no
-   * bounding_poly is specified, the system will try to detect regions of
-   * interest automatically.
-   * Note that the pipeline will resize the image if the image resolution is too
-   * large to process (above 20MP).
-   * Also note that at most one bounding_poly is allowed per line. If the image
-   * contains multiple regions of interest, the csv should contain one line per
-   * region of interest.
-   * The bounding_poly column should contain an even number of comma-separated
-   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-   * integers should be used for absolute bounding polygons, and float values
-   * in [0, 1] should be used for normalized bounding polygons.
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - java.lang.String getCsvFileUri(); - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 6 columns.
-   * 1. image_uri
-   * 2, image_id
-   * 3. product_set_id
-   * 4. product_id
-   * 5, product_category
-   * 6, product_display_name
-   * 7, labels
-   * 8. bounding_poly
-   * Columns 1, 3, 4, and 5 are required, other columns are optional. A new
-   * ProductSet/Product with the same id will be created on the fly
-   * if the ProductSet/Product specified by product_set_id/product_id does not
-   * exist.
-   * The image_id field is optional but has to be unique if provided. If it is
-   * empty, we will automatically assign an unique id to the image.
-   * The product_display_name field is optional. If it is empty, a space (" ")
-   * is used as the place holder for the product display_name, which can
-   * be updated later through the realtime API.
-   * If the Product with product_id already exists, the fields
-   * product_display_name, product_category and labels are ignored.
-   * If a Product doesn't exist and needs to be created on the fly, the
-   * product_display_name field refers to
-   * [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name],
-   * the product_category field refers to
-   * [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category],
-   * and the labels field refers to [Product.labels][].
-   * Labels (optional) should be a line containing a list of comma-separated
-   * key-value pairs, with the format
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n".
-   * The bounding_poly (optional) field is used to identify one region of
-   * interest from the image in the same manner as CreateReferenceImage. If no
-   * bounding_poly is specified, the system will try to detect regions of
-   * interest automatically.
-   * Note that the pipeline will resize the image if the image resolution is too
-   * large to process (above 20MP).
-   * Also note that at most one bounding_poly is allowed per line. If the image
-   * contains multiple regions of interest, the csv should contain one line per
-   * region of interest.
-   * The bounding_poly column should contain an even number of comma-separated
-   * numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
-   * integers should be used for absolute bounding polygons, and float values
-   * in [0, 1] should be used for normalized bounding polygons.
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - com.google.protobuf.ByteString - getCsvFileUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java deleted file mode 100644 index 3dcc0104ad31..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java +++ /dev/null @@ -1,773 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The input content for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} - */ -public final class ImportProductSetsInputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - ImportProductSetsInputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsInputConfig.newBuilder() to construct. - private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsInputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsInputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_SOURCE(1), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: return GCS_SOURCE; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The input content for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig build() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig buildPartial() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig(this); - if (sourceCase_ == 1) { - if (gcsSourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = gcsSourceBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig other) { - if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case GCS_SOURCE: { - mergeGcsSource(other.getGcsSource()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 && - source_ != com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance()) { - source_ = com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - gcsSourceBuilder_.mergeFrom(value); - } else { - gcsSourceBuilder_.setMessage(value); - } - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder>( - (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged();; - return gcsSourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig(); - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsInputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsInputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java deleted file mode 100644 index e41acb199463..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfigOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImportProductSetsInputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); - - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java deleted file mode 100644 index aa8b67459389..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsRequest} - */ -public final class ImportProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - ImportProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsRequest.newBuilder() to construct. - private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_; - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inputConfig_ != null) { - output.writeMessage(2, getInputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest build() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest(this); - result.parent_ = parent_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java deleted file mode 100644 index 7478ab727492..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImportProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig getInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java deleted file mode 100644 index 52a83bf53595..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java +++ /dev/null @@ -1,1414 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response message for the `ImportProductSets` method.
- * This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
- * method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response]
- * field.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsResponse} - */ -public final class ImportProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - ImportProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsResponse.newBuilder() to construct. - private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsResponse() { - referenceImages_ = java.util.Collections.emptyList(); - statuses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - statuses_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int STATUSES_FIELD_NUMBER = 2; - private java.util.List statuses_; - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List getStatusesList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List - getStatusesOrBuilderList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public int getStatusesCount() { - return statuses_.size(); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.Status getStatuses(int index) { - return statuses_.get(index); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - return statuses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - output.writeMessage(2, statuses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, statuses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (!getStatusesList() - .equals(other.getStatusesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - if (getStatusesCount() > 0) { - hash = (37 * hash) + STATUSES_FIELD_NUMBER; - hash = (53 * hash) + getStatusesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ImportProductSets` method.
-   * This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
-   * method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
-   * field.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ImportProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - getStatusesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - statusesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse build() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse result = new com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.statuses_ = statuses_; - } else { - result.statuses_ = statusesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (statusesBuilder_ == null) { - if (!other.statuses_.isEmpty()) { - if (statuses_.isEmpty()) { - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureStatusesIsMutable(); - statuses_.addAll(other.statuses_); - } - onChanged(); - } - } else { - if (!other.statuses_.isEmpty()) { - if (statusesBuilder_.isEmpty()) { - statusesBuilder_.dispose(); - statusesBuilder_ = null; - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - statusesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getStatusesFieldBuilder() : null; - } else { - statusesBuilder_.addAllMessages(other.statuses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private java.util.List statuses_ = - java.util.Collections.emptyList(); - private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(statuses_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; - - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List getStatusesList() { - if (statusesBuilder_ == null) { - return java.util.Collections.unmodifiableList(statuses_); - } else { - return statusesBuilder_.getMessageList(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public int getStatusesCount() { - if (statusesBuilder_ == null) { - return statuses_.size(); - } else { - return statusesBuilder_.getCount(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status getStatuses(int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); - } else { - return statusesBuilder_.getMessage(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.set(index, value); - onChanged(); - } else { - statusesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.set(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses(com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(value); - onChanged(); - } else { - statusesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(index, value); - onChanged(); - } else { - statusesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addAllStatuses( - java.lang.Iterable values) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, statuses_); - onChanged(); - } else { - statusesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder clearStatuses() { - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - statusesBuilder_.clear(); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder removeStatuses(int index) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.remove(index); - onChanged(); - } else { - statusesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder getStatusesBuilder( - int index) { - return getStatusesFieldBuilder().getBuilder(index); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); } else { - return statusesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesOrBuilderList() { - if (statusesBuilder_ != null) { - return statusesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statuses_); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder() { - return getStatusesFieldBuilder().addBuilder( - com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder( - int index) { - return getStatusesFieldBuilder().addBuilder( - index, com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesBuilderList() { - return getStatusesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusesFieldBuilder() { - if (statusesBuilder_ == null) { - statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - statuses_ = null; - } - return statusesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - private static final com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java deleted file mode 100644 index cc734e56af59..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ImportProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.Status getStatuses(int index); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - int getStatusesCount(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesOrBuilderList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java deleted file mode 100644 index 78c39ced7f67..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The desired input location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.InputConfig} - */ -public final class InputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.InputConfig) - InputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InputConfig() { - mimeType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.GcsSource.Builder subBuilder = null; - if (gcsSource_ != null) { - subBuilder = gcsSource_.toBuilder(); - } - gcsSource_ = input.readMessage(com.google.cloud.vision.v1p3beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsSource_); - gcsSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.InputConfig.class, com.google.cloud.vision.v1p3beta1.InputConfig.Builder.class); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_; - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return gcsSource_ != null; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource() { - return gcsSource_ == null ? com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return getGcsSource(); - } - - public static final int MIME_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object mimeType_; - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } - } - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsSource_ != null) { - output.writeMessage(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.InputConfig other = (com.google.cloud.vision.v1p3beta1.InputConfig) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - } - if (!getMimeType() - .equals(other.getMimeType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired input location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.InputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.InputConfig) - com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.InputConfig.class, com.google.cloud.vision.v1p3beta1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - mimeType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig build() { - com.google.cloud.vision.v1p3beta1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig buildPartial() { - com.google.cloud.vision.v1p3beta1.InputConfig result = new com.google.cloud.vision.v1p3beta1.InputConfig(this); - if (gcsSourceBuilder_ == null) { - result.gcsSource_ = gcsSource_; - } else { - result.gcsSource_ = gcsSourceBuilder_.build(); - } - result.mimeType_ = mimeType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.InputConfig) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.InputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.InputConfig other) { - if (other == com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSourceBuilder_ != null || gcsSource_ != null; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - public com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null ? com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1p3beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1p3beta1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1p3beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (gcsSource_ != null) { - gcsSource_ = - com.google.cloud.vision.v1p3beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); - } else { - gcsSource_ = value; - } - onChanged(); - } else { - gcsSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - onChanged(); - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p3beta1.GcsSource.Builder getGcsSourceBuilder() { - - onChanged(); - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null ? - com.google.cloud.vision.v1p3beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder>( - getGcsSource(), - getParentForChildren(), - isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf" and "image/tiff"
-     * are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.InputConfig) - private static final com.google.cloud.vision.v1p3beta1.InputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.InputConfig(); - } - - public static com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java deleted file mode 100644 index f7b7456d33f3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfigOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface InputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1p3beta1.GcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1p3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * The type of the file. Currently only "application/pdf" and "image/tiff"
-   * are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java deleted file mode 100644 index 472166170ab1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Rectangle determined by min and max `LatLng` pairs.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LatLongRect} - */ -public final class LatLongRect extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LatLongRect) - LatLongRectOrBuilder { -private static final long serialVersionUID = 0L; - // Use LatLongRect.newBuilder() to construct. - private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LatLongRect() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LatLongRect(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LatLongRect( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (minLatLng_ != null) { - subBuilder = minLatLng_.toBuilder(); - } - minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minLatLng_); - minLatLng_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.type.LatLng.Builder subBuilder = null; - if (maxLatLng_ != null) { - subBuilder = maxLatLng_.toBuilder(); - } - maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxLatLng_); - maxLatLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LatLongRect.class, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder.class); - } - - public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng minLatLng_; - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - @java.lang.Override - public boolean hasMinLatLng() { - return minLatLng_ != null; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMinLatLng() { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - return getMinLatLng(); - } - - public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; - private com.google.type.LatLng maxLatLng_; - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - @java.lang.Override - public boolean hasMaxLatLng() { - return maxLatLng_ != null; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMaxLatLng() { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - return getMaxLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minLatLng_ != null) { - output.writeMessage(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - output.writeMessage(2, getMaxLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LatLongRect)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.LatLongRect other = (com.google.cloud.vision.v1p3beta1.LatLongRect) obj; - - if (hasMinLatLng() != other.hasMinLatLng()) return false; - if (hasMinLatLng()) { - if (!getMinLatLng() - .equals(other.getMinLatLng())) return false; - } - if (hasMaxLatLng() != other.hasMaxLatLng()) return false; - if (hasMaxLatLng()) { - if (!getMaxLatLng() - .equals(other.getMaxLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinLatLng()) { - hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMinLatLng().hashCode(); - } - if (hasMaxLatLng()) { - hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMaxLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LatLongRect prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rectangle determined by min and max `LatLng` pairs.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LatLongRect} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LatLongRect) - com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LatLongRect.class, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.LatLongRect.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LatLongRect_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRect build() { - com.google.cloud.vision.v1p3beta1.LatLongRect result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRect buildPartial() { - com.google.cloud.vision.v1p3beta1.LatLongRect result = new com.google.cloud.vision.v1p3beta1.LatLongRect(this); - if (minLatLngBuilder_ == null) { - result.minLatLng_ = minLatLng_; - } else { - result.minLatLng_ = minLatLngBuilder_.build(); - } - if (maxLatLngBuilder_ == null) { - result.maxLatLng_ = maxLatLng_; - } else { - result.maxLatLng_ = maxLatLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.LatLongRect) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.LatLongRect)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LatLongRect other) { - if (other == com.google.cloud.vision.v1p3beta1.LatLongRect.getDefaultInstance()) return this; - if (other.hasMinLatLng()) { - mergeMinLatLng(other.getMinLatLng()); - } - if (other.hasMaxLatLng()) { - mergeMaxLatLng(other.getMaxLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.LatLongRect parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.LatLongRect) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng minLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - public boolean hasMinLatLng() { - return minLatLngBuilder_ != null || minLatLng_ != null; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - public com.google.type.LatLng getMinLatLng() { - if (minLatLngBuilder_ == null) { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } else { - return minLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minLatLng_ = value; - onChanged(); - } else { - minLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (minLatLngBuilder_ == null) { - minLatLng_ = builderForValue.build(); - onChanged(); - } else { - minLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder mergeMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (minLatLng_ != null) { - minLatLng_ = - com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); - } else { - minLatLng_ = value; - } - onChanged(); - } else { - minLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder clearMinLatLng() { - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - onChanged(); - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLng.Builder getMinLatLngBuilder() { - - onChanged(); - return getMinLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - if (minLatLngBuilder_ != null) { - return minLatLngBuilder_.getMessageOrBuilder(); - } else { - return minLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMinLatLngFieldBuilder() { - if (minLatLngBuilder_ == null) { - minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMinLatLng(), - getParentForChildren(), - isClean()); - minLatLng_ = null; - } - return minLatLngBuilder_; - } - - private com.google.type.LatLng maxLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - public boolean hasMaxLatLng() { - return maxLatLngBuilder_ != null || maxLatLng_ != null; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - public com.google.type.LatLng getMaxLatLng() { - if (maxLatLngBuilder_ == null) { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } else { - return maxLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxLatLng_ = value; - onChanged(); - } else { - maxLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = builderForValue.build(); - onChanged(); - } else { - maxLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder mergeMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (maxLatLng_ != null) { - maxLatLng_ = - com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); - } else { - maxLatLng_ = value; - } - onChanged(); - } else { - maxLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder clearMaxLatLng() { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - onChanged(); - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLng.Builder getMaxLatLngBuilder() { - - onChanged(); - return getMaxLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - if (maxLatLngBuilder_ != null) { - return maxLatLngBuilder_.getMessageOrBuilder(); - } else { - return maxLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMaxLatLngFieldBuilder() { - if (maxLatLngBuilder_ == null) { - maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMaxLatLng(), - getParentForChildren(), - isClean()); - maxLatLng_ = null; - } - return maxLatLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LatLongRect) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LatLongRect) - private static final com.google.cloud.vision.v1p3beta1.LatLongRect DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LatLongRect(); - } - - public static com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LatLongRect parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LatLongRect(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LatLongRect getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java deleted file mode 100644 index e9f0fe1558ed..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRectOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface LatLongRectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LatLongRect) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - boolean hasMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - com.google.type.LatLng getMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); - - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - boolean hasMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - com.google.type.LatLng getMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java deleted file mode 100644 index d3ec51d01d7c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Likelihood.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A bucketized representation of likelihood, which is intended to give clients
- * highly stable results across model upgrades.
- * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-   * It is very unlikely that the image belongs to the specified vertical.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - *
-   * It is unlikely that the image belongs to the specified vertical.
-   * 
- * - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * It is possible that the image belongs to the specified vertical.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - *
-   * It is likely that the image belongs to the specified vertical.
-   * 
- * - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * It is very likely that the image belongs to the specified vertical.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.Likelihood) -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java deleted file mode 100644 index 6d934e0cfdb3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsRequest} - */ -public final class ListProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - ListProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsRequest.newBuilder() to construct. - private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - com.google.cloud.vision.v1p3beta1.ListProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest build() { - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest result = new com.google.cloud.vision.v1p3beta1.ListProductSetsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductSetsRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - private static final com.google.cloud.vision.v1p3beta1.ListProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductSetsRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java deleted file mode 100644 index cd3c24f417f6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java deleted file mode 100644 index 0805ca2bf1fa..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsResponse} - */ -public final class ListProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - ListProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsResponse.newBuilder() to construct. - private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsResponse() { - productSets_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productSets_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.Builder.class); - } - - public static final int PRODUCT_SETS_FIELD_NUMBER = 1; - private java.util.List productSets_; - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List getProductSetsList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List - getProductSetsOrBuilderList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public int getProductSetsCount() { - return productSets_.size(); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index) { - return productSets_.get(index); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - return productSets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < productSets_.size(); i++) { - output.writeMessage(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < productSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) obj; - - if (!getProductSetsList() - .equals(other.getProductSetsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductSetsCount() > 0) { - hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getProductSetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - com.google.cloud.vision.v1p3beta1.ListProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductSetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productSetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse build() { - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse result = new com.google.cloud.vision.v1p3beta1.ListProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productSets_ = productSets_; - } else { - result.productSets_ = productSetsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductSetsResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductSetsResponse.getDefaultInstance()) return this; - if (productSetsBuilder_ == null) { - if (!other.productSets_.isEmpty()) { - if (productSets_.isEmpty()) { - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductSetsIsMutable(); - productSets_.addAll(other.productSets_); - } - onChanged(); - } - } else { - if (!other.productSets_.isEmpty()) { - if (productSetsBuilder_.isEmpty()) { - productSetsBuilder_.dispose(); - productSetsBuilder_ = null; - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - productSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductSetsFieldBuilder() : null; - } else { - productSetsBuilder_.addAllMessages(other.productSets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List productSets_ = - java.util.Collections.emptyList(); - private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(productSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetsBuilder_; - - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public java.util.List getProductSetsList() { - if (productSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productSets_); - } else { - return productSetsBuilder_.getMessageList(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public int getProductSetsCount() { - if (productSetsBuilder_ == null) { - return productSets_.size(); - } else { - return productSetsBuilder_.getCount(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); - } else { - return productSetsBuilder_.getMessage(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.set(index, value); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.set(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets(com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(value); - onChanged(); - } else { - productSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(index, value); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder addAllProductSets( - java.lang.Iterable values) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productSets_); - onChanged(); - } else { - productSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder clearProductSets() { - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productSetsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public Builder removeProductSets(int index) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.remove(index); - onChanged(); - } else { - productSetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); } else { - return productSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsOrBuilderList() { - if (productSetsBuilder_ != null) { - return productSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productSets_); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet.Builder addProductSetsBuilder() { - return getProductSetsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet.Builder addProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsBuilderList() { - return getProductSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> - getProductSetsFieldBuilder() { - if (productSetsBuilder_ == null) { - productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productSets_ = null; - } - return productSetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - private static final com.google.cloud.vision.v1p3beta1.ListProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductSetsResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java deleted file mode 100644 index e82e82db1b76..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1p3beta1.ProductSet getProductSets(int index); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - int getProductSetsCount(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsOrBuilderList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java deleted file mode 100644 index 84283be7a508..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} - */ -public final class ListProductsInProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - ListProductsInProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetRequest.newBuilder() to construct. - private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetRequest() { - name_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest(this); - result.name_ = name_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java deleted file mode 100644 index 279289c11803..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductsInProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java deleted file mode 100644 index e72c1a92cf03..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} - */ -public final class ListProductsInProductSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - ListProductsInProductSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetResponse.newBuilder() to construct. - private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse build() { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - private static final com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java deleted file mode 100644 index 74d59602c976..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductsInProductSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - com.google.cloud.vision.v1p3beta1.Product getProducts(int index); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java deleted file mode 100644 index 8c5c19bb4e2e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsRequest} - */ -public final class ListProductsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsRequest) - ListProductsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsRequest.newBuilder() to construct. - private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsRequest) - com.google.cloud.vision.v1p3beta1.ListProductsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsRequest.class, com.google.cloud.vision.v1p3beta1.ListProductsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsRequest build() { - com.google.cloud.vision.v1p3beta1.ListProductsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductsRequest result = new com.google.cloud.vision.v1p3beta1.ListProductsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsRequest) - private static final com.google.cloud.vision.v1p3beta1.ListProductsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java deleted file mode 100644 index bd256296d909..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java deleted file mode 100644 index 246d0991d026..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsResponse} - */ -public final class ListProductsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListProductsResponse) - ListProductsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsResponse.newBuilder() to construct. - private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListProductsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListProductsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListProductsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListProductsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListProductsResponse) - com.google.cloud.vision.v1p3beta1.ListProductsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListProductsResponse.class, com.google.cloud.vision.v1p3beta1.ListProductsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsResponse build() { - com.google.cloud.vision.v1p3beta1.ListProductsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.ListProductsResponse result = new com.google.cloud.vision.v1p3beta1.ListProductsResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListProductsResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListProductsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListProductsResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.ListProductsResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListProductsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListProductsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p3beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListProductsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsResponse) - private static final com.google.cloud.vision.v1p3beta1.ListProductsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListProductsResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListProductsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java deleted file mode 100644 index f631a84f3601..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListProductsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListProductsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - com.google.cloud.vision.v1p3beta1.Product getProducts(int index); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product products = 1; - */ - com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java deleted file mode 100644 index b9d9393754ce..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java +++ /dev/null @@ -1,869 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} - */ -public final class ListReferenceImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - ListReferenceImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesRequest.newBuilder() to construct. - private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest build() { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - private static final com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java deleted file mode 100644 index 4b55938d66eb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequestOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListReferenceImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java deleted file mode 100644 index 1d504986df93..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java +++ /dev/null @@ -1,1118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Response message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} - */ -public final class ListReferenceImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - ListReferenceImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesResponse.newBuilder() to construct. - private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesResponse() { - referenceImages_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - pageSize_ = 0; - - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse build() { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse buildPartial() { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - result.pageSize_ = pageSize_; - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse other) { - if (other == com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - private static final com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse(); - } - - public static com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java deleted file mode 100644 index 5347819265f8..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponseOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ListReferenceImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p3beta1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java deleted file mode 100644 index 3be306bf3665..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java +++ /dev/null @@ -1,1259 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Set of detected objects with bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} - */ -public final class LocalizedObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - LocalizedObjectAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocalizedObjectAnnotation.newBuilder() to construct. - private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocalizedObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocalizedObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocalizedObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 42: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (boundingPoly_ != null) { - output.writeMessage(5, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected objects with bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation build() { - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - private static final com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocalizedObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalizedObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java deleted file mode 100644 index ea1bae037f7f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotationOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface LocalizedObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 5; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java deleted file mode 100644 index c96641fbcb24..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Detected entity location information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LocationInfo} - */ -public final class LocationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.LocationInfo) - LocationInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocationInfo.newBuilder() to construct. - private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocationInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (latLng_ != null) { - subBuilder = latLng_.toBuilder(); - } - latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLng_); - latLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LocationInfo.class, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder.class); - } - - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return latLng_ != null; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return getLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLng_ != null) { - output.writeMessage(1, getLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.LocationInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.LocationInfo other = (com.google.cloud.vision.v1p3beta1.LocationInfo) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng() - .equals(other.getLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.LocationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected entity location information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.LocationInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.LocationInfo) - com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.LocationInfo.class, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.LocationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLngBuilder_ == null) { - latLng_ = null; - } else { - latLng_ = null; - latLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_LocationInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfo build() { - com.google.cloud.vision.v1p3beta1.LocationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfo buildPartial() { - com.google.cloud.vision.v1p3beta1.LocationInfo result = new com.google.cloud.vision.v1p3beta1.LocationInfo(this); - if (latLngBuilder_ == null) { - result.latLng_ = latLng_; - } else { - result.latLng_ = latLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.LocationInfo) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.LocationInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.LocationInfo other) { - if (other == com.google.cloud.vision.v1p3beta1.LocationInfo.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.LocationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.LocationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return latLngBuilder_ != null || latLng_ != null; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - onChanged(); - } else { - latLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - onChanged(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (latLng_ != null) { - latLng_ = - com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); - } else { - latLng_ = value; - } - onChanged(); - } else { - latLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - if (latLngBuilder_ == null) { - latLng_ = null; - onChanged(); - } else { - latLng_ = null; - latLngBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - - onChanged(); - return getLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getLatLng(), - getParentForChildren(), - isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.LocationInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocationInfo) - private static final com.google.cloud.vision.v1p3beta1.LocationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.LocationInfo(); - } - - public static com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.LocationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java deleted file mode 100644 index 56b58f709470..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface LocationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.LocationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java deleted file mode 100644 index 889a41418e98..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java deleted file mode 100644 index 8d6bb76b530a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java +++ /dev/null @@ -1,597 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the normalized vertex coordinates are relative to the original image
- * and range from 0 to 1.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.NormalizedVertex} - */ -public final class NormalizedVertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.NormalizedVertex) - NormalizedVertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use NormalizedVertex.newBuilder() to construct. - private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NormalizedVertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NormalizedVertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedVertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.NormalizedVertex.class, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.NormalizedVertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.NormalizedVertex other = (com.google.cloud.vision.v1p3beta1.NormalizedVertex) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.NormalizedVertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the normalized vertex coordinates are relative to the original image
-   * and range from 0 to 1.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.NormalizedVertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.NormalizedVertex) - com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.NormalizedVertex.class, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.NormalizedVertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertex build() { - com.google.cloud.vision.v1p3beta1.NormalizedVertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertex buildPartial() { - com.google.cloud.vision.v1p3beta1.NormalizedVertex result = new com.google.cloud.vision.v1p3beta1.NormalizedVertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.NormalizedVertex) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.NormalizedVertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.NormalizedVertex other) { - if (other == com.google.cloud.vision.v1p3beta1.NormalizedVertex.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.NormalizedVertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.NormalizedVertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.NormalizedVertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.NormalizedVertex) - private static final com.google.cloud.vision.v1p3beta1.NormalizedVertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.NormalizedVertex(); - } - - public static com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NormalizedVertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedVertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.NormalizedVertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java deleted file mode 100644 index 822dd4c71ca9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface NormalizedVertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.NormalizedVertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java deleted file mode 100644 index 85f49d72122e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java +++ /dev/null @@ -1,1204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Contains metadata for the BatchAnnotateImages operation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.OperationMetadata.class, com.google.cloud.vision.v1p3beta1.OperationMetadata.Builder.class); - } - - /** - *
-   * Batch operation states.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.OperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - CREATED(1), - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - public static final int CREATED_VALUE = 1; - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return CREATED; - case 2: return RUNNING; - case 3: return DONE; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.OperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.OperationMetadata.State result = com.google.cloud.vision.v1p3beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p3beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1p3beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1p3beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.OperationMetadata other = (com.google.cloud.vision.v1p3beta1.OperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains metadata for the BatchAnnotateImages operation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.OperationMetadata) - com.google.cloud.vision.v1p3beta1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.OperationMetadata.class, com.google.cloud.vision.v1p3beta1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OperationMetadata build() { - com.google.cloud.vision.v1p3beta1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OperationMetadata buildPartial() { - com.google.cloud.vision.v1p3beta1.OperationMetadata result = new com.google.cloud.vision.v1p3beta1.OperationMetadata(this); - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.OperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.OperationMetadata other) { - if (other == com.google.cloud.vision.v1p3beta1.OperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.OperationMetadata.State result = com.google.cloud.vision.v1p3beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p3beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1p3beta1.OperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OperationMetadata) - private static final com.google.cloud.vision.v1p3beta1.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.OperationMetadata(); - } - - public static com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java deleted file mode 100644 index 7e482eb978a2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p3beta1.OperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1p3beta1.OperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java deleted file mode 100644 index a56e3cbd7de6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java +++ /dev/null @@ -1,777 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * The desired output location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.GcsDestination.Builder subBuilder = null; - if (gcsDestination_ != null) { - subBuilder = gcsDestination_.toBuilder(); - } - gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p3beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsDestination_); - gcsDestination_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - batchSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.OutputConfig.class, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder.class); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_; - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return gcsDestination_ != null; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination() { - return gcsDestination_ == null ? com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return getGcsDestination(); - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 2; - private int batchSize_; - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsDestination_ != null) { - output.writeMessage(1, getGcsDestination()); - } - if (batchSize_ != 0) { - output.writeInt32(2, batchSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsDestination_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsDestination()); - } - if (batchSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, batchSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.OutputConfig other = (com.google.cloud.vision.v1p3beta1.OutputConfig) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - } - if (getBatchSize() - != other.getBatchSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getBatchSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired output location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.OutputConfig) - com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.OutputConfig.class, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - batchSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig build() { - com.google.cloud.vision.v1p3beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig buildPartial() { - com.google.cloud.vision.v1p3beta1.OutputConfig result = new com.google.cloud.vision.v1p3beta1.OutputConfig(this); - if (gcsDestinationBuilder_ == null) { - result.gcsDestination_ = gcsDestination_; - } else { - result.gcsDestination_ = gcsDestinationBuilder_.build(); - } - result.batchSize_ = batchSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.OutputConfig) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.OutputConfig other) { - if (other == com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance()) return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - if (other.getBatchSize() != 0) { - setBatchSize(other.getBatchSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return gcsDestinationBuilder_ != null || gcsDestination_ != null; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - public com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null ? com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.vision.v1p3beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.vision.v1p3beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.vision.v1p3beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (gcsDestination_ != null) { - gcsDestination_ = - com.google.cloud.vision.v1p3beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); - } else { - gcsDestination_ = value; - } - onChanged(); - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - onChanged(); - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p3beta1.GcsDestination.Builder getGcsDestinationBuilder() { - - onChanged(); - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null ? - com.google.cloud.vision.v1p3beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder>( - getGcsDestination(), - getParentForChildren(), - isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - private int batchSize_ ; - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @param value The batchSize to set. - * @return This builder for chaining. - */ - public Builder setBatchSize(int value) { - - batchSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return This builder for chaining. - */ - public Builder clearBatchSize() { - - batchSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OutputConfig) - private static final com.google.cloud.vision.v1p3beta1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.OutputConfig(); - } - - public static com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 413dd4f7b100..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.vision.v1p3beta1.GcsDestination getGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p3beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.vision.v1p3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - int getBatchSize(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java deleted file mode 100644 index 5f3c9a4443cd..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java +++ /dev/null @@ -1,1358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Detected page from OCR.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Page} - */ -public final class Page extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Page) - PageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Page() { - blocks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Page(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - height_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blocks_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Block.parser(), extensionRegistry)); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Page.class, com.google.cloud.vision.v1p3beta1.Page.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int BLOCKS_FIELD_NUMBER = 4; - private java.util.List blocks_; - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Block getBlocks(int index) { - return blocks_.get(index); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (height_ != 0) { - output.writeInt32(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Page)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Page other = (com.google.cloud.vision.v1p3beta1.Page) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!getBlocksList() - .equals(other.getBlocksList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected page from OCR.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Page} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Page) - com.google.cloud.vision.v1p3beta1.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Page.class, com.google.cloud.vision.v1p3beta1.Page.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - width_ = 0; - - height_ = 0; - - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Page getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Page build() { - com.google.cloud.vision.v1p3beta1.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Page buildPartial() { - com.google.cloud.vision.v1p3beta1.Page result = new com.google.cloud.vision.v1p3beta1.Page(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - result.width_ = width_; - result.height_ = height_; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Page) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Page other) { - if (other == com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Page) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private int width_ ; - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder> blocksBuilder_; - - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p3beta1.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p3beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder addBlocks(com.google.cloud.vision.v1p3beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p3beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder addBlocks( - com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p3beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder addAllBlocks( - java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p3beta1.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p3beta1.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p3beta1.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Page) - private static final com.google.cloud.vision.v1p3beta1.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Page(); - } - - public static com.google.cloud.vision.v1p3beta1.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Page(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java deleted file mode 100644 index 56bbe5781c6b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PageOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Page) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - int getHeight(); - - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - java.util.List - getBlocksList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p3beta1.Block getBlocks(int index); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - int getBlocksCount(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - java.util.List - getBlocksOrBuilderList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p3beta1.BlockOrBuilder getBlocksOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java deleted file mode 100644 index 3442ff17f224..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Structural unit of text representing a number of words in certain order.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Paragraph} - */ -public final class Paragraph extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Paragraph) - ParagraphOrBuilder { -private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Paragraph() { - words_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Paragraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Paragraph( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Word.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Paragraph.class, com.google.cloud.vision.v1p3beta1.Paragraph.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int WORDS_FIELD_NUMBER = 3; - private java.util.List words_; - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List getWordsList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List - getWordsOrBuilderList() { - return words_; - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - @java.lang.Override - public int getWordsCount() { - return words_.size(); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Word getWords(int index) { - return words_.get(index); - } - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( - int index) { - return words_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - output.writeMessage(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Paragraph)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Paragraph other = (com.google.cloud.vision.v1p3beta1.Paragraph) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Paragraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structural unit of text representing a number of words in certain order.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Paragraph} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Paragraph) - com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Paragraph.class, com.google.cloud.vision.v1p3beta1.Paragraph.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Paragraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWordsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - wordsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Paragraph build() { - com.google.cloud.vision.v1p3beta1.Paragraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Paragraph buildPartial() { - com.google.cloud.vision.v1p3beta1.Paragraph result = new com.google.cloud.vision.v1p3beta1.Paragraph(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - } else { - result.words_ = wordsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Paragraph) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Paragraph)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Paragraph other) { - if (other == com.google.cloud.vision.v1p3beta1.Paragraph.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (wordsBuilder_ == null) { - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - } else { - if (!other.words_.isEmpty()) { - if (wordsBuilder_.isEmpty()) { - wordsBuilder_.dispose(); - wordsBuilder_ = null; - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - wordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWordsFieldBuilder() : null; - } else { - wordsBuilder_.addAllMessages(other.words_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Paragraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Paragraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List words_ = - java.util.Collections.emptyList(); - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(words_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder> wordsBuilder_; - - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public java.util.List getWordsList() { - if (wordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(words_); - } else { - return wordsBuilder_.getMessageList(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public int getWordsCount() { - if (wordsBuilder_ == null) { - return words_.size(); - } else { - return wordsBuilder_.getCount(); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p3beta1.Word getWords(int index) { - if (wordsBuilder_ == null) { - return words_.get(index); - } else { - return wordsBuilder_.getMessage(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p3beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - } else { - wordsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.set(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder addWords(com.google.cloud.vision.v1p3beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - } else { - wordsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p3beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(index, value); - onChanged(); - } else { - wordsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder addWords( - com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p3beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder addAllWords( - java.lang.Iterable values) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - } else { - wordsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder clearWords() { - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - wordsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public Builder removeWords(int index) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.remove(index); - onChanged(); - } else { - wordsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p3beta1.Word.Builder getWordsBuilder( - int index) { - return getWordsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( - int index) { - if (wordsBuilder_ == null) { - return words_.get(index); } else { - return wordsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public java.util.List - getWordsOrBuilderList() { - if (wordsBuilder_ != null) { - return wordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(words_); - } - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p3beta1.Word.Builder addWordsBuilder() { - return getWordsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p3beta1.Word.Builder addWordsBuilder( - int index) { - return getWordsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - public java.util.List - getWordsBuilderList() { - return getWordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder> - getWordsFieldBuilder() { - if (wordsBuilder_ == null) { - wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - words_ = null; - } - return wordsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Paragraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Paragraph) - private static final com.google.cloud.vision.v1p3beta1.Paragraph DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Paragraph(); - } - - public static com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Paragraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paragraph(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Paragraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java deleted file mode 100644 index 1cfb7f3a0d09..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ParagraphOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Paragraph) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - java.util.List - getWordsList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - com.google.cloud.vision.v1p3beta1.Word getWords(int index); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - int getWordsCount(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - java.util.List - getWordsOrBuilderList(); - /** - *
-   * List of words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Word words = 3; - */ - com.google.cloud.vision.v1p3beta1.WordOrBuilder getWordsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java deleted file mode 100644 index 896bf0e4f749..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A 3D position in the image, used primarily for Face detection landmarks.
- * A valid Position must have both x and y coordinates.
- * The position coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Position} - */ -public final class Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Position) - PositionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Position.newBuilder() to construct. - private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Position() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Position(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Position( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - case 29: { - - z_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Position.class, com.google.cloud.vision.v1p3beta1.Position.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - public static final int Z_FIELD_NUMBER = 3; - private float z_; - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - output.writeFloat(3, z_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, z_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Position)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Position other = (com.google.cloud.vision.v1p3beta1.Position) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (java.lang.Float.floatToIntBits(getZ()) - != java.lang.Float.floatToIntBits( - other.getZ())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getZ()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A 3D position in the image, used primarily for Face detection landmarks.
-   * A valid Position must have both x and y coordinates.
-   * The position coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Position) - com.google.cloud.vision.v1p3beta1.PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Position.class, com.google.cloud.vision.v1p3beta1.Position.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Position.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - z_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Position_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Position getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Position build() { - com.google.cloud.vision.v1p3beta1.Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Position buildPartial() { - com.google.cloud.vision.v1p3beta1.Position result = new com.google.cloud.vision.v1p3beta1.Position(this); - result.x_ = x_; - result.y_ = y_; - result.z_ = z_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Position) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Position other) { - if (other == com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - if (other.getZ() != 0F) { - setZ(other.getZ()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Position parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - - private float z_ ; - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @param value The z to set. - * @return This builder for chaining. - */ - public Builder setZ(float value) { - - z_ = value; - onChanged(); - return this; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return This builder for chaining. - */ - public Builder clearZ() { - - z_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Position) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Position) - private static final com.google.cloud.vision.v1p3beta1.Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Position(); - } - - public static com.google.cloud.vision.v1p3beta1.Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Position parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java deleted file mode 100644 index f539aa66e850..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PositionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Position) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); - - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - float getZ(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java deleted file mode 100644 index 34bb9a42e219..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java +++ /dev/null @@ -1,2548 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A Product contains ReferenceImages.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Product} - */ -public final class Product extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Product) - ProductOrBuilder { -private static final long serialVersionUID = 0L; - // Use Product.newBuilder() to construct. - private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Product() { - name_ = ""; - displayName_ = ""; - description_ = ""; - productCategory_ = ""; - productLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Product(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - productCategory_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productLabels_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Product.KeyValue.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Product.class, com.google.cloud.vision.v1p3beta1.Product.Builder.class); - } - - public interface KeyValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Product.KeyValue) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - java.lang.String getKey(); - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - *
-   * A product label represented as a key-value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Product.KeyValue} - */ - public static final class KeyValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Product.KeyValue) - KeyValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use KeyValue.newBuilder() to construct. - private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KeyValue() { - key_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KeyValue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KeyValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Product.KeyValue.class, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Product.KeyValue)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Product.KeyValue other = (com.google.cloud.vision.v1p3beta1.Product.KeyValue) obj; - - if (!getKey() - .equals(other.getKey())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Product.KeyValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A product label represented as a key-value pair.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Product.KeyValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Product.KeyValue) - com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Product.KeyValue.class, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Product.KeyValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - key_ = ""; - - value_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValue build() { - com.google.cloud.vision.v1p3beta1.Product.KeyValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValue buildPartial() { - com.google.cloud.vision.v1p3beta1.Product.KeyValue result = new com.google.cloud.vision.v1p3beta1.Product.KeyValue(this); - result.key_ = key_; - result.value_ = value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Product.KeyValue) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Product.KeyValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Product.KeyValue other) { - if (other == com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Product.KeyValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Product.KeyValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The bytes for key. - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Product.KeyValue) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product.KeyValue) - private static final com.google.cloud.vision.v1p3beta1.Product.KeyValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Product.KeyValue(); - } - - public static com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KeyValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValue(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; - private volatile java.lang.Object productCategory_; - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-   * "homegoods", "apparel", and "toys" are still supported, but these should
-   * not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - @java.lang.Override - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } - } - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-   * "homegoods", "apparel", and "toys" are still supported, but these should
-   * not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; - private java.util.List productLabels_; - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List getProductLabelsList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List - getProductLabelsOrBuilderList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public int getProductLabelsCount() { - return productLabels_.size(); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index) { - return productLabels_.get(index); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - return productLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - output.writeMessage(5, productLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, productLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Product)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Product other = (com.google.cloud.vision.v1p3beta1.Product) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getProductCategory() - .equals(other.getProductCategory())) return false; - if (!getProductLabelsList() - .equals(other.getProductLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getProductCategory().hashCode(); - if (getProductLabelsCount() > 0) { - hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getProductLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Product parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Product prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Product contains ReferenceImages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Product} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Product) - com.google.cloud.vision.v1p3beta1.ProductOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Product.class, com.google.cloud.vision.v1p3beta1.Product.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - productCategory_ = ""; - - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product build() { - com.google.cloud.vision.v1p3beta1.Product result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product buildPartial() { - com.google.cloud.vision.v1p3beta1.Product result = new com.google.cloud.vision.v1p3beta1.Product(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.productCategory_ = productCategory_; - if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productLabels_ = productLabels_; - } else { - result.productLabels_ = productLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Product) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Product)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Product other) { - if (other == com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getProductCategory().isEmpty()) { - productCategory_ = other.productCategory_; - onChanged(); - } - if (productLabelsBuilder_ == null) { - if (!other.productLabels_.isEmpty()) { - if (productLabels_.isEmpty()) { - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductLabelsIsMutable(); - productLabels_.addAll(other.productLabels_); - } - onChanged(); - } - } else { - if (!other.productLabels_.isEmpty()) { - if (productLabelsBuilder_.isEmpty()) { - productLabelsBuilder_.dispose(); - productLabelsBuilder_ = null; - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - productLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductLabelsFieldBuilder() : null; - } else { - productLabelsBuilder_.addAllMessages(other.productLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Product parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Product) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object productCategory_ = ""; - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-     * "homegoods", "apparel", and "toys" are still supported, but these should
-     * not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-     * "homegoods", "apparel", and "toys" are still supported, but these should
-     * not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-     * "homegoods", "apparel", and "toys" are still supported, but these should
-     * not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategory( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productCategory_ = value; - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-     * "homegoods", "apparel", and "toys" are still supported, but these should
-     * not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return This builder for chaining. - */ - public Builder clearProductCategory() { - - productCategory_ = getDefaultInstance().getProductCategory(); - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image. This should
-     * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-     * "homegoods", "apparel", and "toys" are still supported, but these should
-     * not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The bytes for productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productCategory_ = value; - onChanged(); - return this; - } - - private java.util.List productLabels_ = - java.util.Collections.emptyList(); - private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(productLabels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder> productLabelsBuilder_; - - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List getProductLabelsList() { - if (productLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productLabels_); - } else { - return productLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public int getProductLabelsCount() { - if (productLabelsBuilder_ == null) { - return productLabels_.size(); - } else { - return productLabelsBuilder_.getCount(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); - } else { - return productLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.set(index, value); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels(com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(index, value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder addAllProductLabels( - java.lang.Iterable values) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productLabels_); - onChanged(); - } else { - productLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder clearProductLabels() { - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public Builder removeProductLabels(int index) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.remove(index); - onChanged(); - } else { - productLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder getProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); } else { - return productLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsOrBuilderList() { - if (productLabelsBuilder_ != null) { - return productLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productLabels_); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabelsBuilder() { - return getProductLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 100 product_labels.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsBuilderList() { - return getProductLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder> - getProductLabelsFieldBuilder() { - if (productLabelsBuilder_ == null) { - productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product.KeyValue, com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder>( - productLabels_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productLabels_ = null; - } - return productLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Product) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product) - private static final com.google.cloud.vision.v1p3beta1.Product DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Product(); - } - - public static com.google.cloud.vision.v1p3beta1.Product getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Product parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java deleted file mode 100644 index 430d421eda42..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - - @Deprecated - protected ProductName() { - project = null; - location = null; - product = null; - } - - private ProductName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductName of(String project, String location, String product) { - return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); - } - - public static String format(String project, String location, String product) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .build() - .toString(); - } - - public static ProductName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT.validatedMatch( - formattedString, "ProductName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT.instantiate( - "project", project, "location", location, "product", product); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductName that = ((ProductName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - return h; - } - - /** Builder for projects/{project}/locations/{location}/products/{product}. */ - public static class Builder { - private String project; - private String location; - private String product; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - private Builder(ProductName productName) { - this.project = productName.project; - this.location = productName.location; - this.product = productName.product; - } - - public ProductName build() { - return new ProductName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java deleted file mode 100644 index 6bd8499fb0f2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductOrBuilder.java +++ /dev/null @@ -1,179 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ProductOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Product) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-   * "homegoods", "apparel", and "toys" are still supported, but these should
-   * not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - java.lang.String getProductCategory(); - /** - *
-   * Immutable. The category for the product identified by the reference image. This should
-   * be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
-   * "homegoods", "apparel", and "toys" are still supported, but these should
-   * not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - com.google.protobuf.ByteString - getProductCategoryBytes(); - - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1p3beta1.Product.KeyValue getProductLabels(int index); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - int getProductLabelsCount(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsOrBuilderList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 100 product_labels.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java deleted file mode 100644 index 831ade070cab..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java +++ /dev/null @@ -1,1390 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Parameters for a product search request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchParams} - */ -public final class ProductSearchParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchParams) - ProductSearchParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchParams.newBuilder() to construct. - private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchParams() { - productSet_ = ""; - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - productSet_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productCategories_.add(s); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 74: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchParams.class, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 9; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 6; - private volatile java.lang.Object productSet_; - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - @java.lang.Override - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } - } - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList productCategories_; - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_; - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - - public static final int FILTER_FIELD_NUMBER = 8; - private volatile java.lang.Object filter_; - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); - } - for (int i = 0; i < productCategories_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); - } - if (boundingPoly_ != null) { - output.writeMessage(9, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); - } - { - int dataSize = 0; - for (int i = 0; i < productCategories_.size(); i++) { - dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); - } - size += dataSize; - size += 1 * getProductCategoriesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSearchParams other = (com.google.cloud.vision.v1p3beta1.ProductSearchParams) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getProductSet() - .equals(other.getProductSet())) return false; - if (!getProductCategoriesList() - .equals(other.getProductCategoriesList())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - if (getProductCategoriesCount() > 0) { - hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getProductCategoriesList().hashCode(); - } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchParams) - com.google.cloud.vision.v1p3beta1.ProductSearchParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchParams.class, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - productSet_ = ""; - - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParams build() { - com.google.cloud.vision.v1p3beta1.ProductSearchParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParams buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSearchParams result = new com.google.cloud.vision.v1p3beta1.ProductSearchParams(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.productSet_ = productSet_; - if (((bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productCategories_ = productCategories_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchParams) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchParams other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSearchParams.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (!other.getProductSet().isEmpty()) { - productSet_ = other.productSet_; - onChanged(); - } - if (!other.productCategories_.isEmpty()) { - if (productCategories_.isEmpty()) { - productCategories_ = other.productCategories_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductCategoriesIsMutable(); - productCategories_.addAll(other.productCategories_); - } - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSearchParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.lang.Object productSet_ = ""; - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSet_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProductSet() { - - productSet_ = getDefaultInstance().getProductSet(); - onChanged(); - return this; - } - /** - *
-     * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The bytes for productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSet_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_.getUnmodifiableView(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index to set the value at. - * @param value The productCategories to set. - * @return This builder for chaining. - */ - public Builder setProductCategories( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategories( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param values The productCategories to add. - * @return This builder for chaining. - */ - public Builder addAllProductCategories( - java.lang.Iterable values) { - ensureProductCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productCategories_); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return This builder for chaining. - */ - public Builder clearProductCategories() { - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The bytes of the productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategoriesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchParams) - private static final com.google.cloud.vision.v1p3beta1.ProductSearchParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchParams(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java deleted file mode 100644 index 33e89992cb8a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParamsOrBuilder.java +++ /dev/null @@ -1,160 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ProductSearchParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 9; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - java.lang.String getProductSet(); - /** - *
-   * The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - com.google.protobuf.ByteString - getProductSetBytes(); - - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - java.util.List - getProductCategoriesList(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - int getProductCategoriesCount(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - java.lang.String getProductCategories(int index); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - com.google.protobuf.ByteString - getProductCategoriesBytes(int index); - - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java deleted file mode 100644 index 741f1f89148f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchProto.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class ProductSearchProto { - private ProductSearchProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2google/cloud/vision/v1p3beta1/product_" + - "search.proto\022\035google.cloud.vision.v1p3be" + - "ta1\032\031google/api/resource.proto\032,google/c" + - "loud/vision/v1p3beta1/geometry.proto\032:go" + - "ogle/cloud/vision/v1p3beta1/product_sear" + - "ch_service.proto\032\037google/protobuf/timest" + - "amp.proto\"\301\001\n\023ProductSearchParams\022B\n\rbou" + - "nding_poly\030\t \001(\0132+.google.cloud.vision.v" + - "1p3beta1.BoundingPoly\022:\n\013product_set\030\006 \001" + - "(\tB%\372A\"\n vision.googleapis.com/ProductSe" + - "t\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006filter\030" + - "\010 \001(\t\"\262\005\n\024ProductSearchResults\022.\n\nindex_" + - "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022K" + - "\n\007results\030\005 \003(\0132:.google.cloud.vision.v1" + - "p3beta1.ProductSearchResults.Result\022b\n\027p" + - "roduct_grouped_results\030\006 \003(\0132A.google.cl" + - "oud.vision.v1p3beta1.ProductSearchResult" + - "s.GroupedResult\032_\n\006Result\0227\n\007product\030\001 \001" + - "(\0132&.google.cloud.vision.v1p3beta1.Produ" + - "ct\022\r\n\005score\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020Obje" + - "ctAnnotation\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_co" + - "de\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002" + - "\n\rGroupedResult\022B\n\rbounding_poly\030\001 \001(\0132+" + - ".google.cloud.vision.v1p3beta1.BoundingP" + - "oly\022K\n\007results\030\002 \003(\0132:.google.cloud.visi" + - "on.v1p3beta1.ProductSearchResults.Result" + - "\022`\n\022object_annotations\030\003 \003(\0132D.google.cl" + - "oud.vision.v1p3beta1.ProductSearchResult" + - "s.ObjectAnnotationB\210\001\n!com.google.cloud." + - "vision.v1p3beta1B\022ProductSearchProtoP\001ZC" + - "google.golang.org/genproto/googleapis/cl" + - "oud/vision/v1p3beta1;vision\370\001\001\242\002\004GCVNb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSearchParams_descriptor, - new java.lang.String[] { "BoundingPoly", "ProductSet", "ProductCategories", "Filter", }); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor, - new java.lang.String[] { "IndexTime", "Results", "ProductGroupedResults", }); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor = - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor, - new java.lang.String[] { "Product", "Score", "Image", }); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor = - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor, - new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", }); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor = - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor, - new java.lang.String[] { "BoundingPoly", "Results", "ObjectAnnotations", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java deleted file mode 100644 index 052e0b19812f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java +++ /dev/null @@ -1,5384 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Results for a product search request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults} - */ -public final class ProductSearchResults extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults) - ProductSearchResultsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchResults.newBuilder() to construct. - private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchResults() { - results_ = java.util.Collections.emptyList(); - productGroupedResults_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchResults(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchResults( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productGroupedResults_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder.class); - } - - public interface ResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return The product. - */ - com.google.cloud.vision.v1p3beta1.Product getProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - java.lang.String getImage(); - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - com.google.protobuf.ByteString - getImageBytes(); - } - /** - *
-   * Information about a product.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.Result} - */ - public static final class Result extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Result() { - image_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.Product product_; - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int IMAGE_FIELD_NUMBER = 3; - private volatile java.lang.Object image_; - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - @java.lang.Override - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } - } - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getImage() - .equals(other.getImage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about a product.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.Result} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - score_ = 0F; - - image_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result build() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.score_ = score_; - result.image_ = image_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getImage().isEmpty()) { - image_ = other.image_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - * @return The product. - */ - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public Builder setProduct( - com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private float score_ ; - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object image_ = ""; - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The image. - */ - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The bytes for image. - */ - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The image to set. - * @return This builder for chaining. - */ - public Builder setImage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - image_ = value; - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return This builder for chaining. - */ - public Builder clearImage() { - - image_ = getDefaultInstance().getImage(); - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The bytes for image to set. - * @return This builder for chaining. - */ - public Builder setImageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - image_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Prediction for what the object in the bounding box is.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} - */ - public static final class ObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) - ObjectAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ObjectAnnotation.newBuilder() to construct. - private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Prediction for what the object in the bounding box is.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation build() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation) - private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GroupedResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - int getResultsCount(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - int getObjectAnnotationsCount(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsOrBuilderList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index); - } - /** - *
-   * Information about the products similar to a single product in a query
-   * image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} - */ - public static final class GroupedResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) - GroupedResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use GroupedResult.newBuilder() to construct. - private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupedResult() { - results_ = java.util.Collections.emptyList(); - objectAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupedResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupedResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - objectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List objectAnnotations_; - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List getObjectAnnotationsList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List - getObjectAnnotationsOrBuilderList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public int getObjectAnnotationsCount() { - return objectAnnotations_.size(); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - return objectAnnotations_.get(index); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - return objectAnnotations_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - output.writeMessage(3, objectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, objectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getObjectAnnotationsList() - .equals(other.getObjectAnnotationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getObjectAnnotationsCount() > 0) { - hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getObjectAnnotationsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about the products similar to a single product in a query
-     * image.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getObjectAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult build() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (objectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.objectAnnotations_ = objectAnnotations_; - } else { - result.objectAnnotations_ = objectAnnotationsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (objectAnnotationsBuilder_ == null) { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotations_.isEmpty()) { - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.addAll(other.objectAnnotations_); - } - onChanged(); - } - } else { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotationsBuilder_.isEmpty()) { - objectAnnotationsBuilder_.dispose(); - objectAnnotationsBuilder_ = null; - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - objectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getObjectAnnotationsFieldBuilder() : null; - } else { - objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List objectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; - - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List getObjectAnnotationsList() { - if (objectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } else { - return objectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public int getObjectAnnotationsCount() { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.size(); - } else { - return objectAnnotationsBuilder_.getCount(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); - } else { - return objectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations(com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addAllObjectAnnotations( - java.lang.Iterable values) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, objectAnnotations_); - onChanged(); - } else { - objectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder clearObjectAnnotations() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder removeObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.remove(index); - onChanged(); - } else { - objectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); } else { - return objectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsOrBuilderList() { - if (objectAnnotationsBuilder_ != null) { - return objectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { - return getObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsBuilderList() { - return getObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder> - getObjectAnnotationsFieldBuilder() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotationOrBuilder>( - objectAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - objectAnnotations_ = null; - } - return objectAnnotationsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult) - private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupedResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupedResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INDEX_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int RESULTS_FIELD_NUMBER = 5; - private java.util.List results_; - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; - private java.util.List productGroupedResults_; - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List getProductGroupedResultsList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List - getProductGroupedResultsOrBuilderList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public int getProductGroupedResultsCount() { - return productGroupedResults_.size(); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - return productGroupedResults_.get(index); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - return productGroupedResults_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (indexTime_ != null) { - output.writeMessage(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - output.writeMessage(6, productGroupedResults_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, productGroupedResults_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSearchResults other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults) obj; - - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getProductGroupedResultsList() - .equals(other.getProductGroupedResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getProductGroupedResultsCount() > 0) { - hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductGroupedResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSearchResults prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSearchResults} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSearchResults) - com.google.cloud.vision.v1p3beta1.ProductSearchResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.class, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSearchResults.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getProductGroupedResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p3beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults build() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSearchResults result = new com.google.cloud.vision.v1p3beta1.ProductSearchResults(this); - int from_bitField0_ = bitField0_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (productGroupedResultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.productGroupedResults_ = productGroupedResults_; - } else { - result.productGroupedResults_ = productGroupedResultsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSearchResults) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSearchResults)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSearchResults other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSearchResults.getDefaultInstance()) return this; - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (productGroupedResultsBuilder_ == null) { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResults_.isEmpty()) { - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.addAll(other.productGroupedResults_); - } - onChanged(); - } - } else { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResultsBuilder_.isEmpty()) { - productGroupedResultsBuilder_.dispose(); - productGroupedResultsBuilder_ = null; - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - productGroupedResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductGroupedResultsFieldBuilder() : null; - } else { - productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSearchResults parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSearchResults) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List productGroupedResults_ = - java.util.Collections.emptyList(); - private void ensureProductGroupedResultsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; - - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List getProductGroupedResultsList() { - if (productGroupedResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } else { - return productGroupedResultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public int getProductGroupedResultsCount() { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.size(); - } else { - return productGroupedResultsBuilder_.getCount(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); - } else { - return productGroupedResultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults(com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addAllProductGroupedResults( - java.lang.Iterable values) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productGroupedResults_); - onChanged(); - } else { - productGroupedResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder clearProductGroupedResults() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder removeProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.remove(index); - onChanged(); - } else { - productGroupedResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); } else { - return productGroupedResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsOrBuilderList() { - if (productGroupedResultsBuilder_ != null) { - return productGroupedResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { - return getProductGroupedResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsBuilderList() { - return getProductGroupedResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder> - getProductGroupedResultsFieldBuilder() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder>( - productGroupedResults_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - productGroupedResults_ = null; - } - return productGroupedResultsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSearchResults) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults) - private static final com.google.cloud.vision.v1p3beta1.ProductSearchResults DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSearchResults(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchResults parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchResults(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSearchResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java deleted file mode 100644 index 257811bbb176..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResultsOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ProductSearchResultsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSearchResults) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result getResults(int index); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - int getResultsCount(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - int getProductGroupedResultsCount(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsOrBuilderList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java deleted file mode 100644 index 4d599dfee7a1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchServiceProto.java +++ /dev/null @@ -1,614 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class ProductSearchServiceProto { - private ProductSearchServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Product_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n:google/cloud/vision/v1p3beta1/product_" + - "search_service.proto\022\035google.cloud.visio" + - "n.v1p3beta1\032\034google/api/annotations.prot" + - "o\032\027google/api/client.proto\032\037google/api/f" + - "ield_behavior.proto\032\031google/api/resource" + - ".proto\032,google/cloud/vision/v1p3beta1/ge" + - "ometry.proto\032#google/longrunning/operati" + - "ons.proto\032\033google/protobuf/empty.proto\032 " + - "google/protobuf/field_mask.proto\032\037google" + - "/protobuf/timestamp.proto\032\027google/rpc/st" + - "atus.proto\"\262\002\n\007Product\022\014\n\004name\030\001 \001(\t\022\024\n\014" + - "display_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022" + - "\035\n\020product_category\030\004 \001(\tB\003\340A\005\022G\n\016produc" + - "t_labels\030\005 \003(\0132/.google.cloud.vision.v1p" + - "3beta1.Product.KeyValue\032&\n\010KeyValue\022\013\n\003k" + - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[\n\035vision.goo" + - "gleapis.com/Product\022:projects/{project}/" + - "locations/{location}/products/{product}\"" + - "\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t\022\024\n\014display_" + - "name\030\002 \001(\t\0223\n\nindex_time\030\003 \001(\0132\032.google." + - "protobuf.TimestampB\003\340A\003\022,\n\013index_error\030\004" + - " \001(\0132\022.google.rpc.StatusB\003\340A\003:h\352Ae\n visi" + - "on.googleapis.com/ProductSet\022Aprojects/{" + - "project}/locations/{location}/productSet" + - "s/{product_set}\"\205\002\n\016ReferenceImage\022\014\n\004na" + - "me\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022H\n\016bounding_p" + - "olys\030\003 \003(\0132+.google.cloud.vision.v1p3bet" + - "a1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision.goog" + - "leapis.com/ReferenceImage\022\\projects/{pro" + - "ject}/locations/{location}/products/{pro" + - "duct}/referenceImages/{reference_image}\"" + - "\243\001\n\024CreateProductRequest\0229\n\006parent\030\001 \001(\t" + - "B)\340A\002\372A#\n!locations.googleapis.com/Locat" + - "ion\022<\n\007product\030\002 \001(\0132&.google.cloud.visi" + - "on.v1p3beta1.ProductB\003\340A\002\022\022\n\nproduct_id\030" + - "\003 \001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001" + - " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + - "ocation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + - "\030\003 \001(\t\"i\n\024ListProductsResponse\0228\n\010produc" + - "ts\030\001 \003(\0132&.google.cloud.vision.v1p3beta1" + - ".Product\022\027\n\017next_page_token\030\002 \001(\t\"H\n\021Get" + - "ProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vi" + - "sion.googleapis.com/Product\"\205\001\n\024UpdatePr" + - "oductRequest\022<\n\007product\030\001 \001(\0132&.google.c" + - "loud.vision.v1p3beta1.ProductB\003\340A\002\022/\n\013up" + - "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + - "ask\"K\n\024DeleteProductRequest\0223\n\004name\030\001 \001(" + - "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + - "\"\261\001\n\027CreateProductSetRequest\0229\n\006parent\030\001" + - " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + - "ocation\022C\n\013product_set\030\002 \001(\0132).google.cl" + - "oud.vision.v1p3beta1.ProductSetB\003\340A\002\022\026\n\016" + - "product_set_id\030\003 \001(\t\"z\n\026ListProductSetsR" + - "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + - "s.googleapis.com/Location\022\021\n\tpage_size\030\002" + - " \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027ListProductS" + - "etsResponse\022?\n\014product_sets\030\001 \003(\0132).goog" + - "le.cloud.vision.v1p3beta1.ProductSet\022\027\n\017" + - "next_page_token\030\002 \001(\t\"N\n\024GetProductSetRe" + - "quest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.goog" + - "leapis.com/ProductSet\"\217\001\n\027UpdateProductS" + - "etRequest\022C\n\013product_set\030\001 \001(\0132).google." + - "cloud.vision.v1p3beta1.ProductSetB\003\340A\002\022/" + - "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + - "eldMask\"Q\n\027DeleteProductSetRequest\0226\n\004na" + - "me\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.com/" + - "ProductSet\"\275\001\n\033CreateReferenceImageReque" + - "st\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googl" + - "eapis.com/Product\022K\n\017reference_image\030\002 \001" + - "(\0132-.google.cloud.vision.v1p3beta1.Refer" + - "enceImageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001" + - "(\t\"z\n\032ListReferenceImagesRequest\0225\n\006pare" + - "nt\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/" + - "Product\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + - "\030\003 \001(\t\"\222\001\n\033ListReferenceImagesResponse\022G" + - "\n\020reference_images\030\001 \003(\0132-.google.cloud." + - "vision.v1p3beta1.ReferenceImage\022\021\n\tpage_" + - "size\030\002 \001(\005\022\027\n\017next_page_token\030\003 \001(\t\"V\n\030G" + - "etReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340" + - "A\002\372A&\n$vision.googleapis.com/ReferenceIm" + - "age\"Y\n\033DeleteReferenceImageRequest\022:\n\004na" + - "me\030\001 \001(\tB,\340A\002\372A&\n$vision.googleapis.com/" + - "ReferenceImage\"\217\001\n\035AddProductToProductSe" + - "tRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.g" + - "oogleapis.com/ProductSet\0226\n\007product\030\002 \001(" + - "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + - "\"\224\001\n\"RemoveProductFromProductSetRequest\022" + - "6\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis" + - ".com/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037" + - "\n\035vision.googleapis.com/Product\"\200\001\n\037List" + - "ProductsInProductSetRequest\0226\n\004name\030\001 \001(" + - "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + - "Set\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + - "(\t\"u\n ListProductsInProductSetResponse\0228" + - "\n\010products\030\001 \003(\0132&.google.cloud.vision.v" + - "1p3beta1.Product\022\027\n\017next_page_token\030\002 \001(" + - "\t\"2\n\032ImportProductSetsGcsSource\022\024\n\014csv_f" + - "ile_uri\030\001 \001(\t\"y\n\034ImportProductSetsInputC" + - "onfig\022O\n\ngcs_source\030\001 \001(\01329.google.cloud" + - ".vision.v1p3beta1.ImportProductSetsGcsSo" + - "urceH\000B\010\n\006source\"\255\001\n\030ImportProductSetsRe" + - "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + - ".googleapis.com/Location\022V\n\014input_config" + - "\030\002 \001(\0132;.google.cloud.vision.v1p3beta1.I" + - "mportProductSetsInputConfigB\003\340A\002\"\212\001\n\031Imp" + - "ortProductSetsResponse\022G\n\020reference_imag" + - "es\030\001 \003(\0132-.google.cloud.vision.v1p3beta1" + - ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + - "le.rpc.Status\"\236\002\n\026BatchOperationMetadata" + - "\022J\n\005state\030\001 \001(\0162;.google.cloud.vision.v1" + - "p3beta1.BatchOperationMetadata.State\022/\n\013" + - "submit_time\030\002 \001(\0132\032.google.protobuf.Time" + - "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" + - "f.Timestamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIE" + - "D\020\000\022\016\n\nPROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006F" + - "AILED\020\003\022\r\n\tCANCELLED\020\0042\353\036\n\rProductSearch" + - "\022\346\001\n\020CreateProductSet\0226.google.cloud.vis" + - "ion.v1p3beta1.CreateProductSetRequest\032)." + - "google.cloud.vision.v1p3beta1.ProductSet" + - "\"o\202\323\344\223\002E\"6/v1p3beta1/{parent=projects/*/" + - "locations/*}/productSets:\013product_set\332A!" + - "parent,product_set,product_set_id\022\311\001\n\017Li" + - "stProductSets\0225.google.cloud.vision.v1p3" + - "beta1.ListProductSetsRequest\0326.google.cl" + - "oud.vision.v1p3beta1.ListProductSetsResp" + - "onse\"G\202\323\344\223\0028\0226/v1p3beta1/{parent=project" + - "s/*/locations/*}/productSets\332A\006parent\022\266\001" + - "\n\rGetProductSet\0223.google.cloud.vision.v1" + - "p3beta1.GetProductSetRequest\032).google.cl" + - "oud.vision.v1p3beta1.ProductSet\"E\202\323\344\223\0028\022" + - "6/v1p3beta1/{name=projects/*/locations/*" + - "/productSets/*}\332A\004name\022\350\001\n\020UpdateProduct" + - "Set\0226.google.cloud.vision.v1p3beta1.Upda" + - "teProductSetRequest\032).google.cloud.visio" + - "n.v1p3beta1.ProductSet\"q\202\323\344\223\002Q2B/v1p3bet" + - "a1/{product_set.name=projects/*/location" + - "s/*/productSets/*}:\013product_set\332A\027produc" + - "t_set,update_mask\022\251\001\n\020DeleteProductSet\0226" + - ".google.cloud.vision.v1p3beta1.DeletePro" + - "ductSetRequest\032\026.google.protobuf.Empty\"E" + - "\202\323\344\223\0028*6/v1p3beta1/{name=projects/*/loca" + - "tions/*/productSets/*}\332A\004name\022\316\001\n\rCreate" + - "Product\0223.google.cloud.vision.v1p3beta1." + - "CreateProductRequest\032&.google.cloud.visi" + - "on.v1p3beta1.Product\"`\202\323\344\223\002>\"3/v1p3beta1" + - "/{parent=projects/*/locations/*}/product" + - "s:\007product\332A\031parent,product,product_id\022\275" + - "\001\n\014ListProducts\0222.google.cloud.vision.v1" + - "p3beta1.ListProductsRequest\0323.google.clo" + - "ud.vision.v1p3beta1.ListProductsResponse" + - "\"D\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/" + - "locations/*}/products\332A\006parent\022\252\001\n\nGetPr" + - "oduct\0220.google.cloud.vision.v1p3beta1.Ge" + - "tProductRequest\032&.google.cloud.vision.v1" + - "p3beta1.Product\"B\202\323\344\223\0025\0223/v1p3beta1/{nam" + - "e=projects/*/locations/*/products/*}\332A\004n" + - "ame\022\320\001\n\rUpdateProduct\0223.google.cloud.vis" + - "ion.v1p3beta1.UpdateProductRequest\032&.goo" + - "gle.cloud.vision.v1p3beta1.Product\"b\202\323\344\223" + - "\002F2;/v1p3beta1/{product.name=projects/*/" + - "locations/*/products/*}:\007product\332A\023produ" + - "ct,update_mask\022\240\001\n\rDeleteProduct\0223.googl" + - "e.cloud.vision.v1p3beta1.DeleteProductRe" + - "quest\032\026.google.protobuf.Empty\"B\202\323\344\223\0025*3/" + - "v1p3beta1/{name=projects/*/locations/*/p" + - "roducts/*}\332A\004name\022\216\002\n\024CreateReferenceIma" + - "ge\022:.google.cloud.vision.v1p3beta1.Creat" + - "eReferenceImageRequest\032-.google.cloud.vi" + - "sion.v1p3beta1.ReferenceImage\"\212\001\202\323\344\223\002X\"E" + - "/v1p3beta1/{parent=projects/*/locations/" + - "*/products/*}/referenceImages:\017reference" + - "_image\332A)parent,reference_image,referenc" + - "e_image_id\022\300\001\n\024DeleteReferenceImage\022:.go" + - "ogle.cloud.vision.v1p3beta1.DeleteRefere" + - "nceImageRequest\032\026.google.protobuf.Empty\"" + - "T\202\323\344\223\002G*E/v1p3beta1/{name=projects/*/loc" + - "ations/*/products/*/referenceImages/*}\332A" + - "\004name\022\344\001\n\023ListReferenceImages\0229.google.c" + - "loud.vision.v1p3beta1.ListReferenceImage" + - "sRequest\032:.google.cloud.vision.v1p3beta1" + - ".ListReferenceImagesResponse\"V\202\323\344\223\002G\022E/v" + - "1p3beta1/{parent=projects/*/locations/*/" + - "products/*}/referenceImages\332A\006parent\022\321\001\n" + - "\021GetReferenceImage\0227.google.cloud.vision" + - ".v1p3beta1.GetReferenceImageRequest\032-.go" + - "ogle.cloud.vision.v1p3beta1.ReferenceIma" + - "ge\"T\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/" + - "locations/*/products/*/referenceImages/*" + - "}\332A\004name\022\313\001\n\026AddProductToProductSet\022<.go" + - "ogle.cloud.vision.v1p3beta1.AddProductTo" + - "ProductSetRequest\032\026.google.protobuf.Empt" + - "y\"[\202\323\344\223\002F\"A/v1p3beta1/{name=projects/*/l" + - "ocations/*/productSets/*}:addProduct:\001*\332" + - "A\014name,product\022\330\001\n\033RemoveProductFromProd" + - "uctSet\022A.google.cloud.vision.v1p3beta1.R" + - "emoveProductFromProductSetRequest\032\026.goog" + - "le.protobuf.Empty\"^\202\323\344\223\002I\"D/v1p3beta1/{n" + - "ame=projects/*/locations/*/productSets/*" + - "}:removeProduct:\001*\332A\014name,product\022\353\001\n\030Li" + - "stProductsInProductSet\022>.google.cloud.vi" + - "sion.v1p3beta1.ListProductsInProductSetR" + - "equest\032?.google.cloud.vision.v1p3beta1.L" + - "istProductsInProductSetResponse\"N\202\323\344\223\002A\022" + - "?/v1p3beta1/{name=projects/*/locations/*" + - "/productSets/*}/products\332A\004name\022\202\002\n\021Impo" + - "rtProductSets\0227.google.cloud.vision.v1p3" + - "beta1.ImportProductSetsRequest\032\035.google." + - "longrunning.Operation\"\224\001\202\323\344\223\002B\"=/v1p3bet" + - "a1/{parent=projects/*/locations/*}/produ" + - "ctSets:import:\001*\332A\023parent,input_config\312A" + - "3\n\031ImportProductSetsResponse\022\026BatchOpera" + - "tionMetadata\032v\312A\025vision.googleapis.com\322A" + - "[https://www.googleapis.com/auth/cloud-p" + - "latform,https://www.googleapis.com/auth/" + - "cloud-visionB\210\001\n!com.google.cloud.vision" + - ".v1p3beta1B\031ProductSearchServiceProtoP\001Z" + - "Cgoogle.golang.org/genproto/googleapis/c" + - "loud/vision/v1p3beta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p3beta1_Product_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_Product_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Product_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", "ProductCategory", "ProductLabels", }); - internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor = - internal_static_google_cloud_vision_v1p3beta1_Product_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Product_KeyValue_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor, - new java.lang.String[] { "Name", "DisplayName", "IndexTime", "IndexError", }); - internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor, - new java.lang.String[] { "Name", "Uri", "BoundingPolys", }); - internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CreateProductRequest_descriptor, - new java.lang.String[] { "Parent", "Product", "ProductId", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductsResponse_descriptor, - new java.lang.String[] { "Products", "NextPageToken", }); - internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_GetProductRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor, - new java.lang.String[] { "Product", "UpdateMask", }); - internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_DeleteProductRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CreateProductSetRequest_descriptor, - new java.lang.String[] { "Parent", "ProductSet", "ProductSetId", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductSetsResponse_descriptor, - new java.lang.String[] { "ProductSets", "NextPageToken", }); - internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_GetProductSetRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor, - new java.lang.String[] { "ProductSet", "UpdateMask", }); - internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_DeleteProductSetRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_CreateReferenceImageRequest_descriptor, - new java.lang.String[] { "Parent", "ReferenceImage", "ReferenceImageId", }); - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListReferenceImagesResponse_descriptor, - new java.lang.String[] { "ReferenceImages", "PageSize", "NextPageToken", }); - internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_GetReferenceImageRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_DeleteReferenceImageRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_AddProductToProductSetRequest_descriptor, - new java.lang.String[] { "Name", "Product", }); - internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor, - new java.lang.String[] { "Name", "Product", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetRequest_descriptor, - new java.lang.String[] { "Name", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ListProductsInProductSetResponse_descriptor, - new java.lang.String[] { "Products", "NextPageToken", }); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsGcsSource_descriptor, - new java.lang.String[] { "CsvFileUri", }); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsInputConfig_descriptor, - new java.lang.String[] { "GcsSource", "Source", }); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsRequest_descriptor, - new java.lang.String[] { "Parent", "InputConfig", }); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_ImportProductSetsResponse_descriptor, - new java.lang.String[] { "ReferenceImages", "Statuses", }); - internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_BatchOperationMetadata_descriptor, - new java.lang.String[] { "State", "SubmitTime", "EndTime", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java deleted file mode 100644 index 2817b79b511f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java +++ /dev/null @@ -1,1325 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A ProductSet contains Products. A ProductSet can contain a maximum of 1
- * million reference images. If the limit is exceeded, periodic indexing will
- * fail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSet} - */ -public final class ProductSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ProductSet) - ProductSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSet.newBuilder() to construct. - private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSet() { - name_ = ""; - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (indexError_ != null) { - subBuilder = indexError_.toBuilder(); - } - indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexError_); - indexError_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSet.class, com.google.cloud.vision.v1p3beta1.ProductSet.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEX_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int INDEX_ERROR_FIELD_NUMBER = 4; - private com.google.rpc.Status indexError_; - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - @java.lang.Override - public boolean hasIndexError() { - return indexError_ != null; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - @java.lang.Override - public com.google.rpc.Status getIndexError() { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - return getIndexError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (indexTime_ != null) { - output.writeMessage(3, getIndexTime()); - } - if (indexError_ != null) { - output.writeMessage(4, getIndexError()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIndexTime()); - } - if (indexError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIndexError()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ProductSet)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ProductSet other = (com.google.cloud.vision.v1p3beta1.ProductSet) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (hasIndexError() != other.hasIndexError()) return false; - if (hasIndexError()) { - if (!getIndexError() - .equals(other.getIndexError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (hasIndexError()) { - hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getIndexError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ProductSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
-   * million reference images. If the limit is exceeded, periodic indexing will
-   * fail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ProductSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ProductSet) - com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ProductSet.class, com.google.cloud.vision.v1p3beta1.ProductSet.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (indexErrorBuilder_ == null) { - indexError_ = null; - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ProductSet_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet build() { - com.google.cloud.vision.v1p3beta1.ProductSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet buildPartial() { - com.google.cloud.vision.v1p3beta1.ProductSet result = new com.google.cloud.vision.v1p3beta1.ProductSet(this); - result.name_ = name_; - result.displayName_ = displayName_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (indexErrorBuilder_ == null) { - result.indexError_ = indexError_; - } else { - result.indexError_ = indexErrorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ProductSet) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ProductSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ProductSet other) { - if (other == com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (other.hasIndexError()) { - mergeIndexError(other.getIndexError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ProductSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ProductSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this field is 0.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private com.google.rpc.Status indexError_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - public boolean hasIndexError() { - return indexErrorBuilder_ != null || indexError_ != null; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - public com.google.rpc.Status getIndexError() { - if (indexErrorBuilder_ == null) { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } else { - return indexErrorBuilder_.getMessage(); - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexError_ = value; - onChanged(); - } else { - indexErrorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError( - com.google.rpc.Status.Builder builderForValue) { - if (indexErrorBuilder_ == null) { - indexError_ = builderForValue.build(); - onChanged(); - } else { - indexErrorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (indexError_ != null) { - indexError_ = - com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); - } else { - indexError_ = value; - } - onChanged(); - } else { - indexErrorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexError() { - if (indexErrorBuilder_ == null) { - indexError_ = null; - onChanged(); - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.Status.Builder getIndexErrorBuilder() { - - onChanged(); - return getIndexErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - if (indexErrorBuilder_ != null) { - return indexErrorBuilder_.getMessageOrBuilder(); - } else { - return indexError_ == null ? - com.google.rpc.Status.getDefaultInstance() : indexError_; - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getIndexErrorFieldBuilder() { - if (indexErrorBuilder_ == null) { - indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getIndexError(), - getParentForChildren(), - isClean()); - indexError_ = null; - } - return indexErrorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ProductSet) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSet) - private static final com.google.cloud.vision.v1p3beta1.ProductSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ProductSet(); - } - - public static com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java deleted file mode 100644 index 799c706cd59c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductSetName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/productSets/{product_set}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String productSet; - - @Deprecated - protected ProductSetName() { - project = null; - location = null; - productSet = null; - } - - private ProductSetName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - productSet = Preconditions.checkNotNull(builder.getProductSet()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductSetName of(String project, String location, String productSet) { - return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); - } - - public static String format(String project, String location, String productSet) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProductSet(productSet) - .build() - .toString(); - } - - public static ProductSetName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_SET.validatedMatch( - formattedString, "ProductSetName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductSetName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (productSet != null) { - fieldMapBuilder.put("product_set", productSet); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_SET.instantiate( - "project", project, "location", location, "product_set", productSet); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductSetName that = ((ProductSetName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.productSet, that.productSet); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(productSet); - return h; - } - - /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ - public static class Builder { - private String project; - private String location; - private String productSet; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProductSet(String productSet) { - this.productSet = productSet; - return this; - } - - private Builder(ProductSetName productSetName) { - this.project = productSetName.project; - this.location = productSetName.location; - this.productSet = productSetName.productSet; - } - - public ProductSetName build() { - return new ProductSetName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java deleted file mode 100644 index 1976bf7ae715..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSetOrBuilder.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ProductSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ProductSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this field is 0.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - boolean hasIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - com.google.rpc.Status getIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java deleted file mode 100644 index 1172fb053fe4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java +++ /dev/null @@ -1,842 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A `Property` consists of a user-supplied name/value pair.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Property} - */ -public final class Property extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Property) - PropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Property.newBuilder() to construct. - private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Property() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Property(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Property( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 24: { - - uint64Value_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Property.class, com.google.cloud.vision.v1p3beta1.Property.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UINT64_VALUE_FIELD_NUMBER = 3; - private long uint64Value_; - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - if (uint64Value_ != 0L) { - output.writeUInt64(3, uint64Value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - if (uint64Value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, uint64Value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Property)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Property other = (com.google.cloud.vision.v1p3beta1.Property) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (getUint64Value() - != other.getUint64Value()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Value()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Property parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Property parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Property prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `Property` consists of a user-supplied name/value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Property} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Property) - com.google.cloud.vision.v1p3beta1.PropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Property.class, com.google.cloud.vision.v1p3beta1.Property.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Property.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - uint64Value_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_Property_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Property getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Property build() { - com.google.cloud.vision.v1p3beta1.Property result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Property buildPartial() { - com.google.cloud.vision.v1p3beta1.Property result = new com.google.cloud.vision.v1p3beta1.Property(this); - result.name_ = name_; - result.value_ = value_; - result.uint64Value_ = uint64Value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Property) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Property)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Property other) { - if (other == com.google.cloud.vision.v1p3beta1.Property.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getUint64Value() != 0L) { - setUint64Value(other.getUint64Value()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Property parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Property) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - - private long uint64Value_ ; - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @param value The uint64Value to set. - * @return This builder for chaining. - */ - public Builder setUint64Value(long value) { - - uint64Value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return This builder for chaining. - */ - public Builder clearUint64Value() { - - uint64Value_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Property) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Property) - private static final com.google.cloud.vision.v1p3beta1.Property DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Property(); - } - - public static com.google.cloud.vision.v1p3beta1.Property getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Property parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Property(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Property getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java deleted file mode 100644 index 928b9afa858d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/PropertyOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface PropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Property) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - long getUint64Value(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java deleted file mode 100644 index 6f68eac1a471..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java +++ /dev/null @@ -1,1372 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A `ReferenceImage` represents a product image and its associated metadata,
- * such as bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ReferenceImage} - */ -public final class ReferenceImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.ReferenceImage) - ReferenceImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReferenceImage.newBuilder() to construct. - private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReferenceImage() { - name_ = ""; - uri_ = ""; - boundingPolys_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReferenceImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReferenceImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - boundingPolys_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ReferenceImage.class, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - private volatile java.lang.Object uri_; - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; - private java.util.List boundingPolys_; - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List getBoundingPolysList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List - getBoundingPolysOrBuilderList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public int getBoundingPolysCount() { - return boundingPolys_.size(); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index) { - return boundingPolys_.get(index); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - return boundingPolys_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - output.writeMessage(3, boundingPolys_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, boundingPolys_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.ReferenceImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.ReferenceImage other = (com.google.cloud.vision.v1p3beta1.ReferenceImage) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (!getBoundingPolysList() - .equals(other.getBoundingPolysList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (getBoundingPolysCount() > 0) { - hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPolysList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.ReferenceImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `ReferenceImage` represents a product image and its associated metadata,
-   * such as bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.ReferenceImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.ReferenceImage) - com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.ReferenceImage.class, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.ReferenceImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBoundingPolysFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uri_ = ""; - - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage build() { - com.google.cloud.vision.v1p3beta1.ReferenceImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage buildPartial() { - com.google.cloud.vision.v1p3beta1.ReferenceImage result = new com.google.cloud.vision.v1p3beta1.ReferenceImage(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uri_ = uri_; - if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingPolys_ = boundingPolys_; - } else { - result.boundingPolys_ = boundingPolysBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.ReferenceImage) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.ReferenceImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.ReferenceImage other) { - if (other == com.google.cloud.vision.v1p3beta1.ReferenceImage.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (boundingPolysBuilder_ == null) { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolys_.isEmpty()) { - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingPolysIsMutable(); - boundingPolys_.addAll(other.boundingPolys_); - } - onChanged(); - } - } else { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolysBuilder_.isEmpty()) { - boundingPolysBuilder_.dispose(); - boundingPolysBuilder_ = null; - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingPolysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBoundingPolysFieldBuilder() : null; - } else { - boundingPolysBuilder_.addAllMessages(other.boundingPolys_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.ReferenceImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.ReferenceImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private java.util.List boundingPolys_ = - java.util.Collections.emptyList(); - private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(boundingPolys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolysBuilder_; - - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List getBoundingPolysList() { - if (boundingPolysBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingPolys_); - } else { - return boundingPolysBuilder_.getMessageList(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public int getBoundingPolysCount() { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.size(); - } else { - return boundingPolysBuilder_.getCount(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); - } else { - return boundingPolysBuilder_.getMessage(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, value); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addAllBoundingPolys( - java.lang.Iterable values) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, boundingPolys_); - onChanged(); - } else { - boundingPolysBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearBoundingPolys() { - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.remove(index); - onChanged(); - } else { - boundingPolysBuilder_.remove(index); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().getBuilder(index); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); } else { - return boundingPolysBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysOrBuilderList() { - if (boundingPolysBuilder_ != null) { - return boundingPolysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingPolys_); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBuilder() { - return getBoundingPolysFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference image.
-     * If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysBuilderList() { - return getBoundingPolysFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingPolysFieldBuilder() { - if (boundingPolysBuilder_ == null) { - boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - boundingPolys_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingPolys_ = null; - } - return boundingPolysBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.ReferenceImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ReferenceImage) - private static final com.google.cloud.vision.v1p3beta1.ReferenceImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.ReferenceImage(); - } - - public static com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReferenceImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReferenceImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ReferenceImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java deleted file mode 100644 index 564f1e0f1551..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageName.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ReferenceImageName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - private final String referenceImage; - - @Deprecated - protected ReferenceImageName() { - project = null; - location = null; - product = null; - referenceImage = null; - } - - private ReferenceImageName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ReferenceImageName of( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build(); - } - - public static String format( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build() - .toString(); - } - - public static ReferenceImageName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( - formattedString, "ReferenceImageName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("product"), - matchMap.get("reference_image")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ReferenceImageName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - if (referenceImage != null) { - fieldMapBuilder.put("reference_image", referenceImage); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( - "project", - project, - "location", - location, - "product", - product, - "reference_image", - referenceImage); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ReferenceImageName that = ((ReferenceImageName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product) - && Objects.equals(this.referenceImage, that.referenceImage); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - h *= 1000003; - h ^= Objects.hashCode(referenceImage); - return h; - } - - /** - * Builder for - * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. - */ - public static class Builder { - private String project; - private String location; - private String product; - private String referenceImage; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - public Builder setReferenceImage(String referenceImage) { - this.referenceImage = referenceImage; - return this; - } - - private Builder(ReferenceImageName referenceImageName) { - this.project = referenceImageName.project; - this.location = referenceImageName.location; - this.product = referenceImageName.product; - this.referenceImage = referenceImageName.referenceImage; - } - - public ReferenceImageName build() { - return new ReferenceImageName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java deleted file mode 100644 index c75a5c384cae..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImageOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface ReferenceImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.ReferenceImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPolys(int index); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getBoundingPolysCount(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysOrBuilderList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference image.
-   * If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java deleted file mode 100644 index 97e79fa4e7b2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `RemoveProductFromProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} - */ -public final class RemoveProductFromProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - RemoveProductFromProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveProductFromProductSetRequest.newBuilder() to construct. - private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveProductFromProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveProductFromProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RemoveProductFromProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `RemoveProductFromProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveProductFromProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveProductFromProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java deleted file mode 100644 index 9679f72dd426..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface RemoveProductFromProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be removed from this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java deleted file mode 100644 index f53de0cb3387..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Set of features pertaining to the image, computed by computer vision
- * methods over safe-search verticals (for example, adult, spoof, medical,
- * violence).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.SafeSearchAnnotation} - */ -public final class SafeSearchAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - SafeSearchAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use SafeSearchAnnotation.newBuilder() to construct. - private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SafeSearchAnnotation() { - adult_ = 0; - spoof_ = 0; - medical_ = 0; - violence_ = 0; - racy_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SafeSearchAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SafeSearchAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - adult_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - spoof_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - medical_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - violence_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - racy_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder.class); - } - - public static final int ADULT_FIELD_NUMBER = 1; - private int adult_; - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SPOOF_FIELD_NUMBER = 2; - private int spoof_; - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int MEDICAL_FIELD_NUMBER = 3; - private int medical_; - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int VIOLENCE_FIELD_NUMBER = 4; - private int violence_; - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RACY_FIELD_NUMBER = 9; - private int racy_; - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adult_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, racy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adult_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, racy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) obj; - - if (adult_ != other.adult_) return false; - if (spoof_ != other.spoof_) return false; - if (medical_ != other.medical_) return false; - if (violence_ != other.violence_) return false; - if (racy_ != other.racy_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADULT_FIELD_NUMBER; - hash = (53 * hash) + adult_; - hash = (37 * hash) + SPOOF_FIELD_NUMBER; - hash = (53 * hash) + spoof_; - hash = (37 * hash) + MEDICAL_FIELD_NUMBER; - hash = (53 * hash) + medical_; - hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; - hash = (53 * hash) + violence_; - hash = (37 * hash) + RACY_FIELD_NUMBER; - hash = (53 * hash) + racy_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of features pertaining to the image, computed by computer vision
-   * methods over safe-search verticals (for example, adult, spoof, medical,
-   * violence).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.SafeSearchAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adult_ = 0; - - spoof_ = 0; - - medical_ = 0; - - violence_ = 0; - - racy_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation build() { - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation(this); - result.adult_ = adult_; - result.spoof_ = spoof_; - result.medical_ = medical_; - result.violence_ = violence_; - result.racy_ = racy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.getDefaultInstance()) return this; - if (other.adult_ != 0) { - setAdultValue(other.getAdultValue()); - } - if (other.spoof_ != 0) { - setSpoofValue(other.getSpoofValue()); - } - if (other.medical_ != 0) { - setMedicalValue(other.getMedicalValue()); - } - if (other.violence_ != 0) { - setViolenceValue(other.getViolenceValue()); - } - if (other.racy_ != 0) { - setRacyValue(other.getRacyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int adult_ = 0; - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @param value The enum numeric value on the wire for adult to set. - * @return This builder for chaining. - */ - public Builder setAdultValue(int value) { - - adult_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @param value The adult to set. - * @return This builder for chaining. - */ - public Builder setAdult(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - adult_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return This builder for chaining. - */ - public Builder clearAdult() { - - adult_ = 0; - onChanged(); - return this; - } - - private int spoof_ = 0; - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @param value The enum numeric value on the wire for spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoofValue(int value) { - - spoof_ = value; - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @param value The spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoof(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - spoof_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return This builder for chaining. - */ - public Builder clearSpoof() { - - spoof_ = 0; - onChanged(); - return this; - } - - private int medical_ = 0; - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @param value The enum numeric value on the wire for medical to set. - * @return This builder for chaining. - */ - public Builder setMedicalValue(int value) { - - medical_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @param value The medical to set. - * @return This builder for chaining. - */ - public Builder setMedical(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - medical_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return This builder for chaining. - */ - public Builder clearMedical() { - - medical_ = 0; - onChanged(); - return this; - } - - private int violence_ = 0; - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @param value The enum numeric value on the wire for violence to set. - * @return This builder for chaining. - */ - public Builder setViolenceValue(int value) { - - violence_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @param value The violence to set. - * @return This builder for chaining. - */ - public Builder setViolence(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - violence_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return This builder for chaining. - */ - public Builder clearViolence() { - - violence_ = 0; - onChanged(); - return this; - } - - private int racy_ = 0; - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @param value The enum numeric value on the wire for racy to set. - * @return This builder for chaining. - */ - public Builder setRacyValue(int value) { - - racy_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @param value The racy to set. - * @return This builder for chaining. - */ - public Builder setRacy(com.google.cloud.vision.v1p3beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - racy_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return This builder for chaining. - */ - public Builder clearRacy() { - - racy_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - private static final com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafeSearchAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SafeSearchAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java deleted file mode 100644 index 0f2e34f1243a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotationOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface SafeSearchAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - int getAdultValue(); - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood adult = 1; - * @return The adult. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getAdult(); - - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - int getSpoofValue(); - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood spoof = 2; - * @return The spoof. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getSpoof(); - - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - int getMedicalValue(); - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood medical = 3; - * @return The medical. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getMedical(); - - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - int getViolenceValue(); - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood violence = 4; - * @return The violence. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getViolence(); - - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - int getRacyValue(); - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Likelihood racy = 9; - * @return The racy. - */ - com.google.cloud.vision.v1p3beta1.Likelihood getRacy(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java deleted file mode 100644 index 4f88977e08e6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A single symbol representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Symbol} - */ -public final class Symbol extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Symbol) - SymbolOrBuilder { -private static final long serialVersionUID = 0L; - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Symbol() { - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Symbol(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Symbol( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Symbol.class, com.google.cloud.vision.v1p3beta1.Symbol.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object text_; - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Symbol)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Symbol other = (com.google.cloud.vision.v1p3beta1.Symbol) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Symbol prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single symbol representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Symbol} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Symbol) - com.google.cloud.vision.v1p3beta1.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Symbol.class, com.google.cloud.vision.v1p3beta1.Symbol.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - text_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Symbol build() { - com.google.cloud.vision.v1p3beta1.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Symbol buildPartial() { - com.google.cloud.vision.v1p3beta1.Symbol result = new com.google.cloud.vision.v1p3beta1.Symbol(this); - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.text_ = text_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Symbol) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Symbol other) { - if (other == com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Symbol) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Symbol) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Symbol) - private static final com.google.cloud.vision.v1p3beta1.Symbol DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Symbol(); - } - - public static com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Symbol getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java deleted file mode 100644 index 7dae2af844df..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SymbolOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Symbol) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java deleted file mode 100644 index ca173114db24..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java +++ /dev/null @@ -1,3814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * TextAnnotation contains a structured representation of OCR extracted text.
- * The hierarchy of an OCR extracted text structure is like this:
- *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
- * Each structural component, starting from Page, may further have their own
- * properties. Properties describe detected languages, breaks etc.. Please refer
- * to the
- * [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty]
- * message definition below for more detail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation} - */ -public final class TextAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation) - TextAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextAnnotation.newBuilder() to construct. - private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextAnnotation() { - pages_ = java.util.Collections.emptyList(); - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Page.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder.class); - } - - public interface DetectedLanguageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - } - /** - *
-   * Detected language for a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} - */ - public static final class DetectedLanguage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedLanguage() { - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedLanguage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedLanguage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) obj; - - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - languageCode_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage build() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage buildPartial() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage(this); - result.languageCode_ = languageCode_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage other) { - if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage(); - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedLanguage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectedBreakOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType(); - - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - boolean getIsPrefix(); - } - /** - *
-   * Detected start or end of a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} - */ - public static final class DetectedBreak extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedBreak() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedBreak(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedBreak( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - isPrefix_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - /** - *
-     * Enum to denote the type of break found. New line, space etc.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType} - */ - public enum BreakType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - SURE_SPACE(2), - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - EOL_SURE_SPACE(3), - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - HYPHEN(4), - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - LINE_BREAK(5), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - public static final int SURE_SPACE_VALUE = 2; - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - public static final int EOL_SURE_SPACE_VALUE = 3; - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - public static final int HYPHEN_VALUE = 4; - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - public static final int LINE_BREAK_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BreakType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BreakType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SPACE; - case 2: return SURE_SPACE; - case 3: return EOL_SURE_SPACE; - case 4: return HYPHEN; - case 5: return LINE_BREAK; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BreakType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BreakType findValueByNumber(int number) { - return BreakType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); - } - - private static final BreakType[] VALUES = values(); - - public static BreakType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BreakType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - - public static final int IS_PREFIX_FIELD_NUMBER = 2; - private boolean isPrefix_; - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (isPrefix_ != false) { - output.writeBool(2, isPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (isPrefix_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, isPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) obj; - - if (type_ != other.type_) return false; - if (getIsPrefix() - != other.getIsPrefix()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPrefix()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected start or end of a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - isPrefix_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak build() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak buildPartial() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak(this); - result.type_ = type_; - result.isPrefix_ = isPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak other) { - if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsPrefix() != false) { - setIsPrefix(other.getIsPrefix()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isPrefix_ ; - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @param value The isPrefix to set. - * @return This builder for chaining. - */ - public Builder setIsPrefix(boolean value) { - - isPrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearIsPrefix() { - - isPrefix_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak(); - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedBreak(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TextPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - int getDetectedLanguagesCount(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesOrBuilderList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index); - - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - boolean hasDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); - } - /** - *
-   * Additional information detected on the structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} - */ - public static final class TextProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - TextPropertyOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextProperty.newBuilder() to construct. - private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextProperty() { - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextProperty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextProperty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectedLanguages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; - if (detectedBreak_ != null) { - subBuilder = detectedBreak_.toBuilder(); - } - detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectedBreak_); - detectedBreak_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder.class); - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; - private java.util.List detectedLanguages_; - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - return detectedLanguages_.get(index); - } - - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_; - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - return detectedBreak_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - return getDetectedBreak(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetectedBreak()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) obj; - - if (!getDetectedLanguagesList() - .equals(other.getDetectedLanguagesList())) return false; - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak() - .equals(other.getDetectedBreak())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Additional information detected on the structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectedLanguagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectedLanguagesBuilder_.clear(); - } - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty build() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty buildPartial() { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty(this); - int from_bitField0_ = bitField0_; - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (detectedBreakBuilder_ == null) { - result.detectedBreak_ = detectedBreak_; - } else { - result.detectedBreak_ = detectedBreakBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty other) { - if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectedLanguagesFieldBuilder() : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List detectedLanguages_ = - java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; - - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return detectedBreakBuilder_ != null || detectedBreak_ != null; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - onChanged(); - } else { - detectedBreakBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak( - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - onChanged(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder mergeDetectedBreak(com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (detectedBreak_ != null) { - detectedBreak_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); - } else { - detectedBreak_ = value; - } - onChanged(); - } else { - detectedBreakBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder clearDetectedBreak() { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - onChanged(); - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { - - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreakOrBuilder>( - getDetectedBreak(), - getParentForChildren(), - isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - private static final com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty(); - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextProperty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PAGES_FIELD_NUMBER = 1; - private java.util.List pages_; - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List getPagesList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - @java.lang.Override - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Page getPages(int index) { - return pages_.get(index); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.TextAnnotation other = (com.google.cloud.vision.v1p3beta1.TextAnnotation) obj; - - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!getText() - .equals(other.getText())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * TextAnnotation contains a structured representation of OCR extracted text.
-   * The hierarchy of an OCR extracted text structure is like this:
-   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
-   * Each structural component, starting from Page, may further have their own
-   * properties. Properties describe detected languages, breaks etc.. Please refer
-   * to the
-   * [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty]
-   * message definition below for more detail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextAnnotation) - com.google.cloud.vision.v1p3beta1.TextAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextAnnotation.class, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.TextAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pagesBuilder_.clear(); - } - text_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation build() { - com.google.cloud.vision.v1p3beta1.TextAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation buildPartial() { - com.google.cloud.vision.v1p3beta1.TextAnnotation result = new com.google.cloud.vision.v1p3beta1.TextAnnotation(this); - int from_bitField0_ = bitField0_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - result.text_ = text_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.TextAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.TextAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextAnnotation other) { - if (other == com.google.cloud.vision.v1p3beta1.TextAnnotation.getDefaultInstance()) return this; - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - pagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.TextAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.TextAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder> pagesBuilder_; - - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p3beta1.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p3beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder addPages(com.google.cloud.vision.v1p3beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p3beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder addPages( - com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p3beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p3beta1.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p3beta1.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p3beta1.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation) - private static final com.google.cloud.vision.v1p3beta1.TextAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextAnnotation(); - } - - public static com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java deleted file mode 100644 index b2692137bad7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface TextAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - java.util.List - getPagesList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p3beta1.Page getPages(int index); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - int getPagesCount(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - java.util.List - getPagesOrBuilderList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p3beta1.PageOrBuilder getPagesOrBuilder( - int index); - - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java deleted file mode 100644 index 90a57121c941..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotationProto.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class TextAnnotationProto { - private TextAnnotationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Page_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Block_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p3beta1/text_ann" + - "otation.proto\022\035google.cloud.vision.v1p3b" + - "eta1\032,google/cloud/vision/v1p3beta1/geom" + - "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + - " \003(\0132#.google.cloud.vision.v1p3beta1.Pag" + - "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + - "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + - "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + - "cloud.vision.v1p3beta1.TextAnnotation.De" + - "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + - "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + - "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + - "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + - "\n\022detected_languages\030\001 \003(\0132>.google.clou" + - "d.vision.v1p3beta1.TextAnnotation.Detect" + - "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + - "gle.cloud.vision.v1p3beta1.TextAnnotatio" + - "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + - "(\0132:.google.cloud.vision.v1p3beta1.TextA" + - "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + - "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + - "loud.vision.v1p3beta1.Block\022\022\n\nconfidenc" + - "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + - "ogle.cloud.vision.v1p3beta1.TextAnnotati" + - "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + - "google.cloud.vision.v1p3beta1.BoundingPo" + - "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + - "sion.v1p3beta1.Paragraph\022B\n\nblock_type\030\004" + - " \001(\0162..google.cloud.vision.v1p3beta1.Blo" + - "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + - "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + - "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + - "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + - "oud.vision.v1p3beta1.TextAnnotation.Text" + - "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + - "cloud.vision.v1p3beta1.BoundingPoly\0222\n\005w" + - "ords\030\003 \003(\0132#.google.cloud.vision.v1p3bet" + - "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + - "property\030\001 \001(\0132:.google.cloud.vision.v1p" + - "3beta1.TextAnnotation.TextProperty\022A\n\014bo" + - "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + - "1p3beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + - ".google.cloud.vision.v1p3beta1.Symbol\022\022\n" + - "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + - "\030\001 \001(\0132:.google.cloud.vision.v1p3beta1.T" + - "extAnnotation.TextProperty\022A\n\014bounding_b" + - "ox\030\002 \001(\0132+.google.cloud.vision.v1p3beta1" + - ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + - "e\030\004 \001(\002B\202\001\n!com.google.cloud.vision.v1p3" + - "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + - "ang.org/genproto/googleapis/cloud/vision" + - "/v1p3beta1;vision\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor, - new java.lang.String[] { "Pages", "Text", }); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor = - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedLanguage_descriptor, - new java.lang.String[] { "LanguageCode", "Confidence", }); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor = - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_DetectedBreak_descriptor, - new java.lang.String[] { "Type", "IsPrefix", }); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor = - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_TextAnnotation_TextProperty_descriptor, - new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); - internal_static_google_cloud_vision_v1p3beta1_Page_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_Page_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Page_descriptor, - new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); - internal_static_google_cloud_vision_v1p3beta1_Block_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_Block_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Block_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); - internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p3beta1_Paragraph_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Paragraph_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); - internal_static_google_cloud_vision_v1p3beta1_Word_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Word_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); - internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p3beta1_Symbol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_Symbol_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.cloud.vision.v1p3beta1.GeometryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java deleted file mode 100644 index 040102d98ae1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParams.java +++ /dev/null @@ -1,767 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Parameters for text detections. This is used to control TEXT_DETECTION and
- * DOCUMENT_TEXT_DETECTION features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextDetectionParams} - */ -public final class TextDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.TextDetectionParams) - TextDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextDetectionParams.newBuilder() to construct. - private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextDetectionParams() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 72: { - - enableTextDetectionConfidenceScore_ = input.readBool(); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advancedOcrOptions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextDetectionParams.class, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder.class); - } - - public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; - private boolean enableTextDetectionConfidenceScore_; - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - - public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList advancedOcrOptions_; - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_; - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enableTextDetectionConfidenceScore_ != false) { - output.writeBool(9, enableTextDetectionConfidenceScore_); - } - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableTextDetectionConfidenceScore_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, enableTextDetectionConfidenceScore_); - } - { - int dataSize = 0; - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdvancedOcrOptionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.TextDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.TextDetectionParams other = (com.google.cloud.vision.v1p3beta1.TextDetectionParams) obj; - - if (getEnableTextDetectionConfidenceScore() - != other.getEnableTextDetectionConfidenceScore()) return false; - if (!getAdvancedOcrOptionsList() - .equals(other.getAdvancedOcrOptionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableTextDetectionConfidenceScore()); - if (getAdvancedOcrOptionsCount() > 0) { - hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.TextDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for text detections. This is used to control TEXT_DETECTION and
-   * DOCUMENT_TEXT_DETECTION features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.TextDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.TextDetectionParams) - com.google.cloud.vision.v1p3beta1.TextDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.TextDetectionParams.class, com.google.cloud.vision.v1p3beta1.TextDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.TextDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - enableTextDetectionConfidenceScore_ = false; - - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParams build() { - com.google.cloud.vision.v1p3beta1.TextDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParams buildPartial() { - com.google.cloud.vision.v1p3beta1.TextDetectionParams result = new com.google.cloud.vision.v1p3beta1.TextDetectionParams(this); - int from_bitField0_ = bitField0_; - result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; - if (((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.advancedOcrOptions_ = advancedOcrOptions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.TextDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.TextDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.TextDetectionParams other) { - if (other == com.google.cloud.vision.v1p3beta1.TextDetectionParams.getDefaultInstance()) return this; - if (other.getEnableTextDetectionConfidenceScore() != false) { - setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); - } - if (!other.advancedOcrOptions_.isEmpty()) { - if (advancedOcrOptions_.isEmpty()) { - advancedOcrOptions_ = other.advancedOcrOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.addAll(other.advancedOcrOptions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.TextDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.TextDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean enableTextDetectionConfidenceScore_ ; - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @param value The enableTextDetectionConfidenceScore to set. - * @return This builder for chaining. - */ - public Builder setEnableTextDetectionConfidenceScore(boolean value) { - - enableTextDetectionConfidenceScore_ = value; - onChanged(); - return this; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return This builder for chaining. - */ - public Builder clearEnableTextDetectionConfidenceScore() { - - enableTextDetectionConfidenceScore_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdvancedOcrOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_.getUnmodifiableView(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index to set the value at. - * @param value The advancedOcrOptions to set. - * @return This builder for chaining. - */ - public Builder setAdvancedOcrOptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param values The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAllAdvancedOcrOptions( - java.lang.Iterable values) { - ensureAdvancedOcrOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, advancedOcrOptions_); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return This builder for chaining. - */ - public Builder clearAdvancedOcrOptions() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The bytes of the advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.TextDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextDetectionParams) - private static final com.google.cloud.vision.v1p3beta1.TextDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.TextDetectionParams(); - } - - public static com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java deleted file mode 100644 index 3b8eedebf1a3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextDetectionParamsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface TextDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.TextDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - boolean getEnableTextDetectionConfidenceScore(); - - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - java.util.List - getAdvancedOcrOptionsList(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - int getAdvancedOcrOptionsCount(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - java.lang.String getAdvancedOcrOptions(int index); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java deleted file mode 100644 index 180b0d570a95..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `UpdateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductRequest} - */ -public final class UpdateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.UpdateProductRequest) - UpdateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductRequest.newBuilder() to construct. - private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p3beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductRequest.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.Product product_; - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.UpdateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductRequest) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.UpdateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.UpdateProductRequest) - com.google.cloud.vision.v1p3beta1.UpdateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductRequest build() { - com.google.cloud.vision.v1p3beta1.UpdateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.UpdateProductRequest result = new com.google.cloud.vision.v1p3beta1.UpdateProductRequest(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.UpdateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.UpdateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.UpdateProductRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.UpdateProductRequest.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.UpdateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.UpdateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1p3beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1p3beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p3beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p3beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p3beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) - private static final com.google.cloud.vision.v1p3beta1.UpdateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.UpdateProductRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java deleted file mode 100644 index a7115ee346b2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface UpdateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.UpdateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1p3beta1.Product getProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p3beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java deleted file mode 100644 index 3488a6498dc5..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java +++ /dev/null @@ -1,937 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Request message for the `UpdateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductSetRequest} - */ -public final class UpdateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - UpdateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductSetRequest.newBuilder() to construct. - private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductSetRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.Builder.class); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (productSet_ != null) { - output.writeMessage(1, getProductSet()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProductSet()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) obj; - - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.UpdateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p3beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest build() { - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest buildPartial() { - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest result = new com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest(this); - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest other) { - if (other == com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest.getDefaultInstance()) return this; - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1p3beta1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1p3beta1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1p3beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1p3beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1p3beta1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - private static final com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest(); - } - - public static com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java deleted file mode 100644 index 9ee7743a6987..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/product_search_service.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface UpdateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1p3beta1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p3beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java deleted file mode 100644 index 45b59ccaba1a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the vertex coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Vertex} - */ -public final class Vertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Vertex) - VertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use Vertex.newBuilder() to construct. - private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Vertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Vertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - x_ = input.readInt32(); - break; - } - case 16: { - - y_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Vertex.class, com.google.cloud.vision.v1p3beta1.Vertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private int x_; - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private int y_; - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (x_ != 0) { - output.writeInt32(1, x_); - } - if (y_ != 0) { - output.writeInt32(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, x_); - } - if (y_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Vertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Vertex other = (com.google.cloud.vision.v1p3beta1.Vertex) obj; - - if (getX() - != other.getX()) return false; - if (getY() - != other.getY()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX(); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Vertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the vertex coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Vertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Vertex) - com.google.cloud.vision.v1p3beta1.VertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Vertex.class, com.google.cloud.vision.v1p3beta1.Vertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Vertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0; - - y_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.GeometryProto.internal_static_google_cloud_vision_v1p3beta1_Vertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Vertex build() { - com.google.cloud.vision.v1p3beta1.Vertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Vertex buildPartial() { - com.google.cloud.vision.v1p3beta1.Vertex result = new com.google.cloud.vision.v1p3beta1.Vertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Vertex) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Vertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Vertex other) { - if (other == com.google.cloud.vision.v1p3beta1.Vertex.getDefaultInstance()) return this; - if (other.getX() != 0) { - setX(other.getX()); - } - if (other.getY() != 0) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Vertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Vertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(int value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0; - onChanged(); - return this; - } - - private int y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Vertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Vertex) - private static final com.google.cloud.vision.v1p3beta1.Vertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Vertex(); - } - - public static com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Vertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Vertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Vertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java deleted file mode 100644 index f1a73eebcad1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/VertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/geometry.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface VertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Vertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - int getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - int getY(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java deleted file mode 100644 index 1f4bd5944e98..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java +++ /dev/null @@ -1,7537 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/web_detection.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Relevant information for the image from the Internet.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection} - */ -public final class WebDetection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection) - WebDetectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetection.newBuilder() to construct. - private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetection() { - webEntities_ = java.util.Collections.emptyList(); - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - visuallySimilarImages_ = java.util.Collections.emptyList(); - bestGuessLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - webEntities_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pagesWithMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - visuallySimilarImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bestGuessLabels_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.class, com.google.cloud.vision.v1p3beta1.WebDetection.Builder.class); - } - - public interface WebEntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - *
-   * Entity deduced from similar images on the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebEntity} - */ - public static final class WebEntity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - WebEntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebEntity.newBuilder() to construct. - private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebEntity() { - entityId_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebEntity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebEntity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - entityId_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object entityId_; - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Entity deduced from similar images on the Internet.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebEntity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - entityId_ = ""; - - score_ = 0F; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity build() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity(this); - result.entityId_ = entityId_; - result.score_ = score_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object entityId_ = ""; - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - entityId_ = value; - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - - entityId_ = getDefaultInstance().getEntityId(); - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - entityId_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebEntity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebEntity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Metadata for online images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebImage} - */ - public static final class WebImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - WebImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebImage.newBuilder() to construct. - private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebImage() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for online images.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage build() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebImage(this); - result.url_ = url_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebImage(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebPageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - java.lang.String getPageTitle(); - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - com.google.protobuf.ByteString - getPageTitleBytes(); - - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - int getFullMatchingImagesCount(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - int getPartialMatchingImagesCount(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - } - /** - *
-   * Metadata for web pages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebPage} - */ - public static final class WebPage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - WebPageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebPage.newBuilder() to construct. - private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebPage() { - url_ = ""; - pageTitle_ = ""; - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebPage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebPage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageTitle_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PAGE_TITLE_FIELD_NUMBER = 3; - private volatile java.lang.Object pageTitle_; - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - @java.lang.Override - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } - } - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List fullMatchingImages_; - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; - private java.util.List partialMatchingImages_; - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(5, partialMatchingImages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, partialMatchingImages_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebPage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getPageTitle() - .equals(other.getPageTitle())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; - hash = (53 * hash) + getPageTitle().hashCode(); - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for web pages.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebPage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - pageTitle_ = ""; - - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage build() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebPage(this); - int from_bitField0_ = bitField0_; - result.url_ = url_; - result.score_ = score_; - result.pageTitle_ = pageTitle_; - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebPage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getPageTitle().isEmpty()) { - pageTitle_ = other.pageTitle_; - onChanged(); - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object pageTitle_ = ""; - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageTitle_ = value; - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return This builder for chaining. - */ - public Builder clearPageTitle() { - - pageTitle_ = getDefaultInstance().getPageTitle(); - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The bytes for pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageTitle_ = value; - onChanged(); - return this; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebPage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebPage(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebPage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebPage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - } - /** - *
-   * Label to provide extra metadata for the web detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebLabel} - */ - public static final class WebLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) - WebLabelOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebLabel.newBuilder() to construct. - private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebLabel() { - label_ = ""; - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - private volatile java.lang.Object label_; - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) obj; - - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Label to provide extra metadata for the web detection.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection.WebLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - label_ = ""; - - languageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel build() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel(this); - result.label_ = label_; - result.languageCode_ = languageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()) return this; - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebLabel) - private static final com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int WEB_ENTITIES_FIELD_NUMBER = 1; - private java.util.List webEntities_; - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List getWebEntitiesList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List - getWebEntitiesOrBuilderList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public int getWebEntitiesCount() { - return webEntities_.size(); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index) { - return webEntities_.get(index); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - return webEntities_.get(index); - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; - private java.util.List fullMatchingImages_; - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; - private java.util.List partialMatchingImages_; - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List pagesWithMatchingImages_; - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List getPagesWithMatchingImagesList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public int getPagesWithMatchingImagesCount() { - return pagesWithMatchingImages_.size(); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - return pagesWithMatchingImages_.get(index); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - return pagesWithMatchingImages_.get(index); - } - - public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; - private java.util.List visuallySimilarImages_; - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List getVisuallySimilarImagesList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public int getVisuallySimilarImagesCount() { - return visuallySimilarImages_.size(); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - return visuallySimilarImages_.get(index); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - return visuallySimilarImages_.get(index); - } - - public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; - private java.util.List bestGuessLabels_; - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List getBestGuessLabelsList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List - getBestGuessLabelsOrBuilderList() { - return bestGuessLabels_; - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public int getBestGuessLabelsCount() { - return bestGuessLabels_.size(); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - return bestGuessLabels_.get(index); - } - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - return bestGuessLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < webEntities_.size(); i++) { - output.writeMessage(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - output.writeMessage(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - output.writeMessage(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - output.writeMessage(8, bestGuessLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < webEntities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, bestGuessLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetection)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetection other = (com.google.cloud.vision.v1p3beta1.WebDetection) obj; - - if (!getWebEntitiesList() - .equals(other.getWebEntitiesList())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!getPagesWithMatchingImagesList() - .equals(other.getPagesWithMatchingImagesList())) return false; - if (!getVisuallySimilarImagesList() - .equals(other.getVisuallySimilarImagesList())) return false; - if (!getBestGuessLabelsList() - .equals(other.getBestGuessLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWebEntitiesCount() > 0) { - hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getWebEntitiesList().hashCode(); - } - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - if (getPagesWithMatchingImagesCount() > 0) { - hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); - } - if (getVisuallySimilarImagesCount() > 0) { - hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); - } - if (getBestGuessLabelsCount() > 0) { - hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getBestGuessLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Relevant information for the image from the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetection) - com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetection.class, com.google.cloud.vision.v1p3beta1.WebDetection.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWebEntitiesFieldBuilder(); - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - getPagesWithMatchingImagesFieldBuilder(); - getVisuallySimilarImagesFieldBuilder(); - getBestGuessLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - webEntitiesBuilder_.clear(); - } - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - partialMatchingImagesBuilder_.clear(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - visuallySimilarImagesBuilder_.clear(); - } - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection build() { - com.google.cloud.vision.v1p3beta1.WebDetection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetection result = new com.google.cloud.vision.v1p3beta1.WebDetection(this); - int from_bitField0_ = bitField0_; - if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.webEntities_ = webEntities_; - } else { - result.webEntities_ = webEntitiesBuilder_.build(); - } - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.pagesWithMatchingImages_ = pagesWithMatchingImages_; - } else { - result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); - } - if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.visuallySimilarImages_ = visuallySimilarImages_; - } else { - result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); - } - if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bestGuessLabels_ = bestGuessLabels_; - } else { - result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetection) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetection other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetection.getDefaultInstance()) return this; - if (webEntitiesBuilder_ == null) { - if (!other.webEntities_.isEmpty()) { - if (webEntities_.isEmpty()) { - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWebEntitiesIsMutable(); - webEntities_.addAll(other.webEntities_); - } - onChanged(); - } - } else { - if (!other.webEntities_.isEmpty()) { - if (webEntitiesBuilder_.isEmpty()) { - webEntitiesBuilder_.dispose(); - webEntitiesBuilder_ = null; - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - webEntitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWebEntitiesFieldBuilder() : null; - } else { - webEntitiesBuilder_.addAllMessages(other.webEntities_); - } - } - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImages_.isEmpty()) { - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); - } - onChanged(); - } - } else { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImagesBuilder_.isEmpty()) { - pagesWithMatchingImagesBuilder_.dispose(); - pagesWithMatchingImagesBuilder_ = null; - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - pagesWithMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesWithMatchingImagesFieldBuilder() : null; - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); - } - } - } - if (visuallySimilarImagesBuilder_ == null) { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImages_.isEmpty()) { - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.addAll(other.visuallySimilarImages_); - } - onChanged(); - } - } else { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImagesBuilder_.isEmpty()) { - visuallySimilarImagesBuilder_.dispose(); - visuallySimilarImagesBuilder_ = null; - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - visuallySimilarImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVisuallySimilarImagesFieldBuilder() : null; - } else { - visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); - } - } - } - if (bestGuessLabelsBuilder_ == null) { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabels_.isEmpty()) { - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.addAll(other.bestGuessLabels_); - } - onChanged(); - } - } else { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabelsBuilder_.isEmpty()) { - bestGuessLabelsBuilder_.dispose(); - bestGuessLabelsBuilder_ = null; - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - bestGuessLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBestGuessLabelsFieldBuilder() : null; - } else { - bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List webEntities_ = - java.util.Collections.emptyList(); - private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(webEntities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; - - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List getWebEntitiesList() { - if (webEntitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webEntities_); - } else { - return webEntitiesBuilder_.getMessageList(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public int getWebEntitiesCount() { - if (webEntitiesBuilder_ == null) { - return webEntities_.size(); - } else { - return webEntitiesBuilder_.getCount(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); - } else { - return webEntitiesBuilder_.getMessage(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.set(index, value); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.set(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities(com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(index, value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addAllWebEntities( - java.lang.Iterable values) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, webEntities_); - onChanged(); - } else { - webEntitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder clearWebEntities() { - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - webEntitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder removeWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.remove(index); - onChanged(); - } else { - webEntitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); } else { - return webEntitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesOrBuilderList() { - if (webEntitiesBuilder_ != null) { - return webEntitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webEntities_); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { - return getWebEntitiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesBuilderList() { - return getWebEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder> - getWebEntitiesFieldBuilder() { - if (webEntitiesBuilder_ == null) { - webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - webEntities_ = null; - } - return webEntitiesBuilder_; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - - private java.util.List pagesWithMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; - - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List getPagesWithMatchingImagesList() { - if (pagesWithMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } else { - return pagesWithMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public int getPagesWithMatchingImagesCount() { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.size(); - } else { - return pagesWithMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); - } else { - return pagesWithMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addAllPagesWithMatchingImages( - java.lang.Iterable values) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pagesWithMatchingImages_); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder clearPagesWithMatchingImages() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder removePagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.remove(index); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); } else { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - if (pagesWithMatchingImagesBuilder_ != null) { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesBuilderList() { - return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder> - getPagesWithMatchingImagesFieldBuilder() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage, com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder>( - pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - pagesWithMatchingImages_ = null; - } - return pagesWithMatchingImagesBuilder_; - } - - private java.util.List visuallySimilarImages_ = - java.util.Collections.emptyList(); - private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; - - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List getVisuallySimilarImagesList() { - if (visuallySimilarImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } else { - return visuallySimilarImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public int getVisuallySimilarImagesCount() { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.size(); - } else { - return visuallySimilarImagesBuilder_.getCount(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); - } else { - return visuallySimilarImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addAllVisuallySimilarImages( - java.lang.Iterable values) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visuallySimilarImages_); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder clearVisuallySimilarImages() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - visuallySimilarImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder removeVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.remove(index); - onChanged(); - } else { - visuallySimilarImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); } else { - return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - if (visuallySimilarImagesBuilder_ != null) { - return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesBuilderList() { - return getVisuallySimilarImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder> - getVisuallySimilarImagesFieldBuilder() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage, com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( - visuallySimilarImages_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - visuallySimilarImages_ = null; - } - return visuallySimilarImagesBuilder_; - } - - private java.util.List bestGuessLabels_ = - java.util.Collections.emptyList(); - private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; - - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List getBestGuessLabelsList() { - if (bestGuessLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } else { - return bestGuessLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public int getBestGuessLabelsCount() { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.size(); - } else { - return bestGuessLabelsBuilder_.getCount(); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); - } else { - return bestGuessLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels(com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addAllBestGuessLabels( - java.lang.Iterable values) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bestGuessLabels_); - onChanged(); - } else { - bestGuessLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder clearBestGuessLabels() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder removeBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.remove(index); - onChanged(); - } else { - bestGuessLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); } else { - return bestGuessLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsOrBuilderList() { - if (bestGuessLabelsBuilder_ != null) { - return bestGuessLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { - return getBestGuessLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * Best guess text labels for the request image.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsBuilderList() { - return getBestGuessLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder> - getBestGuessLabelsFieldBuilder() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder>( - bestGuessLabels_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - bestGuessLabels_ = null; - } - return bestGuessLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection) - private static final com.google.cloud.vision.v1p3beta1.WebDetection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetection(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java deleted file mode 100644 index d4d1d2ed6404..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionOrBuilder.java +++ /dev/null @@ -1,288 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/web_detection.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface WebDetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity getWebEntities(int index); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - int getWebEntitiesCount(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesOrBuilderList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index); - - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - int getFullMatchingImagesCount(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - int getPartialMatchingImagesCount(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - int getPagesWithMatchingImagesCount(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesOrBuilderList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index); - - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImage getVisuallySimilarImages(int index); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - int getVisuallySimilarImagesCount(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesOrBuilderList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index); - - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel getBestGuessLabels(int index); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - int getBestGuessLabelsCount(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsOrBuilderList(); - /** - *
-   * Best guess text labels for the request image.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java deleted file mode 100644 index 226d434498fb..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * Parameters for web detection request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetectionParams} - */ -public final class WebDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.WebDetectionParams) - WebDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetectionParams.newBuilder() to construct. - private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetectionParams() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - includeGeoResults_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetectionParams.class, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder.class); - } - - public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; - private boolean includeGeoResults_; - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (includeGeoResults_ != false) { - output.writeBool(2, includeGeoResults_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGeoResults_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeGeoResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.WebDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.WebDetectionParams other = (com.google.cloud.vision.v1p3beta1.WebDetectionParams) obj; - - if (getIncludeGeoResults() - != other.getIncludeGeoResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeGeoResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.WebDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for web detection request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.WebDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.WebDetectionParams) - com.google.cloud.vision.v1p3beta1.WebDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.WebDetectionParams.class, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.WebDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - includeGeoResults_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParams build() { - com.google.cloud.vision.v1p3beta1.WebDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParams buildPartial() { - com.google.cloud.vision.v1p3beta1.WebDetectionParams result = new com.google.cloud.vision.v1p3beta1.WebDetectionParams(this); - result.includeGeoResults_ = includeGeoResults_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.WebDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.WebDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.WebDetectionParams other) { - if (other == com.google.cloud.vision.v1p3beta1.WebDetectionParams.getDefaultInstance()) return this; - if (other.getIncludeGeoResults() != false) { - setIncludeGeoResults(other.getIncludeGeoResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.WebDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.WebDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean includeGeoResults_ ; - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @param value The includeGeoResults to set. - * @return This builder for chaining. - */ - public Builder setIncludeGeoResults(boolean value) { - - includeGeoResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeGeoResults() { - - includeGeoResults_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.WebDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetectionParams) - private static final com.google.cloud.vision.v1p3beta1.WebDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.WebDetectionParams(); - } - - public static com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.WebDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java deleted file mode 100644 index 75f49a3fbff7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParamsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/image_annotator.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface WebDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.WebDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - boolean getIncludeGeoResults(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java deleted file mode 100644 index 3d64a2139492..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionProto.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/web_detection.proto - -package com.google.cloud.vision.v1p3beta1; - -public final class WebDetectionProto { - private WebDetectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/vision/v1p3beta1/web_dete" + - "ction.proto\022\035google.cloud.vision.v1p3bet" + - "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + - "\01325.google.cloud.vision.v1p3beta1.WebDet" + - "ection.WebEntity\022R\n\024full_matching_images" + - "\030\002 \003(\01324.google.cloud.vision.v1p3beta1.W" + - "ebDetection.WebImage\022U\n\027partial_matching" + - "_images\030\003 \003(\01324.google.cloud.vision.v1p3" + - "beta1.WebDetection.WebImage\022W\n\032pages_wit" + - "h_matching_images\030\004 \003(\01323.google.cloud.v" + - "ision.v1p3beta1.WebDetection.WebPage\022U\n\027" + - "visually_similar_images\030\006 \003(\01324.google.c" + - "loud.vision.v1p3beta1.WebDetection.WebIm" + - "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + - "cloud.vision.v1p3beta1.WebDetection.WebL" + - "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + - "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + - "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + - "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + - "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + - "(\01324.google.cloud.vision.v1p3beta1.WebDe" + - "tection.WebImage\022U\n\027partial_matching_ima" + - "ges\030\005 \003(\01324.google.cloud.vision.v1p3beta" + - "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + - "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\200\001\n!co" + - "m.google.cloud.vision.v1p3beta1B\021WebDete" + - "ctionProtoP\001ZCgoogle.golang.org/genproto" + - "/googleapis/cloud/vision/v1p3beta1;visio" + - "n\370\001\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor, - new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor = - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebEntity_descriptor, - new java.lang.String[] { "EntityId", "Score", "Description", }); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor = - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebImage_descriptor, - new java.lang.String[] { "Url", "Score", }); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor = - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebPage_descriptor, - new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor = - internal_static_google_cloud_vision_v1p3beta1_WebDetection_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p3beta1_WebDetection_WebLabel_descriptor, - new java.lang.String[] { "Label", "LanguageCode", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java deleted file mode 100644 index 51f927e0f9ca..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java +++ /dev/null @@ -1,1617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -/** - *
- * A word representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Word} - */ -public final class Word extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.Word) - WordOrBuilder { -private static final long serialVersionUID = 0L; - // Use Word.newBuilder() to construct. - private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Word() { - symbols_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Word(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Word( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p3beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - symbols_.add( - input.readMessage(com.google.cloud.vision.v1p3beta1.Symbol.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Word.class, com.google.cloud.vision.v1p3beta1.Word.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SYMBOLS_FIELD_NUMBER = 3; - private java.util.List symbols_; - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List getSymbolsList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List - getSymbolsOrBuilderList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - @java.lang.Override - public int getSymbolsCount() { - return symbols_.size(); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index) { - return symbols_.get(index); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - return symbols_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - output.writeMessage(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p3beta1.Word)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p3beta1.Word other = (com.google.cloud.vision.v1p3beta1.Word) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getSymbolsList() - .equals(other.getSymbolsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getSymbolsCount() > 0) { - hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; - hash = (53 * hash) + getSymbolsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Word parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Word parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p3beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.Word prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A word representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p3beta1.Word} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.Word) - com.google.cloud.vision.v1p3beta1.WordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p3beta1.Word.class, com.google.cloud.vision.v1p3beta1.Word.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p3beta1.Word.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSymbolsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - symbolsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p3beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p3beta1_Word_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Word getDefaultInstanceForType() { - return com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Word build() { - com.google.cloud.vision.v1p3beta1.Word result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Word buildPartial() { - com.google.cloud.vision.v1p3beta1.Word result = new com.google.cloud.vision.v1p3beta1.Word(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.symbols_ = symbols_; - } else { - result.symbols_ = symbolsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p3beta1.Word) { - return mergeFrom((com.google.cloud.vision.v1p3beta1.Word)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.Word other) { - if (other == com.google.cloud.vision.v1p3beta1.Word.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (symbolsBuilder_ == null) { - if (!other.symbols_.isEmpty()) { - if (symbols_.isEmpty()) { - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSymbolsIsMutable(); - symbols_.addAll(other.symbols_); - } - onChanged(); - } - } else { - if (!other.symbols_.isEmpty()) { - if (symbolsBuilder_.isEmpty()) { - symbolsBuilder_.dispose(); - symbolsBuilder_ = null; - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - symbolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSymbolsFieldBuilder() : null; - } else { - symbolsBuilder_.addAllMessages(other.symbols_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p3beta1.Word parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p3beta1.Word) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p3beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertice order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List symbols_ = - java.util.Collections.emptyList(); - private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(symbols_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder> symbolsBuilder_; - - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public java.util.List getSymbolsList() { - if (symbolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbols_); - } else { - return symbolsBuilder_.getMessageList(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public int getSymbolsCount() { - if (symbolsBuilder_ == null) { - return symbols_.size(); - } else { - return symbolsBuilder_.getCount(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); - } else { - return symbolsBuilder_.getMessage(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p3beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.set(index, value); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.set(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder addSymbols(com.google.cloud.vision.v1p3beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(value); - onChanged(); - } else { - symbolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p3beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(index, value); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p3beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder addAllSymbols( - java.lang.Iterable values) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbols_); - onChanged(); - } else { - symbolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder clearSymbols() { - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - symbolsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public Builder removeSymbols(int index) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.remove(index); - onChanged(); - } else { - symbolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p3beta1.Symbol.Builder getSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); } else { - return symbolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsOrBuilderList() { - if (symbolsBuilder_ != null) { - return symbolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(symbols_); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p3beta1.Symbol.Builder addSymbolsBuilder() { - return getSymbolsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p3beta1.Symbol.Builder addSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p3beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsBuilderList() { - return getSymbolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder> - getSymbolsFieldBuilder() { - if (symbolsBuilder_ == null) { - symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - symbols_ = null; - } - return symbolsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.Word) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Word) - private static final com.google.cloud.vision.v1p3beta1.Word DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.Word(); - } - - public static com.google.cloud.vision.v1p3beta1.Word getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Word parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Word(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p3beta1.Word getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java deleted file mode 100644 index 70ccd560f6c4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WordOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p3beta1/text_annotation.proto - -package com.google.cloud.vision.v1p3beta1; - -public interface WordOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.Word) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p3beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertice order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p3beta1.Symbol getSymbols(int index); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - int getSymbolsCount(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsOrBuilderList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p3beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p3beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto deleted file mode 100644 index c2c524fb559a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/geometry.proto +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; -option objc_class_prefix = "GCVN"; - -// A vertex represents a 2D point in the image. -// NOTE: the vertex coordinates are in the same scale as the original image. -message Vertex { - // X coordinate. - int32 x = 1; - - // Y coordinate. - int32 y = 2; -} - -// A vertex represents a 2D point in the image. -// NOTE: the normalized vertex coordinates are relative to the original image -// and range from 0 to 1. -message NormalizedVertex { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; -} - -// A bounding polygon for the detected image annotation. -message BoundingPoly { - // The bounding polygon vertices. - repeated Vertex vertices = 1; - - // The bounding polygon normalized vertices. - repeated NormalizedVertex normalized_vertices = 2; -} - -// A 3D position in the image, used primarily for Face detection landmarks. -// A valid Position must have both x and y coordinates. -// The position coordinates are in the same scale as the original image. -message Position { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; - - // Z coordinate (or depth). - float z = 3; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto deleted file mode 100644 index ebab14a6b115..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/image_annotator.proto +++ /dev/null @@ -1,833 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/vision/v1p3beta1/geometry.proto"; -import "google/cloud/vision/v1p3beta1/product_search.proto"; -import "google/cloud/vision/v1p3beta1/text_annotation.proto"; -import "google/cloud/vision/v1p3beta1/web_detection.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/color.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ImageAnnotatorProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; - -// Service that performs Google Cloud Vision API detection tasks over client -// images, such as face, landmark, logo, label, and text detection. The -// ImageAnnotator service returns detected entities from the images. -service ImageAnnotator { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { - option (google.api.http) = { - post: "/v1p3beta1/images:annotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - } - - // Run asynchronous image detection and annotation for a list of generic - // files, such as PDF files, which may contain multiple pages and multiple - // images per page. Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p3beta1/files:asyncBatchAnnotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateFilesResponse" - metadata_type: "OperationMetadata" - }; - } -} - -// The type of Google Cloud Vision API detection to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message Feature { - // Type of Google Cloud Vision API feature to be extracted. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run face detection. - FACE_DETECTION = 1; - - // Run landmark detection. - LANDMARK_DETECTION = 2; - - // Run logo detection. - LOGO_DETECTION = 3; - - // Run label detection. - LABEL_DETECTION = 4; - - // Run text detection / optical character recognition (OCR). Text detection - // is optimized for areas of text within a larger image; if the image is - // a document, use `DOCUMENT_TEXT_DETECTION` instead. - TEXT_DETECTION = 5; - - // Run dense text document OCR. Takes precedence when both - // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - DOCUMENT_TEXT_DETECTION = 11; - - // Run Safe Search to detect potentially unsafe - // or undesirable content. - SAFE_SEARCH_DETECTION = 6; - - // Compute a set of image properties, such as the - // image's dominant colors. - IMAGE_PROPERTIES = 7; - - // Run crop hints. - CROP_HINTS = 9; - - // Run web detection. - WEB_DETECTION = 10; - - // Run Product Search. - PRODUCT_SEARCH = 12; - - // Run localizer for object detection. - OBJECT_LOCALIZATION = 19; - } - - // The feature type. - Type type = 1; - - // Maximum number of results of this type. Does not apply to - // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - int32 max_results = 2; - - // Model to use for the feature. - // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - // support "builtin/weekly" for the bleeding edge release updated weekly. - string model = 3; -} - -// External image source (Google Cloud Storage or web URL image location). -message ImageSource { - // **Use `image_uri` instead.** - // - // The Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - string gcs_image_uri = 1; - - // The URI of the source image. Can be either: - // - // 1. A Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more - // info. - // - // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - // HTTP/HTTPS URLs, Google cannot guarantee that the request will be - // completed. Your request may fail if the specified host denies the - // request (e.g. due to request throttling or DOS prevention), or if Google - // throttles requests to the site for abuse prevention. You should not - // depend on externally-hosted images for production applications. - // - // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - // precedence. - string image_uri = 2; -} - -// Client image to perform Google Cloud Vision API tasks over. -message Image { - // Image content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - bytes content = 1; - - // Google Cloud Storage image location, or publicly-accessible image - // URL. If both `content` and `source` are provided for an image, `content` - // takes precedence and is used to perform the image annotation request. - ImageSource source = 2; -} - -// A face annotation object contains the results of face detection. -message FaceAnnotation { - // A face-specific landmark (for example, a face feature). - message Landmark { - // Face landmark (feature) type. - // Left and right are defined from the vantage of the viewer of the image - // without considering mirror projections typical of photos. So, `LEFT_EYE`, - // typically, is the person's right eye. - enum Type { - // Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0; - - // Left eye. - LEFT_EYE = 1; - - // Right eye. - RIGHT_EYE = 2; - - // Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3; - - // Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4; - - // Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5; - - // Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6; - - // Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7; - - // Nose tip. - NOSE_TIP = 8; - - // Upper lip. - UPPER_LIP = 9; - - // Lower lip. - LOWER_LIP = 10; - - // Mouth left. - MOUTH_LEFT = 11; - - // Mouth right. - MOUTH_RIGHT = 12; - - // Mouth center. - MOUTH_CENTER = 13; - - // Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14; - - // Nose, bottom left. - NOSE_BOTTOM_LEFT = 15; - - // Nose, bottom center. - NOSE_BOTTOM_CENTER = 16; - - // Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17; - - // Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18; - - // Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19; - - // Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20; - - // Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21; - - // Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22; - - // Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23; - - // Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24; - - // Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25; - - // Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - - // Left ear tragion. - LEFT_EAR_TRAGION = 27; - - // Right ear tragion. - RIGHT_EAR_TRAGION = 28; - - // Left eye pupil. - LEFT_EYE_PUPIL = 29; - - // Right eye pupil. - RIGHT_EYE_PUPIL = 30; - - // Forehead glabella. - FOREHEAD_GLABELLA = 31; - - // Chin gnathion. - CHIN_GNATHION = 32; - - // Chin left gonion. - CHIN_LEFT_GONION = 33; - - // Chin right gonion. - CHIN_RIGHT_GONION = 34; - } - - // Face landmark type. - Type type = 3; - - // Face landmark position. - Position position = 4; - } - - // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale, as returned in `ImageParams`. - // The bounding box is computed to "frame" the face in accordance with human - // expectations. It is based on the landmarker results. - // Note that one or more x and/or y coordinates may not be generated in the - // `BoundingPoly` (the polygon will be unbounded) if only a partial face - // appears in the image to be annotated. - BoundingPoly bounding_poly = 1; - - // The `fd_bounding_poly` bounding polygon is tighter than the - // `boundingPoly`, and encloses only the skin part of the face. Typically, it - // is used to eliminate the face from any image analysis that detects the - // "amount of skin" visible in an image. It is not based on the - // landmarker results, only on the initial face detection, hence - // the fd (face detection) prefix. - BoundingPoly fd_bounding_poly = 2; - - // Detected face landmarks. - repeated Landmark landmarks = 3; - - // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - // of the face relative to the image vertical about the axis perpendicular to - // the face. Range [-180,180]. - float roll_angle = 4; - - // Yaw angle, which indicates the leftward/rightward angle that the face is - // pointing relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - float pan_angle = 5; - - // Pitch angle, which indicates the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - float tilt_angle = 6; - - // Detection confidence. Range [0, 1]. - float detection_confidence = 7; - - // Face landmarking confidence. Range [0, 1]. - float landmarking_confidence = 8; - - // Joy likelihood. - Likelihood joy_likelihood = 9; - - // Sorrow likelihood. - Likelihood sorrow_likelihood = 10; - - // Anger likelihood. - Likelihood anger_likelihood = 11; - - // Surprise likelihood. - Likelihood surprise_likelihood = 12; - - // Under-exposed likelihood. - Likelihood under_exposed_likelihood = 13; - - // Blurred likelihood. - Likelihood blurred_likelihood = 14; - - // Headwear likelihood. - Likelihood headwear_likelihood = 15; -} - -// Detected entity location information. -message LocationInfo { - // lat/long location coordinates. - google.type.LatLng lat_lng = 1; -} - -// A `Property` consists of a user-supplied name/value pair. -message Property { - // Name of the property. - string name = 1; - - // Value of the property. - string value = 2; - - // Value of numeric properties. - uint64 uint64_value = 3; -} - -// Set of detected entity features. -message EntityAnnotation { - // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search - // API](https://developers.google.com/knowledge-graph/). - string mid = 1; - - // The language code for the locale in which the entity textual - // `description` is expressed. - string locale = 2; - - // Entity textual description, expressed in its `locale` language. - string description = 3; - - // Overall score of the result. Range [0, 1]. - float score = 4; - - // **Deprecated. Use `score` instead.** - // The accuracy of the entity detection in an image. - // For example, for an image in which the "Eiffel Tower" entity is detected, - // this field represents the confidence that there is a tower in the query - // image. Range [0, 1]. - float confidence = 5; - - // The relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of "tower" is likely higher to an image - // containing the detected "Eiffel Tower" than to an image containing a - // detected distant towering building, even though the confidence that - // there is a tower in each image may be the same. Range [0, 1]. - float topicality = 6; - - // Image region to which this entity belongs. Not produced - // for `LABEL_DETECTION` features. - BoundingPoly bounding_poly = 7; - - // The location information for the detected entity. Multiple - // `LocationInfo` elements can be present because one location may - // indicate the location of the scene in the image, and another location - // may indicate the location of the place where the image was taken. - // Location information is usually present for landmarks. - repeated LocationInfo locations = 8; - - // Some entities may have optional user-supplied `Property` (name/value) - // fields, such a score or string that qualifies the entity. - repeated Property properties = 9; -} - -// Set of detected objects with bounding boxes. -message LocalizedObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - - // Image region to which this object belongs. This must be populated. - BoundingPoly bounding_poly = 5; -} - -// Set of features pertaining to the image, computed by computer vision -// methods over safe-search verticals (for example, adult, spoof, medical, -// violence). -message SafeSearchAnnotation { - // Represents the adult content likelihood for the image. Adult content may - // contain elements such as nudity, pornographic images or cartoons, or - // sexual activities. - Likelihood adult = 1; - - // Spoof likelihood. The likelihood that an modification - // was made to the image's canonical version to make it appear - // funny or offensive. - Likelihood spoof = 2; - - // Likelihood that this is a medical image. - Likelihood medical = 3; - - // Likelihood that this image contains violent content. - Likelihood violence = 4; - - // Likelihood that the request image contains racy content. Racy content may - // include (but is not limited to) skimpy or sheer clothing, strategically - // covered nudity, lewd or provocative poses, or close-ups of sensitive - // body areas. - Likelihood racy = 9; -} - -// Rectangle determined by min and max `LatLng` pairs. -message LatLongRect { - // Min lat/long pair. - google.type.LatLng min_lat_lng = 1; - - // Max lat/long pair. - google.type.LatLng max_lat_lng = 2; -} - -// Color information consists of RGB channels, score, and the fraction of -// the image that the color occupies in the image. -message ColorInfo { - // RGB components of the color. - google.type.Color color = 1; - - // Image-specific score for this color. Value in range [0, 1]. - float score = 2; - - // The fraction of pixels the color occupies in the image. - // Value in range [0, 1]. - float pixel_fraction = 3; -} - -// Set of dominant colors and their corresponding scores. -message DominantColorsAnnotation { - // RGB color values with their score and pixel fraction. - repeated ColorInfo colors = 1; -} - -// Stores image properties, such as dominant colors. -message ImageProperties { - // If present, dominant colors completed successfully. - DominantColorsAnnotation dominant_colors = 1; -} - -// Single crop hint that is used to generate a new crop when serving an image. -message CropHint { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale, as returned in `ImageParams`. - BoundingPoly bounding_poly = 1; - - // Confidence of this being a salient region. Range [0, 1]. - float confidence = 2; - - // Fraction of importance of this salient region with respect to the original - // image. - float importance_fraction = 3; -} - -// Set of crop hints that are used to generate new crops when serving images. -message CropHintsAnnotation { - // Crop hint results. - repeated CropHint crop_hints = 1; -} - -// Parameters for crop hints annotation request. -message CropHintsParams { - // Aspect ratios in floats, representing the ratio of the width to the height - // of the image. For example, if the desired aspect ratio is 4/3, the - // corresponding float value should be 1.33333. If not specified, the - // best possible crop is returned. The number of provided aspect ratios is - // limited to a maximum of 16; any aspect ratios provided after the 16th are - // ignored. - repeated float aspect_ratios = 1; -} - -// Parameters for web detection request. -message WebDetectionParams { - // Whether to include results derived from the geo information in the image. - bool include_geo_results = 2; -} - -// Parameters for text detections. This is used to control TEXT_DETECTION and -// DOCUMENT_TEXT_DETECTION features. -message TextDetectionParams { - - // By default, Cloud Vision API only includes confidence score for - // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - // score for TEXT_DETECTION as well. - bool enable_text_detection_confidence_score = 9; - - // A list of advanced OCR options to fine-tune OCR behavior. - repeated string advanced_ocr_options = 11; -} - -// Image context and/or feature-specific parameters. -message ImageContext { - // Not used. - LatLongRect lat_long_rect = 1; - - // List of languages to use for TEXT_DETECTION. In most cases, an empty value - // yields the best results since it enables automatic language detection. For - // languages based on the Latin alphabet, setting `language_hints` is not - // needed. In rare cases, when the language of the text in the image is known, - // setting a hint will help get better results (although it will be a - // significant hindrance if the hint is wrong). Text detection returns an - // error if one or more of the specified languages is not one of the - // [supported languages](https://cloud.google.com/vision/docs/languages). - repeated string language_hints = 2; - - // Parameters for crop hints annotation request. - CropHintsParams crop_hints_params = 4; - - // Parameters for product search. - google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5; - - // Parameters for web detection. - WebDetectionParams web_detection_params = 6; - - // Parameters for text detection and document text detection. - TextDetectionParams text_detection_params = 12; -} - -// Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features. -message AnnotateImageRequest { - // The image to be processed. - Image image = 1; - - // Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image. - ImageContext image_context = 3; -} - -// If an image was produced from a file (e.g. a PDF), this message gives -// information about the source of that image. -message ImageAnnotationContext { - // The URI of the file used to produce the image. - string uri = 1; - - // If the file was a PDF or TIFF, this field gives the page number within - // the file used to produce the image. - int32 page_number = 2; -} - -// Response to an image annotation request. -message AnnotateImageResponse { - // If present, face detection has completed successfully. - repeated FaceAnnotation face_annotations = 1; - - // If present, landmark detection has completed successfully. - repeated EntityAnnotation landmark_annotations = 2; - - // If present, logo detection has completed successfully. - repeated EntityAnnotation logo_annotations = 3; - - // If present, label detection has completed successfully. - repeated EntityAnnotation label_annotations = 4; - - // If present, localized object detection has completed successfully. - // This will be sorted descending by confidence score. - repeated LocalizedObjectAnnotation localized_object_annotations = 22; - - // If present, text (OCR) detection has completed successfully. - repeated EntityAnnotation text_annotations = 5; - - // If present, text (OCR) detection or document (OCR) text detection has - // completed successfully. - // This annotation provides the structural hierarchy for the OCR detected - // text. - TextAnnotation full_text_annotation = 12; - - // If present, safe-search annotation has completed successfully. - SafeSearchAnnotation safe_search_annotation = 6; - - // If present, image properties were extracted successfully. - ImageProperties image_properties_annotation = 8; - - // If present, crop hints have completed successfully. - CropHintsAnnotation crop_hints_annotation = 11; - - // If present, web detection has completed successfully. - WebDetection web_detection = 13; - - // If present, product search has completed successfully. - google.cloud.vision.v1p3beta1.ProductSearchResults product_search_results = - 14; - - // If set, represents the error message for the operation. - // Note that filled-in image annotations are guaranteed to be - // correct, even when `error` is set. - google.rpc.Status error = 9; - - // If present, contextual information is needed to understand where this image - // comes from. - ImageAnnotationContext context = 21; -} - -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. - repeated AnnotateImageResponse responses = 2; -} - -// Multiple image annotation requests are batched into a single service call. -message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to a batch image annotation request. -message BatchAnnotateImagesResponse { - // Individual responses to image annotation requests within the batch. - repeated AnnotateImageResponse responses = 1; -} - -// An offline file annotation request. -message AsyncAnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 4; -} - -// The response for a single offline file annotation request. -message AsyncAnnotateFileResponse { - // The output location and metadata from AsyncAnnotateFileRequest. - OutputConfig output_config = 1; -} - -// Multiple async file annotation requests are batched into a single service -// call. -message AsyncBatchAnnotateFilesRequest { - // Required. Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to an async batch file annotation request. -message AsyncBatchAnnotateFilesResponse { - // The list of file annotation responses, one for each request in - // AsyncBatchAnnotateFilesRequest. - repeated AsyncAnnotateFileResponse responses = 1; -} - -// The desired input location and metadata. -message InputConfig { - // The Google Cloud Storage location to read the input from. - GcsSource gcs_source = 1; - - // The type of the file. Currently only "application/pdf" and "image/tiff" - // are supported. Wildcards are not supported. - string mime_type = 2; -} - -// The desired output location and metadata. -message OutputConfig { - // The Google Cloud Storage location to write the output(s) to. - GcsDestination gcs_destination = 1; - - // The max number of response protos to put into each output JSON file on - // Google Cloud Storage. - // The valid range is [1, 100]. If not specified, the default value is 20. - // - // For example, for one pdf file with 100 pages, 100 response protos will - // be generated. If `batch_size` = 20, then 5 json files each - // containing 20 response protos will be written under the prefix - // `gcs_destination`.`uri`. - // - // Currently, batch_size only applies to GcsDestination, with potential future - // support for other output configurations. - int32 batch_size = 2; -} - -// The Google Cloud Storage location where the input will be read from. -message GcsSource { - // Google Cloud Storage URI for the input file. This must only be a - // Google Cloud Storage object. Wildcards are not currently supported. - string uri = 1; -} - -// The Google Cloud Storage location where the output will be written to. -message GcsDestination { - // Google Cloud Storage URI where the results will be stored. Results will - // be in JSON format and preceded by its corresponding input URI. This field - // can either represent a single file, or a prefix for multiple outputs. - // Prefixes must end in a `/`. - // - // Examples: - // - // * File: gs://bucket-name/filename.json - // * Prefix: gs://bucket-name/prefix/here/ - // * File: gs://bucket-name/prefix/here - // - // If multiple outputs, each response is still AnnotateFileResponse, each of - // which contains some subset of the full list of AnnotateImageResponse. - // Multiple outputs can happen if, for example, the output JSON is too large - // and overflows into multiple sharded files. - string uri = 1; -} - -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely that the image belongs to the specified vertical. - VERY_UNLIKELY = 1; - - // It is unlikely that the image belongs to the specified vertical. - UNLIKELY = 2; - - // It is possible that the image belongs to the specified vertical. - POSSIBLE = 3; - - // It is likely that the image belongs to the specified vertical. - LIKELY = 4; - - // It is very likely that the image belongs to the specified vertical. - VERY_LIKELY = 5; -} - -// Contains metadata for the BatchAnnotateImages operation. -message OperationMetadata { - // Batch operation states. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is received. - CREATED = 1; - - // Request is actively being processed. - RUNNING = 2; - - // The batch processing is done. - DONE = 3; - - // The batch processing was cancelled. - CANCELLED = 4; - } - // Current state of the batch operation. - State state = 1; - - // The time when the batch request was received. - google.protobuf.Timestamp create_time = 5; - - // The time when the operation result was last updated. - google.protobuf.Timestamp update_time = 6; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto deleted file mode 100644 index 86ea1a064f83..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - -import "google/api/resource.proto"; -import "google/cloud/vision/v1p3beta1/geometry.proto"; -import "google/cloud/vision/v1p3beta1/product_search_service.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; -option objc_class_prefix = "GCVN"; - -// Parameters for a product search request. -message ProductSearchParams { - // The bounding polygon around the area of interest in the image. - // If it is not specified, system discretion will be applied. - BoundingPoly bounding_poly = 9; - - // The resource name of a [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] to be searched for similar images. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6 [(google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - }]; - - // The list of product categories to search in. Currently, we only consider - // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - // "packagedgoods-v1", or "general-v1" should be specified. The legacy - // categories "homegoods", "apparel", and "toys" are still supported but will - // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - // or "toys-v2" for better product search accuracy. It is recommended to - // migrate existing products to these categories as well. - repeated string product_categories = 7; - - // The filtering expression. This can be used to restrict search results based - // on Product labels. We currently support an AND of OR of key-value - // expressions, where each expression within an OR must have the same key. An - // '=' should be used to connect the key and value. - // - // For example, "(color = red OR color = blue) AND brand = Google" is - // acceptable, but "(color = red OR brand = Google)" is not acceptable. - // "color: red" is not acceptable because it uses a ':' instead of an '='. - string filter = 8; -} - -// Results for a product search request. -message ProductSearchResults { - // Information about a product. - message Result { - // The Product. - Product product = 1; - - // A confidence level on the match, ranging from 0 (no confidence) to - // 1 (full confidence). - float score = 2; - - // The resource name of the image from the product that is the closest match - // to the query. - string image = 3; - } - - // Prediction for what the object in the bounding box is. - message ObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - } - - // Information about the products similar to a single product in a query - // image. - message GroupedResult { - // The bounding polygon around the product detected in the query image. - BoundingPoly bounding_poly = 1; - - // List of results, one for each product match. - repeated Result results = 2; - - // List of generic predictions for the object in the bounding box. - repeated ObjectAnnotation object_annotations = 3; - } - - // Timestamp of the index which provided these results. Products added to the - // product set and products removed from the product set after this time are - // not reflected in the current results. - google.protobuf.Timestamp index_time = 2; - - // List of results, one for each product match. - repeated Result results = 5; - - // List of results grouped by products detected in the query image. Each entry - // corresponds to one bounding polygon in the query image, and contains the - // matching products specific to that region. There may be duplicate product - // matches in the union of all the per-product results. - repeated GroupedResult product_grouped_results = 6; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto deleted file mode 100644 index daf1d0ddc5ec..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/product_search_service.proto +++ /dev/null @@ -1,971 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vision/v1p3beta1/geometry.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchServiceProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; - -// Manages Products and ProductSets of reference images for use in product -// search. It uses the following resource model: -// -// - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named -// `projects/*/locations/*/productSets/*`, which acts as a way to put different -// products into groups to limit identification. -// -// In parallel, -// -// - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named -// `projects/*/locations/*/products/*` -// -// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named -// `projects/*/locations/*/products/*/referenceImages/*` -service ProductSearch { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Creates and returns a new ProductSet resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - // 4096 characters. - rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" - body: "product_set" - }; - option (google.api.method_signature) = "parent,product_set,product_set_id"; - } - - // Lists ProductSets in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - // than 1. - rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { - option (google.api.http) = { - get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a ProductSet resource. - // Only display_name can be updated currently. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but - // missing from the request or longer than 4096 characters. - rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}" - body: "product_set" - }; - option (google.api.method_signature) = "product_set,update_mask"; - } - - // Permanently deletes a ProductSet. All Products and ReferenceImages in the - // ProductSet will be deleted. - // - // The actual image files are not deleted from Google Cloud Storage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - rpc DeleteProductSet(DeleteProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new product resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is missing or invalid. - rpc CreateProduct(CreateProductRequest) returns (Product) { - option (google.api.http) = { - post: "/v1p3beta1/{parent=projects/*/locations/*}/products" - body: "product" - }; - option (google.api.method_signature) = "parent,product,product_id"; - } - - // Lists products in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { - option (google.api.http) = { - get: "/v1p3beta1/{parent=projects/*/locations/*}/products" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a Product. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - rpc GetProduct(GetProductRequest) returns (Product) { - option (google.api.http) = { - get: "/v1p3beta1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a Product resource. - // Only display_name, description and labels can be updated right now. - // - // If labels are updated, the change will not be reflected in queries until - // the next index time. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - // missing from the request or longer than 4096 characters. - // * Returns INVALID_ARGUMENT if description is present in update_mask but is - // longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is present in update_mask. - rpc UpdateProduct(UpdateProductRequest) returns (Product) { - option (google.api.http) = { - patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}" - body: "product" - }; - option (google.api.method_signature) = "product,update_mask"; - } - - // Permanently deletes a product and its reference images. - // - // Metadata of the product and all its images will be deleted right away, but - // search queries against ProductSets containing the product may still work - // until all related caches are refreshed. - // - // Possible errors: - // - // * Returns NOT_FOUND if the product does not exist. - rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new ReferenceImage resource. - // - // The `bounding_poly` field is optional. If `bounding_poly` is not specified, - // the system will try to detect regions of interest in the image that are - // compatible with the product_category on the parent product. If it is - // specified, detection is ALWAYS skipped. The system converts polygons into - // non-rotated rectangles. - // - // Note that the pipeline will resize the image if the image resolution is too - // large to process (above 50MP). - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if the product does not exist. - // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - // compatible with the parent product's product_category is detected. - // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - rpc CreateReferenceImage(CreateReferenceImageRequest) - returns (ReferenceImage) { - option (google.api.http) = { - post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" - body: "reference_image" - }; - option (google.api.method_signature) = "parent,reference_image,reference_image_id"; - } - - // Permanently deletes a reference image. - // - // The image metadata will be deleted right away, but search queries - // against ProductSets containing the image may still work until all related - // caches are refreshed. - // - // The actual image files are not deleted from Google Cloud Storage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the reference image does not exist. - rpc DeleteReferenceImage(DeleteReferenceImageRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists reference images. - // - // Possible errors: - // - // * Returns NOT_FOUND if the parent product does not exist. - // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - // than 1. - rpc ListReferenceImages(ListReferenceImagesRequest) - returns (ListReferenceImagesResponse) { - option (google.api.http) = { - get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ReferenceImage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the specified image does not exist. - rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { - option (google.api.http) = { - get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Adds a Product to the specified ProductSet. If the Product is already - // present, no change is made. - // - // One Product can be added to at most 100 ProductSets. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc AddProductToProductSet(AddProductToProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Removes a Product from the specified ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND If the Product is not found under the ProductSet. - rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Lists the Products in a ProductSet, in an unspecified order. If the - // ProductSet does not exist, the products field of the response will be - // empty. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProductsInProductSet(ListProductsInProductSetRequest) - returns (ListProductsInProductSetResponse) { - option (google.api.http) = { - get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" - }; - option (google.api.method_signature) = "name"; - } - - // Asynchronous API that imports a list of reference images to specified - // product sets based on a list of image information. - // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be - // used to keep track of the progress and results of the request. - // `Operation.metadata` contains `BatchOperationMetadata`. (progress) - // `Operation.response` contains `ImportProductSetsResponse`. (results) - // - // The input source of this method is a csv file on Google Cloud Storage. - // For the format of the csv file please see - // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - rpc ImportProductSets(ImportProductSetsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import" - body: "*" - }; - option (google.api.method_signature) = "parent,input_config"; - option (google.longrunning.operation_info) = { - response_type: "ImportProductSetsResponse" - metadata_type: "BatchOperationMetadata" - }; - } -} - -// A Product contains ReferenceImages. -message Product { - option (google.api.resource) = { - type: "vision.googleapis.com/Product" - pattern: "projects/{project}/locations/{location}/products/{product}" - }; - - // A product label represented as a key-value pair. - message KeyValue { - // The key of the label attached to the product. Cannot be empty and cannot - // exceed 128 bytes. - string key = 1; - - // The value of the label attached to the product. Cannot be empty and - // cannot exceed 128 bytes. - string value = 2; - } - - // The resource name of the product. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - // - // This field is ignored when creating a product. - string name = 1; - - // The user-provided name for this Product. Must not be empty. Must be at most - // 4096 characters long. - string display_name = 2; - - // User-provided metadata to be stored with this product. Must be at most 4096 - // characters long. - string description = 3; - - // Immutable. The category for the product identified by the reference image. This should - // be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories - // "homegoods", "apparel", and "toys" are still supported, but these should - // not be used for new products. - string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; - - // Key-value pairs that can be attached to a product. At query time, - // constraints can be specified based on the product_labels. - // - // Note that integer values can be provided as strings, e.g. "1199". Only - // strings with integer values can match a range-based restriction which is - // to be supported soon. - // - // Multiple values can be assigned to the same key. One product may have up to - // 100 product_labels. - repeated KeyValue product_labels = 5; -} - -// A ProductSet contains Products. A ProductSet can contain a maximum of 1 -// million reference images. If the limit is exceeded, periodic indexing will -// fail. -message ProductSet { - option (google.api.resource) = { - type: "vision.googleapis.com/ProductSet" - pattern: "projects/{project}/locations/{location}/productSets/{product_set}" - }; - - // The resource name of the ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - // - // This field is ignored when creating a ProductSet. - string name = 1; - - // The user-provided name for this ProductSet. Must not be empty. Must be at - // most 4096 characters long. - string display_name = 2; - - // Output only. The time at which this ProductSet was last indexed. Query - // results will reflect all updates before this time. If this ProductSet has - // never been indexed, this field is 0. - // - // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If there was an error with indexing the product set, the field - // is populated. - // - // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A `ReferenceImage` represents a product image and its associated metadata, -// such as bounding boxes. -message ReferenceImage { - option (google.api.resource) = { - type: "vision.googleapis.com/ReferenceImage" - pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" - }; - - // The resource name of the reference image. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - // - // This field is ignored when creating a reference image. - string name = 1; - - // Required. The Google Cloud Storage URI of the reference image. - // - // The URI must start with `gs://`. - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Bounding polygons around the areas of interest in the reference image. - // If this field is empty, the system will try to detect regions of - // interest. At most 10 bounding polygons will be used. - // - // The provided shape is converted into a non-rotated rectangle. Once - // converted, the small edge of the rectangle must be greater than or equal - // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - // is not). - repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for the `CreateProduct` method. -message CreateProductRequest { - // Required. The project in which the Product should be created. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The product to create. - Product product = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this Product. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_id = 3; -} - -// Request message for the `ListProducts` method. -message ListProductsRequest { - // Required. The project OR ProductSet from which Products should be listed. - // - // Format: - // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProducts` method. -message ListProductsResponse { - // List of products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProduct` method. -message GetProductRequest { - // Required. Resource name of the Product to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `UpdateProduct` method. -message UpdateProductRequest { - // Required. The Product resource which replaces the one on the server. - // product.name is immutable. - Product product = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields - // to update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask paths include `product_labels`, `display_name`, and - // `description`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProduct` method. -message DeleteProductRequest { - // Required. Resource name of product to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `CreateProductSet` method. -message CreateProductSetRequest { - // Required. The project in which the ProductSet should be created. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The ProductSet to create. - ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this ProductSet. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_set_id = 3; -} - -// Request message for the `ListProductSets` method. -message ListProductSetsRequest { - // Required. The project from which ProductSets should be listed. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductSets` method. -message ListProductSetsResponse { - // List of ProductSets. - repeated ProductSet product_sets = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProductSet` method. -message GetProductSetRequest { - // Required. Resource name of the ProductSet to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `UpdateProductSet` method. -message UpdateProductSetRequest { - // Required. The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - // update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask path is `display_name`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProductSet` method. -message DeleteProductSetRequest { - // Required. Resource name of the ProductSet to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `CreateReferenceImage` method. -message CreateReferenceImageRequest { - // Required. Resource name of the product in which to create the reference image. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; - - // Required. The reference image to create. - // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for the ReferenceImage to be added. If set, - // the server will attempt to use this value as the resource id. If it is - // already in use, an error is returned with code ALREADY_EXISTS. Must be at - // most 128 characters long. It cannot contain the character `/`. - string reference_image_id = 3; -} - -// Request message for the `ListReferenceImages` method. -message ListReferenceImagesRequest { - // Required. Resource name of the product containing the reference images. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // A token identifying a page of results to be returned. This is the value - // of `nextPageToken` returned in a previous reference image list request. - // - // Defaults to the first page if not specified. - string page_token = 3; -} - -// Response message for the `ListReferenceImages` method. -message ListReferenceImagesResponse { - // The list of reference images. - repeated ReferenceImage reference_images = 1; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string next_page_token = 3; -} - -// Request message for the `GetReferenceImage` method. -message GetReferenceImageRequest { - // Required. The resource name of the ReferenceImage to get. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `DeleteReferenceImage` method. -message DeleteReferenceImageRequest { - // Required. The resource name of the reference image to delete. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `AddProductToProductSet` method. -message AddProductToProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be added to this ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `RemoveProductFromProductSet` method. -message RemoveProductFromProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be removed from this ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/Product" - } - ]; -} - -// Request message for the `ListProductsInProductSet` method. -message ListProductsInProductSetRequest { - // Required. The ProductSet resource for which to retrieve Products. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductsInProductSet` method. -message ListProductsInProductSetResponse { - // The list of Products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// The Google Cloud Storage location for a csv file which preserves a list of -// ImportProductSetRequests in each line. -message ImportProductSetsGcsSource { - // The Google Cloud Storage URI of the input csv file. - // - // The URI must start with `gs://`. - // - // The format of the input csv file should be one image per line. - // In each line, there are 6 columns. - // 1. image_uri - // 2, image_id - // 3. product_set_id - // 4. product_id - // 5, product_category - // 6, product_display_name - // 7, labels - // 8. bounding_poly - // - // Columns 1, 3, 4, and 5 are required, other columns are optional. A new - // ProductSet/Product with the same id will be created on the fly - // if the ProductSet/Product specified by product_set_id/product_id does not - // exist. - // - // The image_id field is optional but has to be unique if provided. If it is - // empty, we will automatically assign an unique id to the image. - // - // The product_display_name field is optional. If it is empty, a space (" ") - // is used as the place holder for the product display_name, which can - // be updated later through the realtime API. - // - // If the Product with product_id already exists, the fields - // product_display_name, product_category and labels are ignored. - // - // If a Product doesn't exist and needs to be created on the fly, the - // product_display_name field refers to - // [Product.display_name][google.cloud.vision.v1p3beta1.Product.display_name], - // the product_category field refers to - // [Product.product_category][google.cloud.vision.v1p3beta1.Product.product_category], - // and the labels field refers to [Product.labels][]. - // - // Labels (optional) should be a line containing a list of comma-separated - // key-value pairs, with the format - // "key_1=value_1,key_2=value_2,...,key_n=value_n". - // - // The bounding_poly (optional) field is used to identify one region of - // interest from the image in the same manner as CreateReferenceImage. If no - // bounding_poly is specified, the system will try to detect regions of - // interest automatically. - // - // Note that the pipeline will resize the image if the image resolution is too - // large to process (above 20MP). - // - // Also note that at most one bounding_poly is allowed per line. If the image - // contains multiple regions of interest, the csv should contain one line per - // region of interest. - // - // The bounding_poly column should contain an even number of comma-separated - // numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative - // integers should be used for absolute bounding polygons, and float values - // in [0, 1] should be used for normalized bounding polygons. - string csv_file_uri = 1; -} - -// The input content for the `ImportProductSets` method. -message ImportProductSetsInputConfig { - // The source of the input. - oneof source { - // The Google Cloud Storage location for a csv file which preserves a list - // of ImportProductSetRequests in each line. - ImportProductSetsGcsSource gcs_source = 1; - } -} - -// Request message for the `ImportProductSets` method. -message ImportProductSetsRequest { - // Required. The project in which the ProductSets should be imported. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for the `ImportProductSets` method. -// -// This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] -// method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// field. -message ImportProductSetsResponse { - // The list of reference_images that are imported successfully. - repeated ReferenceImage reference_images = 1; - - // The rpc status for each ImportProductSet request, including both successes - // and errors. - // - // The number of statuses here matches the number of lines in the csv file, - // and statuses[i] stores the success or failure status of processing the i-th - // line of the csv, starting from line 0. - repeated google.rpc.Status statuses = 2; -} - -// Metadata for the batch operations such as the current state. -// -// This is included in the `metadata` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message BatchOperationMetadata { - // Enumerates the possible states that the batch request can be in. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is actively being processed. - PROCESSING = 1; - - // The request is done and at least one item has been successfully - // processed. - SUCCESSFUL = 2; - - // The request is done and no item has been successfully processed. - FAILED = 3; - - // The request is done after the longrunning.Operations.CancelOperation has - // been called by the user. Any records that were processed before the - // cancel command are output as specified in the request. - CANCELLED = 4; - } - - // The current state of the batch operation. - State state = 1; - - // The time when the batch request was submitted to the server. - google.protobuf.Timestamp submit_time = 2; - - // The time when the batch request is finished and - // [google.longrunning.Operation.done][google.longrunning.Operation.done] is - // set to true. - google.protobuf.Timestamp end_time = 3; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto deleted file mode 100644 index 633e404ed097..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/text_annotation.proto +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - -import "google/cloud/vision/v1p3beta1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "TextAnnotationProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure is like this: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have their own -// properties. Properties describe detected languages, breaks etc.. Please refer -// to the -// [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty] -// message definition below for more detail. -message TextAnnotation { - // Detected language for a structural component. - message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 1; - - // Confidence of detected language. Range [0, 1]. - float confidence = 2; - } - - // Detected start or end of a structural component. - message DetectedBreak { - // Enum to denote the type of break found. New line, space etc. - enum BreakType { - // Unknown break label type. - UNKNOWN = 0; - - // Regular space. - SPACE = 1; - - // Sure space (very wide). - SURE_SPACE = 2; - - // Line-wrapping break. - EOL_SURE_SPACE = 3; - - // End-line hyphen that is not present in text; does not co-occur with - // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4; - - // Line break that ends a paragraph. - LINE_BREAK = 5; - } - - // Detected break type. - BreakType type = 1; - - // True if break prepends the element. - bool is_prefix = 2; - } - - // Additional information detected on the structural component. - message TextProperty { - // A list of detected languages together with confidence. - repeated DetectedLanguage detected_languages = 1; - - // Detected start or end of a text segment. - DetectedBreak detected_break = 2; - } - - // List of pages detected by OCR. - repeated Page pages = 1; - - // UTF-8 text detected on the pages. - string text = 2; -} - -// Detected page from OCR. -message Page { - // Additional information detected on the page. - TextAnnotation.TextProperty property = 1; - - // Page width. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 width = 2; - - // Page height. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 height = 3; - - // List of blocks of text, images etc on this page. - repeated Block blocks = 4; - - // Confidence of the OCR results on the page. Range [0, 1]. - float confidence = 5; -} - -// Logical element on the page. -message Block { - // Type of a block (text, image etc) as identified by OCR. - enum BlockType { - // Unknown block type. - UNKNOWN = 0; - - // Regular text block. - TEXT = 1; - - // Table block. - TABLE = 2; - - // Image block. - PICTURE = 3; - - // Horizontal/vertical line box. - RULER = 4; - - // Barcode block. - BARCODE = 5; - } - - // Additional information detected for the block. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // - // * when the text is horizontal it might look like: - // - // 0----1 - // | | - // 3----2 - // - // * when it's rotated 180 degrees around the top-left corner it becomes: - // - // 2----3 - // | | - // 1----0 - // - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of paragraphs in this block (if this blocks is of type text). - repeated Paragraph paragraphs = 3; - - // Detected block type (text, image etc) for this block. - BlockType block_type = 4; - - // Confidence of the OCR results on the block. Range [0, 1]. - float confidence = 5; -} - -// Structural unit of text representing a number of words in certain order. -message Paragraph { - // Additional information detected for the paragraph. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of words in this paragraph. - repeated Word words = 3; - - // Confidence of the OCR results for the paragraph. Range [0, 1]. - float confidence = 4; -} - -// A word representation. -message Word { - // Additional information detected for the word. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - repeated Symbol symbols = 3; - - // Confidence of the OCR results for the word. Range [0, 1]. - float confidence = 4; -} - -// A single symbol representation. -message Symbol { - // Additional information detected for the symbol. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // The actual UTF-8 representation of the symbol. - string text = 3; - - // Confidence of the OCR results for the symbol. Range [0, 1]. - float confidence = 4; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto deleted file mode 100644 index 205dfe656d1f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/proto-google-cloud-vision-v1p3beta1/src/main/proto/google/cloud/vision/v1p3beta1/web_detection.proto +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2018 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.vision.v1p3beta1; - - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "WebDetectionProto"; -option java_package = "com.google.cloud.vision.v1p3beta1"; - -// Relevant information for the image from the Internet. -message WebDetection { - // Entity deduced from similar images on the Internet. - message WebEntity { - // Opaque entity ID. - string entity_id = 1; - - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - float score = 2; - - // Canonical description of the entity, in English. - string description = 3; - } - - // Metadata for online images. - message WebImage { - // The result image URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the image. - float score = 2; - } - - // Metadata for web pages. - message WebPage { - // The result web page URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the web page. - float score = 2; - - // Title for the web page, may contain HTML markups. - string page_title = 3; - - // Fully matching images on the page. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 4; - - // Partial matching images on the page. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its - // crops. - repeated WebImage partial_matching_images = 5; - } - - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - - // Deduced entities from similar images on the Internet. - repeated WebEntity web_entities = 1; - - // Fully matching images from the Internet. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 2; - - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - repeated WebImage partial_matching_images = 3; - - // Web pages containing the matching images from the Internet. - repeated WebPage pages_with_matching_images = 4; - - // The visually similar image results. - repeated WebImage visually_similar_images = 6; - - // Best guess text labels for the request image. - repeated WebLabel best_guess_labels = 8; -} diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index 09cb3693af8c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFiles(); - } - - public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java deleted file mode 100644 index 6d588b9982e2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p3beta1.OperationMetadata; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFilesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFilesLRO(); - } - - public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index e2b0d8974492..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] -import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFiles(); - } - - public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java deleted file mode 100644 index 77154aa7d802..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] -import com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); - } - - public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java deleted file mode 100644 index 282718c23f81..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateImages(); - } - - public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); - // Do something. - BatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index e24118ffc722..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_sync] -import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java deleted file mode 100644 index e17a7845dde6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] -import com.google.cloud.vision.v1p3beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateImagesListannotateimagerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImagesListannotateimagerequest(); - } - - public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); - } - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 81d36792636e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p3beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index e61ffe63b65a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 5c81a10f70ca..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p3beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p3beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index e9e89467203a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_imageannotatorsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p3beta1.ImageAnnotatorSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p3beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java deleted file mode 100644 index cefc670f91d5..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - asyncAddProductToProductSet(); - } - - public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.addProductToProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java deleted file mode 100644 index 81188b7017b1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_sync] -import com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSet(); - } - - public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.addProductToProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java deleted file mode 100644 index 3b650f90729e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameProductname(); - } - - public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java deleted file mode 100644 index e5315729bef2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameString(); - } - - public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java deleted file mode 100644 index e807d05b1d15..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringProductname(); - } - - public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java deleted file mode 100644 index 141cdd0fc76e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringString(); - } - - public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index a67860361f29..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; -import com.google.cloud.vision.v1p3beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 93e867cda918..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p3beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index f69dafc186e0..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; -import com.google.cloud.vision.v1p3beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p3beta1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java deleted file mode 100644 index 08c25eb500a1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/AsyncCreateProduct.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class AsyncCreateProduct { - - public static void main(String[] args) throws Exception { - asyncCreateProduct(); - } - - public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - ApiFuture future = productSearchClient.createProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java deleted file mode 100644 index 06f1144b6239..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProduct.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproduct_sync] -import com.google.cloud.vision.v1p3beta1.CreateProductRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncCreateProduct { - - public static void main(String[] args) throws Exception { - syncCreateProduct(); - } - - public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - Product response = productSearchClient.createProduct(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java deleted file mode 100644 index 30a8e2fbaecf..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncCreateProductLocationnameProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductLocationnameProductString(); - } - - public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java deleted file mode 100644 index d5da324cd1e8..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproduct_stringproductstring_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncCreateProductStringProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductStringProductString(); - } - - public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java deleted file mode 100644 index 7282006d3dc0..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class AsyncCreateProductSet { - - public static void main(String[] args) throws Exception { - asyncCreateProductSet(); - } - - public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ApiFuture future = - productSearchClient.createProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java deleted file mode 100644 index e6a9cebd0d30..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproductset_sync] -import com.google.cloud.vision.v1p3beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ProductSet response = productSearchClient.createProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java deleted file mode 100644 index 5b3719f16d89..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncCreateProductSetLocationnameProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetLocationnameProductsetString(); - } - - public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java deleted file mode 100644 index 3dafc768a4ef..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncCreateProductSetStringProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetStringProductsetString(); - } - - public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java deleted file mode 100644 index a1099b9c970e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class AsyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - asyncCreateReferenceImage(); - } - - public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ApiFuture future = - productSearchClient.createReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java deleted file mode 100644 index 8de6d52d7b31..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_sync] -import com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImage(); - } - - public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ReferenceImage response = productSearchClient.createReferenceImage(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java deleted file mode 100644 index ab15f1cc3d59..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncCreateReferenceImageProductnameReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageProductnameReferenceimageString(); - } - - public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java deleted file mode 100644 index d96b857d1538..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncCreateReferenceImageStringReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageStringReferenceimageString(); - } - - public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java deleted file mode 100644 index e7bc0611ca0b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteProduct { - - public static void main(String[] args) throws Exception { - asyncDeleteProduct(); - } - - public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java deleted file mode 100644 index 58fc0f3064c4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_sync] -import com.google.cloud.vision.v1p3beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProduct { - - public static void main(String[] args) throws Exception { - syncDeleteProduct(); - } - - public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.deleteProduct(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java deleted file mode 100644 index 00b977f57be4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_productname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductProductname { - - public static void main(String[] args) throws Exception { - syncDeleteProductProductname(); - } - - public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java deleted file mode 100644 index f9e364931413..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproduct_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductString { - - public static void main(String[] args) throws Exception { - syncDeleteProductString(); - } - - public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java deleted file mode 100644 index a0b3481ed35c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - asyncDeleteProductSet(); - } - - public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java deleted file mode 100644 index 47f05b8ab936..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_sync] -import com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - syncDeleteProductSet(); - } - - public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - productSearchClient.deleteProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java deleted file mode 100644 index c7a9a8219f9c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_productsetname_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetProductsetname(); - } - - public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java deleted file mode 100644 index ab5f22cf9ae4..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deleteproductset_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetString { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetString(); - } - - public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java deleted file mode 100644 index 107f9b0ea93c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class AsyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - asyncDeleteReferenceImage(); - } - - public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.deleteReferenceImageCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java deleted file mode 100644 index 7e13278940d2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_sync] -import com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImage(); - } - - public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - productSearchClient.deleteReferenceImage(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java deleted file mode 100644 index 774bfcd8a883..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageReferenceimagename(); - } - - public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java deleted file mode 100644 index 6580c333b742..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageString { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageString(); - } - - public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java deleted file mode 100644 index dec67e615f74..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/AsyncGetProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class AsyncGetProduct { - - public static void main(String[] args) throws Exception { - asyncGetProduct(); - } - - public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.getProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java deleted file mode 100644 index 172b278b9773..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproduct_sync] -import com.google.cloud.vision.v1p3beta1.GetProductRequest; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncGetProduct { - - public static void main(String[] args) throws Exception { - syncGetProduct(); - } - - public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - Product response = productSearchClient.getProduct(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java deleted file mode 100644 index 7e52c7e1a832..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproduct_productname_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncGetProductProductname { - - public static void main(String[] args) throws Exception { - syncGetProductProductname(); - } - - public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java deleted file mode 100644 index 77e33f15a908..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproduct/SyncGetProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproduct_string_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncGetProductString { - - public static void main(String[] args) throws Exception { - syncGetProductString(); - } - - public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java deleted file mode 100644 index 084e9c991d63..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/AsyncGetProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class AsyncGetProductSet { - - public static void main(String[] args) throws Exception { - asyncGetProductSet(); - } - - public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = - productSearchClient.getProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java deleted file mode 100644 index 94f59279ccc9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproductset_sync] -import com.google.cloud.vision.v1p3beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncGetProductSet { - - public static void main(String[] args) throws Exception { - syncGetProductSet(); - } - - public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ProductSet response = productSearchClient.getProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java deleted file mode 100644 index ac6317c45149..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproductset_productsetname_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncGetProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncGetProductSetProductsetname(); - } - - public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java deleted file mode 100644 index 9b547f4b67a9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getproductset/SyncGetProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getproductset_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncGetProductSetString { - - public static void main(String[] args) throws Exception { - syncGetProductSetString(); - } - - public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java deleted file mode 100644 index e8d72c529e4f..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; - -public class AsyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - asyncGetReferenceImage(); - } - - public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.getReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java deleted file mode 100644 index 39fd456a8b5e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_sync] -import com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; - -public class SyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - syncGetReferenceImage(); - } - - public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ReferenceImage response = productSearchClient.getReferenceImage(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java deleted file mode 100644 index 2c258155c522..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; - -public class SyncGetReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageReferenceimagename(); - } - - public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java deleted file mode 100644 index a677430297f7..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_getreferenceimage_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.cloud.vision.v1p3beta1.ReferenceImageName; - -public class SyncGetReferenceImageString { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageString(); - } - - public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java deleted file mode 100644 index 940862b3d0bc..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.longrunning.Operation; - -public class AsyncImportProductSets { - - public static void main(String[] args) throws Exception { - asyncImportProductSets(); - } - - public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.importProductSetsCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java deleted file mode 100644 index f52024c60ab9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p3beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class AsyncImportProductSetsLRO { - - public static void main(String[] args) throws Exception { - asyncImportProductSetsLRO(); - } - - public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - OperationFuture future = - productSearchClient.importProductSetsOperationCallable().futureCall(request); - // Do something. - ImportProductSetsResponse response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java deleted file mode 100644 index eb629deacef9..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSets.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_sync] -import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncImportProductSets { - - public static void main(String[] args) throws Exception { - syncImportProductSets(); - } - - public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(request).get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java deleted file mode 100644 index b1c76f40a289..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsLocationnameImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() - throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java deleted file mode 100644 index 0ddbf0325743..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncImportProductSetsStringImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsStringImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java deleted file mode 100644 index 22e018b7db0a..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProducts.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproducts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class AsyncListProducts { - - public static void main(String[] args) throws Exception { - asyncListProducts(); - } - - public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java deleted file mode 100644 index 602d5aab443c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproducts_paged_async] -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.common.base.Strings; - -public class AsyncListProductsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsPaged(); - } - - public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsResponse response = productSearchClient.listProductsCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java deleted file mode 100644 index 26e13ed07293..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProducts.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproducts_sync] -import com.google.cloud.vision.v1p3beta1.ListProductsRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncListProducts { - - public static void main(String[] args) throws Exception { - syncListProducts(); - } - - public static void syncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProducts(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java deleted file mode 100644 index 51be97599542..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproducts_locationname_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncListProductsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductsLocationname(); - } - - public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java deleted file mode 100644 index 014807bf18fc..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproducts/SyncListProductsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproducts_string_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; - -public class SyncListProductsString { - - public static void main(String[] args) throws Exception { - syncListProductsString(); - } - - public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java deleted file mode 100644 index 731003110144..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSets.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class AsyncListProductSets { - - public static void main(String[] args) throws Exception { - asyncListProductSets(); - } - - public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductSetsPagedCallable().futureCall(request); - // Do something. - for (ProductSet element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java deleted file mode 100644 index 3f30b5d46786..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_paged_async] -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.common.base.Strings; - -public class AsyncListProductSetsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductSetsPaged(); - } - - public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductSetsResponse response = - productSearchClient.listProductSetsCallable().call(request); - for (ProductSet element : response.getProductSetsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java deleted file mode 100644 index 29035c5e5b34..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSets.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_sync] -import com.google.cloud.vision.v1p3beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncListProductSets { - - public static void main(String[] args) throws Exception { - syncListProductSets(); - } - - public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java deleted file mode 100644 index 1a9e639500a3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_locationname_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncListProductSetsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductSetsLocationname(); - } - - public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java deleted file mode 100644 index 46bd837a6bd6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsets_string_sync] -import com.google.cloud.vision.v1p3beta1.LocationName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; - -public class SyncListProductSetsString { - - public static void main(String[] args) throws Exception { - syncListProductSetsString(); - } - - public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java deleted file mode 100644 index 4068d1bc27e2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class AsyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSet(); - } - - public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java deleted file mode 100644 index e9a497d98998..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_paged_async] -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.common.base.Strings; - -public class AsyncListProductsInProductSetPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSetPaged(); - } - - public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsInProductSetResponse response = - productSearchClient.listProductsInProductSetCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java deleted file mode 100644 index 9609d21d1ac3..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_sync] -import com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSet(); - } - - public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java deleted file mode 100644 index 4afae165a370..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncListProductsInProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetProductsetname(); - } - - public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java deleted file mode 100644 index adcc4acc5e6d..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_string_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; - -public class SyncListProductsInProductSetString { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetString(); - } - - public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java deleted file mode 100644 index f5aa8c6fff5c..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class AsyncListReferenceImages { - - public static void main(String[] args) throws Exception { - asyncListReferenceImages(); - } - - public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listReferenceImagesPagedCallable().futureCall(request); - // Do something. - for (ReferenceImage element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java deleted file mode 100644 index 44d598fc4010..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_paged_async] -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; -import com.google.common.base.Strings; - -public class AsyncListReferenceImagesPaged { - - public static void main(String[] args) throws Exception { - asyncListReferenceImagesPaged(); - } - - public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListReferenceImagesResponse response = - productSearchClient.listReferenceImagesCallable().call(request); - for (ReferenceImage element : response.getReferenceImagesList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java deleted file mode 100644 index a507902f8c58..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_sync] -import com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncListReferenceImages { - - public static void main(String[] args) throws Exception { - syncListReferenceImages(); - } - - public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java deleted file mode 100644 index 79e99528cb88..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_productname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncListReferenceImagesProductname { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesProductname(); - } - - public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java deleted file mode 100644 index 7105d84e326b..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_listreferenceimages_string_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ReferenceImage; - -public class SyncListReferenceImagesString { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesString(); - } - - public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java deleted file mode 100644 index 4156a31363c1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class AsyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - asyncRemoveProductFromProductSet(); - } - - public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.removeProductFromProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java deleted file mode 100644 index b8d204b00561..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSet(); - } - - public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.removeProductFromProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java deleted file mode 100644 index a39b39523015..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameProductname(); - } - - public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java deleted file mode 100644 index 045c962e40cd..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameString(); - } - - public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java deleted file mode 100644 index 510dea6b38e1..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringProductname(); - } - - public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java deleted file mode 100644 index f21bf3b9adc2..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] -import com.google.cloud.vision.v1p3beta1.ProductName; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringString(); - } - - public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java deleted file mode 100644 index 4f39f4e62285..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProduct { - - public static void main(String[] args) throws Exception { - asyncUpdateProduct(); - } - - public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java deleted file mode 100644 index 5d8577e13df6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProduct { - - public static void main(String[] args) throws Exception { - syncUpdateProduct(); - } - - public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Product response = productSearchClient.updateProduct(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java deleted file mode 100644 index aab6300ab184..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] -import com.google.cloud.vision.v1p3beta1.Product; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductProductFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductProductFieldmask(); - } - - public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Product response = productSearchClient.updateProduct(product, updateMask); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java deleted file mode 100644 index b74fd146cdea..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - asyncUpdateProductSet(); - } - - public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.updateProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java deleted file mode 100644 index 9cdc578b07de..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - syncUpdateProductSet(); - } - - public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ProductSet response = productSearchClient.updateProductSet(request); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java deleted file mode 100644 index b0abad28e48e..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchClient; -import com.google.cloud.vision.v1p3beta1.ProductSet; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSetProductsetFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductSetProductsetFieldmask(); - } - - public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); - } - } -} -// [END vision_v1p3beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index f4f7d368ff02..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.samples; - -// [START vision_v1p3beta1_generated_productsearchsettings_createproductset_sync] -import com.google.cloud.vision.v1p3beta1.ProductSearchSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1p3beta1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index b00bf50eb263..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub.samples; - -// [START vision_v1p3beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p3beta1.stub.ImageAnnotatorStubSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorStubSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p3beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index 2854e5a26fe6..000000000000 --- a/owl-bot-staging/java-vision/v1p3beta1/samples/snippets/generated/com/google/cloud/vision/v1p3beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p3beta1.stub.samples; - -// [START vision_v1p3beta1_generated_productsearchstubsettings_createproductset_sync] -import com.google.cloud.vision.v1p3beta1.stub.ProductSearchStubSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchStubSettings.Builder productSearchSettingsBuilder = - ProductSearchStubSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1p3beta1_generated_productsearchstubsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java deleted file mode 100644 index 6d53017e3be1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClient.java +++ /dev/null @@ -1,706 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStub; -import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ImageAnnotatorSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings imageAnnotatorSettings =
- *     ImageAnnotatorSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorClient implements BackgroundResource { - private final ImageAnnotatorSettings settings; - private final ImageAnnotatorStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ImageAnnotatorClient with default settings. */ - public static final ImageAnnotatorClient create() throws IOException { - return create(ImageAnnotatorSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ImageAnnotatorClient create(ImageAnnotatorSettings settings) - throws IOException { - return new ImageAnnotatorClient(settings); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ImageAnnotatorSettings). - */ - public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { - return new ImageAnnotatorClient(stub); - } - - /** - * Constructs an instance of ImageAnnotatorClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ImageAnnotatorClient(ImageAnnotatorStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ImageAnnotatorSettings getSettings() { - return settings; - } - - public ImageAnnotatorStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages( - List requests) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImagesRequest request) { - return batchAnnotateImagesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run image detection and annotation for a batch of images. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateImagesRequest request =
-   *       BatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateImagesCallable() { - return stub.batchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
-   * }
-   * }
- * - * @param requests Required. The list of file annotation requests. Right now we support only one - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateFilesResponse batchAnnotateFiles(List requests) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return batchAnnotateFiles(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateFilesRequest request =
-   *       BatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesRequest request) { - return batchAnnotateFilesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Service that performs image detection and annotation for a batch of files. Now only - * "application/pdf", "image/tiff" and "image/gif" are supported. - * - *

This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and - * perform detection and annotation for each image extracted. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   BatchAnnotateFilesRequest request =
-   *       BatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchAnnotateFilesCallable() { - return stub.batchAnnotateFilesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   AsyncBatchAnnotateImagesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get();
-   * }
-   * }
- * - * @param requests Required. Individual image annotation requests for this batch. - * @param outputConfig Required. The desired output location and metadata (e.g. format). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateImagesAsync( - List requests, OutputConfig outputConfig) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(requests) - .setOutputConfig(outputConfig) - .build(); - return asyncBatchAnnotateImagesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .build();
-   *   AsyncBatchAnnotateImagesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest request) { - return asyncBatchAnnotateImagesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateImagesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return stub.asyncBatchAnnotateImagesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of images. - * - *

Progress and results can be retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains - * `AsyncBatchAnnotateImagesResponse` (results). - * - *

This service will write image annotation outputs to json files in customer GCS bucket, each - * json file containing BatchAnnotateImagesResponse proto. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateImagesRequest request =
-   *       AsyncBatchAnnotateImagesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateImagesCallable() { - return stub.asyncBatchAnnotateImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   List requests = new ArrayList<>();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
-   * }
-   * }
- * - * @param requests Required. Individual async file annotation requests for this batch. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(List requests) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder().addAllRequests(requests).build(); - return asyncBatchAnnotateFilesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   AsyncBatchAnnotateFilesResponse response =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { - return asyncBatchAnnotateFilesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   OperationFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AsyncBatchAnnotateFilesResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return stub.asyncBatchAnnotateFilesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, - * which may contain multiple pages and multiple images per page. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains - * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` - * (results). - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
-   *   AsyncBatchAnnotateFilesRequest request =
-   *       AsyncBatchAnnotateFilesRequest.newBuilder()
-   *           .addAllRequests(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - asyncBatchAnnotateFilesCallable() { - return stub.asyncBatchAnnotateFilesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java deleted file mode 100644 index 3672bf778846..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorSettings.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings - batchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).batchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings - asyncBatchAnnotateImagesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateImagesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateImagesOperationSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()).asyncBatchAnnotateFilesSettings(); - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return ((ImageAnnotatorStubSettings) getStubSettings()) - .asyncBatchAnnotateFilesOperationSettings(); - } - - public static final ImageAnnotatorSettings create(ImageAnnotatorStubSettings stub) - throws IOException { - return new ImageAnnotatorSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ImageAnnotatorStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ImageAnnotatorStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ImageAnnotatorStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ImageAnnotatorStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ImageAnnotatorStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ImageAnnotatorStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ImageAnnotatorSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ImageAnnotatorStubSettings.newBuilder(clientContext)); - } - - protected Builder(ImageAnnotatorSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ImageAnnotatorStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ImageAnnotatorStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ImageAnnotatorStubSettings.newHttpJsonBuilder()); - } - - public ImageAnnotatorStubSettings.Builder getStubSettingsBuilder() { - return ((ImageAnnotatorStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return getStubSettingsBuilder().batchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings.Builder - batchAnnotateFilesSettings() { - return getStubSettingsBuilder().batchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateImagesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateImagesOperationSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesSettings(); - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return getStubSettingsBuilder().asyncBatchAnnotateFilesOperationSettings(); - } - - @Override - public ImageAnnotatorSettings build() throws IOException { - return new ImageAnnotatorSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java deleted file mode 100644 index 9cca0b4648b3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchClient.java +++ /dev/null @@ -1,3874 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStub; -import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] - * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put - * different products into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, - * named `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- * - *

Note: close() needs to be called on the ProductSearchClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of ProductSearchSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings productSearchSettings =
- *     ProductSearchSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchClient implements BackgroundResource { - private final ProductSearchSettings settings; - private final ProductSearchStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of ProductSearchClient with default settings. */ - public static final ProductSearchClient create() throws IOException { - return create(ProductSearchSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final ProductSearchClient create(ProductSearchSettings settings) - throws IOException { - return new ProductSearchClient(settings); - } - - /** - * Constructs an instance of ProductSearchClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(ProductSearchSettings). - */ - public static final ProductSearchClient create(ProductSearchStub stub) { - return new ProductSearchClient(stub); - } - - /** - * Constructs an instance of ProductSearchClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected ProductSearchClient(ProductSearchSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ProductSearchStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected ProductSearchClient(ProductSearchStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final ProductSearchSettings getSettings() { - return settings; - } - - public ProductSearchStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - LocationName parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   String productSetId = "productSetId1003042158";
-   *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSet should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param productSet Required. The ProductSet to create. - * @param productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an error is returned - * with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the - * character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet( - String parent, ProductSet productSet, String productSetId) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(parent) - .setProductSet(productSet) - .setProductSetId(productSetId) - .build(); - return createProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ProductSet response = productSearchClient.createProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet createProductSet(CreateProductSetRequest request) { - return createProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ProductSet resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductSetRequest request =
-   *       CreateProductSetRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setProductSetId("productSetId1003042158")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductSetCallable() { - return stub.createProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(LocationName parent) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project from which ProductSets should be listed. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(String parent) { - ListProductSetsRequest request = ListProductSetsRequest.newBuilder().setParent(parent).build(); - return listProductSets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductSetsPagedResponse listProductSets(ListProductSetsRequest request) { - return listProductSetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductSetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ProductSet element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsPagedCallable() { - return stub.listProductSetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists ProductSets in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductSetsRequest request =
-   *       ListProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductSetsResponse response =
-   *         productSearchClient.listProductSetsCallable().call(request);
-   *     for (ProductSet element : response.getProductSetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductSetsCallable() { - return stub.listProductSetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(ProductSetName name) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductSet response = productSearchClient.getProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(String name) { - GetProductSetRequest request = GetProductSetRequest.newBuilder().setName(name).build(); - return getProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ProductSet response = productSearchClient.getProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet getProductSet(GetProductSetRequest request) { - return getProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ProductSet. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductSetRequest request =
-   *       GetProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductSetCallable() { - return stub.getProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSet productSet = ProductSet.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   ProductSet response = productSearchClient.updateProductSet(productSet, updateMask);
-   * }
-   * }
- * - * @param productSet Required. The ProductSet resource which replaces the one on the server. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * path is `display_name`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(ProductSet productSet, FieldMask updateMask) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(productSet) - .setUpdateMask(updateMask) - .build(); - return updateProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ProductSet response = productSearchClient.updateProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ProductSet updateProductSet(UpdateProductSetRequest request) { - return updateProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a ProductSet resource. Only display_name can be updated currently. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the ProductSet does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the - * request or longer than 4096 characters. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductSetRequest request =
-   *       UpdateProductSetRequest.newBuilder()
-   *           .setProductSet(ProductSet.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.updateProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   ProductSet response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductSetCallable() { - return stub.updateProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(ProductSetName name) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   productSearchClient.deleteProductSet(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the ProductSet to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(String name) { - DeleteProductSetRequest request = DeleteProductSetRequest.newBuilder().setName(name).build(); - deleteProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   productSearchClient.deleteProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProductSet(DeleteProductSetRequest request) { - deleteProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not - * deleted. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductSetRequest request =
-   *       DeleteProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductSetCallable() { - return stub.deleteProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(LocationName parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Product product = Product.newBuilder().build();
-   *   String productId = "productId-1051830678";
-   *   Product response = productSearchClient.createProduct(parent, product, productId);
-   * }
-   * }
- * - * @param parent Required. The project in which the Product should be created. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param product Required. The product to create. - * @param productId A user-supplied resource id for this Product. If set, the server will attempt - * to use this value as the resource id. If it is already in use, an error is returned with - * code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character - * `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(String parent, Product product, String productId) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(parent) - .setProduct(product) - .setProductId(productId) - .build(); - return createProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   Product response = productSearchClient.createProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product createProduct(CreateProductRequest request) { - return createProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new product resource. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if product_category is missing or invalid. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateProductRequest request =
-   *       CreateProductRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setProduct(Product.newBuilder().build())
-   *           .setProductId("productId-1051830678")
-   *           .build();
-   *   ApiFuture future = productSearchClient.createProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createProductCallable() { - return stub.createProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(LocationName parent) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Product element : productSearchClient.listProducts(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The project OR ProductSet from which Products should be listed. - *

Format: `projects/PROJECT_ID/locations/LOC_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(String parent) { - ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); - return listProducts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProducts(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsPagedResponse listProducts(ListProductsRequest request) { - return listProductsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsPagedCallable() { - return stub.listProductsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists products in an unspecified order. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsRequest request =
-   *       ListProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsResponse response = productSearchClient.listProductsCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listProductsCallable() { - return stub.listProductsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(ProductName name) { - GetProductRequest request = - GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   Product response = productSearchClient.getProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the Product to get. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(String name) { - GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); - return getProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   Product response = productSearchClient.getProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product getProduct(GetProductRequest request) { - return getProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a Product. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetProductRequest request =
-   *       GetProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.getProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getProductCallable() { - return stub.getProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   Product product = Product.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Product response = productSearchClient.updateProduct(product, updateMask);
-   * }
-   * }
- * - * @param product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask - * paths include `product_labels`, `display_name`, and `description`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(Product product, FieldMask updateMask) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder().setProduct(product).setUpdateMask(updateMask).build(); - return updateProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Product response = productSearchClient.updateProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Product updateProduct(UpdateProductRequest request) { - return updateProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` - * fields can be updated right now. - * - *

If labels are updated, the change will not be reflected in queries until the next index - * time. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product does not exist. - *
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from - * the request or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 - * characters. - *
  • Returns INVALID_ARGUMENT if product_category is present in update_mask. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   UpdateProductRequest request =
-   *       UpdateProductRequest.newBuilder()
-   *           .setProduct(Product.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = productSearchClient.updateProductCallable().futureCall(request);
-   *   // Do something.
-   *   Product response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateProductCallable() { - return stub.updateProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(ProductName name) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.deleteProduct(name);
-   * }
-   * }
- * - * @param name Required. Resource name of product to delete. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(String name) { - DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); - deleteProduct(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.deleteProduct(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteProduct(DeleteProductRequest request) { - deleteProductCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a product and its reference images. - * - *

Metadata of the product and all its images will be deleted right away, but search queries - * against ProductSets containing the product may still work until all related caches are - * refreshed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteProductRequest request =
-   *       DeleteProductRequest.newBuilder()
-   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteProductCallable() { - return stub.deleteProductCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - ProductName parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   ReferenceImage referenceImage = ReferenceImage.newBuilder().build();
-   *   String referenceImageId = "referenceImageId1224107531";
-   *   ReferenceImage response =
-   *       productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId);
-   * }
-   * }
- * - * @param parent Required. Resource name of the product in which to create the reference image. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param referenceImage Required. The reference image to create. If an image ID is specified, it - * is ignored. - * @param referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot - * contain the character `/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage( - String parent, ReferenceImage referenceImage, String referenceImageId) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(parent) - .setReferenceImage(referenceImage) - .setReferenceImageId(referenceImageId) - .build(); - return createReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ReferenceImage response = productSearchClient.createReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage createReferenceImage(CreateReferenceImageRequest request) { - return createReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates and returns a new ReferenceImage resource. - * - *

The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will - * try to detect regions of interest in the image that are compatible with the product_category on - * the parent product. If it is specified, detection is ALWAYS skipped. The system converts - * polygons into non-rotated rectangles. - * - *

Note that the pipeline will resize the image if the image resolution is too large to process - * (above 50MP). - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. - *
  • Returns INVALID_ARGUMENT if the product does not exist. - *
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with - * the parent product's product_category is detected. - *
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   CreateReferenceImageRequest request =
-   *       CreateReferenceImageRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setReferenceImage(ReferenceImage.newBuilder().build())
-   *           .setReferenceImageId("referenceImageId1224107531")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.createReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createReferenceImageCallable() { - return stub.createReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(ReferenceImageName name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   productSearchClient.deleteReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the reference image to delete. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(String name) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder().setName(name).build(); - deleteReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   productSearchClient.deleteReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteReferenceImage(DeleteReferenceImageRequest request) { - deleteReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a reference image. - * - *

The image metadata will be deleted right away, but search queries against ProductSets - * containing the image may still work until all related caches are refreshed. - * - *

The actual image files are not deleted from Google Cloud Storage. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   DeleteReferenceImageRequest request =
-   *       DeleteReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.deleteReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteReferenceImageCallable() { - return stub.deleteReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(ProductName parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Resource name of the product containing the reference images. - *

Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages(String parent) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder().setParent(parent).build(); - return listReferenceImages(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListReferenceImagesPagedResponse listReferenceImages( - ListReferenceImagesRequest request) { - return listReferenceImagesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listReferenceImagesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ReferenceImage element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesPagedCallable() { - return stub.listReferenceImagesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists reference images. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the parent product does not exist. - *
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListReferenceImagesRequest request =
-   *       ListReferenceImagesRequest.newBuilder()
-   *           .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListReferenceImagesResponse response =
-   *         productSearchClient.listReferenceImagesCallable().call(request);
-   *     for (ReferenceImage element : response.getReferenceImagesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listReferenceImagesCallable() { - return stub.listReferenceImagesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ReferenceImageName name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]");
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(ReferenceImageName name) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name =
-   *       ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *           .toString();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the ReferenceImage to get. - *

Format is: - *

`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(String name) { - GetReferenceImageRequest request = GetReferenceImageRequest.newBuilder().setName(name).build(); - return getReferenceImage(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ReferenceImage response = productSearchClient.getReferenceImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReferenceImage getReferenceImage(GetReferenceImageRequest request) { - return getReferenceImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets information associated with a ReferenceImage. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the specified image does not exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   GetReferenceImageRequest request =
-   *       GetReferenceImageRequest.newBuilder()
-   *           .setName(
-   *               ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.getReferenceImageCallable().futureCall(request);
-   *   // Do something.
-   *   ReferenceImage response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getReferenceImageCallable() { - return stub.getReferenceImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(ProductSetName name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, ProductName product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.addProductToProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be added to this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(String name, String product) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - addProductToProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.addProductToProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void addProductToProductSet(AddProductToProductSetRequest request) { - addProductToProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Adds a Product to the specified ProductSet. If the Product is already present, no change is - * made. - * - *

One Product can be added to at most 100 ProductSets. - * - *

Possible errors: - * - *

    - *
  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   AddProductToProductSetRequest request =
-   *       AddProductToProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.addProductToProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - addProductToProductSetCallable() { - return stub.addProductToProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(ProductSetName name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setProduct(product) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, ProductName product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(name) - .setProduct(product == null ? null : product.toString()) - .build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
-   *   productSearchClient.removeProductFromProductSet(name, product);
-   * }
-   * }
- * - * @param name Required. The resource name for the ProductSet to modify. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param product Required. The resource name for the Product to be removed from this ProductSet. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(String name, String product) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder().setName(name).setProduct(product).build(); - removeProductFromProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   productSearchClient.removeProductFromProductSet(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void removeProductFromProductSet(RemoveProductFromProductSetRequest request) { - removeProductFromProductSetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Removes a Product from the specified ProductSet. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   RemoveProductFromProductSetRequest request =
-   *       RemoveProductFromProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.removeProductFromProductSetCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - removeProductFromProductSetCallable() { - return stub.removeProductFromProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]");
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(ProductSetName name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString();
-   *   for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param name Required. The ProductSet resource for which to retrieve Products. - *

Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet(String name) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder().setName(name).build(); - return listProductsInProductSet(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListProductsInProductSetPagedResponse listProductsInProductSet( - ListProductsInProductSetRequest request) { - return listProductsInProductSetPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.listProductsInProductSetPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Product element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetPagedCallable() { - return stub.listProductsInProductSetPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, - * the products field of the response will be empty. - * - *

Possible errors: - * - *

    - *
  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - *
- * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ListProductsInProductSetRequest request =
-   *       ListProductsInProductSetRequest.newBuilder()
-   *           .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListProductsInProductSetResponse response =
-   *         productSearchClient.listProductsInProductSetCallable().call(request);
-   *     for (Product element : response.getProductsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listProductsInProductSetCallable() { - return stub.listProductsInProductSetCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(LocationName parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInputConfig(inputConfig) - .build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(parent, inputConfig).get();
-   * }
-   * }
- * - * @param parent Required. The project in which the ProductSets should be imported. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param inputConfig Required. The input content for the list of requests. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(String parent, ImportProductSetsInputConfig inputConfig) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder().setParent(parent).setInputConfig(inputConfig).build(); - return importProductSetsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ImportProductSetsResponse response =
-   *       productSearchClient.importProductSetsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - importProductSetsAsync(ImportProductSetsRequest request) { - return importProductSetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       productSearchClient.importProductSetsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   ImportProductSetsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return stub.importProductSetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API that imports a list of reference images to specified product sets based on a - * list of image information. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. - * (results) - * - *

The input source of this method is a csv file on Google Cloud Storage. For the format of the - * csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   ImportProductSetsRequest request =
-   *       ImportProductSetsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setInputConfig(ImportProductSetsInputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       productSearchClient.importProductSetsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable importProductSetsCallable() { - return stub.importProductSetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   productSearchClient.purgeProductsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The project and location in which the Products should be deleted. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync( - LocationName parent) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return purgeProductsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   productSearchClient.purgeProductsAsync(parent).get();
-   * }
-   * }
- * - * @param parent Required. The project and location in which the Products should be deleted. - *

Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync(String parent) { - PurgeProductsRequest request = PurgeProductsRequest.newBuilder().setParent(parent).build(); - return purgeProductsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   productSearchClient.purgeProductsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture purgeProductsAsync( - PurgeProductsRequest request) { - return purgeProductsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   OperationFuture future =
-   *       productSearchClient.purgeProductsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - purgeProductsOperationCallable() { - return stub.purgeProductsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Asynchronous API to delete all Products in a ProductSet or all Products that are in no - * ProductSet. - * - *

If a Product is a member of the specified ProductSet in addition to other ProductSets, the - * Product will still be deleted. - * - *

It is recommended to not delete the specified ProductSet until after this operation has - * completed. It is also recommended to not add any of the Products involved in the batch delete - * to a new ProductSet while this operation is running because those Products may still end up - * deleted. - * - *

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep - * the csv files used in ImportProductSets (if that was how you originally built the Product Set) - * before starting PurgeProducts, in case you need to re-import the data after deletion. - * - *

If the plan is to purge all of the Products from a ProductSet and then re-use the empty - * ProductSet to re-import new Products into the empty ProductSet, you must wait until the - * PurgeProducts operation has finished for that ProductSet. - * - *

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep - * track of the progress and results of the request. `Operation.metadata` contains - * `BatchOperationMetadata`. (progress) - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
-   *   PurgeProductsRequest request =
-   *       PurgeProductsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setForce(true)
-   *           .build();
-   *   ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable purgeProductsCallable() { - return stub.purgeProductsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListProductSetsPagedResponse - extends AbstractPagedListResponse< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductSetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductSetsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductSetsPagedResponse(ListProductSetsPage page) { - super(page, ListProductSetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductSetsPage - extends AbstractPage< - ListProductSetsRequest, ListProductSetsResponse, ProductSet, ListProductSetsPage> { - - private ListProductSetsPage( - PageContext context, - ListProductSetsResponse response) { - super(context, response); - } - - private static ListProductSetsPage createEmptyPage() { - return new ListProductSetsPage(null, null); - } - - @Override - protected ListProductSetsPage createPage( - PageContext context, - ListProductSetsResponse response) { - return new ListProductSetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductSetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductSetsRequest, - ListProductSetsResponse, - ProductSet, - ListProductSetsPage, - ListProductSetsFixedSizeCollection> { - - private ListProductSetsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductSetsFixedSizeCollection createEmptyCollection() { - return new ListProductSetsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductSetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductSetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsPagedResponse - extends AbstractPagedListResponse< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsPagedResponse(ListProductsPage page) { - super(page, ListProductsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsPage - extends AbstractPage { - - private ListProductsPage( - PageContext context, - ListProductsResponse response) { - super(context, response); - } - - private static ListProductsPage createEmptyPage() { - return new ListProductsPage(null, null); - } - - @Override - protected ListProductsPage createPage( - PageContext context, - ListProductsResponse response) { - return new ListProductsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsRequest, - ListProductsResponse, - Product, - ListProductsPage, - ListProductsFixedSizeCollection> { - - private ListProductsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsFixedSizeCollection createEmptyCollection() { - return new ListProductsFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListReferenceImagesPagedResponse - extends AbstractPagedListResponse< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListReferenceImagesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListReferenceImagesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListReferenceImagesPagedResponse(ListReferenceImagesPage page) { - super(page, ListReferenceImagesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListReferenceImagesPage - extends AbstractPage< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage> { - - private ListReferenceImagesPage( - PageContext - context, - ListReferenceImagesResponse response) { - super(context, response); - } - - private static ListReferenceImagesPage createEmptyPage() { - return new ListReferenceImagesPage(null, null); - } - - @Override - protected ListReferenceImagesPage createPage( - PageContext - context, - ListReferenceImagesResponse response) { - return new ListReferenceImagesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListReferenceImagesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ReferenceImage, - ListReferenceImagesPage, - ListReferenceImagesFixedSizeCollection> { - - private ListReferenceImagesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListReferenceImagesFixedSizeCollection createEmptyCollection() { - return new ListReferenceImagesFixedSizeCollection(null, 0); - } - - @Override - protected ListReferenceImagesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListReferenceImagesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListProductsInProductSetPagedResponse - extends AbstractPagedListResponse< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListProductsInProductSetPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListProductsInProductSetPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListProductsInProductSetPagedResponse(ListProductsInProductSetPage page) { - super(page, ListProductsInProductSetFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListProductsInProductSetPage - extends AbstractPage< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage> { - - private ListProductsInProductSetPage( - PageContext - context, - ListProductsInProductSetResponse response) { - super(context, response); - } - - private static ListProductsInProductSetPage createEmptyPage() { - return new ListProductsInProductSetPage(null, null); - } - - @Override - protected ListProductsInProductSetPage createPage( - PageContext - context, - ListProductsInProductSetResponse response) { - return new ListProductsInProductSetPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListProductsInProductSetFixedSizeCollection - extends AbstractFixedSizeCollection< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - Product, - ListProductsInProductSetPage, - ListProductsInProductSetFixedSizeCollection> { - - private ListProductsInProductSetFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListProductsInProductSetFixedSizeCollection createEmptyCollection() { - return new ListProductsInProductSetFixedSizeCollection(null, 0); - } - - @Override - protected ListProductsInProductSetFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListProductsInProductSetFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java deleted file mode 100644 index 64de31052202..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchSettings.java +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSetSettings(); - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSetSettings(); - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSetSettings(); - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createProductSettings(); - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsSettings(); - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getProductSettings(); - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).updateProductSettings(); - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteProductSettings(); - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).createReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).deleteReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listReferenceImagesSettings(); - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return ((ProductSearchStubSettings) getStubSettings()).getReferenceImageSettings(); - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).addProductToProductSetSettings(); - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).removeProductFromProductSetSettings(); - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return ((ProductSearchStubSettings) getStubSettings()).listProductsInProductSetSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsSettings(); - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return ((ProductSearchStubSettings) getStubSettings()).importProductSetsOperationSettings(); - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public UnaryCallSettings purgeProductsSettings() { - return ((ProductSearchStubSettings) getStubSettings()).purgeProductsSettings(); - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public OperationCallSettings - purgeProductsOperationSettings() { - return ((ProductSearchStubSettings) getStubSettings()).purgeProductsOperationSettings(); - } - - public static final ProductSearchSettings create(ProductSearchStubSettings stub) - throws IOException { - return new ProductSearchSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ProductSearchStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ProductSearchStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ProductSearchStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ProductSearchStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ProductSearchStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ProductSearchStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ProductSearchSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ProductSearchStubSettings.newBuilder(clientContext)); - } - - protected Builder(ProductSearchSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ProductSearchStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ProductSearchStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ProductSearchStubSettings.newHttpJsonBuilder()); - } - - public ProductSearchStubSettings.Builder getStubSettingsBuilder() { - return ((ProductSearchStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return getStubSettingsBuilder().createProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return getStubSettingsBuilder().listProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getStubSettingsBuilder().getProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return getStubSettingsBuilder().updateProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return getStubSettingsBuilder().deleteProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return getStubSettingsBuilder().createProductSettings(); - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return getStubSettingsBuilder().listProductsSettings(); - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getStubSettingsBuilder().getProductSettings(); - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return getStubSettingsBuilder().updateProductSettings(); - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return getStubSettingsBuilder().deleteProductSettings(); - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return getStubSettingsBuilder().createReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return getStubSettingsBuilder().deleteReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return getStubSettingsBuilder().listReferenceImagesSettings(); - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getStubSettingsBuilder().getReferenceImageSettings(); - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return getStubSettingsBuilder().addProductToProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return getStubSettingsBuilder().removeProductFromProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return getStubSettingsBuilder().listProductsInProductSetSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return getStubSettingsBuilder().importProductSetsSettings(); - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return getStubSettingsBuilder().importProductSetsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public UnaryCallSettings.Builder purgeProductsSettings() { - return getStubSettingsBuilder().purgeProductsSettings(); - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public OperationCallSettings.Builder - purgeProductsOperationSettings() { - return getStubSettingsBuilder().purgeProductsOperationSettings(); - } - - @Override - public ProductSearchSettings build() throws IOException { - return new ProductSearchSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json deleted file mode 100644 index 8ad119c5b486..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/gapic_metadata.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.vision.v1p4beta1", - "libraryPackage": "com.google.cloud.vision.v1p4beta1", - "services": { - "ImageAnnotator": { - "clients": { - "grpc": { - "libraryClient": "ImageAnnotatorClient", - "rpcs": { - "AsyncBatchAnnotateFiles": { - "methods": ["asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesAsync", "asyncBatchAnnotateFilesOperationCallable", "asyncBatchAnnotateFilesCallable"] - }, - "AsyncBatchAnnotateImages": { - "methods": ["asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesAsync", "asyncBatchAnnotateImagesOperationCallable", "asyncBatchAnnotateImagesCallable"] - }, - "BatchAnnotateFiles": { - "methods": ["batchAnnotateFiles", "batchAnnotateFiles", "batchAnnotateFilesCallable"] - }, - "BatchAnnotateImages": { - "methods": ["batchAnnotateImages", "batchAnnotateImages", "batchAnnotateImagesCallable"] - } - } - } - } - }, - "ProductSearch": { - "clients": { - "grpc": { - "libraryClient": "ProductSearchClient", - "rpcs": { - "AddProductToProductSet": { - "methods": ["addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSet", "addProductToProductSetCallable"] - }, - "CreateProduct": { - "methods": ["createProduct", "createProduct", "createProduct", "createProductCallable"] - }, - "CreateProductSet": { - "methods": ["createProductSet", "createProductSet", "createProductSet", "createProductSetCallable"] - }, - "CreateReferenceImage": { - "methods": ["createReferenceImage", "createReferenceImage", "createReferenceImage", "createReferenceImageCallable"] - }, - "DeleteProduct": { - "methods": ["deleteProduct", "deleteProduct", "deleteProduct", "deleteProductCallable"] - }, - "DeleteProductSet": { - "methods": ["deleteProductSet", "deleteProductSet", "deleteProductSet", "deleteProductSetCallable"] - }, - "DeleteReferenceImage": { - "methods": ["deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImage", "deleteReferenceImageCallable"] - }, - "GetProduct": { - "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] - }, - "GetProductSet": { - "methods": ["getProductSet", "getProductSet", "getProductSet", "getProductSetCallable"] - }, - "GetReferenceImage": { - "methods": ["getReferenceImage", "getReferenceImage", "getReferenceImage", "getReferenceImageCallable"] - }, - "ImportProductSets": { - "methods": ["importProductSetsAsync", "importProductSetsAsync", "importProductSetsAsync", "importProductSetsOperationCallable", "importProductSetsCallable"] - }, - "ListProductSets": { - "methods": ["listProductSets", "listProductSets", "listProductSets", "listProductSetsPagedCallable", "listProductSetsCallable"] - }, - "ListProducts": { - "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] - }, - "ListProductsInProductSet": { - "methods": ["listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSet", "listProductsInProductSetPagedCallable", "listProductsInProductSetCallable"] - }, - "ListReferenceImages": { - "methods": ["listReferenceImages", "listReferenceImages", "listReferenceImages", "listReferenceImagesPagedCallable", "listReferenceImagesCallable"] - }, - "PurgeProducts": { - "methods": ["purgeProductsAsync", "purgeProductsAsync", "purgeProductsAsync", "purgeProductsOperationCallable", "purgeProductsCallable"] - }, - "RemoveProductFromProductSet": { - "methods": ["removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSet", "removeProductFromProductSetCallable"] - }, - "UpdateProduct": { - "methods": ["updateProduct", "updateProduct", "updateProductCallable"] - }, - "UpdateProductSet": { - "methods": ["updateProductSet", "updateProductSet", "updateProductSetCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java deleted file mode 100644 index 9f00d3089dce..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/package-info.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= ImageAnnotatorClient ======================= - * - *

Service Description: Service that performs Google Cloud Vision API detection tasks over client - * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service - * returns detected entities from the images. - * - *

Sample for ImageAnnotatorClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
- *   List requests = new ArrayList<>();
- *   BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
- * }
- * }
- * - *

======================= ProductSearchClient ======================= - * - *

Service Description: Manages Products and ProductSets of reference images for use in product - * search. It uses the following resource model: - * - *

- The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] - * resources, named `projects/*/locations/*/productSets/*`, which acts as a way to put - * different products into groups to limit identification. - * - *

In parallel, - * - *

- The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, - * named `projects/*/locations/*/products/*` - * - *

- Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of - * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named - * `projects/*/locations/*/products/*/referenceImages/*` - * - *

Sample for ProductSearchClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   ProductSet productSet = ProductSet.newBuilder().build();
- *   String productSetId = "productSetId1003042158";
- *   ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.vision.v1p4beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java deleted file mode 100644 index 26ba519adf13..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java deleted file mode 100644 index 9d45f0e21bdd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcImageAnnotatorStub.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcImageAnnotatorStub extends ImageAnnotatorStub { - private static final MethodDescriptor - batchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchAnnotateFilesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateImages") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setRequestMarshaller( - ProtoUtils.marshaller(AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - batchAnnotateFilesCallable; - private final UnaryCallable - asyncBatchAnnotateImagesCallable; - private final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new GrpcImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final GrpcImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcImageAnnotatorStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub(ImageAnnotatorStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of GrpcImageAnnotatorStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - batchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .build(); - GrpcCallSettings - batchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) - .build(); - GrpcCallSettings - asyncBatchAnnotateImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) - .build(); - GrpcCallSettings - asyncBatchAnnotateFilesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.batchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - batchAnnotateFilesTransportSettings, - settings.batchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateImagesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesOperationSettings(), - clientContext, - operationsStub); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - batchAnnotateFilesCallable() { - return batchAnnotateFilesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - return asyncBatchAnnotateImagesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return asyncBatchAnnotateImagesOperationCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java deleted file mode 100644 index 5e932b470f6d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcProductSearchCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java deleted file mode 100644 index e4e6d523a3f9..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchStub.java +++ /dev/null @@ -1,831 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsResponse; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcProductSearchStub extends ProductSearchStub { - private static final MethodDescriptor - createProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductSetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ProductSet.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listProductsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProducts") - .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProduct") - .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProduct") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteProductMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProduct") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listReferenceImagesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListReferenceImages") - .setRequestMarshaller( - ProtoUtils.marshaller(ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListReferenceImagesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getReferenceImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetReferenceImage") - .setRequestMarshaller( - ProtoUtils.marshaller(GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ReferenceImage.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - addProductToProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/AddProductToProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - removeProductFromProductSetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/RemoveProductFromProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/ListProductsInProductSet") - .setRequestMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListProductsInProductSetResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - importProductSetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ImportProductSets") - .setRequestMarshaller( - ProtoUtils.marshaller(ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - purgeProductsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts") - .setRequestMarshaller( - ProtoUtils.marshaller(PurgeProductsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - private final UnaryCallable purgeProductsCallable; - private final OperationCallable - purgeProductsOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new GrpcProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final GrpcProductSearchStub create(ClientContext clientContext) throws IOException { - return new GrpcProductSearchStub(ProductSearchStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcProductSearchStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcProductSearchStub( - ProductSearchStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub(ProductSearchStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcProductSearchCallableFactory()); - } - - /** - * Constructs an instance of GrpcProductSearchStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product_set.name", String.valueOf(request.getProductSet().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listProductsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("product.name", String.valueOf(request.getProduct().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteProductTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listReferenceImagesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getReferenceImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings addProductToProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - removeProductFromProductSetTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listProductsInProductSetTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings importProductSetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings purgeProductsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(purgeProductsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - operationsStub); - this.purgeProductsCallable = - callableFactory.createUnaryCallable( - purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); - this.purgeProductsOperationCallable = - callableFactory.createOperationCallable( - purgeProductsTransportSettings, - settings.purgeProductsOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public UnaryCallable purgeProductsCallable() { - return purgeProductsCallable; - } - - @Override - public OperationCallable - purgeProductsOperationCallable() { - return purgeProductsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java deleted file mode 100644 index 6cecdfaec4db..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java deleted file mode 100644 index a6e83d2f1e20..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonImageAnnotatorStub.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(OperationMetadata.getDescriptor()) - .add(AsyncBatchAnnotateFilesResponse.getDescriptor()) - .add(AsyncBatchAnnotateImagesResponse.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/images:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - batchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/files:annotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchAnnotateFilesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateImages") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/images:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateImagesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - asyncBatchAnnotateFilesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateFiles") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/files:asyncBatchAnnotate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AsyncBatchAnnotateFilesRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable - batchAnnotateImagesCallable; - private final UnaryCallable - batchAnnotateFilesCallable; - private final UnaryCallable - asyncBatchAnnotateImagesCallable; - private final OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable; - private final UnaryCallable - asyncBatchAnnotateFilesCallable; - private final OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonImageAnnotatorStub create(ImageAnnotatorStubSettings settings) - throws IOException { - return new HttpJsonImageAnnotatorStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonImageAnnotatorStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonImageAnnotatorStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonImageAnnotatorCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonImageAnnotatorStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonImageAnnotatorStub( - ImageAnnotatorStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - batchAnnotateImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - batchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(batchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateImagesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - asyncBatchAnnotateFilesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(asyncBatchAnnotateFilesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.batchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - batchAnnotateImagesTransportSettings, - settings.batchAnnotateImagesSettings(), - clientContext); - this.batchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - batchAnnotateFilesTransportSettings, - settings.batchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateImagesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesSettings(), - clientContext); - this.asyncBatchAnnotateImagesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateImagesTransportSettings, - settings.asyncBatchAnnotateImagesOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.asyncBatchAnnotateFilesCallable = - callableFactory.createUnaryCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesSettings(), - clientContext); - this.asyncBatchAnnotateFilesOperationCallable = - callableFactory.createOperationCallable( - asyncBatchAnnotateFilesTransportSettings, - settings.asyncBatchAnnotateFilesOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(batchAnnotateImagesMethodDescriptor); - methodDescriptors.add(batchAnnotateFilesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateImagesMethodDescriptor); - methodDescriptors.add(asyncBatchAnnotateFilesMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable - batchAnnotateImagesCallable() { - return batchAnnotateImagesCallable; - } - - @Override - public UnaryCallable - batchAnnotateFilesCallable() { - return batchAnnotateFilesCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - return asyncBatchAnnotateImagesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - return asyncBatchAnnotateImagesOperationCallable; - } - - @Override - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - return asyncBatchAnnotateFilesCallable; - } - - @Override - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - return asyncBatchAnnotateFilesOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java deleted file mode 100644 index 9554d926c154..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ProductSearch service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonProductSearchCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java deleted file mode 100644 index 51dbbc77eb47..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/HttpJsonProductSearchStub.java +++ /dev/null @@ -1,1269 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsResponse; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonProductSearchStub extends ProductSearchStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(ImportProductSetsResponse.getDescriptor()) - .add(Empty.getDescriptor()) - .add(BatchOperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - createProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "productSetId", request.getProductSetId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProductSets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/productSets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductSetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProductSet") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{productSet.name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "productSet.name", request.getProductSet().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("productSet", request.getProductSet(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ProductSet.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProductSet") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/productSets/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateProduct") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "productId", request.getProductId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listProductsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListProducts") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetProduct") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/UpdateProduct") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{product.name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "product.name", request.getProduct().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("product", request.getProduct(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Product.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteProductMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteProduct") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/products/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/CreateReferenceImage") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "referenceImageId", request.getReferenceImageId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("referenceImage", request.getReferenceImage(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/DeleteReferenceImage") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listReferenceImagesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ListReferenceImages") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListReferenceImagesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getReferenceImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/GetReferenceImage") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReferenceImage.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - addProductToProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/AddProductToProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - removeProductFromProductSetMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/RemoveProductFromProductSet") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse> - listProductsInProductSetMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.vision.v1p4beta1.ProductSearch/ListProductsInProductSet") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListProductsInProductSetResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - importProductSetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/ImportProductSets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ImportProductSetsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - purgeProductsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p4beta1/{parent=projects/*/locations/*}/products:purge", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (PurgeProductsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable createProductSetCallable; - private final UnaryCallable - listProductSetsCallable; - private final UnaryCallable - listProductSetsPagedCallable; - private final UnaryCallable getProductSetCallable; - private final UnaryCallable updateProductSetCallable; - private final UnaryCallable deleteProductSetCallable; - private final UnaryCallable createProductCallable; - private final UnaryCallable listProductsCallable; - private final UnaryCallable - listProductsPagedCallable; - private final UnaryCallable getProductCallable; - private final UnaryCallable updateProductCallable; - private final UnaryCallable deleteProductCallable; - private final UnaryCallable - createReferenceImageCallable; - private final UnaryCallable deleteReferenceImageCallable; - private final UnaryCallable - listReferenceImagesCallable; - private final UnaryCallable - listReferenceImagesPagedCallable; - private final UnaryCallable getReferenceImageCallable; - private final UnaryCallable addProductToProductSetCallable; - private final UnaryCallable - removeProductFromProductSetCallable; - private final UnaryCallable - listProductsInProductSetCallable; - private final UnaryCallable< - ListProductsInProductSetRequest, ListProductsInProductSetPagedResponse> - listProductsInProductSetPagedCallable; - private final UnaryCallable importProductSetsCallable; - private final OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable; - private final UnaryCallable purgeProductsCallable; - private final OperationCallable - purgeProductsOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonProductSearchStub create(ProductSearchStubSettings settings) - throws IOException { - return new HttpJsonProductSearchStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonProductSearchStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonProductSearchStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonProductSearchStub( - ProductSearchStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonProductSearchCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonProductSearchStub, using the given settings. This is - * protected so that it is easy to make a subclass, but otherwise, the static factory methods - * should be preferred. - */ - protected HttpJsonProductSearchStub( - ProductSearchStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings createProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listProductsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listProductsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteProductTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteProductMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listReferenceImagesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listReferenceImagesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getReferenceImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getReferenceImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - addProductToProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(addProductToProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - removeProductFromProductSetTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(removeProductFromProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listProductsInProductSetTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listProductsInProductSetMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings importProductSetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(importProductSetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings purgeProductsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(purgeProductsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createProductSetCallable = - callableFactory.createUnaryCallable( - createProductSetTransportSettings, settings.createProductSetSettings(), clientContext); - this.listProductSetsCallable = - callableFactory.createUnaryCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.listProductSetsPagedCallable = - callableFactory.createPagedCallable( - listProductSetsTransportSettings, settings.listProductSetsSettings(), clientContext); - this.getProductSetCallable = - callableFactory.createUnaryCallable( - getProductSetTransportSettings, settings.getProductSetSettings(), clientContext); - this.updateProductSetCallable = - callableFactory.createUnaryCallable( - updateProductSetTransportSettings, settings.updateProductSetSettings(), clientContext); - this.deleteProductSetCallable = - callableFactory.createUnaryCallable( - deleteProductSetTransportSettings, settings.deleteProductSetSettings(), clientContext); - this.createProductCallable = - callableFactory.createUnaryCallable( - createProductTransportSettings, settings.createProductSettings(), clientContext); - this.listProductsCallable = - callableFactory.createUnaryCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.listProductsPagedCallable = - callableFactory.createPagedCallable( - listProductsTransportSettings, settings.listProductsSettings(), clientContext); - this.getProductCallable = - callableFactory.createUnaryCallable( - getProductTransportSettings, settings.getProductSettings(), clientContext); - this.updateProductCallable = - callableFactory.createUnaryCallable( - updateProductTransportSettings, settings.updateProductSettings(), clientContext); - this.deleteProductCallable = - callableFactory.createUnaryCallable( - deleteProductTransportSettings, settings.deleteProductSettings(), clientContext); - this.createReferenceImageCallable = - callableFactory.createUnaryCallable( - createReferenceImageTransportSettings, - settings.createReferenceImageSettings(), - clientContext); - this.deleteReferenceImageCallable = - callableFactory.createUnaryCallable( - deleteReferenceImageTransportSettings, - settings.deleteReferenceImageSettings(), - clientContext); - this.listReferenceImagesCallable = - callableFactory.createUnaryCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.listReferenceImagesPagedCallable = - callableFactory.createPagedCallable( - listReferenceImagesTransportSettings, - settings.listReferenceImagesSettings(), - clientContext); - this.getReferenceImageCallable = - callableFactory.createUnaryCallable( - getReferenceImageTransportSettings, - settings.getReferenceImageSettings(), - clientContext); - this.addProductToProductSetCallable = - callableFactory.createUnaryCallable( - addProductToProductSetTransportSettings, - settings.addProductToProductSetSettings(), - clientContext); - this.removeProductFromProductSetCallable = - callableFactory.createUnaryCallable( - removeProductFromProductSetTransportSettings, - settings.removeProductFromProductSetSettings(), - clientContext); - this.listProductsInProductSetCallable = - callableFactory.createUnaryCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.listProductsInProductSetPagedCallable = - callableFactory.createPagedCallable( - listProductsInProductSetTransportSettings, - settings.listProductsInProductSetSettings(), - clientContext); - this.importProductSetsCallable = - callableFactory.createUnaryCallable( - importProductSetsTransportSettings, - settings.importProductSetsSettings(), - clientContext); - this.importProductSetsOperationCallable = - callableFactory.createOperationCallable( - importProductSetsTransportSettings, - settings.importProductSetsOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.purgeProductsCallable = - callableFactory.createUnaryCallable( - purgeProductsTransportSettings, settings.purgeProductsSettings(), clientContext); - this.purgeProductsOperationCallable = - callableFactory.createOperationCallable( - purgeProductsTransportSettings, - settings.purgeProductsOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createProductSetMethodDescriptor); - methodDescriptors.add(listProductSetsMethodDescriptor); - methodDescriptors.add(getProductSetMethodDescriptor); - methodDescriptors.add(updateProductSetMethodDescriptor); - methodDescriptors.add(deleteProductSetMethodDescriptor); - methodDescriptors.add(createProductMethodDescriptor); - methodDescriptors.add(listProductsMethodDescriptor); - methodDescriptors.add(getProductMethodDescriptor); - methodDescriptors.add(updateProductMethodDescriptor); - methodDescriptors.add(deleteProductMethodDescriptor); - methodDescriptors.add(createReferenceImageMethodDescriptor); - methodDescriptors.add(deleteReferenceImageMethodDescriptor); - methodDescriptors.add(listReferenceImagesMethodDescriptor); - methodDescriptors.add(getReferenceImageMethodDescriptor); - methodDescriptors.add(addProductToProductSetMethodDescriptor); - methodDescriptors.add(removeProductFromProductSetMethodDescriptor); - methodDescriptors.add(listProductsInProductSetMethodDescriptor); - methodDescriptors.add(importProductSetsMethodDescriptor); - methodDescriptors.add(purgeProductsMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable createProductSetCallable() { - return createProductSetCallable; - } - - @Override - public UnaryCallable listProductSetsCallable() { - return listProductSetsCallable; - } - - @Override - public UnaryCallable - listProductSetsPagedCallable() { - return listProductSetsPagedCallable; - } - - @Override - public UnaryCallable getProductSetCallable() { - return getProductSetCallable; - } - - @Override - public UnaryCallable updateProductSetCallable() { - return updateProductSetCallable; - } - - @Override - public UnaryCallable deleteProductSetCallable() { - return deleteProductSetCallable; - } - - @Override - public UnaryCallable createProductCallable() { - return createProductCallable; - } - - @Override - public UnaryCallable listProductsCallable() { - return listProductsCallable; - } - - @Override - public UnaryCallable listProductsPagedCallable() { - return listProductsPagedCallable; - } - - @Override - public UnaryCallable getProductCallable() { - return getProductCallable; - } - - @Override - public UnaryCallable updateProductCallable() { - return updateProductCallable; - } - - @Override - public UnaryCallable deleteProductCallable() { - return deleteProductCallable; - } - - @Override - public UnaryCallable createReferenceImageCallable() { - return createReferenceImageCallable; - } - - @Override - public UnaryCallable deleteReferenceImageCallable() { - return deleteReferenceImageCallable; - } - - @Override - public UnaryCallable - listReferenceImagesCallable() { - return listReferenceImagesCallable; - } - - @Override - public UnaryCallable - listReferenceImagesPagedCallable() { - return listReferenceImagesPagedCallable; - } - - @Override - public UnaryCallable getReferenceImageCallable() { - return getReferenceImageCallable; - } - - @Override - public UnaryCallable addProductToProductSetCallable() { - return addProductToProductSetCallable; - } - - @Override - public UnaryCallable - removeProductFromProductSetCallable() { - return removeProductFromProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetCallable() { - return listProductsInProductSetCallable; - } - - @Override - public UnaryCallable - listProductsInProductSetPagedCallable() { - return listProductsInProductSetPagedCallable; - } - - @Override - public UnaryCallable importProductSetsCallable() { - return importProductSetsCallable; - } - - @Override - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - return importProductSetsOperationCallable; - } - - @Override - public UnaryCallable purgeProductsCallable() { - return purgeProductsCallable; - } - - @Override - public OperationCallable - purgeProductsOperationCallable() { - return purgeProductsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java deleted file mode 100644 index 8097b695f4cf..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStub.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ImageAnnotator service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ImageAnnotatorStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - batchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateImagesCallable()"); - } - - public UnaryCallable - batchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: batchAnnotateFilesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateImagesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateImagesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateImagesCallable()"); - } - - public OperationCallable< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: asyncBatchAnnotateFilesOperationCallable()"); - } - - public UnaryCallable - asyncBatchAnnotateFilesCallable() { - throw new UnsupportedOperationException("Not implemented: asyncBatchAnnotateFilesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java deleted file mode 100644 index c8094c685383..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ImageAnnotatorStubSettings.java +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ImageAnnotatorStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchAnnotateImages to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
- *     ImageAnnotatorStubSettings.newBuilder();
- * imageAnnotatorSettingsBuilder
- *     .batchAnnotateImagesSettings()
- *     .setRetrySettings(
- *         imageAnnotatorSettingsBuilder
- *             .batchAnnotateImagesSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ImageAnnotatorStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings - batchAnnotateImagesSettings; - private final UnaryCallSettings - batchAnnotateFilesSettings; - private final UnaryCallSettings - asyncBatchAnnotateImagesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings; - private final UnaryCallSettings - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - - /** Returns the object with the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings - batchAnnotateFilesSettings() { - return batchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings - asyncBatchAnnotateImagesSettings() { - return asyncBatchAnnotateImagesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateImages. */ - public OperationCallSettings< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return asyncBatchAnnotateImagesOperationSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the object with the settings used for calls to asyncBatchAnnotateFiles. */ - public OperationCallSettings< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - public ImageAnnotatorStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcImageAnnotatorStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonImageAnnotatorStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ImageAnnotatorStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ImageAnnotatorStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ImageAnnotatorStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - batchAnnotateImagesSettings = settingsBuilder.batchAnnotateImagesSettings().build(); - batchAnnotateFilesSettings = settingsBuilder.batchAnnotateFilesSettings().build(); - asyncBatchAnnotateImagesSettings = settingsBuilder.asyncBatchAnnotateImagesSettings().build(); - asyncBatchAnnotateImagesOperationSettings = - settingsBuilder.asyncBatchAnnotateImagesOperationSettings().build(); - asyncBatchAnnotateFilesSettings = settingsBuilder.asyncBatchAnnotateFilesSettings().build(); - asyncBatchAnnotateFilesOperationSettings = - settingsBuilder.asyncBatchAnnotateFilesOperationSettings().build(); - } - - /** Builder for ImageAnnotatorStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - batchAnnotateImagesSettings; - private final UnaryCallSettings.Builder - batchAnnotateFilesSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings; - private final UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings; - private final OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - batchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateImagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateImagesOperationSettings = OperationCallSettings.newBuilder(); - asyncBatchAnnotateFilesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - asyncBatchAnnotateFilesOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, - batchAnnotateFilesSettings, - asyncBatchAnnotateImagesSettings, - asyncBatchAnnotateFilesSettings); - initDefaults(this); - } - - protected Builder(ImageAnnotatorStubSettings settings) { - super(settings); - - batchAnnotateImagesSettings = settings.batchAnnotateImagesSettings.toBuilder(); - batchAnnotateFilesSettings = settings.batchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateImagesSettings = settings.asyncBatchAnnotateImagesSettings.toBuilder(); - asyncBatchAnnotateImagesOperationSettings = - settings.asyncBatchAnnotateImagesOperationSettings.toBuilder(); - asyncBatchAnnotateFilesSettings = settings.asyncBatchAnnotateFilesSettings.toBuilder(); - asyncBatchAnnotateFilesOperationSettings = - settings.asyncBatchAnnotateFilesOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - batchAnnotateImagesSettings, - batchAnnotateFilesSettings, - asyncBatchAnnotateImagesSettings, - asyncBatchAnnotateFilesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .batchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .batchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateFilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .asyncBatchAnnotateImagesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateImagesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .asyncBatchAnnotateFilesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AsyncBatchAnnotateFilesResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to batchAnnotateImages. */ - public UnaryCallSettings.Builder - batchAnnotateImagesSettings() { - return batchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to batchAnnotateFiles. */ - public UnaryCallSettings.Builder - batchAnnotateFilesSettings() { - return batchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateImagesSettings() { - return asyncBatchAnnotateImagesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateImages. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata> - asyncBatchAnnotateImagesOperationSettings() { - return asyncBatchAnnotateImagesOperationSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - public UnaryCallSettings.Builder - asyncBatchAnnotateFilesSettings() { - return asyncBatchAnnotateFilesSettings; - } - - /** Returns the builder for the settings used for calls to asyncBatchAnnotateFiles. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata> - asyncBatchAnnotateFilesOperationSettings() { - return asyncBatchAnnotateFilesOperationSettings; - } - - @Override - public ImageAnnotatorStubSettings build() throws IOException { - return new ImageAnnotatorStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java deleted file mode 100644 index fa7cfd2a354e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsResponse; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ProductSearch service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class ProductSearchStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable createProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: createProductSetCallable()"); - } - - public UnaryCallable - listProductSetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsPagedCallable()"); - } - - public UnaryCallable listProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductSetsCallable()"); - } - - public UnaryCallable getProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: getProductSetCallable()"); - } - - public UnaryCallable updateProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductSetCallable()"); - } - - public UnaryCallable deleteProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductSetCallable()"); - } - - public UnaryCallable createProductCallable() { - throw new UnsupportedOperationException("Not implemented: createProductCallable()"); - } - - public UnaryCallable listProductsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); - } - - public UnaryCallable listProductsCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); - } - - public UnaryCallable getProductCallable() { - throw new UnsupportedOperationException("Not implemented: getProductCallable()"); - } - - public UnaryCallable updateProductCallable() { - throw new UnsupportedOperationException("Not implemented: updateProductCallable()"); - } - - public UnaryCallable deleteProductCallable() { - throw new UnsupportedOperationException("Not implemented: deleteProductCallable()"); - } - - public UnaryCallable createReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: createReferenceImageCallable()"); - } - - public UnaryCallable deleteReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: deleteReferenceImageCallable()"); - } - - public UnaryCallable - listReferenceImagesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesPagedCallable()"); - } - - public UnaryCallable - listReferenceImagesCallable() { - throw new UnsupportedOperationException("Not implemented: listReferenceImagesCallable()"); - } - - public UnaryCallable getReferenceImageCallable() { - throw new UnsupportedOperationException("Not implemented: getReferenceImageCallable()"); - } - - public UnaryCallable addProductToProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: addProductToProductSetCallable()"); - } - - public UnaryCallable - removeProductFromProductSetCallable() { - throw new UnsupportedOperationException( - "Not implemented: removeProductFromProductSetCallable()"); - } - - public UnaryCallable - listProductsInProductSetPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listProductsInProductSetPagedCallable()"); - } - - public UnaryCallable - listProductsInProductSetCallable() { - throw new UnsupportedOperationException("Not implemented: listProductsInProductSetCallable()"); - } - - public OperationCallable< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: importProductSetsOperationCallable()"); - } - - public UnaryCallable importProductSetsCallable() { - throw new UnsupportedOperationException("Not implemented: importProductSetsCallable()"); - } - - public OperationCallable - purgeProductsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: purgeProductsOperationCallable()"); - } - - public UnaryCallable purgeProductsCallable() { - throw new UnsupportedOperationException("Not implemented: purgeProductsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java deleted file mode 100644 index b890b18e0009..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStubSettings.java +++ /dev/null @@ -1,1191 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsResponse; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link ProductSearchStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (vision.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createProductSet to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ProductSearchStubSettings.Builder productSearchSettingsBuilder =
- *     ProductSearchStubSettings.newBuilder();
- * productSearchSettingsBuilder
- *     .createProductSetSettings()
- *     .setRetrySettings(
- *         productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class ProductSearchStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder() - .add("https://www.googleapis.com/auth/cloud-platform") - .add("https://www.googleapis.com/auth/cloud-vision") - .build(); - - private final UnaryCallSettings createProductSetSettings; - private final PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings getProductSetSettings; - private final UnaryCallSettings updateProductSetSettings; - private final UnaryCallSettings deleteProductSetSettings; - private final UnaryCallSettings createProductSettings; - private final PagedCallSettings< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings getProductSettings; - private final UnaryCallSettings updateProductSettings; - private final UnaryCallSettings deleteProductSettings; - private final UnaryCallSettings - createReferenceImageSettings; - private final UnaryCallSettings deleteReferenceImageSettings; - private final PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings - getReferenceImageSettings; - private final UnaryCallSettings - addProductToProductSetSettings; - private final UnaryCallSettings - removeProductFromProductSetSettings; - private final PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings importProductSetsSettings; - private final OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - private final UnaryCallSettings purgeProductsSettings; - private final OperationCallSettings - purgeProductsOperationSettings; - - private static final PagedListDescriptor< - ListProductSetsRequest, ListProductSetsResponse, ProductSet> - LIST_PRODUCT_SETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductSetsRequest injectToken( - ListProductSetsRequest payload, String token) { - return ListProductSetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductSetsRequest injectPageSize( - ListProductSetsRequest payload, int pageSize) { - return ListProductSetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductSetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductSetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductSetsResponse payload) { - return payload.getProductSetsList() == null - ? ImmutableList.of() - : payload.getProductSetsList(); - } - }; - - private static final PagedListDescriptor - LIST_PRODUCTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsRequest injectToken(ListProductsRequest payload, String token) { - return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { - return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListProductsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage> - LIST_REFERENCE_IMAGES_PAGE_STR_DESC = - new PagedListDescriptor< - ListReferenceImagesRequest, ListReferenceImagesResponse, ReferenceImage>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListReferenceImagesRequest injectToken( - ListReferenceImagesRequest payload, String token) { - return ListReferenceImagesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListReferenceImagesRequest injectPageSize( - ListReferenceImagesRequest payload, int pageSize) { - return ListReferenceImagesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListReferenceImagesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListReferenceImagesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListReferenceImagesResponse payload) { - return payload.getReferenceImagesList() == null - ? ImmutableList.of() - : payload.getReferenceImagesList(); - } - }; - - private static final PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC = - new PagedListDescriptor< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListProductsInProductSetRequest injectToken( - ListProductsInProductSetRequest payload, String token) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } - - @Override - public ListProductsInProductSetRequest injectPageSize( - ListProductsInProductSetRequest payload, int pageSize) { - return ListProductsInProductSetRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListProductsInProductSetRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListProductsInProductSetResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListProductsInProductSetResponse payload) { - return payload.getProductsList() == null - ? ImmutableList.of() - : payload.getProductsList(); - } - }; - - private static final PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - LIST_PRODUCT_SETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductSetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCT_SETS_PAGE_STR_DESC, request, context); - return ListProductSetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - LIST_PRODUCTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListProductsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); - return ListProductsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - LIST_REFERENCE_IMAGES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListReferenceImagesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_REFERENCE_IMAGES_PAGE_STR_DESC, request, context); - return ListReferenceImagesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT = - new PagedListResponseFactory< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListProductsInProductSetRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListProductsInProductSetRequest, ListProductsInProductSetResponse, Product> - pageContext = - PageContext.create( - callable, LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_DESC, request, context); - return ListProductsInProductSetPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createProductSet. */ - public UnaryCallSettings createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductSets. */ - public PagedCallSettings< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the object with the settings used for calls to getProductSet. */ - public UnaryCallSettings getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the object with the settings used for calls to updateProductSet. */ - public UnaryCallSettings updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the object with the settings used for calls to deleteProductSet. */ - public UnaryCallSettings deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the object with the settings used for calls to createProduct. */ - public UnaryCallSettings createProductSettings() { - return createProductSettings; - } - - /** Returns the object with the settings used for calls to listProducts. */ - public PagedCallSettings - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the object with the settings used for calls to getProduct. */ - public UnaryCallSettings getProductSettings() { - return getProductSettings; - } - - /** Returns the object with the settings used for calls to updateProduct. */ - public UnaryCallSettings updateProductSettings() { - return updateProductSettings; - } - - /** Returns the object with the settings used for calls to deleteProduct. */ - public UnaryCallSettings deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the object with the settings used for calls to createReferenceImage. */ - public UnaryCallSettings - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to listReferenceImages. */ - public PagedCallSettings< - ListReferenceImagesRequest, ListReferenceImagesResponse, ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the object with the settings used for calls to getReferenceImage. */ - public UnaryCallSettings getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the object with the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the object with the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the object with the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public UnaryCallSettings importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the object with the settings used for calls to importProductSets. */ - public OperationCallSettings< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public UnaryCallSettings purgeProductsSettings() { - return purgeProductsSettings; - } - - /** Returns the object with the settings used for calls to purgeProducts. */ - public OperationCallSettings - purgeProductsOperationSettings() { - return purgeProductsOperationSettings; - } - - public ProductSearchStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcProductSearchStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonProductSearchStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "vision.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "vision.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ProductSearchStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ProductSearchStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected ProductSearchStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createProductSetSettings = settingsBuilder.createProductSetSettings().build(); - listProductSetsSettings = settingsBuilder.listProductSetsSettings().build(); - getProductSetSettings = settingsBuilder.getProductSetSettings().build(); - updateProductSetSettings = settingsBuilder.updateProductSetSettings().build(); - deleteProductSetSettings = settingsBuilder.deleteProductSetSettings().build(); - createProductSettings = settingsBuilder.createProductSettings().build(); - listProductsSettings = settingsBuilder.listProductsSettings().build(); - getProductSettings = settingsBuilder.getProductSettings().build(); - updateProductSettings = settingsBuilder.updateProductSettings().build(); - deleteProductSettings = settingsBuilder.deleteProductSettings().build(); - createReferenceImageSettings = settingsBuilder.createReferenceImageSettings().build(); - deleteReferenceImageSettings = settingsBuilder.deleteReferenceImageSettings().build(); - listReferenceImagesSettings = settingsBuilder.listReferenceImagesSettings().build(); - getReferenceImageSettings = settingsBuilder.getReferenceImageSettings().build(); - addProductToProductSetSettings = settingsBuilder.addProductToProductSetSettings().build(); - removeProductFromProductSetSettings = - settingsBuilder.removeProductFromProductSetSettings().build(); - listProductsInProductSetSettings = settingsBuilder.listProductsInProductSetSettings().build(); - importProductSetsSettings = settingsBuilder.importProductSetsSettings().build(); - importProductSetsOperationSettings = - settingsBuilder.importProductSetsOperationSettings().build(); - purgeProductsSettings = settingsBuilder.purgeProductsSettings().build(); - purgeProductsOperationSettings = settingsBuilder.purgeProductsOperationSettings().build(); - } - - /** Builder for ProductSearchStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createProductSetSettings; - private final PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings; - private final UnaryCallSettings.Builder getProductSetSettings; - private final UnaryCallSettings.Builder - updateProductSetSettings; - private final UnaryCallSettings.Builder - deleteProductSetSettings; - private final UnaryCallSettings.Builder createProductSettings; - private final PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings; - private final UnaryCallSettings.Builder getProductSettings; - private final UnaryCallSettings.Builder updateProductSettings; - private final UnaryCallSettings.Builder deleteProductSettings; - private final UnaryCallSettings.Builder - createReferenceImageSettings; - private final UnaryCallSettings.Builder - deleteReferenceImageSettings; - private final PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings; - private final UnaryCallSettings.Builder - getReferenceImageSettings; - private final UnaryCallSettings.Builder - addProductToProductSetSettings; - private final UnaryCallSettings.Builder - removeProductFromProductSetSettings; - private final PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings; - private final UnaryCallSettings.Builder - importProductSetsSettings; - private final OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings; - private final UnaryCallSettings.Builder purgeProductsSettings; - private final OperationCallSettings.Builder - purgeProductsOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_2_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductSetsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SETS_PAGE_STR_FACT); - getProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); - getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listReferenceImagesSettings = - PagedCallSettings.newBuilder(LIST_REFERENCE_IMAGES_PAGE_STR_FACT); - getReferenceImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - addProductToProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - removeProductFromProductSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listProductsInProductSetSettings = - PagedCallSettings.newBuilder(LIST_PRODUCTS_IN_PRODUCT_SET_PAGE_STR_FACT); - importProductSetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - importProductSetsOperationSettings = OperationCallSettings.newBuilder(); - purgeProductsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - purgeProductsOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings, - purgeProductsSettings); - initDefaults(this); - } - - protected Builder(ProductSearchStubSettings settings) { - super(settings); - - createProductSetSettings = settings.createProductSetSettings.toBuilder(); - listProductSetsSettings = settings.listProductSetsSettings.toBuilder(); - getProductSetSettings = settings.getProductSetSettings.toBuilder(); - updateProductSetSettings = settings.updateProductSetSettings.toBuilder(); - deleteProductSetSettings = settings.deleteProductSetSettings.toBuilder(); - createProductSettings = settings.createProductSettings.toBuilder(); - listProductsSettings = settings.listProductsSettings.toBuilder(); - getProductSettings = settings.getProductSettings.toBuilder(); - updateProductSettings = settings.updateProductSettings.toBuilder(); - deleteProductSettings = settings.deleteProductSettings.toBuilder(); - createReferenceImageSettings = settings.createReferenceImageSettings.toBuilder(); - deleteReferenceImageSettings = settings.deleteReferenceImageSettings.toBuilder(); - listReferenceImagesSettings = settings.listReferenceImagesSettings.toBuilder(); - getReferenceImageSettings = settings.getReferenceImageSettings.toBuilder(); - addProductToProductSetSettings = settings.addProductToProductSetSettings.toBuilder(); - removeProductFromProductSetSettings = - settings.removeProductFromProductSetSettings.toBuilder(); - listProductsInProductSetSettings = settings.listProductsInProductSetSettings.toBuilder(); - importProductSetsSettings = settings.importProductSetsSettings.toBuilder(); - importProductSetsOperationSettings = settings.importProductSetsOperationSettings.toBuilder(); - purgeProductsSettings = settings.purgeProductsSettings.toBuilder(); - purgeProductsOperationSettings = settings.purgeProductsOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createProductSetSettings, - listProductSetsSettings, - getProductSetSettings, - updateProductSetSettings, - deleteProductSetSettings, - createProductSettings, - listProductsSettings, - getProductSettings, - updateProductSettings, - deleteProductSettings, - createReferenceImageSettings, - deleteReferenceImageSettings, - listReferenceImagesSettings, - getReferenceImageSettings, - addProductToProductSetSettings, - removeProductFromProductSetSettings, - listProductsInProductSetSettings, - importProductSetsSettings, - purgeProductsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteProductSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .createReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .listReferenceImagesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getReferenceImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .addProductToProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .removeProductFromProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listProductsInProductSetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .importProductSetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .purgeProductsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .importProductSetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - ImportProductSetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(20000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(86400000L)) - .build())); - - builder - .purgeProductsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createProductSet. */ - public UnaryCallSettings.Builder - createProductSetSettings() { - return createProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductSets. */ - public PagedCallSettings.Builder< - ListProductSetsRequest, ListProductSetsResponse, ListProductSetsPagedResponse> - listProductSetsSettings() { - return listProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to getProductSet. */ - public UnaryCallSettings.Builder getProductSetSettings() { - return getProductSetSettings; - } - - /** Returns the builder for the settings used for calls to updateProductSet. */ - public UnaryCallSettings.Builder - updateProductSetSettings() { - return updateProductSetSettings; - } - - /** Returns the builder for the settings used for calls to deleteProductSet. */ - public UnaryCallSettings.Builder deleteProductSetSettings() { - return deleteProductSetSettings; - } - - /** Returns the builder for the settings used for calls to createProduct. */ - public UnaryCallSettings.Builder createProductSettings() { - return createProductSettings; - } - - /** Returns the builder for the settings used for calls to listProducts. */ - public PagedCallSettings.Builder< - ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> - listProductsSettings() { - return listProductsSettings; - } - - /** Returns the builder for the settings used for calls to getProduct. */ - public UnaryCallSettings.Builder getProductSettings() { - return getProductSettings; - } - - /** Returns the builder for the settings used for calls to updateProduct. */ - public UnaryCallSettings.Builder updateProductSettings() { - return updateProductSettings; - } - - /** Returns the builder for the settings used for calls to deleteProduct. */ - public UnaryCallSettings.Builder deleteProductSettings() { - return deleteProductSettings; - } - - /** Returns the builder for the settings used for calls to createReferenceImage. */ - public UnaryCallSettings.Builder - createReferenceImageSettings() { - return createReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to deleteReferenceImage. */ - public UnaryCallSettings.Builder - deleteReferenceImageSettings() { - return deleteReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to listReferenceImages. */ - public PagedCallSettings.Builder< - ListReferenceImagesRequest, - ListReferenceImagesResponse, - ListReferenceImagesPagedResponse> - listReferenceImagesSettings() { - return listReferenceImagesSettings; - } - - /** Returns the builder for the settings used for calls to getReferenceImage. */ - public UnaryCallSettings.Builder - getReferenceImageSettings() { - return getReferenceImageSettings; - } - - /** Returns the builder for the settings used for calls to addProductToProductSet. */ - public UnaryCallSettings.Builder - addProductToProductSetSettings() { - return addProductToProductSetSettings; - } - - /** Returns the builder for the settings used for calls to removeProductFromProductSet. */ - public UnaryCallSettings.Builder - removeProductFromProductSetSettings() { - return removeProductFromProductSetSettings; - } - - /** Returns the builder for the settings used for calls to listProductsInProductSet. */ - public PagedCallSettings.Builder< - ListProductsInProductSetRequest, - ListProductsInProductSetResponse, - ListProductsInProductSetPagedResponse> - listProductsInProductSetSettings() { - return listProductsInProductSetSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - public UnaryCallSettings.Builder - importProductSetsSettings() { - return importProductSetsSettings; - } - - /** Returns the builder for the settings used for calls to importProductSets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ImportProductSetsRequest, ImportProductSetsResponse, BatchOperationMetadata> - importProductSetsOperationSettings() { - return importProductSetsOperationSettings; - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - public UnaryCallSettings.Builder purgeProductsSettings() { - return purgeProductsSettings; - } - - /** Returns the builder for the settings used for calls to purgeProducts. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - purgeProductsOperationSettings() { - return purgeProductsOperationSettings; - } - - @Override - public ProductSearchStubSettings build() throws IOException { - return new ProductSearchStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java deleted file mode 100644 index f6c37238b4f2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientHttpJsonTest.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p4beta1.stub.HttpJsonImageAnnotatorStub; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientHttpJsonTest { - private static MockHttpService mockService; - private static ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonImageAnnotatorStub.getMethodDescriptors(), - ImageAnnotatorSettings.getDefaultEndpoint()); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchAnnotateFilesTest() throws Exception { - BatchAnnotateFilesResponse expectedResponse = - BatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateFiles(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateImagesTest() throws Exception { - AsyncBatchAnnotateImagesResponse expectedResponse = - AsyncBatchAnnotateImagesResponse.newBuilder() - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateImagesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - AsyncBatchAnnotateImagesResponse actualResponse = - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java deleted file mode 100644 index 16f2ea5fe2f0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorClientTest.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ImageAnnotatorClientTest { - private static MockImageAnnotator mockImageAnnotator; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ImageAnnotatorClient client; - - @BeforeClass - public static void startStaticServer() { - mockImageAnnotator = new MockImageAnnotator(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockImageAnnotator)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ImageAnnotatorSettings settings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ImageAnnotatorClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void batchAnnotateImagesTest() throws Exception { - BatchAnnotateImagesResponse expectedResponse = - BatchAnnotateImagesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateImagesResponse actualResponse = client.batchAnnotateImages(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateImagesRequest actualRequest = ((BatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateImages(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchAnnotateFilesTest() throws Exception { - BatchAnnotateFilesResponse expectedResponse = - BatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - mockImageAnnotator.addResponse(expectedResponse); - - List requests = new ArrayList<>(); - - BatchAnnotateFilesResponse actualResponse = client.batchAnnotateFiles(requests); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchAnnotateFilesRequest actualRequest = ((BatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.batchAnnotateFiles(requests); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void asyncBatchAnnotateImagesTest() throws Exception { - AsyncBatchAnnotateImagesResponse expectedResponse = - AsyncBatchAnnotateImagesResponse.newBuilder() - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateImagesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - AsyncBatchAnnotateImagesResponse actualResponse = - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateImagesRequest actualRequest = - ((AsyncBatchAnnotateImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - client.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void asyncBatchAnnotateFilesTest() throws Exception { - AsyncBatchAnnotateFilesResponse expectedResponse = - AsyncBatchAnnotateFilesResponse.newBuilder() - .addAllResponses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("asyncBatchAnnotateFilesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockImageAnnotator.addResponse(resultOperation); - - List requests = new ArrayList<>(); - - AsyncBatchAnnotateFilesResponse actualResponse = - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockImageAnnotator.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AsyncBatchAnnotateFilesRequest actualRequest = - ((AsyncBatchAnnotateFilesRequest) actualRequests.get(0)); - - Assert.assertEquals(requests, actualRequest.getRequestsList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void asyncBatchAnnotateFilesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockImageAnnotator.addException(exception); - - try { - List requests = new ArrayList<>(); - client.asyncBatchAnnotateFilesAsync(requests).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java deleted file mode 100644 index 248837fa20ed..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotator implements MockGrpcService { - private final MockImageAnnotatorImpl serviceImpl; - - public MockImageAnnotator() { - serviceImpl = new MockImageAnnotatorImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java deleted file mode 100644 index 269328329384..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockImageAnnotatorImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorGrpc.ImageAnnotatorImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockImageAnnotatorImpl extends ImageAnnotatorImplBase { - private List requests; - private Queue responses; - - public MockImageAnnotatorImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void batchAnnotateImages( - BatchAnnotateImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateImagesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchAnnotateFiles( - BatchAnnotateFilesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchAnnotateFilesResponse) { - requests.add(request); - responseObserver.onNext(((BatchAnnotateFilesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchAnnotateFilesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateImages( - AsyncBatchAnnotateImagesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void asyncBatchAnnotateFiles( - AsyncBatchAnnotateFilesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AsyncBatchAnnotateFiles, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java deleted file mode 100644 index 413b7f2e3a79..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearch.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearch implements MockGrpcService { - private final MockProductSearchImpl serviceImpl; - - public MockProductSearch() { - serviceImpl = new MockProductSearchImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java deleted file mode 100644 index 0321f0f58b03..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/MockProductSearchImpl.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.vision.v1p4beta1.ProductSearchGrpc.ProductSearchImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockProductSearchImpl extends ProductSearchImplBase { - private List requests; - private Queue responses; - - public MockProductSearchImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void createProductSet( - CreateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductSets( - ListProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductSetsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductSetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductSetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProductSet( - GetProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProductSet( - UpdateProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ProductSet) { - requests.add(request); - responseObserver.onNext(((ProductSet) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ProductSet.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProductSet( - DeleteProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createProduct( - CreateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProducts( - ListProductsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProducts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getProduct(GetProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateProduct( - UpdateProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Product) { - requests.add(request); - responseObserver.onNext(((Product) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Product.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteProduct(DeleteProductRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteProduct, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createReferenceImage( - CreateReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteReferenceImage( - DeleteReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listReferenceImages( - ListReferenceImagesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListReferenceImagesResponse) { - requests.add(request); - responseObserver.onNext(((ListReferenceImagesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListReferenceImages, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListReferenceImagesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getReferenceImage( - GetReferenceImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReferenceImage) { - requests.add(request); - responseObserver.onNext(((ReferenceImage) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetReferenceImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReferenceImage.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void addProductToProductSet( - AddProductToProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AddProductToProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void removeProductFromProductSet( - RemoveProductFromProductSetRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RemoveProductFromProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listProductsInProductSet( - ListProductsInProductSetRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListProductsInProductSetResponse) { - requests.add(request); - responseObserver.onNext(((ListProductsInProductSetResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListProductsInProductSet, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListProductsInProductSetResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void importProductSets( - ImportProductSetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ImportProductSets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void purgeProducts( - PurgeProductsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method PurgeProducts, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java deleted file mode 100644 index f4805121c5eb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientHttpJsonTest.java +++ /dev/null @@ -1,1991 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.vision.v1p4beta1.stub.HttpJsonProductSearchStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientHttpJsonTest { - private static MockHttpService mockService; - private static ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonProductSearchStub.getMethodDescriptors(), - ProductSearchSettings.getDefaultEndpoint()); - ProductSearchSettings settings = - ProductSearchSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSet productSet = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - client.deleteProductSet(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Product product = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - - client.deleteProduct(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4324/locations/location-4324/products/product-4324"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - client.deleteReferenceImage(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-7253/locations/location-7253/products/product-7253"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-61/locations/location-61/products/product-61/referenceImages/referenceImage-61"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7514/locations/location-7514/productSets/productSet-7514"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void purgeProductsTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void purgeProductsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void purgeProductsTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void purgeProductsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java b/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java deleted file mode 100644 index 19e7c7c38e18..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/google-cloud-vision/src/test/java/com/google/cloud/vision/v1p4beta1/ProductSearchClientTest.java +++ /dev/null @@ -1,1775 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductSetsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsInProductSetPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListProductsPagedResponse; -import static com.google.cloud.vision.v1p4beta1.ProductSearchClient.ListReferenceImagesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.rpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class ProductSearchClientTest { - private static MockProductSearch mockProductSearch; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ProductSearchClient client; - - @BeforeClass - public static void startStaticServer() { - mockProductSearch = new MockProductSearch(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockProductSearch)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ProductSearchSettings settings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ProductSearchClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - - ProductSet actualResponse = client.createProductSet(parent, productSet, productSetId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductSetRequest actualRequest = ((CreateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(productSetId, actualRequest.getProductSetId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - client.createProductSet(parent, productSet, productSetId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductSetsTest2() throws Exception { - ProductSet responsesElement = ProductSet.newBuilder().build(); - ListProductSetsResponse expectedResponse = - ListProductSetsResponse.newBuilder() - .setNextPageToken("") - .addAllProductSets(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductSetsPagedResponse pagedListResponse = client.listProductSets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductSetsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductSetsRequest actualRequest = ((ListProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProductSets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductSetTest2() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ProductSet actualResponse = client.getProductSet(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductSetRequest actualRequest = ((GetProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductSetTest() throws Exception { - ProductSet expectedResponse = - ProductSet.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setDisplayName("displayName1714148973") - .setIndexTime(Timestamp.newBuilder().build()) - .setIndexError(Status.newBuilder().build()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - ProductSet actualResponse = client.updateProductSet(productSet, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductSetRequest actualRequest = ((UpdateProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(productSet, actualRequest.getProductSet()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProductSet(productSet, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProductSet(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductSetRequest actualRequest = ((DeleteProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - - Product actualResponse = client.createProduct(parent, product, productId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateProductRequest actualRequest = ((CreateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(productId, actualRequest.getProductId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - client.createProduct(parent, product, productId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsResponse expectedResponse = - ListProductsResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListProductsPagedResponse pagedListResponse = client.listProducts(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listProducts(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getProductTest2() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - Product actualResponse = client.getProduct(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateProductTest() throws Exception { - Product expectedResponse = - Product.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setProductCategory("productCategory197299981") - .addAllProductLabels(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Product actualResponse = client.updateProduct(product, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateProductRequest actualRequest = ((UpdateProductRequest) actualRequests.get(0)); - - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProduct(product, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteProductTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteProduct(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteProductRequest actualRequest = ((DeleteProductRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteProductExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteProduct(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - - ReferenceImage actualResponse = - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateReferenceImageRequest actualRequest = - ((CreateReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(referenceImage, actualRequest.getReferenceImage()); - Assert.assertEquals(referenceImageId, actualRequest.getReferenceImageId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - client.createReferenceImage(parent, referenceImage, referenceImageId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteReferenceImageTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteReferenceImage(name); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteReferenceImageRequest actualRequest = - ((DeleteReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.deleteReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listReferenceImagesTest2() throws Exception { - ReferenceImage responsesElement = ReferenceImage.newBuilder().build(); - ListReferenceImagesResponse expectedResponse = - ListReferenceImagesResponse.newBuilder() - .setNextPageToken("") - .addAllReferenceImages(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListReferenceImagesPagedResponse pagedListResponse = client.listReferenceImages(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getReferenceImagesList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListReferenceImagesRequest actualRequest = ((ListReferenceImagesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listReferenceImagesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.listReferenceImages(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getReferenceImageTest2() throws Exception { - ReferenceImage expectedResponse = - ReferenceImage.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .setUri("uri116076") - .addAllBoundingPolys(new ArrayList()) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ReferenceImage actualResponse = client.getReferenceImage(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetReferenceImageRequest actualRequest = ((GetReferenceImageRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getReferenceImageExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.getReferenceImage(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void addProductToProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.addProductToProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AddProductToProductSetRequest actualRequest = - ((AddProductToProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void addProductToProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.addProductToProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product.toString(), actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void removeProductFromProductSetTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - String product = "product-309474065"; - - client.removeProductFromProductSet(name, product); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RemoveProductFromProductSetRequest actualRequest = - ((RemoveProductFromProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(product, actualRequest.getProduct()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void removeProductFromProductSetExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - String product = "product-309474065"; - client.removeProductFromProductSet(name, product); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listProductsInProductSetTest2() throws Exception { - Product responsesElement = Product.newBuilder().build(); - ListProductsInProductSetResponse expectedResponse = - ListProductsInProductSetResponse.newBuilder() - .setNextPageToken("") - .addAllProducts(Arrays.asList(responsesElement)) - .build(); - mockProductSearch.addResponse(expectedResponse); - - String name = "name3373707"; - - ListProductsInProductSetPagedResponse pagedListResponse = client.listProductsInProductSet(name); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListProductsInProductSetRequest actualRequest = - ((ListProductsInProductSetRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listProductsInProductSetExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String name = "name3373707"; - client.listProductsInProductSet(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void importProductSetsTest() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void importProductSetsTest2() throws Exception { - ImportProductSetsResponse expectedResponse = - ImportProductSetsResponse.newBuilder() - .addAllReferenceImages(new ArrayList()) - .addAllStatuses(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importProductSetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - - ImportProductSetsResponse actualResponse = - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportProductSetsRequest actualRequest = ((ImportProductSetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void importProductSetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - client.importProductSetsAsync(parent, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void purgeProductsTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void purgeProductsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void purgeProductsTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("purgeProductsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockProductSearch.addResponse(resultOperation); - - String parent = "parent-995424086"; - - client.purgeProductsAsync(parent).get(); - - List actualRequests = mockProductSearch.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PurgeProductsRequest actualRequest = ((PurgeProductsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void purgeProductsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockProductSearch.addException(exception); - - try { - String parent = "parent-995424086"; - client.purgeProductsAsync(parent).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java deleted file mode 100644 index af9e90f11bcc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorGrpc.java +++ /dev/null @@ -1,635 +0,0 @@ -package com.google.cloud.vision.v1p4beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Service that performs Google Cloud Vision API detection tasks over client
- * images, such as face, landmark, logo, label, and text detection. The
- * ImageAnnotator service returns detected entities from the images.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p4beta1/image_annotator.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ImageAnnotatorGrpc { - - private ImageAnnotatorGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ImageAnnotator"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateImages", - requestType = com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateImagesMethod; - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = getBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateImages")) - .build(); - } - } - } - return getBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchAnnotateFiles", - requestType = com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getBatchAnnotateFilesMethod; - if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getBatchAnnotateFilesMethod = getBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("BatchAnnotateFiles")) - .build(); - } - } - } - return getBatchAnnotateFilesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateImages", - requestType = com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateImagesMethod; - if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateImagesMethod = getAsyncBatchAnnotateImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateImages")) - .build(); - } - } - } - return getAsyncBatchAnnotateImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AsyncBatchAnnotateFiles", - requestType = com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod() { - io.grpc.MethodDescriptor getAsyncBatchAnnotateFilesMethod; - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - synchronized (ImageAnnotatorGrpc.class) { - if ((getAsyncBatchAnnotateFilesMethod = ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod) == null) { - ImageAnnotatorGrpc.getAsyncBatchAnnotateFilesMethod = getAsyncBatchAnnotateFilesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AsyncBatchAnnotateFiles")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ImageAnnotatorMethodDescriptorSupplier("AsyncBatchAnnotateFiles")) - .build(); - } - } - } - return getAsyncBatchAnnotateFilesMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ImageAnnotatorStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - }; - return ImageAnnotatorStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ImageAnnotatorBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - }; - return ImageAnnotatorBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ImageAnnotatorFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ImageAnnotatorFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - }; - return ImageAnnotatorFutureStub.newStub(factory, channel); - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static abstract class ImageAnnotatorImplBase implements io.grpc.BindableService { - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public void batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchAnnotateFilesMethod(), responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public void asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateImagesMethod(), responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAsyncBatchAnnotateFilesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse>( - this, METHODID_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest, - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse>( - this, METHODID_BATCH_ANNOTATE_FILES))) - .addMethod( - getAsyncBatchAnnotateImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_IMAGES))) - .addMethod( - getAsyncBatchAnnotateFilesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest, - com.google.longrunning.Operation>( - this, METHODID_ASYNC_BATCH_ANNOTATE_FILES))) - .build(); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorStub extends io.grpc.stub.AbstractAsyncStub { - private ImageAnnotatorStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public void batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public void batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public void asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public void asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ImageAnnotatorBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorBlockingStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBatchAnnotateFilesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateImages(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.longrunning.Operation asyncBatchAnnotateFiles(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAsyncBatchAnnotateFilesMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Service that performs Google Cloud Vision API detection tasks over client
-   * images, such as face, landmark, logo, label, and text detection. The
-   * ImageAnnotator service returns detected entities from the images.
-   * 
- */ - public static final class ImageAnnotatorFutureStub extends io.grpc.stub.AbstractFutureStub { - private ImageAnnotatorFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ImageAnnotatorFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ImageAnnotatorFutureStub(channel, callOptions); - } - - /** - *
-     * Run image detection and annotation for a batch of images.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateImages( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Service that performs image detection and annotation for a batch of files.
-     * Now only "application/pdf", "image/tiff" and "image/gif" are supported.
-     * This service will extract at most 5 (customers can specify which 5 in
-     * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
-     * file provided and perform detection and annotation for each image
-     * extracted.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchAnnotateFiles( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchAnnotateFilesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of images.
-     * Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
-     * This service will write image annotation outputs to json files in customer
-     * GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateImages( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Run asynchronous image detection and annotation for a list of generic
-     * files, such as PDF files, which may contain multiple pages and multiple
-     * images per page. Progress and results can be retrieved through the
-     * `google.longrunning.Operations` interface.
-     * `Operation.metadata` contains `OperationMetadata` (metadata).
-     * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture asyncBatchAnnotateFiles( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAsyncBatchAnnotateFilesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_BATCH_ANNOTATE_IMAGES = 0; - private static final int METHODID_BATCH_ANNOTATE_FILES = 1; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_IMAGES = 2; - private static final int METHODID_ASYNC_BATCH_ANNOTATE_FILES = 3; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ImageAnnotatorImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ImageAnnotatorImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_BATCH_ANNOTATE_IMAGES: - serviceImpl.batchAnnotateImages((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_ANNOTATE_FILES: - serviceImpl.batchAnnotateFiles((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_IMAGES: - serviceImpl.asyncBatchAnnotateImages((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ASYNC_BATCH_ANNOTATE_FILES: - serviceImpl.asyncBatchAnnotateFiles((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ImageAnnotatorBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ImageAnnotator"); - } - } - - private static final class ImageAnnotatorFileDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier { - ImageAnnotatorFileDescriptorSupplier() {} - } - - private static final class ImageAnnotatorMethodDescriptorSupplier - extends ImageAnnotatorBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ImageAnnotatorMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ImageAnnotatorGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ImageAnnotatorFileDescriptorSupplier()) - .addMethod(getBatchAnnotateImagesMethod()) - .addMethod(getBatchAnnotateFilesMethod()) - .addMethod(getAsyncBatchAnnotateImagesMethod()) - .addMethod(getAsyncBatchAnnotateFilesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java b/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java deleted file mode 100644 index 066efff1eb09..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/grpc-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchGrpc.java +++ /dev/null @@ -1,2300 +0,0 @@ -package com.google.cloud.vision.v1p4beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Manages Products and ProductSets of reference images for use in product
- * search. It uses the following resource model:
- * - The API has a collection of
- * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
- * `projects/*/locations/*/productSets/*`, which acts as a way to put different
- * products into groups to limit identification.
- * In parallel,
- * - The API has a collection of
- * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
- *   `projects/*/locations/*/products/*`
- * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
- * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
- * named
- *   `projects/*/locations/*/products/*/referenceImages/*`
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/vision/v1p4beta1/product_search_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ProductSearchGrpc { - - private ProductSearchGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ProductSearch"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProductSet", - requestType = com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductSetMethod() { - io.grpc.MethodDescriptor getCreateProductSetMethod; - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { - ProductSearchGrpc.getCreateProductSetMethod = getCreateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProductSet")) - .build(); - } - } - } - return getCreateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductSets", - requestType = com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductSetsMethod() { - io.grpc.MethodDescriptor getListProductSetsMethod; - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductSetsMethod = ProductSearchGrpc.getListProductSetsMethod) == null) { - ProductSearchGrpc.getListProductSetsMethod = getListProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductSets")) - .build(); - } - } - } - return getListProductSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProductSet", - requestType = com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductSetMethod() { - io.grpc.MethodDescriptor getGetProductSetMethod; - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductSetMethod = ProductSearchGrpc.getGetProductSetMethod) == null) { - ProductSearchGrpc.getGetProductSetMethod = getGetProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProductSet")) - .build(); - } - } - } - return getGetProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProductSet", - requestType = com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ProductSet.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductSetMethod() { - io.grpc.MethodDescriptor getUpdateProductSetMethod; - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductSetMethod = ProductSearchGrpc.getUpdateProductSetMethod) == null) { - ProductSearchGrpc.getUpdateProductSetMethod = getUpdateProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProductSet")) - .build(); - } - } - } - return getUpdateProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProductSet", - requestType = com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductSetMethod() { - io.grpc.MethodDescriptor getDeleteProductSetMethod; - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductSetMethod = ProductSearchGrpc.getDeleteProductSetMethod) == null) { - ProductSearchGrpc.getDeleteProductSetMethod = getDeleteProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProductSet")) - .build(); - } - } - } - return getDeleteProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateProduct", - requestType = com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateProductMethod() { - io.grpc.MethodDescriptor getCreateProductMethod; - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateProductMethod = ProductSearchGrpc.getCreateProductMethod) == null) { - ProductSearchGrpc.getCreateProductMethod = getCreateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateProduct")) - .build(); - } - } - } - return getCreateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProducts", - requestType = com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsMethod() { - io.grpc.MethodDescriptor getListProductsMethod; - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsMethod = ProductSearchGrpc.getListProductsMethod) == null) { - ProductSearchGrpc.getListProductsMethod = getListProductsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProducts")) - .build(); - } - } - } - return getListProductsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetProduct", - requestType = com.google.cloud.vision.v1p4beta1.GetProductRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetProductMethod() { - io.grpc.MethodDescriptor getGetProductMethod; - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetProductMethod = ProductSearchGrpc.getGetProductMethod) == null) { - ProductSearchGrpc.getGetProductMethod = getGetProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetProduct")) - .build(); - } - } - } - return getGetProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateProduct", - requestType = com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.Product.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateProductMethod() { - io.grpc.MethodDescriptor getUpdateProductMethod; - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getUpdateProductMethod = ProductSearchGrpc.getUpdateProductMethod) == null) { - ProductSearchGrpc.getUpdateProductMethod = getUpdateProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("UpdateProduct")) - .build(); - } - } - } - return getUpdateProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteProductMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteProduct", - requestType = com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteProductMethod() { - io.grpc.MethodDescriptor getDeleteProductMethod; - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteProductMethod = ProductSearchGrpc.getDeleteProductMethod) == null) { - ProductSearchGrpc.getDeleteProductMethod = getDeleteProductMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProduct")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteProduct")) - .build(); - } - } - } - return getDeleteProductMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateReferenceImage", - requestType = com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateReferenceImageMethod() { - io.grpc.MethodDescriptor getCreateReferenceImageMethod; - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getCreateReferenceImageMethod = ProductSearchGrpc.getCreateReferenceImageMethod) == null) { - ProductSearchGrpc.getCreateReferenceImageMethod = getCreateReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("CreateReferenceImage")) - .build(); - } - } - } - return getCreateReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteReferenceImage", - requestType = com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteReferenceImageMethod() { - io.grpc.MethodDescriptor getDeleteReferenceImageMethod; - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getDeleteReferenceImageMethod = ProductSearchGrpc.getDeleteReferenceImageMethod) == null) { - ProductSearchGrpc.getDeleteReferenceImageMethod = getDeleteReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("DeleteReferenceImage")) - .build(); - } - } - } - return getDeleteReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getListReferenceImagesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListReferenceImages", - requestType = com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListReferenceImagesMethod() { - io.grpc.MethodDescriptor getListReferenceImagesMethod; - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListReferenceImagesMethod = ProductSearchGrpc.getListReferenceImagesMethod) == null) { - ProductSearchGrpc.getListReferenceImagesMethod = getListReferenceImagesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListReferenceImages")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListReferenceImages")) - .build(); - } - } - } - return getListReferenceImagesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetReferenceImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetReferenceImage", - requestType = com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ReferenceImage.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetReferenceImageMethod() { - io.grpc.MethodDescriptor getGetReferenceImageMethod; - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getGetReferenceImageMethod = ProductSearchGrpc.getGetReferenceImageMethod) == null) { - ProductSearchGrpc.getGetReferenceImageMethod = getGetReferenceImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetReferenceImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("GetReferenceImage")) - .build(); - } - } - } - return getGetReferenceImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getAddProductToProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AddProductToProductSet", - requestType = com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAddProductToProductSetMethod() { - io.grpc.MethodDescriptor getAddProductToProductSetMethod; - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getAddProductToProductSetMethod = ProductSearchGrpc.getAddProductToProductSetMethod) == null) { - ProductSearchGrpc.getAddProductToProductSetMethod = getAddProductToProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddProductToProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("AddProductToProductSet")) - .build(); - } - } - } - return getAddProductToProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveProductFromProductSet", - requestType = com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod() { - io.grpc.MethodDescriptor getRemoveProductFromProductSetMethod; - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getRemoveProductFromProductSetMethod = ProductSearchGrpc.getRemoveProductFromProductSetMethod) == null) { - ProductSearchGrpc.getRemoveProductFromProductSetMethod = getRemoveProductFromProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveProductFromProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("RemoveProductFromProductSet")) - .build(); - } - } - } - return getRemoveProductFromProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListProductsInProductSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListProductsInProductSet", - requestType = com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, - responseType = com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListProductsInProductSetMethod() { - io.grpc.MethodDescriptor getListProductsInProductSetMethod; - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getListProductsInProductSetMethod = ProductSearchGrpc.getListProductsInProductSetMethod) == null) { - ProductSearchGrpc.getListProductsInProductSetMethod = getListProductsInProductSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductsInProductSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ListProductsInProductSet")) - .build(); - } - } - } - return getListProductsInProductSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getImportProductSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ImportProductSets", - requestType = com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getImportProductSetsMethod() { - io.grpc.MethodDescriptor getImportProductSetsMethod; - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getImportProductSetsMethod = ProductSearchGrpc.getImportProductSetsMethod) == null) { - ProductSearchGrpc.getImportProductSetsMethod = getImportProductSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportProductSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("ImportProductSets")) - .build(); - } - } - } - return getImportProductSetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getPurgeProductsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PurgeProducts", - requestType = com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPurgeProductsMethod() { - io.grpc.MethodDescriptor getPurgeProductsMethod; - if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { - synchronized (ProductSearchGrpc.class) { - if ((getPurgeProductsMethod = ProductSearchGrpc.getPurgeProductsMethod) == null) { - ProductSearchGrpc.getPurgeProductsMethod = getPurgeProductsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PurgeProducts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new ProductSearchMethodDescriptorSupplier("PurgeProducts")) - .build(); - } - } - } - return getPurgeProductsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ProductSearchStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - }; - return ProductSearchStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ProductSearchBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - }; - return ProductSearchBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ProductSearchFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ProductSearchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - }; - return ProductSearchFutureStub.newStub(factory, channel); - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of
-   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
-   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
-   * named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static abstract class ProductSearchImplBase implements io.grpc.BindableService { - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductSetsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductSetMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductSetMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductSetMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateProductMethod(), responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateProductMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteProductMethod(), responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListReferenceImagesMethod(), responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetReferenceImageMethod(), responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddProductToProductSetMethod(), responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveProductFromProductSetMethod(), responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListProductsInProductSetMethod(), responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductSetsMethod(), responseObserver); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public void purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPurgeProductsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, - com.google.cloud.vision.v1p4beta1.ProductSet>( - this, METHODID_CREATE_PRODUCT_SET))) - .addMethod( - getListProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest, - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse>( - this, METHODID_LIST_PRODUCT_SETS))) - .addMethod( - getGetProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.GetProductSetRequest, - com.google.cloud.vision.v1p4beta1.ProductSet>( - this, METHODID_GET_PRODUCT_SET))) - .addMethod( - getUpdateProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest, - com.google.cloud.vision.v1p4beta1.ProductSet>( - this, METHODID_UPDATE_PRODUCT_SET))) - .addMethod( - getDeleteProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT_SET))) - .addMethod( - getCreateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.CreateProductRequest, - com.google.cloud.vision.v1p4beta1.Product>( - this, METHODID_CREATE_PRODUCT))) - .addMethod( - getListProductsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.ListProductsRequest, - com.google.cloud.vision.v1p4beta1.ListProductsResponse>( - this, METHODID_LIST_PRODUCTS))) - .addMethod( - getGetProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.GetProductRequest, - com.google.cloud.vision.v1p4beta1.Product>( - this, METHODID_GET_PRODUCT))) - .addMethod( - getUpdateProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.UpdateProductRequest, - com.google.cloud.vision.v1p4beta1.Product>( - this, METHODID_UPDATE_PRODUCT))) - .addMethod( - getDeleteProductMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.DeleteProductRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_PRODUCT))) - .addMethod( - getCreateReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest, - com.google.cloud.vision.v1p4beta1.ReferenceImage>( - this, METHODID_CREATE_REFERENCE_IMAGE))) - .addMethod( - getDeleteReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_REFERENCE_IMAGE))) - .addMethod( - getListReferenceImagesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest, - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse>( - this, METHODID_LIST_REFERENCE_IMAGES))) - .addMethod( - getGetReferenceImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest, - com.google.cloud.vision.v1p4beta1.ReferenceImage>( - this, METHODID_GET_REFERENCE_IMAGE))) - .addMethod( - getAddProductToProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_ADD_PRODUCT_TO_PRODUCT_SET))) - .addMethod( - getRemoveProductFromProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest, - com.google.protobuf.Empty>( - this, METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET))) - .addMethod( - getListProductsInProductSetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest, - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse>( - this, METHODID_LIST_PRODUCTS_IN_PRODUCT_SET))) - .addMethod( - getImportProductSetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest, - com.google.longrunning.Operation>( - this, METHODID_IMPORT_PRODUCT_SETS))) - .addMethod( - getPurgeProductsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest, - com.google.longrunning.Operation>( - this, METHODID_PURGE_PRODUCTS))) - .build(); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of
-   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
-   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
-   * named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchStub extends io.grpc.stub.AbstractAsyncStub { - private ProductSearchStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public void createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public void getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public void updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public void createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public void getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public void updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public void deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public void createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public void deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public void listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public void getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public void listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public void importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public void purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of
-   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
-   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
-   * named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ProductSearchBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchBlockingStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ProductSet createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductSetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ProductSet updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.protobuf.Empty deleteProductSet(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.Product createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ListProductsResponse listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.Product getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.Product updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public com.google.protobuf.Empty deleteProduct(com.google.cloud.vision.v1p4beta1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteProductMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage createReferenceImage(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.protobuf.Empty deleteReferenceImage(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListReferenceImagesMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetReferenceImageMethod(), getCallOptions(), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.protobuf.Empty addProductToProductSet(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAddProductToProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public com.google.protobuf.Empty removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveProductFromProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse listProductsInProductSet(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListProductsInProductSetMethod(), getCallOptions(), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.longrunning.Operation importProductSets(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getImportProductSetsMethod(), getCallOptions(), request); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPurgeProductsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Manages Products and ProductSets of reference images for use in product
-   * search. It uses the following resource model:
-   * - The API has a collection of
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
-   * `projects/*/locations/*/productSets/*`, which acts as a way to put different
-   * products into groups to limit identification.
-   * In parallel,
-   * - The API has a collection of
-   * [Product][google.cloud.vision.v1p4beta1.Product] resources, named
-   *   `projects/*/locations/*/products/*`
-   * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
-   * [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
-   * named
-   *   `projects/*/locations/*/products/*/referenceImages/*`
-   * 
- */ - public static final class ProductSearchFutureStub extends io.grpc.stub.AbstractFutureStub { - private ProductSearchFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ProductSearchFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ProductSearchFutureStub(channel, callOptions); - } - - /** - *
-     * Creates and returns a new ProductSet resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
-     *   4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProductSet( - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists ProductSets in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductSets( - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductSetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ProductSet.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProductSet( - com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a ProductSet resource.
-     * Only display_name can be updated currently.
-     * Possible errors:
-     * * Returns NOT_FOUND if the ProductSet does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but
-     *   missing from the request or longer than 4096 characters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProductSet( - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a ProductSet. Products and ReferenceImages in the
-     * ProductSet are not deleted.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProductSet( - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new product resource.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is missing or invalid.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createProduct( - com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists products in an unspecified order.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProducts( - com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a Product.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getProduct( - com.google.cloud.vision.v1p4beta1.GetProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Makes changes to a Product resource.
-     * Only the `display_name`, `description`, and `labels` fields can be updated
-     * right now.
-     * If labels are updated, the change will not be reflected in queries until
-     * the next index time.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product does not exist.
-     * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
-     *   missing from the request or longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if description is present in update_mask but is
-     *   longer than 4096 characters.
-     * * Returns INVALID_ARGUMENT if product_category is present in update_mask.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateProduct( - com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a product and its reference images.
-     * Metadata of the product and all its images will be deleted right away, but
-     * search queries against ProductSets containing the product may still work
-     * until all related caches are refreshed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteProduct( - com.google.cloud.vision.v1p4beta1.DeleteProductRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteProductMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates and returns a new ReferenceImage resource.
-     * The `bounding_poly` field is optional. If `bounding_poly` is not specified,
-     * the system will try to detect regions of interest in the image that are
-     * compatible with the product_category on the parent product. If it is
-     * specified, detection is ALWAYS skipped. The system converts polygons into
-     * non-rotated rectangles.
-     * Note that the pipeline will resize the image if the image resolution is too
-     * large to process (above 50MP).
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
-     *   characters.
-     * * Returns INVALID_ARGUMENT if the product does not exist.
-     * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
-     *   compatible with the parent product's product_category is detected.
-     * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createReferenceImage( - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Permanently deletes a reference image.
-     * The image metadata will be deleted right away, but search queries
-     * against ProductSets containing the image may still work until all related
-     * caches are refreshed.
-     * The actual image files are not deleted from Google Cloud Storage.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteReferenceImage( - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists reference images.
-     * Possible errors:
-     * * Returns NOT_FOUND if the parent product does not exist.
-     * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
-     *   than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listReferenceImages( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListReferenceImagesMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets information associated with a ReferenceImage.
-     * Possible errors:
-     * * Returns NOT_FOUND if the specified image does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getReferenceImage( - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetReferenceImageMethod(), getCallOptions()), request); - } - - /** - *
-     * Adds a Product to the specified ProductSet. If the Product is already
-     * present, no change is made.
-     * One Product can be added to at most 100 ProductSets.
-     * Possible errors:
-     * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture addProductToProductSet( - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAddProductToProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Removes a Product from the specified ProductSet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture removeProductFromProductSet( - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveProductFromProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists the Products in a ProductSet, in an unspecified order. If the
-     * ProductSet does not exist, the products field of the response will be
-     * empty.
-     * Possible errors:
-     * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listProductsInProductSet( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListProductsInProductSetMethod(), getCallOptions()), request); - } - - /** - *
-     * Asynchronous API that imports a list of reference images to specified
-     * product sets based on a list of image information.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * `Operation.response` contains `ImportProductSetsResponse`. (results)
-     * The input source of this method is a csv file on Google Cloud Storage.
-     * For the format of the csv file please see
-     * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture importProductSets( - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getImportProductSetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Asynchronous API to delete all Products in a ProductSet or all Products
-     * that are in no ProductSet.
-     * If a Product is a member of the specified ProductSet in addition to other
-     * ProductSets, the Product will still be deleted.
-     * It is recommended to not delete the specified ProductSet until after this
-     * operation has completed. It is also recommended to not add any of the
-     * Products involved in the batch delete to a new ProductSet while this
-     * operation is running because those Products may still end up deleted.
-     * It's not possible to undo the PurgeProducts operation. Therefore, it is
-     * recommended to keep the csv files used in ImportProductSets (if that was
-     * how you originally built the Product Set) before starting PurgeProducts, in
-     * case you need to re-import the data after deletion.
-     * If the plan is to purge all of the Products from a ProductSet and then
-     * re-use the empty ProductSet to re-import new Products into the empty
-     * ProductSet, you must wait until the PurgeProducts operation has finished
-     * for that ProductSet.
-     * The [google.longrunning.Operation][google.longrunning.Operation] API can be
-     * used to keep track of the progress and results of the request.
-     * `Operation.metadata` contains `BatchOperationMetadata`. (progress)
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture purgeProducts( - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPurgeProductsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_PRODUCT_SET = 0; - private static final int METHODID_LIST_PRODUCT_SETS = 1; - private static final int METHODID_GET_PRODUCT_SET = 2; - private static final int METHODID_UPDATE_PRODUCT_SET = 3; - private static final int METHODID_DELETE_PRODUCT_SET = 4; - private static final int METHODID_CREATE_PRODUCT = 5; - private static final int METHODID_LIST_PRODUCTS = 6; - private static final int METHODID_GET_PRODUCT = 7; - private static final int METHODID_UPDATE_PRODUCT = 8; - private static final int METHODID_DELETE_PRODUCT = 9; - private static final int METHODID_CREATE_REFERENCE_IMAGE = 10; - private static final int METHODID_DELETE_REFERENCE_IMAGE = 11; - private static final int METHODID_LIST_REFERENCE_IMAGES = 12; - private static final int METHODID_GET_REFERENCE_IMAGE = 13; - private static final int METHODID_ADD_PRODUCT_TO_PRODUCT_SET = 14; - private static final int METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET = 15; - private static final int METHODID_LIST_PRODUCTS_IN_PRODUCT_SET = 16; - private static final int METHODID_IMPORT_PRODUCT_SETS = 17; - private static final int METHODID_PURGE_PRODUCTS = 18; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ProductSearchImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ProductSearchImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_PRODUCT_SET: - serviceImpl.createProductSet((com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCT_SETS: - serviceImpl.listProductSets((com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT_SET: - serviceImpl.getProductSet((com.google.cloud.vision.v1p4beta1.GetProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT_SET: - serviceImpl.updateProductSet((com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT_SET: - serviceImpl.deleteProductSet((com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_PRODUCT: - serviceImpl.createProduct((com.google.cloud.vision.v1p4beta1.CreateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS: - serviceImpl.listProducts((com.google.cloud.vision.v1p4beta1.ListProductsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PRODUCT: - serviceImpl.getProduct((com.google.cloud.vision.v1p4beta1.GetProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_PRODUCT: - serviceImpl.updateProduct((com.google.cloud.vision.v1p4beta1.UpdateProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_PRODUCT: - serviceImpl.deleteProduct((com.google.cloud.vision.v1p4beta1.DeleteProductRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_REFERENCE_IMAGE: - serviceImpl.createReferenceImage((com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_REFERENCE_IMAGE: - serviceImpl.deleteReferenceImage((com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_REFERENCE_IMAGES: - serviceImpl.listReferenceImages((com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_REFERENCE_IMAGE: - serviceImpl.getReferenceImage((com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ADD_PRODUCT_TO_PRODUCT_SET: - serviceImpl.addProductToProductSet((com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_PRODUCT_FROM_PRODUCT_SET: - serviceImpl.removeProductFromProductSet((com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_PRODUCTS_IN_PRODUCT_SET: - serviceImpl.listProductsInProductSet((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_IMPORT_PRODUCT_SETS: - serviceImpl.importProductSets((com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_PURGE_PRODUCTS: - serviceImpl.purgeProducts((com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ProductSearchBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ProductSearch"); - } - } - - private static final class ProductSearchFileDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier { - ProductSearchFileDescriptorSupplier() {} - } - - private static final class ProductSearchMethodDescriptorSupplier - extends ProductSearchBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ProductSearchMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ProductSearchGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ProductSearchFileDescriptorSupplier()) - .addMethod(getCreateProductSetMethod()) - .addMethod(getListProductSetsMethod()) - .addMethod(getGetProductSetMethod()) - .addMethod(getUpdateProductSetMethod()) - .addMethod(getDeleteProductSetMethod()) - .addMethod(getCreateProductMethod()) - .addMethod(getListProductsMethod()) - .addMethod(getGetProductMethod()) - .addMethod(getUpdateProductMethod()) - .addMethod(getDeleteProductMethod()) - .addMethod(getCreateReferenceImageMethod()) - .addMethod(getDeleteReferenceImageMethod()) - .addMethod(getListReferenceImagesMethod()) - .addMethod(getGetReferenceImageMethod()) - .addMethod(getAddProductToProductSetMethod()) - .addMethod(getRemoveProductFromProductSetMethod()) - .addMethod(getListProductsInProductSetMethod()) - .addMethod(getImportProductSetsMethod()) - .addMethod(getPurgeProductsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java deleted file mode 100644 index 053f1a5043a3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `AddProductToProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} - */ -public final class AddProductToProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - AddProductToProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AddProductToProductSetRequest.newBuilder() to construct. - private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AddProductToProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AddProductToProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AddProductToProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `AddProductToProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest result = new com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be added to this ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AddProductToProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AddProductToProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java deleted file mode 100644 index 595a24af90d1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AddProductToProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be added to this ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java deleted file mode 100644 index 97a09cf93788..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java +++ /dev/null @@ -1,1651 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} - */ -public final class AnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - AnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileRequest.newBuilder() to construct. - private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - pages_ = emptyIntList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pages_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - pages_.addInt(input.readInt32()); - break; - } - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - pages_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - pages_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pages_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int PAGES_FIELD_NUMBER = 4; - private com.google.protobuf.Internal.IntList pages_; - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - @java.lang.Override - public java.util.List - getPagesList() { - return pages_; - } - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - public int getPages(int index) { - return pages_.getInt(index); - } - private int pagesMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (getPagesList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(pagesMemoizedSerializedSize); - } - for (int i = 0; i < pages_.size(); i++) { - output.writeInt32NoTag(pages_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - { - int dataSize = 0; - for (int i = 0; i < pages_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(pages_.getInt(i)); - } - size += dataSize; - if (!getPagesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - pagesMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - pages_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest build() { - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest result = new com.google.cloud.vision.v1p4beta1.AnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - pages_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pages_ = pages_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.protobuf.Internal.IntList pages_ = emptyIntList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - pages_ = mutableCopy(pages_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - public java.util.List - getPagesList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(pages_) : pages_; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - public int getPagesCount() { - return pages_.size(); - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - public int getPages(int index) { - return pages_.getInt(index); - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param index The index to set the value at. - * @param value The pages to set. - * @return This builder for chaining. - */ - public Builder setPages( - int index, int value) { - ensurePagesIsMutable(); - pages_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param value The pages to add. - * @return This builder for chaining. - */ - public Builder addPages(int value) { - ensurePagesIsMutable(); - pages_.addInt(value); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @param values The pages to add. - * @return This builder for chaining. - */ - public Builder addAllPages( - java.lang.Iterable values) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - return this; - } - /** - *
-     * Pages of the file to perform image annotation.
-     * Pages starts from 1, we assume the first page of the file is page 1.
-     * At most 5 pages are supported per request. Pages can be negative.
-     * Page 1 means the first page.
-     * Page 2 means the second page.
-     * Page -1 means the last page.
-     * Page -2 means the second to the last page.
-     * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-     * If this field is empty, by default the service performs image annotation
-     * for the first 5 pages of the file.
-     * 
- * - * repeated int32 pages = 4; - * @return This builder for chaining. - */ - public Builder clearPages() { - pages_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - private static final com.google.cloud.vision.v1p4beta1.AnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java deleted file mode 100644 index 8afb5a7a9beb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return A list containing the pages. - */ - java.util.List getPagesList(); - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @return The count of pages. - */ - int getPagesCount(); - /** - *
-   * Pages of the file to perform image annotation.
-   * Pages starts from 1, we assume the first page of the file is page 1.
-   * At most 5 pages are supported per request. Pages can be negative.
-   * Page 1 means the first page.
-   * Page 2 means the second page.
-   * Page -1 means the last page.
-   * Page -2 means the second to the last page.
-   * If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
-   * If this field is empty, by default the service performs image annotation
-   * for the first 5 pages of the file.
-   * 
- * - * repeated int32 pages = 4; - * @param index The index of the element to return. - * @return The pages at the given index. - */ - int getPages(int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java deleted file mode 100644 index e2559320414c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java +++ /dev/null @@ -1,1461 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response to a single file annotation request. A file may contain one or more
- * images, which individually have their own responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} - */ -public final class AnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - AnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateFileResponse.newBuilder() to construct. - private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateFileResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - case 24: { - - totalPages_ = input.readInt32(); - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int RESPONSES_FIELD_NUMBER = 2; - private java.util.List responses_; - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - public static final int TOTAL_PAGES_FIELD_NUMBER = 3; - private int totalPages_; - /** - *
-   * This field gives the total number of pages in the file.
-   * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - @java.lang.Override - public int getTotalPages() { - return totalPages_; - } - - public static final int ERROR_FIELD_NUMBER = 4; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(2, responses_.get(i)); - } - if (totalPages_ != 0) { - output.writeInt32(3, totalPages_); - } - if (error_ != null) { - output.writeMessage(4, getError()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, responses_.get(i)); - } - if (totalPages_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, totalPages_); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getError()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (getTotalPages() - != other.getTotalPages()) return false; - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER; - hash = (53 * hash) + getTotalPages(); - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a single file annotation request. A file may contain one or more
-   * images, which individually have their own responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - totalPages_ = 0; - - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse build() { - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse result = new com.google.cloud.vision.v1p4beta1.AnnotateFileResponse(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - result.totalPages_ = totalPages_; - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - if (other.getTotalPages() != 0) { - setTotalPages(other.getTotalPages()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Information about the file for which this response is generated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to images found within the file. This field will be
-     * empty if the `error` field is set.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - - private int totalPages_ ; - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - @java.lang.Override - public int getTotalPages() { - return totalPages_; - } - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @param value The totalPages to set. - * @return This builder for chaining. - */ - public Builder setTotalPages(int value) { - - totalPages_ = value; - onChanged(); - return this; - } - /** - *
-     * This field gives the total number of pages in the file.
-     * 
- * - * int32 total_pages = 3; - * @return This builder for chaining. - */ - public Builder clearTotalPages() { - - totalPages_ = 0; - onChanged(); - return this; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the failed request. The
-     * `responses` field will not be set in this case.
-     * 
- * - * .google.rpc.Status error = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - private static final com.google.cloud.vision.v1p4beta1.AnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java deleted file mode 100644 index 8cf89b180117..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,125 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); - /** - *
-   * Information about the file for which this response is generated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to images found within the file. This field will be
-   * empty if the `error` field is set.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); - - /** - *
-   * This field gives the total number of pages in the file.
-   * 
- * - * int32 total_pages = 3; - * @return The totalPages. - */ - int getTotalPages(); - - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the failed request. The
-   * `responses` field will not be set in this case.
-   * 
- * - * .google.rpc.Status error = 4; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java deleted file mode 100644 index c739b512f673..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java +++ /dev/null @@ -1,1346 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request for performing Google Cloud Vision API tasks over a user-provided
- * image, with user-requested features, and with context information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} - */ -public final class AnnotateImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - AnnotateImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageRequest.newBuilder() to construct. - private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.Image.Builder subBuilder = null; - if (image_ != null) { - subBuilder = image_.toBuilder(); - } - image_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder.class); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.Image image_; - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return Whether the image field is set. - */ - @java.lang.Override - public boolean hasImage() { - return image_ != null; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return The image. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Image getImage() { - return image_ == null ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; - } - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() { - return getImage(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (image_ != null) { - output.writeMessage(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (image_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getImage()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) obj; - - if (hasImage() != other.hasImage()) return false; - if (hasImage()) { - if (!getImage() - .equals(other.getImage())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasImage()) { - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for performing Google Cloud Vision API tasks over a user-provided
-   * image, with user-requested features, and with context information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.class, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (imageBuilder_ == null) { - image_ = null; - } else { - image_ = null; - imageBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest build() { - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest result = new com.google.cloud.vision.v1p4beta1.AnnotateImageRequest(this); - int from_bitField0_ = bitField0_; - if (imageBuilder_ == null) { - result.image_ = image_; - } else { - result.image_ = imageBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()) return this; - if (other.hasImage()) { - mergeImage(other.getImage()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.Image image_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder> imageBuilder_; - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return Whether the image field is set. - */ - public boolean hasImage() { - return imageBuilder_ != null || image_ != null; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return The image. - */ - public com.google.cloud.vision.v1p4beta1.Image getImage() { - if (imageBuilder_ == null) { - return image_ == null ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; - } else { - return imageBuilder_.getMessage(); - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.vision.v1p4beta1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - image_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public Builder setImage( - com.google.cloud.vision.v1p4beta1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - image_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.vision.v1p4beta1.Image value) { - if (imageBuilder_ == null) { - if (image_ != null) { - image_ = - com.google.cloud.vision.v1p4beta1.Image.newBuilder(image_).mergeFrom(value).buildPartial(); - } else { - image_ = value; - } - onChanged(); - } else { - imageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - image_ = null; - onChanged(); - } else { - image_ = null; - imageBuilder_ = null; - } - - return this; - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p4beta1.Image.Builder getImageBuilder() { - - onChanged(); - return getImageFieldBuilder().getBuilder(); - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() { - if (imageBuilder_ != null) { - return imageBuilder_.getMessageOrBuilder(); - } else { - return image_ == null ? - com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_; - } - } - /** - *
-     * The image to be processed.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, com.google.cloud.vision.v1p4beta1.ImageOrBuilder>( - getImage(), - getParentForChildren(), - isClean()); - image_ = null; - } - return imageBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - private static final com.google.cloud.vision.v1p4beta1.AnnotateImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java deleted file mode 100644 index a0c31ffdef20..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequestOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AnnotateImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - * @return The image. - */ - com.google.cloud.vision.v1p4beta1.Image getImage(); - /** - *
-   * The image to be processed.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Image image = 1; - */ - com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder(); - - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java deleted file mode 100644 index 3e06218abd5f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java +++ /dev/null @@ -1,5055 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response to an image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} - */ -public final class AnnotateImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - AnnotateImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnnotateImageResponse.newBuilder() to construct. - private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnnotateImageResponse() { - faceAnnotations_ = java.util.Collections.emptyList(); - landmarkAnnotations_ = java.util.Collections.emptyList(); - logoAnnotations_ = java.util.Collections.emptyList(); - labelAnnotations_ = java.util.Collections.emptyList(); - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - textAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnnotateImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnnotateImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - faceAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.FaceAnnotation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - landmarkAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - logoAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - labelAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - textAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.EntityAnnotation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder subBuilder = null; - if (safeSearchAnnotation_ != null) { - subBuilder = safeSearchAnnotation_.toBuilder(); - } - safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(safeSearchAnnotation_); - safeSearchAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.cloud.vision.v1p4beta1.ImageProperties.Builder subBuilder = null; - if (imagePropertiesAnnotation_ != null) { - subBuilder = imagePropertiesAnnotation_.toBuilder(); - } - imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imagePropertiesAnnotation_); - imagePropertiesAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.rpc.Status.Builder subBuilder = null; - if (error_ != null) { - subBuilder = error_.toBuilder(); - } - error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder subBuilder = null; - if (cropHintsAnnotation_ != null) { - subBuilder = cropHintsAnnotation_.toBuilder(); - } - cropHintsAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsAnnotation_); - cropHintsAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder subBuilder = null; - if (fullTextAnnotation_ != null) { - subBuilder = fullTextAnnotation_.toBuilder(); - } - fullTextAnnotation_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fullTextAnnotation_); - fullTextAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.vision.v1p4beta1.WebDetection.Builder subBuilder = null; - if (webDetection_ != null) { - subBuilder = webDetection_.toBuilder(); - } - webDetection_ = input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetection_); - webDetection_ = subBuilder.buildPartial(); - } - - break; - } - case 114: { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder subBuilder = null; - if (productSearchResults_ != null) { - subBuilder = productSearchResults_.toBuilder(); - } - productSearchResults_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchResults_); - productSearchResults_ = subBuilder.buildPartial(); - } - - break; - } - case 170: { - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - localizedObjectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder.class); - } - - public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; - private java.util.List faceAnnotations_; - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List getFaceAnnotationsList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public java.util.List - getFaceAnnotationsOrBuilderList() { - return faceAnnotations_; - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public int getFaceAnnotationsCount() { - return faceAnnotations_.size(); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) { - return faceAnnotations_.get(index); - } - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - return faceAnnotations_.get(index); - } - - public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; - private java.util.List landmarkAnnotations_; - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List getLandmarkAnnotationsList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - return landmarkAnnotations_; - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public int getLandmarkAnnotationsCount() { - return landmarkAnnotations_.size(); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) { - return landmarkAnnotations_.get(index); - } - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - return landmarkAnnotations_.get(index); - } - - public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List logoAnnotations_; - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List getLogoAnnotationsList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public java.util.List - getLogoAnnotationsOrBuilderList() { - return logoAnnotations_; - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public int getLogoAnnotationsCount() { - return logoAnnotations_.size(); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) { - return logoAnnotations_.get(index); - } - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - return logoAnnotations_.get(index); - } - - public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; - private java.util.List labelAnnotations_; - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List getLabelAnnotationsList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public java.util.List - getLabelAnnotationsOrBuilderList() { - return labelAnnotations_; - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public int getLabelAnnotationsCount() { - return labelAnnotations_.size(); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) { - return labelAnnotations_.get(index); - } - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - return labelAnnotations_.get(index); - } - - public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22; - private java.util.List localizedObjectAnnotations_; - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List getLocalizedObjectAnnotationsList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - return localizedObjectAnnotations_; - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public int getLocalizedObjectAnnotationsCount() { - return localizedObjectAnnotations_.size(); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - return localizedObjectAnnotations_.get(index); - } - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - return localizedObjectAnnotations_.get(index); - } - - public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; - private java.util.List textAnnotations_; - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List getTextAnnotationsList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public java.util.List - getTextAnnotationsOrBuilderList() { - return textAnnotations_; - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public int getTextAnnotationsCount() { - return textAnnotations_.size(); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) { - return textAnnotations_.get(index); - } - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - return textAnnotations_.get(index); - } - - public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_; - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - @java.lang.Override - public boolean hasFullTextAnnotation() { - return fullTextAnnotation_ != null; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - return getFullTextAnnotation(); - } - - public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_; - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - @java.lang.Override - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotation_ != null; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - return getSafeSearchAnnotation(); - } - - public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; - private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_; - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - @java.lang.Override - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ != null; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - return getImagePropertiesAnnotation(); - } - - public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; - private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_; - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - @java.lang.Override - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotation_ != null; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - return getCropHintsAnnotation(); - } - - public static final int WEB_DETECTION_FIELD_NUMBER = 13; - private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_; - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - @java.lang.Override - public boolean hasWebDetection() { - return webDetection_ != null; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() { - return webDetection_ == null ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; - } - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - return getWebDetection(); - } - - public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14; - private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_; - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - @java.lang.Override - public boolean hasProductSearchResults() { - return productSearchResults_ != null; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() { - return productSearchResults_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - return getProductSearchResults(); - } - - public static final int ERROR_FIELD_NUMBER = 9; - private com.google.rpc.Status error_; - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return error_ != null; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - return getError(); - } - - public static final int CONTEXT_FIELD_NUMBER = 21; - private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_; - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() { - return context_ == null ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - return getContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < faceAnnotations_.size(); i++) { - output.writeMessage(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - output.writeMessage(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - output.writeMessage(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - output.writeMessage(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - output.writeMessage(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - output.writeMessage(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - output.writeMessage(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - output.writeMessage(9, getError()); - } - if (cropHintsAnnotation_ != null) { - output.writeMessage(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - output.writeMessage(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - output.writeMessage(13, getWebDetection()); - } - if (productSearchResults_ != null) { - output.writeMessage(14, getProductSearchResults()); - } - if (context_ != null) { - output.writeMessage(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - output.writeMessage(22, localizedObjectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < faceAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, faceAnnotations_.get(i)); - } - for (int i = 0; i < landmarkAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, landmarkAnnotations_.get(i)); - } - for (int i = 0; i < logoAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, logoAnnotations_.get(i)); - } - for (int i = 0; i < labelAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, labelAnnotations_.get(i)); - } - for (int i = 0; i < textAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, textAnnotations_.get(i)); - } - if (safeSearchAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getSafeSearchAnnotation()); - } - if (imagePropertiesAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getImagePropertiesAnnotation()); - } - if (error_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getError()); - } - if (cropHintsAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCropHintsAnnotation()); - } - if (fullTextAnnotation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getFullTextAnnotation()); - } - if (webDetection_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getWebDetection()); - } - if (productSearchResults_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getProductSearchResults()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getContext()); - } - for (int i = 0; i < localizedObjectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(22, localizedObjectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) obj; - - if (!getFaceAnnotationsList() - .equals(other.getFaceAnnotationsList())) return false; - if (!getLandmarkAnnotationsList() - .equals(other.getLandmarkAnnotationsList())) return false; - if (!getLogoAnnotationsList() - .equals(other.getLogoAnnotationsList())) return false; - if (!getLabelAnnotationsList() - .equals(other.getLabelAnnotationsList())) return false; - if (!getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList())) return false; - if (!getTextAnnotationsList() - .equals(other.getTextAnnotationsList())) return false; - if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; - if (hasFullTextAnnotation()) { - if (!getFullTextAnnotation() - .equals(other.getFullTextAnnotation())) return false; - } - if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; - if (hasSafeSearchAnnotation()) { - if (!getSafeSearchAnnotation() - .equals(other.getSafeSearchAnnotation())) return false; - } - if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; - if (hasImagePropertiesAnnotation()) { - if (!getImagePropertiesAnnotation() - .equals(other.getImagePropertiesAnnotation())) return false; - } - if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; - if (hasCropHintsAnnotation()) { - if (!getCropHintsAnnotation() - .equals(other.getCropHintsAnnotation())) return false; - } - if (hasWebDetection() != other.hasWebDetection()) return false; - if (hasWebDetection()) { - if (!getWebDetection() - .equals(other.getWebDetection())) return false; - } - if (hasProductSearchResults() != other.hasProductSearchResults()) return false; - if (hasProductSearchResults()) { - if (!getProductSearchResults() - .equals(other.getProductSearchResults())) return false; - } - if (hasError() != other.hasError()) return false; - if (hasError()) { - if (!getError() - .equals(other.getError())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFaceAnnotationsCount() > 0) { - hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFaceAnnotationsList().hashCode(); - } - if (getLandmarkAnnotationsCount() > 0) { - hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); - } - if (getLogoAnnotationsCount() > 0) { - hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLogoAnnotationsList().hashCode(); - } - if (getLabelAnnotationsCount() > 0) { - hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLabelAnnotationsList().hashCode(); - } - if (getLocalizedObjectAnnotationsCount() > 0) { - hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode(); - } - if (getTextAnnotationsCount() > 0) { - hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTextAnnotationsList().hashCode(); - } - if (hasFullTextAnnotation()) { - hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getFullTextAnnotation().hashCode(); - } - if (hasSafeSearchAnnotation()) { - hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); - } - if (hasImagePropertiesAnnotation()) { - hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); - } - if (hasCropHintsAnnotation()) { - hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsAnnotation().hashCode(); - } - if (hasWebDetection()) { - hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getWebDetection().hashCode(); - } - if (hasProductSearchResults()) { - hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchResults().hashCode(); - } - if (hasError()) { - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFaceAnnotationsFieldBuilder(); - getLandmarkAnnotationsFieldBuilder(); - getLogoAnnotationsFieldBuilder(); - getLabelAnnotationsFieldBuilder(); - getLocalizedObjectAnnotationsFieldBuilder(); - getTextAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - faceAnnotationsBuilder_.clear(); - } - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - landmarkAnnotationsBuilder_.clear(); - } - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - logoAnnotationsBuilder_.clear(); - } - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - labelAnnotationsBuilder_.clear(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - textAnnotationsBuilder_.clear(); - } - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - if (webDetectionBuilder_ == null) { - webDetection_ = null; - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - if (errorBuilder_ == null) { - error_ = null; - } else { - error_ = null; - errorBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse build() { - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p4beta1.AnnotateImageResponse(this); - int from_bitField0_ = bitField0_; - if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.faceAnnotations_ = faceAnnotations_; - } else { - result.faceAnnotations_ = faceAnnotationsBuilder_.build(); - } - if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.landmarkAnnotations_ = landmarkAnnotations_; - } else { - result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); - } - if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.logoAnnotations_ = logoAnnotations_; - } else { - result.logoAnnotations_ = logoAnnotationsBuilder_.build(); - } - if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.labelAnnotations_ = labelAnnotations_; - } else { - result.labelAnnotations_ = labelAnnotationsBuilder_.build(); - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.localizedObjectAnnotations_ = localizedObjectAnnotations_; - } else { - result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); - } - if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.textAnnotations_ = textAnnotations_; - } else { - result.textAnnotations_ = textAnnotationsBuilder_.build(); - } - if (fullTextAnnotationBuilder_ == null) { - result.fullTextAnnotation_ = fullTextAnnotation_; - } else { - result.fullTextAnnotation_ = fullTextAnnotationBuilder_.build(); - } - if (safeSearchAnnotationBuilder_ == null) { - result.safeSearchAnnotation_ = safeSearchAnnotation_; - } else { - result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build(); - } - if (imagePropertiesAnnotationBuilder_ == null) { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_; - } else { - result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build(); - } - if (cropHintsAnnotationBuilder_ == null) { - result.cropHintsAnnotation_ = cropHintsAnnotation_; - } else { - result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_.build(); - } - if (webDetectionBuilder_ == null) { - result.webDetection_ = webDetection_; - } else { - result.webDetection_ = webDetectionBuilder_.build(); - } - if (productSearchResultsBuilder_ == null) { - result.productSearchResults_ = productSearchResults_; - } else { - result.productSearchResults_ = productSearchResultsBuilder_.build(); - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AnnotateImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()) return this; - if (faceAnnotationsBuilder_ == null) { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotations_.isEmpty()) { - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.addAll(other.faceAnnotations_); - } - onChanged(); - } - } else { - if (!other.faceAnnotations_.isEmpty()) { - if (faceAnnotationsBuilder_.isEmpty()) { - faceAnnotationsBuilder_.dispose(); - faceAnnotationsBuilder_ = null; - faceAnnotations_ = other.faceAnnotations_; - bitField0_ = (bitField0_ & ~0x00000001); - faceAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFaceAnnotationsFieldBuilder() : null; - } else { - faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); - } - } - } - if (landmarkAnnotationsBuilder_ == null) { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotations_.isEmpty()) { - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.addAll(other.landmarkAnnotations_); - } - onChanged(); - } - } else { - if (!other.landmarkAnnotations_.isEmpty()) { - if (landmarkAnnotationsBuilder_.isEmpty()) { - landmarkAnnotationsBuilder_.dispose(); - landmarkAnnotationsBuilder_ = null; - landmarkAnnotations_ = other.landmarkAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - landmarkAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarkAnnotationsFieldBuilder() : null; - } else { - landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); - } - } - } - if (logoAnnotationsBuilder_ == null) { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotations_.isEmpty()) { - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.addAll(other.logoAnnotations_); - } - onChanged(); - } - } else { - if (!other.logoAnnotations_.isEmpty()) { - if (logoAnnotationsBuilder_.isEmpty()) { - logoAnnotationsBuilder_.dispose(); - logoAnnotationsBuilder_ = null; - logoAnnotations_ = other.logoAnnotations_; - bitField0_ = (bitField0_ & ~0x00000004); - logoAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLogoAnnotationsFieldBuilder() : null; - } else { - logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); - } - } - } - if (labelAnnotationsBuilder_ == null) { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotations_.isEmpty()) { - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.addAll(other.labelAnnotations_); - } - onChanged(); - } - } else { - if (!other.labelAnnotations_.isEmpty()) { - if (labelAnnotationsBuilder_.isEmpty()) { - labelAnnotationsBuilder_.dispose(); - labelAnnotationsBuilder_ = null; - labelAnnotations_ = other.labelAnnotations_; - bitField0_ = (bitField0_ & ~0x00000008); - labelAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLabelAnnotationsFieldBuilder() : null; - } else { - labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); - } - } - } - if (localizedObjectAnnotationsBuilder_ == null) { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotations_.isEmpty()) { - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_); - } - onChanged(); - } - } else { - if (!other.localizedObjectAnnotations_.isEmpty()) { - if (localizedObjectAnnotationsBuilder_.isEmpty()) { - localizedObjectAnnotationsBuilder_.dispose(); - localizedObjectAnnotationsBuilder_ = null; - localizedObjectAnnotations_ = other.localizedObjectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000010); - localizedObjectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocalizedObjectAnnotationsFieldBuilder() : null; - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_); - } - } - } - if (textAnnotationsBuilder_ == null) { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotations_.isEmpty()) { - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTextAnnotationsIsMutable(); - textAnnotations_.addAll(other.textAnnotations_); - } - onChanged(); - } - } else { - if (!other.textAnnotations_.isEmpty()) { - if (textAnnotationsBuilder_.isEmpty()) { - textAnnotationsBuilder_.dispose(); - textAnnotationsBuilder_ = null; - textAnnotations_ = other.textAnnotations_; - bitField0_ = (bitField0_ & ~0x00000020); - textAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTextAnnotationsFieldBuilder() : null; - } else { - textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); - } - } - } - if (other.hasFullTextAnnotation()) { - mergeFullTextAnnotation(other.getFullTextAnnotation()); - } - if (other.hasSafeSearchAnnotation()) { - mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); - } - if (other.hasImagePropertiesAnnotation()) { - mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); - } - if (other.hasCropHintsAnnotation()) { - mergeCropHintsAnnotation(other.getCropHintsAnnotation()); - } - if (other.hasWebDetection()) { - mergeWebDetection(other.getWebDetection()); - } - if (other.hasProductSearchResults()) { - mergeProductSearchResults(other.getProductSearchResults()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List faceAnnotations_ = - java.util.Collections.emptyList(); - private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; - - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List getFaceAnnotationsList() { - if (faceAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } else { - return faceAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public int getFaceAnnotationsCount() { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.size(); - } else { - return faceAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); - } else { - return faceAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder setFaceAnnotations( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations(com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) { - if (faceAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, value); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addFaceAnnotations( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder addAllFaceAnnotations( - java.lang.Iterable values) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, faceAnnotations_); - onChanged(); - } else { - faceAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder clearFaceAnnotations() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - faceAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public Builder removeFaceAnnotations(int index) { - if (faceAnnotationsBuilder_ == null) { - ensureFaceAnnotationsIsMutable(); - faceAnnotations_.remove(index); - onChanged(); - } else { - faceAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index) { - if (faceAnnotationsBuilder_ == null) { - return faceAnnotations_.get(index); } else { - return faceAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsOrBuilderList() { - if (faceAnnotationsBuilder_ != null) { - return faceAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(faceAnnotations_); - } - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { - return getFaceAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( - int index) { - return getFaceAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, face detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - public java.util.List - getFaceAnnotationsBuilderList() { - return getFaceAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder> - getFaceAnnotationsFieldBuilder() { - if (faceAnnotationsBuilder_ == null) { - faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>( - faceAnnotations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - faceAnnotations_ = null; - } - return faceAnnotationsBuilder_; - } - - private java.util.List landmarkAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; - - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List getLandmarkAnnotationsList() { - if (landmarkAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } else { - return landmarkAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public int getLandmarkAnnotationsCount() { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.size(); - } else { - return landmarkAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); - } else { - return landmarkAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder setLandmarkAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (landmarkAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, value); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addLandmarkAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder addAllLandmarkAnnotations( - java.lang.Iterable values) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarkAnnotations_); - onChanged(); - } else { - landmarkAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder clearLandmarkAnnotations() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - landmarkAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public Builder removeLandmarkAnnotations(int index) { - if (landmarkAnnotationsBuilder_ == null) { - ensureLandmarkAnnotationsIsMutable(); - landmarkAnnotations_.remove(index); - onChanged(); - } else { - landmarkAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index) { - if (landmarkAnnotationsBuilder_ == null) { - return landmarkAnnotations_.get(index); } else { - return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsOrBuilderList() { - if (landmarkAnnotationsBuilder_ != null) { - return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarkAnnotations_); - } - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( - int index) { - return getLandmarkAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, landmark detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - public java.util.List - getLandmarkAnnotationsBuilderList() { - return getLandmarkAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> - getLandmarkAnnotationsFieldBuilder() { - if (landmarkAnnotationsBuilder_ == null) { - landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( - landmarkAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - landmarkAnnotations_ = null; - } - return landmarkAnnotationsBuilder_; - } - - private java.util.List logoAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; - - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List getLogoAnnotationsList() { - if (logoAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } else { - return logoAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public int getLogoAnnotationsCount() { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.size(); - } else { - return logoAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); - } else { - return logoAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder setLogoAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (logoAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, value); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addLogoAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder addAllLogoAnnotations( - java.lang.Iterable values) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, logoAnnotations_); - onChanged(); - } else { - logoAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder clearLogoAnnotations() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - logoAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public Builder removeLogoAnnotations(int index) { - if (logoAnnotationsBuilder_ == null) { - ensureLogoAnnotationsIsMutable(); - logoAnnotations_.remove(index); - onChanged(); - } else { - logoAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index) { - if (logoAnnotationsBuilder_ == null) { - return logoAnnotations_.get(index); } else { - return logoAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsOrBuilderList() { - if (logoAnnotationsBuilder_ != null) { - return logoAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(logoAnnotations_); - } - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { - return getLogoAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( - int index) { - return getLogoAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, logo detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - public java.util.List - getLogoAnnotationsBuilderList() { - return getLogoAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> - getLogoAnnotationsFieldBuilder() { - if (logoAnnotationsBuilder_ == null) { - logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( - logoAnnotations_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - logoAnnotations_ = null; - } - return logoAnnotationsBuilder_; - } - - private java.util.List labelAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; - - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List getLabelAnnotationsList() { - if (labelAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } else { - return labelAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public int getLabelAnnotationsCount() { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.size(); - } else { - return labelAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); - } else { - return labelAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder setLabelAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (labelAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, value); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addLabelAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder addAllLabelAnnotations( - java.lang.Iterable values) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelAnnotations_); - onChanged(); - } else { - labelAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder clearLabelAnnotations() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - labelAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public Builder removeLabelAnnotations(int index) { - if (labelAnnotationsBuilder_ == null) { - ensureLabelAnnotationsIsMutable(); - labelAnnotations_.remove(index); - onChanged(); - } else { - labelAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index) { - if (labelAnnotationsBuilder_ == null) { - return labelAnnotations_.get(index); } else { - return labelAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsOrBuilderList() { - if (labelAnnotationsBuilder_ != null) { - return labelAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(labelAnnotations_); - } - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { - return getLabelAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( - int index) { - return getLabelAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, label detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - public java.util.List - getLabelAnnotationsBuilderList() { - return getLabelAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> - getLabelAnnotationsFieldBuilder() { - if (labelAnnotationsBuilder_ == null) { - labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( - labelAnnotations_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - labelAnnotations_ = null; - } - return labelAnnotationsBuilder_; - } - - private java.util.List localizedObjectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - localizedObjectAnnotations_ = new java.util.ArrayList(localizedObjectAnnotations_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder> localizedObjectAnnotationsBuilder_; - - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List getLocalizedObjectAnnotationsList() { - if (localizedObjectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } else { - return localizedObjectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public int getLocalizedObjectAnnotationsCount() { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.size(); - } else { - return localizedObjectAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); - } else { - return localizedObjectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder setLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) { - if (localizedObjectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, value); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addLocalizedObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder addAllLocalizedObjectAnnotations( - java.lang.Iterable values) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, localizedObjectAnnotations_); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder clearLocalizedObjectAnnotations() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public Builder removeLocalizedObjectAnnotations(int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - ensureLocalizedObjectAnnotationsIsMutable(); - localizedObjectAnnotations_.remove(index); - onChanged(); - } else { - localizedObjectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder getLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index) { - if (localizedObjectAnnotationsBuilder_ == null) { - return localizedObjectAnnotations_.get(index); } else { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsOrBuilderList() { - if (localizedObjectAnnotationsBuilder_ != null) { - return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(localizedObjectAnnotations_); - } - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder() { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder addLocalizedObjectAnnotationsBuilder( - int index) { - return getLocalizedObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, localized object detection has completed successfully.
-     * This will be sorted descending by confidence score.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - public java.util.List - getLocalizedObjectAnnotationsBuilderList() { - return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder> - getLocalizedObjectAnnotationsFieldBuilder() { - if (localizedObjectAnnotationsBuilder_ == null) { - localizedObjectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>( - localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - localizedObjectAnnotations_ = null; - } - return localizedObjectAnnotationsBuilder_; - } - - private java.util.List textAnnotations_ = - java.util.Collections.emptyList(); - private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - textAnnotations_ = new java.util.ArrayList(textAnnotations_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; - - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List getTextAnnotationsList() { - if (textAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(textAnnotations_); - } else { - return textAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public int getTextAnnotationsCount() { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.size(); - } else { - return textAnnotationsBuilder_.getCount(); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); - } else { - return textAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder setTextAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) { - if (textAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, value); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addTextAnnotations( - int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - textAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder addAllTextAnnotations( - java.lang.Iterable values) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, textAnnotations_); - onChanged(); - } else { - textAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder clearTextAnnotations() { - if (textAnnotationsBuilder_ == null) { - textAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - textAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public Builder removeTextAnnotations(int index) { - if (textAnnotationsBuilder_ == null) { - ensureTextAnnotationsIsMutable(); - textAnnotations_.remove(index); - onChanged(); - } else { - textAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index) { - if (textAnnotationsBuilder_ == null) { - return textAnnotations_.get(index); } else { - return textAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsOrBuilderList() { - if (textAnnotationsBuilder_ != null) { - return textAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(textAnnotations_); - } - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { - return getTextAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( - int index) { - return getTextAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()); - } - /** - *
-     * If present, text (OCR) detection has completed successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - public java.util.List - getTextAnnotationsBuilderList() { - return getTextAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder> - getTextAnnotationsFieldBuilder() { - if (textAnnotationsBuilder_ == null) { - textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.EntityAnnotation, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( - textAnnotations_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - textAnnotations_ = null; - } - return textAnnotationsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - public boolean hasFullTextAnnotation() { - return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } else { - return fullTextAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fullTextAnnotation_ = value; - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder setFullTextAnnotation( - com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder builderForValue) { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = builderForValue.build(); - onChanged(); - } else { - fullTextAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) { - if (fullTextAnnotationBuilder_ == null) { - if (fullTextAnnotation_ != null) { - fullTextAnnotation_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.newBuilder(fullTextAnnotation_).mergeFrom(value).buildPartial(); - } else { - fullTextAnnotation_ = value; - } - onChanged(); - } else { - fullTextAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public Builder clearFullTextAnnotation() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotation_ = null; - onChanged(); - } else { - fullTextAnnotation_ = null; - fullTextAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { - - onChanged(); - return getFullTextAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { - if (fullTextAnnotationBuilder_ != null) { - return fullTextAnnotationBuilder_.getMessageOrBuilder(); - } else { - return fullTextAnnotation_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; - } - } - /** - *
-     * If present, text (OCR) detection or document (OCR) text detection has
-     * completed successfully.
-     * This annotation provides the structural hierarchy for the OCR detected
-     * text.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder> - getFullTextAnnotationFieldBuilder() { - if (fullTextAnnotationBuilder_ == null) { - fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder>( - getFullTextAnnotation(), - getParentForChildren(), - isClean()); - fullTextAnnotation_ = null; - } - return fullTextAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - public boolean hasSafeSearchAnnotation() { - return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } else { - return safeSearchAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - safeSearchAnnotation_ = value; - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder setSafeSearchAnnotation( - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder builderForValue) { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = builderForValue.build(); - onChanged(); - } else { - safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) { - if (safeSearchAnnotationBuilder_ == null) { - if (safeSearchAnnotation_ != null) { - safeSearchAnnotation_ = - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial(); - } else { - safeSearchAnnotation_ = value; - } - onChanged(); - } else { - safeSearchAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public Builder clearSafeSearchAnnotation() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotation_ = null; - onChanged(); - } else { - safeSearchAnnotation_ = null; - safeSearchAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { - - onChanged(); - return getSafeSearchAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { - if (safeSearchAnnotationBuilder_ != null) { - return safeSearchAnnotationBuilder_.getMessageOrBuilder(); - } else { - return safeSearchAnnotation_ == null ? - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; - } - } - /** - *
-     * If present, safe-search annotation has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder> - getSafeSearchAnnotationFieldBuilder() { - if (safeSearchAnnotationBuilder_ == null) { - safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder>( - getSafeSearchAnnotation(), - getParentForChildren(), - isClean()); - safeSearchAnnotation_ = null; - } - return safeSearchAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - public boolean hasImagePropertiesAnnotation() { - return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } else { - return imagePropertiesAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1p4beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imagePropertiesAnnotation_ = value; - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder setImagePropertiesAnnotation( - com.google.cloud.vision.v1p4beta1.ImageProperties.Builder builderForValue) { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = builderForValue.build(); - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1p4beta1.ImageProperties value) { - if (imagePropertiesAnnotationBuilder_ == null) { - if (imagePropertiesAnnotation_ != null) { - imagePropertiesAnnotation_ = - com.google.cloud.vision.v1p4beta1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial(); - } else { - imagePropertiesAnnotation_ = value; - } - onChanged(); - } else { - imagePropertiesAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public Builder clearImagePropertiesAnnotation() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotation_ = null; - onChanged(); - } else { - imagePropertiesAnnotation_ = null; - imagePropertiesAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p4beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { - - onChanged(); - return getImagePropertiesAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { - if (imagePropertiesAnnotationBuilder_ != null) { - return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); - } else { - return imagePropertiesAnnotation_ == null ? - com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; - } - } - /** - *
-     * If present, image properties were extracted successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder> - getImagePropertiesAnnotationFieldBuilder() { - if (imagePropertiesAnnotationBuilder_ == null) { - imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder>( - getImagePropertiesAnnotation(), - getParentForChildren(), - isClean()); - imagePropertiesAnnotation_ = null; - } - return imagePropertiesAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - public boolean hasCropHintsAnnotation() { - return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } else { - return cropHintsAnnotationBuilder_.getMessage(); - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsAnnotation_ = value; - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder setCropHintsAnnotation( - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder builderForValue) { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = builderForValue.build(); - onChanged(); - } else { - cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) { - if (cropHintsAnnotationBuilder_ == null) { - if (cropHintsAnnotation_ != null) { - cropHintsAnnotation_ = - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_).mergeFrom(value).buildPartial(); - } else { - cropHintsAnnotation_ = value; - } - onChanged(); - } else { - cropHintsAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public Builder clearCropHintsAnnotation() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotation_ = null; - onChanged(); - } else { - cropHintsAnnotation_ = null; - cropHintsAnnotationBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { - - onChanged(); - return getCropHintsAnnotationFieldBuilder().getBuilder(); - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { - if (cropHintsAnnotationBuilder_ != null) { - return cropHintsAnnotationBuilder_.getMessageOrBuilder(); - } else { - return cropHintsAnnotation_ == null ? - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; - } - } - /** - *
-     * If present, crop hints have completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder> - getCropHintsAnnotationFieldBuilder() { - if (cropHintsAnnotationBuilder_ == null) { - cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder>( - getCropHintsAnnotation(), - getParentForChildren(), - isClean()); - cropHintsAnnotation_ = null; - } - return cropHintsAnnotationBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder> webDetectionBuilder_; - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - public boolean hasWebDetection() { - return webDetectionBuilder_ != null || webDetection_ != null; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() { - if (webDetectionBuilder_ == null) { - return webDetection_ == null ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; - } else { - return webDetectionBuilder_.getMessage(); - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetection_ = value; - onChanged(); - } else { - webDetectionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public Builder setWebDetection( - com.google.cloud.vision.v1p4beta1.WebDetection.Builder builderForValue) { - if (webDetectionBuilder_ == null) { - webDetection_ = builderForValue.build(); - onChanged(); - } else { - webDetectionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public Builder mergeWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) { - if (webDetectionBuilder_ == null) { - if (webDetection_ != null) { - webDetection_ = - com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder(webDetection_).mergeFrom(value).buildPartial(); - } else { - webDetection_ = value; - } - onChanged(); - } else { - webDetectionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public Builder clearWebDetection() { - if (webDetectionBuilder_ == null) { - webDetection_ = null; - onChanged(); - } else { - webDetection_ = null; - webDetectionBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.Builder getWebDetectionBuilder() { - - onChanged(); - return getWebDetectionFieldBuilder().getBuilder(); - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { - if (webDetectionBuilder_ != null) { - return webDetectionBuilder_.getMessageOrBuilder(); - } else { - return webDetection_ == null ? - com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance() : webDetection_; - } - } - /** - *
-     * If present, web detection has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder> - getWebDetectionFieldBuilder() { - if (webDetectionBuilder_ == null) { - webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder>( - getWebDetection(), - getParentForChildren(), - isClean()); - webDetection_ = null; - } - return webDetectionBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder> productSearchResultsBuilder_; - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - public boolean hasProductSearchResults() { - return productSearchResultsBuilder_ != null || productSearchResults_ != null; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - return productSearchResults_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } else { - return productSearchResultsBuilder_.getMessage(); - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchResults_ = value; - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public Builder setProductSearchResults( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder builderForValue) { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = builderForValue.build(); - onChanged(); - } else { - productSearchResultsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public Builder mergeProductSearchResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults value) { - if (productSearchResultsBuilder_ == null) { - if (productSearchResults_ != null) { - productSearchResults_ = - com.google.cloud.vision.v1p4beta1.ProductSearchResults.newBuilder(productSearchResults_).mergeFrom(value).buildPartial(); - } else { - productSearchResults_ = value; - } - onChanged(); - } else { - productSearchResultsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public Builder clearProductSearchResults() { - if (productSearchResultsBuilder_ == null) { - productSearchResults_ = null; - onChanged(); - } else { - productSearchResults_ = null; - productSearchResultsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder getProductSearchResultsBuilder() { - - onChanged(); - return getProductSearchResultsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder() { - if (productSearchResultsBuilder_ != null) { - return productSearchResultsBuilder_.getMessageOrBuilder(); - } else { - return productSearchResults_ == null ? - com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance() : productSearchResults_; - } - } - /** - *
-     * If present, product search has completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder> - getProductSearchResultsFieldBuilder() { - if (productSearchResultsBuilder_ == null) { - productSearchResultsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder>( - getProductSearchResults(), - getParentForChildren(), - isClean()); - productSearchResults_ = null; - } - return productSearchResultsBuilder_; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - public boolean hasError() { - return errorBuilder_ != null || error_ != null; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; - } else { - return errorBuilder_.getMessage(); - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (error_ != null) { - error_ = - com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = null; - onChanged(); - } else { - error_ = null; - errorBuilder_ = null; - } - - return this; - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_ == null ? - com.google.rpc.Status.getDefaultInstance() : error_; - } - } - /** - *
-     * If set, represents the error message for the operation.
-     * Note that filled-in image annotations are guaranteed to be
-     * correct, even when `error` is set.
-     * 
- * - * .google.rpc.Status error = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getError(), - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder> contextBuilder_; - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public Builder setContext( - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public Builder mergeContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance() : context_; - } - } - /** - *
-     * If present, contextual information is needed to understand where this image
-     * comes from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - private static final com.google.cloud.vision.v1p4beta1.AnnotateImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotateImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotateImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java deleted file mode 100644 index 1111293c4c8d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponseOrBuilder.java +++ /dev/null @@ -1,512 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AnnotateImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - int getFaceAnnotationsCount(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - java.util.List - getFaceAnnotationsOrBuilderList(); - /** - *
-   * If present, face detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1; - */ - com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - int getLandmarkAnnotationsCount(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - java.util.List - getLandmarkAnnotationsOrBuilderList(); - /** - *
-   * If present, landmark detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - int getLogoAnnotationsCount(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - java.util.List - getLogoAnnotationsOrBuilderList(); - /** - *
-   * If present, logo detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - int getLabelAnnotationsCount(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - java.util.List - getLabelAnnotationsOrBuilderList(); - /** - *
-   * If present, label detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(int index); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - int getLocalizedObjectAnnotationsCount(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - java.util.List - getLocalizedObjectAnnotationsOrBuilderList(); - /** - *
-   * If present, localized object detection has completed successfully.
-   * This will be sorted descending by confidence score.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder getLocalizedObjectAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - int getTextAnnotationsCount(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - java.util.List - getTextAnnotationsOrBuilderList(); - /** - *
-   * If present, text (OCR) detection has completed successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5; - */ - com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( - int index); - - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return Whether the fullTextAnnotation field is set. - */ - boolean hasFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - * @return The fullTextAnnotation. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation(); - /** - *
-   * If present, text (OCR) detection or document (OCR) text detection has
-   * completed successfully.
-   * This annotation provides the structural hierarchy for the OCR detected
-   * text.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder(); - - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return Whether the safeSearchAnnotation field is set. - */ - boolean hasSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - * @return The safeSearchAnnotation. - */ - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation(); - /** - *
-   * If present, safe-search annotation has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6; - */ - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder(); - - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return Whether the imagePropertiesAnnotation field is set. - */ - boolean hasImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - * @return The imagePropertiesAnnotation. - */ - com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation(); - /** - *
-   * If present, image properties were extracted successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8; - */ - com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder(); - - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return Whether the cropHintsAnnotation field is set. - */ - boolean hasCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - * @return The cropHintsAnnotation. - */ - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation(); - /** - *
-   * If present, crop hints have completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11; - */ - com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder(); - - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return Whether the webDetection field is set. - */ - boolean hasWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - * @return The webDetection. - */ - com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection(); - /** - *
-   * If present, web detection has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetection web_detection = 13; - */ - com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder(); - - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return Whether the productSearchResults field is set. - */ - boolean hasProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - * @return The productSearchResults. - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults(); - /** - *
-   * If present, product search has completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder getProductSearchResultsOrBuilder(); - - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * If set, represents the error message for the operation.
-   * Note that filled-in image annotations are guaranteed to be
-   * correct, even when `error` is set.
-   * 
- * - * .google.rpc.Status error = 9; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - * @return The context. - */ - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext(); - /** - *
-   * If present, contextual information is needed to understand where this image
-   * comes from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21; - */ - com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java deleted file mode 100644 index 5b23b25b4f2d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java +++ /dev/null @@ -1,1580 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * An offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} - */ -public final class AsyncAnnotateFileRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - AsyncAnnotateFileRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileRequest.newBuilder() to construct. - private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileRequest() { - features_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Feature.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.cloud.vision.v1p4beta1.ImageContext.Builder subBuilder = null; - if (imageContext_ != null) { - subBuilder = imageContext_.toBuilder(); - } - imageContext_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageContext_); - imageContext_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder.class); - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int FEATURES_FIELD_NUMBER = 2; - private java.util.List features_; - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List getFeaturesList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public java.util.List - getFeaturesOrBuilderList() { - return features_; - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public int getFeaturesCount() { - return features_.size(); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - return features_.get(index); - } - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - return features_.get(index); - } - - public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3; - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - @java.lang.Override - public boolean hasImageContext() { - return imageContext_ != null; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - return getImageContext(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - output.writeMessage(2, features_.get(i)); - } - if (imageContext_ != null) { - output.writeMessage(3, getImageContext()); - } - if (outputConfig_ != null) { - output.writeMessage(4, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInputConfig()); - } - for (int i = 0; i < features_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, features_.get(i)); - } - if (imageContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getImageContext()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; - if (hasImageContext() != other.hasImageContext()) return false; - if (hasImageContext()) { - if (!getImageContext() - .equals(other.getImageContext())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (getFeaturesCount() > 0) { - hash = (37 * hash) + FEATURES_FIELD_NUMBER; - hash = (53 * hash) + getFeaturesList().hashCode(); - } - if (hasImageContext()) { - hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getImageContext().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeaturesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - featuresBuilder_.clear(); - } - if (imageContextBuilder_ == null) { - imageContext_ = null; - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest build() { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - features_ = java.util.Collections.unmodifiableList(features_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.features_ = features_; - } else { - result.features_ = featuresBuilder_.build(); - } - if (imageContextBuilder_ == null) { - result.imageContext_ = imageContext_; - } else { - result.imageContext_ = imageContextBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (featuresBuilder_ == null) { - if (!other.features_.isEmpty()) { - if (features_.isEmpty()) { - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeaturesIsMutable(); - features_.addAll(other.features_); - } - onChanged(); - } - } else { - if (!other.features_.isEmpty()) { - if (featuresBuilder_.isEmpty()) { - featuresBuilder_.dispose(); - featuresBuilder_ = null; - features_ = other.features_; - bitField0_ = (bitField0_ & ~0x00000001); - featuresBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; - } else { - featuresBuilder_.addAllMessages(other.features_); - } - } - } - if (other.hasImageContext()) { - mergeImageContext(other.getImageContext()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. Information about the input file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private java.util.List features_ = - java.util.Collections.emptyList(); - private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - features_ = new java.util.ArrayList(features_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> featuresBuilder_; - - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List getFeaturesList() { - if (featuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(features_); - } else { - return featuresBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public int getFeaturesCount() { - if (featuresBuilder_ == null) { - return features_.size(); - } else { - return featuresBuilder_.getCount(); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) { - if (featuresBuilder_ == null) { - return features_.get(index); - } else { - return featuresBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.set(index, value); - onChanged(); - } else { - featuresBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder setFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.set(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(value); - onChanged(); - } else { - featuresBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature value) { - if (featuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeaturesIsMutable(); - features_.add(index, value); - onChanged(); - } else { - featuresBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addFeatures( - int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.add(index, builderForValue.build()); - onChanged(); - } else { - featuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder addAllFeatures( - java.lang.Iterable values) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, features_); - onChanged(); - } else { - featuresBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder clearFeatures() { - if (featuresBuilder_ == null) { - features_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - featuresBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public Builder removeFeatures(int index) { - if (featuresBuilder_ == null) { - ensureFeaturesIsMutable(); - features_.remove(index); - onChanged(); - } else { - featuresBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index) { - if (featuresBuilder_ == null) { - return features_.get(index); } else { - return featuresBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesOrBuilderList() { - if (featuresBuilder_ != null) { - return featuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(features_); - } - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() { - return getFeaturesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder( - int index) { - return getFeaturesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()); - } - /** - *
-     * Required. Requested features.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - public java.util.List - getFeaturesBuilderList() { - return getFeaturesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder> - getFeaturesFieldBuilder() { - if (featuresBuilder_ == null) { - featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - features_ = null; - } - return featuresBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> imageContextBuilder_; - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - public boolean hasImageContext() { - return imageContextBuilder_ != null || imageContext_ != null; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() { - if (imageContextBuilder_ == null) { - return imageContext_ == null ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } else { - return imageContextBuilder_.getMessage(); - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - imageContext_ = value; - onChanged(); - } else { - imageContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder setImageContext( - com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) { - if (imageContextBuilder_ == null) { - imageContext_ = builderForValue.build(); - onChanged(); - } else { - imageContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) { - if (imageContextBuilder_ == null) { - if (imageContext_ != null) { - imageContext_ = - com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial(); - } else { - imageContext_ = value; - } - onChanged(); - } else { - imageContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public Builder clearImageContext() { - if (imageContextBuilder_ == null) { - imageContext_ = null; - onChanged(); - } else { - imageContext_ = null; - imageContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() { - - onChanged(); - return getImageContextFieldBuilder().getBuilder(); - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() { - if (imageContextBuilder_ != null) { - return imageContextBuilder_.getMessageOrBuilder(); - } else { - return imageContext_ == null ? - com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance() : imageContext_; - } - } - /** - *
-     * Additional context that may accompany the image(s) in the file.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder> - getImageContextFieldBuilder() { - if (imageContextBuilder_ == null) { - imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>( - getImageContext(), - getParentForChildren(), - isClean()); - imageContext_ = null; - } - return imageContextBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java deleted file mode 100644 index d2e427e25602..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncAnnotateFileRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig(); - /** - *
-   * Required. Information about the input file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.InputConfig input_config = 1; - */ - com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - int getFeaturesCount(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - java.util.List - getFeaturesOrBuilderList(); - /** - *
-   * Required. Requested features.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Feature features = 2; - */ - com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder( - int index); - - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return Whether the imageContext field is set. - */ - boolean hasImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - * @return The imageContext. - */ - com.google.cloud.vision.v1p4beta1.ImageContext getImageContext(); - /** - *
-   * Additional context that may accompany the image(s) in the file.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageContext image_context = 3; - */ - com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder(); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 4; - */ - com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java deleted file mode 100644 index 1dd7a1d72e22..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The response for a single offline file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} - */ -public final class AsyncAnnotateFileResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - AsyncAnnotateFileResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncAnnotateFileResponse.newBuilder() to construct. - private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncAnnotateFileResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncAnnotateFileResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncAnnotateFileResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response for a single offline file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.class, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse build() { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse result = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncAnnotateFileRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncAnnotateFileResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncAnnotateFileResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java deleted file mode 100644 index d8ff569ddbe9..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncAnnotateFileResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncAnnotateFileRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java deleted file mode 100644 index 7af88b49bc1f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java +++ /dev/null @@ -1,874 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Multiple async file annotation requests are batched into a single service
- * call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} - */ -public final class AsyncBatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - AsyncBatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. - private AsyncBatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple async file annotation requests are batched into a single service
-   * call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual async file annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index f2d3b993addd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncBatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual async file annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java deleted file mode 100644 index 1ee4eba65acc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response to an async batch file annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} - */ -public final class AsyncBatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - AsyncBatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. - private AsyncBatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch file annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, one for each request in
-     * AsyncBatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index 8fe1eb059580..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncBatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, one for each request in
-   * AsyncBatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java deleted file mode 100644 index 1f1a1e7f43af..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java +++ /dev/null @@ -1,1108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request for async image annotation for a list of images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} - */ -public final class AsyncBatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - AsyncBatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateImagesRequest.newBuilder() to construct. - private AsyncBatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for async image annotation for a list of images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. The desired output location and metadata (e.g. format).
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index 45006d846a52..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncBatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); - - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); - /** - *
-   * Required. The desired output location and metadata (e.g. format).
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java deleted file mode 100644 index e937d1cc98ea..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response to an async batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} - */ -public final class AsyncBatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - AsyncBatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AsyncBatchAnnotateImagesResponse.newBuilder() to construct. - private AsyncBatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AsyncBatchAnnotateImagesResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AsyncBatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AsyncBatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to an async batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AsyncBatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AsyncBatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index 9bb3274f91b2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface AsyncBatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - * @return The outputConfig. - */ - com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig(); - /** - *
-   * The output location and metadata from AsyncBatchAnnotateImagesRequest.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OutputConfig output_config = 1; - */ - com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java deleted file mode 100644 index a1da2dffc3a5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A list of requests to annotate files using the BatchAnnotateFiles API.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} - */ -public final class BatchAnnotateFilesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - BatchAnnotateFilesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateFilesRequest.newBuilder() to construct. - private BatchAnnotateFilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateFilesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateFilesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateFilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A list of requests to annotate files using the BatchAnnotateFiles API.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest build() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.getDefaultInstance()); - } - /** - *
-     * Required. The list of file annotation requests. Right now we support only
-     * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateFilesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateFilesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java deleted file mode 100644 index fa918040232d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BatchAnnotateFilesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getRequests(int index); - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. The list of file annotation requests. Right now we support only
-   * one AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java deleted file mode 100644 index da076569e75d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A list of file annotation responses.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} - */ -public final class BatchAnnotateFilesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - BatchAnnotateFilesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateFilesResponse.newBuilder() to construct. - private BatchAnnotateFilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateFilesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateFilesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateFilesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A list of file annotation responses.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse build() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder> responsesBuilder_; - - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.getDefaultInstance()); - } - /** - *
-     * The list of file annotation responses, each response corresponding to each
-     * AnnotateFileRequest in BatchAnnotateFilesRequest.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateFilesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateFilesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java deleted file mode 100644 index 91cba2e22caa..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BatchAnnotateFilesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getResponses(int index); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * The list of file annotation responses, each response corresponding to each
-   * AnnotateFileRequest in BatchAnnotateFilesRequest.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateFileResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java deleted file mode 100644 index d398103bde04..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Multiple image annotation requests are batched into a single service call.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} - */ -public final class BatchAnnotateImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - BatchAnnotateImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesRequest.newBuilder() to construct. - private BatchAnnotateImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesRequest() { - requests_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.Builder.class); - } - - public static final int REQUESTS_FIELD_NUMBER = 1; - private java.util.List requests_; - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getRequestsList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getRequestsOrBuilderList() { - return requests_; - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getRequestsCount() { - return requests_.size(); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { - return requests_.get(index); - } - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - return requests_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < requests_.size(); i++) { - output.writeMessage(1, requests_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < requests_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, requests_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) obj; - - if (!getRequestsList() - .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRequestsCount() > 0) { - hash = (37 * hash) + REQUESTS_FIELD_NUMBER; - hash = (53 * hash) + getRequestsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Multiple image annotation requests are batched into a single service call.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - requestsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest build() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest(this); - int from_bitField0_ = bitField0_; - if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requests_ = requests_; - } else { - result.requests_ = requestsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.getDefaultInstance()) return this; - if (requestsBuilder_ == null) { - if (!other.requests_.isEmpty()) { - if (requests_.isEmpty()) { - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequestsIsMutable(); - requests_.addAll(other.requests_); - } - onChanged(); - } - } else { - if (!other.requests_.isEmpty()) { - if (requestsBuilder_.isEmpty()) { - requestsBuilder_.dispose(); - requestsBuilder_ = null; - requests_ = other.requests_; - bitField0_ = (bitField0_ & ~0x00000001); - requestsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRequestsFieldBuilder() : null; - } else { - requestsBuilder_.addAllMessages(other.requests_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List requests_ = - java.util.Collections.emptyList(); - private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(requests_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> requestsBuilder_; - - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getRequestsList() { - if (requestsBuilder_ == null) { - return java.util.Collections.unmodifiableList(requests_); - } else { - return requestsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getRequestsCount() { - if (requestsBuilder_ == null) { - return requests_.size(); - } else { - return requestsBuilder_.getCount(); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); - } else { - return requestsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.set(index, value); - onChanged(); - } else { - requestsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.set(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests(com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(value); - onChanged(); - } else { - requestsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest value) { - if (requestsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestsIsMutable(); - requests_.add(index, value); - onChanged(); - } else { - requestsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addRequests( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder builderForValue) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.add(index, builderForValue.build()); - onChanged(); - } else { - requestsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllRequests( - java.lang.Iterable values) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requests_); - onChanged(); - } else { - requestsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRequests() { - if (requestsBuilder_ == null) { - requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - requestsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeRequests(int index) { - if (requestsBuilder_ == null) { - ensureRequestsIsMutable(); - requests_.remove(index); - onChanged(); - } else { - requestsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder getRequestsBuilder( - int index) { - return getRequestsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index) { - if (requestsBuilder_ == null) { - return requests_.get(index); } else { - return requestsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsOrBuilderList() { - if (requestsBuilder_ != null) { - return requestsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(requests_); - } - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder() { - return getRequestsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequestsBuilder( - int index) { - return getRequestsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.getDefaultInstance()); - } - /** - *
-     * Required. Individual image annotation requests for this batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getRequestsBuilderList() { - return getRequestsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder> - getRequestsFieldBuilder() { - if (requestsBuilder_ == null) { - requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - requests_ = null; - } - return requestsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java deleted file mode 100644 index a5d680e088f8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BatchAnnotateImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getRequests(int index); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getRequestsCount(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getRequestsOrBuilderList(); - /** - *
-   * Required. Individual image annotation requests for this batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder getRequestsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java deleted file mode 100644 index c36f1e0db8a8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response to a batch image annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} - */ -public final class BatchAnnotateImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - BatchAnnotateImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchAnnotateImagesResponse.newBuilder() to construct. - private BatchAnnotateImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchAnnotateImagesResponse() { - responses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchAnnotateImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchAnnotateImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.Builder.class); - } - - public static final int RESPONSES_FIELD_NUMBER = 1; - private java.util.List responses_; - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List getResponsesList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public java.util.List - getResponsesOrBuilderList() { - return responses_; - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public int getResponsesCount() { - return responses_.size(); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { - return responses_.get(index); - } - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - return responses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < responses_.size(); i++) { - output.writeMessage(1, responses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < responses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, responses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) obj; - - if (!getResponsesList() - .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResponsesCount() > 0) { - hash = (37 * hash) + RESPONSES_FIELD_NUMBER; - hash = (53 * hash) + getResponsesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to a batch image annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.class, com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - responsesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse build() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse result = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse(this); - int from_bitField0_ = bitField0_; - if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.responses_ = responses_; - } else { - result.responses_ = responsesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.getDefaultInstance()) return this; - if (responsesBuilder_ == null) { - if (!other.responses_.isEmpty()) { - if (responses_.isEmpty()) { - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResponsesIsMutable(); - responses_.addAll(other.responses_); - } - onChanged(); - } - } else { - if (!other.responses_.isEmpty()) { - if (responsesBuilder_.isEmpty()) { - responsesBuilder_.dispose(); - responsesBuilder_ = null; - responses_ = other.responses_; - bitField0_ = (bitField0_ & ~0x00000001); - responsesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResponsesFieldBuilder() : null; - } else { - responsesBuilder_.addAllMessages(other.responses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List responses_ = - java.util.Collections.emptyList(); - private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(responses_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> responsesBuilder_; - - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List getResponsesList() { - if (responsesBuilder_ == null) { - return java.util.Collections.unmodifiableList(responses_); - } else { - return responsesBuilder_.getMessageList(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public int getResponsesCount() { - if (responsesBuilder_ == null) { - return responses_.size(); - } else { - return responsesBuilder_.getCount(); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); - } else { - return responsesBuilder_.getMessage(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.set(index, value); - onChanged(); - } else { - responsesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder setResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.set(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(value); - onChanged(); - } else { - responsesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) { - if (responsesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResponsesIsMutable(); - responses_.add(index, value); - onChanged(); - } else { - responsesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder addResponses( - int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.add(index, builderForValue.build()); - onChanged(); - } else { - responsesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder addAllResponses( - java.lang.Iterable values) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, responses_); - onChanged(); - } else { - responsesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder clearResponses() { - if (responsesBuilder_ == null) { - responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - responsesBuilder_.clear(); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public Builder removeResponses(int index) { - if (responsesBuilder_ == null) { - ensureResponsesIsMutable(); - responses_.remove(index); - onChanged(); - } else { - responsesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder getResponsesBuilder( - int index) { - return getResponsesFieldBuilder().getBuilder(index); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index) { - if (responsesBuilder_ == null) { - return responses_.get(index); } else { - return responsesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesOrBuilderList() { - if (responsesBuilder_ != null) { - return responsesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responses_); - } - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder() { - return getResponsesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder( - int index) { - return getResponsesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance()); - } - /** - *
-     * Individual responses to image annotation requests within the batch.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - public java.util.List - getResponsesBuilderList() { - return getResponsesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder> - getResponsesFieldBuilder() { - if (responsesBuilder_ == null) { - responsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - responses_ = null; - } - return responsesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - private static final com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchAnnotateImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchAnnotateImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java deleted file mode 100644 index a85f5923ddd5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BatchAnnotateImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - int getResponsesCount(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - java.util.List - getResponsesOrBuilderList(); - /** - *
-   * Individual responses to image annotation requests within the batch.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 1; - */ - com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java deleted file mode 100644 index 609ca27f04be..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java +++ /dev/null @@ -1,1238 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Metadata for the batch operations such as the current state.
- * This is included in the `metadata` field of the `Operation` returned by the
- * `GetOperation` call of the `google::longrunning::Operations` service.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata} - */ -public final class BatchOperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - BatchOperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchOperationMetadata.newBuilder() to construct. - private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchOperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (submitTime_ != null) { - subBuilder = submitTime_.toBuilder(); - } - submitTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(submitTime_); - submitTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.Builder.class); - } - - /** - *
-   * Enumerates the possible states that the batch request can be in.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - PROCESSING(1), - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - SUCCESSFUL(2), - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is actively being processed.
-     * 
- * - * PROCESSING = 1; - */ - public static final int PROCESSING_VALUE = 1; - /** - *
-     * The request is done and at least one item has been successfully
-     * processed.
-     * 
- * - * SUCCESSFUL = 2; - */ - public static final int SUCCESSFUL_VALUE = 2; - /** - *
-     * The request is done and no item has been successfully processed.
-     * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - *
-     * The request is done after the longrunning.Operations.CancelOperation has
-     * been called by the user.  Any records that were processed before the
-     * cancel command are output as specified in the request.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return PROCESSING; - case 2: return SUCCESSFUL; - case 3: return FAILED; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int SUBMIT_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp submitTime_; - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - @java.lang.Override - public boolean hasSubmitTime() { - return submitTime_ != null; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getSubmitTime() { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - return getSubmitTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (submitTime_ != null) { - output.writeMessage(2, getSubmitTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (submitTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubmitTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEndTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BatchOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasSubmitTime() != other.hasSubmitTime()) return false; - if (hasSubmitTime()) { - if (!getSubmitTime() - .equals(other.getSubmitTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasSubmitTime()) { - hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; - hash = (53 * hash) + getSubmitTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata for the batch operations such as the current state.
-   * This is included in the `metadata` field of the `Operation` returned by the
-   * `GetOperation` call of the `google::longrunning::Operations` service.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BatchOperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - com.google.cloud.vision.v1p4beta1.BatchOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.class, com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (submitTimeBuilder_ == null) { - submitTime_ = null; - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata build() { - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata buildPartial() { - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata result = new com.google.cloud.vision.v1p4beta1.BatchOperationMetadata(this); - result.state_ = state_; - if (submitTimeBuilder_ == null) { - result.submitTime_ = submitTime_; - } else { - result.submitTime_ = submitTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BatchOperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata other) { - if (other == com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasSubmitTime()) { - mergeSubmitTime(other.getSubmitTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State result = com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp submitTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> submitTimeBuilder_; - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - public boolean hasSubmitTime() { - return submitTimeBuilder_ != null || submitTime_ != null; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - public com.google.protobuf.Timestamp getSubmitTime() { - if (submitTimeBuilder_ == null) { - return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } else { - return submitTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - submitTime_ = value; - onChanged(); - } else { - submitTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder setSubmitTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (submitTimeBuilder_ == null) { - submitTime_ = builderForValue.build(); - onChanged(); - } else { - submitTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { - if (submitTimeBuilder_ == null) { - if (submitTime_ != null) { - submitTime_ = - com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial(); - } else { - submitTime_ = value; - } - onChanged(); - } else { - submitTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public Builder clearSubmitTime() { - if (submitTimeBuilder_ == null) { - submitTime_ = null; - onChanged(); - } else { - submitTime_ = null; - submitTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { - - onChanged(); - return getSubmitTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { - if (submitTimeBuilder_ != null) { - return submitTimeBuilder_.getMessageOrBuilder(); - } else { - return submitTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; - } - } - /** - *
-     * The time when the batch request was submitted to the server.
-     * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSubmitTimeFieldBuilder() { - if (submitTimeBuilder_ == null) { - submitTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getSubmitTime(), - getParentForChildren(), - isClean()); - submitTime_ = null; - } - return submitTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * The time when the batch request is finished and
-     * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-     * set to true.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - private static final com.google.cloud.vision.v1p4beta1.BatchOperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BatchOperationMetadata(); - } - - public static com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java deleted file mode 100644 index dc1d431a393d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadataOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BatchOperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * The current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BatchOperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return Whether the submitTime field is set. - */ - boolean hasSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - * @return The submitTime. - */ - com.google.protobuf.Timestamp getSubmitTime(); - /** - *
-   * The time when the batch request was submitted to the server.
-   * 
- * - * .google.protobuf.Timestamp submit_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); - - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * The time when the batch request is finished and
-   * [google.longrunning.Operation.done][google.longrunning.Operation.done] is
-   * set to true.
-   * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java deleted file mode 100644 index 3fba75ae6bce..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java +++ /dev/null @@ -1,1914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Logical element on the page.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Block} - */ -public final class Block extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Block) - BlockOrBuilder { -private static final long serialVersionUID = 0L; - // Use Block.newBuilder() to construct. - private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Block() { - paragraphs_ = java.util.Collections.emptyList(); - blockType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Block(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Block( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paragraphs_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Paragraph.parser(), extensionRegistry)); - break; - } - case 32: { - int rawValue = input.readEnum(); - - blockType_ = rawValue; - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Block.class, com.google.cloud.vision.v1p4beta1.Block.Builder.class); - } - - /** - *
-   * Type of a block (text, image etc) as identified by OCR.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.Block.BlockType} - */ - public enum BlockType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - TEXT(1), - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - TABLE(2), - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - PICTURE(3), - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - RULER(4), - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - BARCODE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown block type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Regular text block.
-     * 
- * - * TEXT = 1; - */ - public static final int TEXT_VALUE = 1; - /** - *
-     * Table block.
-     * 
- * - * TABLE = 2; - */ - public static final int TABLE_VALUE = 2; - /** - *
-     * Image block.
-     * 
- * - * PICTURE = 3; - */ - public static final int PICTURE_VALUE = 3; - /** - *
-     * Horizontal/vertical line box.
-     * 
- * - * RULER = 4; - */ - public static final int RULER_VALUE = 4; - /** - *
-     * Barcode block.
-     * 
- * - * BARCODE = 5; - */ - public static final int BARCODE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TEXT; - case 2: return TABLE; - case 3: return PICTURE; - case 4: return RULER; - case 5: return BARCODE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockType findValueByNumber(int number) { - return BlockType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.Block.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockType[] VALUES = values(); - - public static BlockType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Block.BlockType) - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int PARAGRAPHS_FIELD_NUMBER = 3; - private java.util.List paragraphs_; - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List getParagraphsList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public java.util.List - getParagraphsOrBuilderList() { - return paragraphs_; - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public int getParagraphsCount() { - return paragraphs_.size(); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index) { - return paragraphs_.get(index); - } - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - return paragraphs_.get(index); - } - - public static final int BLOCK_TYPE_FIELD_NUMBER = 4; - private int blockType_; - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Block.BlockType result = com.google.cloud.vision.v1p4beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p4beta1.Block.BlockType.UNRECOGNIZED : result; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - output.writeMessage(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p4beta1.Block.BlockType.UNKNOWN.getNumber()) { - output.writeEnum(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < paragraphs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, paragraphs_.get(i)); - } - if (blockType_ != com.google.cloud.vision.v1p4beta1.Block.BlockType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, blockType_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Block)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Block other = (com.google.cloud.vision.v1p4beta1.Block) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getParagraphsList() - .equals(other.getParagraphsList())) return false; - if (blockType_ != other.blockType_) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getParagraphsCount() > 0) { - hash = (37 * hash) + PARAGRAPHS_FIELD_NUMBER; - hash = (53 * hash) + getParagraphsList().hashCode(); - } - hash = (37 * hash) + BLOCK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + blockType_; - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Block parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Block parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Block parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Block prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Logical element on the page.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Block} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Block) - com.google.cloud.vision.v1p4beta1.BlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Block.class, com.google.cloud.vision.v1p4beta1.Block.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Block.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getParagraphsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - paragraphsBuilder_.clear(); - } - blockType_ = 0; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block build() { - com.google.cloud.vision.v1p4beta1.Block result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block buildPartial() { - com.google.cloud.vision.v1p4beta1.Block result = new com.google.cloud.vision.v1p4beta1.Block(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.paragraphs_ = paragraphs_; - } else { - result.paragraphs_ = paragraphsBuilder_.build(); - } - result.blockType_ = blockType_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Block) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Block)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Block other) { - if (other == com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (paragraphsBuilder_ == null) { - if (!other.paragraphs_.isEmpty()) { - if (paragraphs_.isEmpty()) { - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureParagraphsIsMutable(); - paragraphs_.addAll(other.paragraphs_); - } - onChanged(); - } - } else { - if (!other.paragraphs_.isEmpty()) { - if (paragraphsBuilder_.isEmpty()) { - paragraphsBuilder_.dispose(); - paragraphsBuilder_ = null; - paragraphs_ = other.paragraphs_; - bitField0_ = (bitField0_ & ~0x00000001); - paragraphsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getParagraphsFieldBuilder() : null; - } else { - paragraphsBuilder_.addAllMessages(other.paragraphs_); - } - } - } - if (other.blockType_ != 0) { - setBlockTypeValue(other.getBlockTypeValue()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Block parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Block) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the block.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     * * when the text is horizontal it might look like:
-     *         0----1
-     *         |    |
-     *         3----2
-     * * when it's rotated 180 degrees around the top-left corner it becomes:
-     *         2----3
-     *         |    |
-     *         1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List paragraphs_ = - java.util.Collections.emptyList(); - private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - paragraphs_ = new java.util.ArrayList(paragraphs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder> paragraphsBuilder_; - - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public java.util.List getParagraphsList() { - if (paragraphsBuilder_ == null) { - return java.util.Collections.unmodifiableList(paragraphs_); - } else { - return paragraphsBuilder_.getMessageList(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public int getParagraphsCount() { - if (paragraphsBuilder_ == null) { - return paragraphs_.size(); - } else { - return paragraphsBuilder_.getCount(); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); - } else { - return paragraphsBuilder_.getMessage(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p4beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.set(index, value); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder setParagraphs( - int index, com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.set(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs(com.google.cloud.vision.v1p4beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p4beta1.Paragraph value) { - if (paragraphsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParagraphsIsMutable(); - paragraphs_.add(index, value); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder addParagraphs( - int index, com.google.cloud.vision.v1p4beta1.Paragraph.Builder builderForValue) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.add(index, builderForValue.build()); - onChanged(); - } else { - paragraphsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder addAllParagraphs( - java.lang.Iterable values) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, paragraphs_); - onChanged(); - } else { - paragraphsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder clearParagraphs() { - if (paragraphsBuilder_ == null) { - paragraphs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - paragraphsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public Builder removeParagraphs(int index) { - if (paragraphsBuilder_ == null) { - ensureParagraphsIsMutable(); - paragraphs_.remove(index); - onChanged(); - } else { - paragraphsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p4beta1.Paragraph.Builder getParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index) { - if (paragraphsBuilder_ == null) { - return paragraphs_.get(index); } else { - return paragraphsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsOrBuilderList() { - if (paragraphsBuilder_ != null) { - return paragraphsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(paragraphs_); - } - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p4beta1.Paragraph.Builder addParagraphsBuilder() { - return getParagraphsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public com.google.cloud.vision.v1p4beta1.Paragraph.Builder addParagraphsBuilder( - int index) { - return getParagraphsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()); - } - /** - *
-     * List of paragraphs in this block (if this blocks is of type text).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - public java.util.List - getParagraphsBuilderList() { - return getParagraphsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder> - getParagraphsFieldBuilder() { - if (paragraphsBuilder_ == null) { - paragraphsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - paragraphs_ = null; - } - return paragraphsBuilder_; - } - - private int blockType_ = 0; - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - @java.lang.Override public int getBlockTypeValue() { - return blockType_; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @param value The enum numeric value on the wire for blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockTypeValue(int value) { - - blockType_ = value; - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Block.BlockType result = com.google.cloud.vision.v1p4beta1.Block.BlockType.valueOf(blockType_); - return result == null ? com.google.cloud.vision.v1p4beta1.Block.BlockType.UNRECOGNIZED : result; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @param value The blockType to set. - * @return This builder for chaining. - */ - public Builder setBlockType(com.google.cloud.vision.v1p4beta1.Block.BlockType value) { - if (value == null) { - throw new NullPointerException(); - } - - blockType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Detected block type (text, image etc) for this block.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return This builder for chaining. - */ - public Builder clearBlockType() { - - blockType_ = 0; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the block. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Block) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Block) - private static final com.google.cloud.vision.v1p4beta1.Block DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Block(); - } - - public static com.google.cloud.vision.v1p4beta1.Block getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Block parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Block(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java deleted file mode 100644 index e8b0d95ffa09..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BlockOrBuilder.java +++ /dev/null @@ -1,178 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BlockOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Block) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the block.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   * * when the text is horizontal it might look like:
-   *         0----1
-   *         |    |
-   *         3----2
-   * * when it's rotated 180 degrees around the top-left corner it becomes:
-   *         2----3
-   *         |    |
-   *         1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p4beta1.Paragraph getParagraphs(int index); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - int getParagraphsCount(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - java.util.List - getParagraphsOrBuilderList(); - /** - *
-   * List of paragraphs in this block (if this blocks is of type text).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Paragraph paragraphs = 3; - */ - com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder getParagraphsOrBuilder( - int index); - - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The enum numeric value on the wire for blockType. - */ - int getBlockTypeValue(); - /** - *
-   * Detected block type (text, image etc) for this block.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Block.BlockType block_type = 4; - * @return The blockType. - */ - com.google.cloud.vision.v1p4beta1.Block.BlockType getBlockType(); - - /** - *
-   * Confidence of the OCR results on the block. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java deleted file mode 100644 index 36961f2284c3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java +++ /dev/null @@ -1,1312 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A bounding polygon for the detected image annotation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BoundingPoly} - */ -public final class BoundingPoly extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.BoundingPoly) - BoundingPolyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingPoly() { - vertices_ = java.util.Collections.emptyList(); - normalizedVertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vertices_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Vertex.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - normalizedVertices_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.NormalizedVertex.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BoundingPoly.class, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder.class); - } - - public static final int VERTICES_FIELD_NUMBER = 1; - private java.util.List vertices_; - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List getVerticesList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - @java.lang.Override - public java.util.List - getVerticesOrBuilderList() { - return vertices_; - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - @java.lang.Override - public int getVerticesCount() { - return vertices_.size(); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index) { - return vertices_.get(index); - } - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - return vertices_.get(index); - } - - public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; - private java.util.List normalizedVertices_; - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List getNormalizedVerticesList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public java.util.List - getNormalizedVerticesOrBuilderList() { - return normalizedVertices_; - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public int getNormalizedVerticesCount() { - return normalizedVertices_.size(); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index) { - return normalizedVertices_.get(index); - } - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - return normalizedVertices_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < vertices_.size(); i++) { - output.writeMessage(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - output.writeMessage(2, normalizedVertices_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < vertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, vertices_.get(i)); - } - for (int i = 0; i < normalizedVertices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, normalizedVertices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.BoundingPoly other = (com.google.cloud.vision.v1p4beta1.BoundingPoly) obj; - - if (!getVerticesList() - .equals(other.getVerticesList())) return false; - if (!getNormalizedVerticesList() - .equals(other.getNormalizedVerticesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getVerticesCount() > 0) { - hash = (37 * hash) + VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getVerticesList().hashCode(); - } - if (getNormalizedVerticesCount() > 0) { - hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getNormalizedVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A bounding polygon for the detected image annotation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.BoundingPoly} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.BoundingPoly) - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.BoundingPoly.class, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVerticesFieldBuilder(); - getNormalizedVerticesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - verticesBuilder_.clear(); - } - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly build() { - com.google.cloud.vision.v1p4beta1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly buildPartial() { - com.google.cloud.vision.v1p4beta1.BoundingPoly result = new com.google.cloud.vision.v1p4beta1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - vertices_ = java.util.Collections.unmodifiableList(vertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.vertices_ = vertices_; - } else { - result.vertices_ = verticesBuilder_.build(); - } - if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.normalizedVertices_ = normalizedVertices_; - } else { - result.normalizedVertices_ = normalizedVerticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.BoundingPoly) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.BoundingPoly)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.BoundingPoly other) { - if (other == com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()) return this; - if (verticesBuilder_ == null) { - if (!other.vertices_.isEmpty()) { - if (vertices_.isEmpty()) { - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVerticesIsMutable(); - vertices_.addAll(other.vertices_); - } - onChanged(); - } - } else { - if (!other.vertices_.isEmpty()) { - if (verticesBuilder_.isEmpty()) { - verticesBuilder_.dispose(); - verticesBuilder_ = null; - vertices_ = other.vertices_; - bitField0_ = (bitField0_ & ~0x00000001); - verticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVerticesFieldBuilder() : null; - } else { - verticesBuilder_.addAllMessages(other.vertices_); - } - } - } - if (normalizedVerticesBuilder_ == null) { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVertices_.isEmpty()) { - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.addAll(other.normalizedVertices_); - } - onChanged(); - } - } else { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVerticesBuilder_.isEmpty()) { - normalizedVerticesBuilder_.dispose(); - normalizedVerticesBuilder_ = null; - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000002); - normalizedVerticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNormalizedVerticesFieldBuilder() : null; - } else { - normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List vertices_ = - java.util.Collections.emptyList(); - private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - vertices_ = new java.util.ArrayList(vertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder> verticesBuilder_; - - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public java.util.List getVerticesList() { - if (verticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(vertices_); - } else { - return verticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public int getVerticesCount() { - if (verticesBuilder_ == null) { - return vertices_.size(); - } else { - return verticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); - } else { - return verticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p4beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.set(index, value); - onChanged(); - } else { - verticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder setVertices( - int index, com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.set(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder addVertices(com.google.cloud.vision.v1p4beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(value); - onChanged(); - } else { - verticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p4beta1.Vertex value) { - if (verticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVerticesIsMutable(); - vertices_.add(index, value); - onChanged(); - } else { - verticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder addVertices( - com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder addVertices( - int index, com.google.cloud.vision.v1p4beta1.Vertex.Builder builderForValue) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.add(index, builderForValue.build()); - onChanged(); - } else { - verticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder addAllVertices( - java.lang.Iterable values) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, vertices_); - onChanged(); - } else { - verticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder clearVertices() { - if (verticesBuilder_ == null) { - vertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - verticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public Builder removeVertices(int index) { - if (verticesBuilder_ == null) { - ensureVerticesIsMutable(); - vertices_.remove(index); - onChanged(); - } else { - verticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p4beta1.Vertex.Builder getVerticesBuilder( - int index) { - return getVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( - int index) { - if (verticesBuilder_ == null) { - return vertices_.get(index); } else { - return verticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesOrBuilderList() { - if (verticesBuilder_ != null) { - return verticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(vertices_); - } - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder() { - return getVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder( - int index) { - return getVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - public java.util.List - getVerticesBuilderList() { - return getVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder> - getVerticesFieldBuilder() { - if (verticesBuilder_ == null) { - verticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - vertices_ = null; - } - return verticesBuilder_; - } - - private java.util.List normalizedVertices_ = - java.util.Collections.emptyList(); - private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - normalizedVertices_ = new java.util.ArrayList(normalizedVertices_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder> normalizedVerticesBuilder_; - - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List getNormalizedVerticesList() { - if (normalizedVerticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } else { - return normalizedVerticesBuilder_.getMessageList(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.size(); - } else { - return normalizedVerticesBuilder_.getCount(); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessage(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices(com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addAllNormalizedVertices( - java.lang.Iterable values) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, normalizedVertices_); - onChanged(); - } else { - normalizedVerticesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder clearNormalizedVertices() { - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder removeNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.remove(index); - onChanged(); - } else { - normalizedVerticesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().getBuilder(index); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); } else { - return normalizedVerticesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - if (normalizedVerticesBuilder_ != null) { - return normalizedVerticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { - return getNormalizedVerticesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()); - } - /** - *
-     * The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesBuilderList() { - return getNormalizedVerticesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder> - getNormalizedVerticesFieldBuilder() { - if (normalizedVerticesBuilder_ == null) { - normalizedVerticesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.NormalizedVertex, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder>( - normalizedVertices_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - normalizedVertices_ = null; - } - return normalizedVerticesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BoundingPoly) - private static final com.google.cloud.vision.v1p4beta1.BoundingPoly DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.BoundingPoly(); - } - - public static com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java deleted file mode 100644 index 72e8b27695eb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface BoundingPolyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p4beta1.Vertex getVertices(int index); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - int getVerticesCount(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - java.util.List - getVerticesOrBuilderList(); - /** - *
-   * The bounding polygon vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Vertex vertices = 1; - */ - com.google.cloud.vision.v1p4beta1.VertexOrBuilder getVerticesOrBuilder( - int index); - - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p4beta1.NormalizedVertex getNormalizedVertices(int index); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - int getNormalizedVerticesCount(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesOrBuilderList(); - /** - *
-   * The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java deleted file mode 100644 index a4881d9388f1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Celebrity.java +++ /dev/null @@ -1,934 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A Celebrity is a group of Faces with an identity.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Celebrity} - */ -public final class Celebrity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Celebrity) - CelebrityOrBuilder { -private static final long serialVersionUID = 0L; - // Use Celebrity.newBuilder() to construct. - private Celebrity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Celebrity() { - name_ = ""; - displayName_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Celebrity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Celebrity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Celebrity.class, com.google.cloud.vision.v1p4beta1.Celebrity.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the preloaded Celebrity. Has the format
-   * `builtin/{mid}`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the preloaded Celebrity. Has the format
-   * `builtin/{mid}`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The Celebrity's display name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The Celebrity's display name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * The Celebrity's description.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The Celebrity's description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Celebrity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Celebrity other = (com.google.cloud.vision.v1p4beta1.Celebrity) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Celebrity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Celebrity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Celebrity is a group of Faces with an identity.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Celebrity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Celebrity) - com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Celebrity.class, com.google.cloud.vision.v1p4beta1.Celebrity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Celebrity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Celebrity build() { - com.google.cloud.vision.v1p4beta1.Celebrity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Celebrity buildPartial() { - com.google.cloud.vision.v1p4beta1.Celebrity result = new com.google.cloud.vision.v1p4beta1.Celebrity(this); - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Celebrity) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Celebrity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Celebrity other) { - if (other == com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Celebrity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Celebrity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the preloaded Celebrity. Has the format
-     * `builtin/{mid}`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the preloaded Celebrity. Has the format
-     * `builtin/{mid}`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the preloaded Celebrity. Has the format
-     * `builtin/{mid}`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the preloaded Celebrity. Has the format
-     * `builtin/{mid}`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the preloaded Celebrity. Has the format
-     * `builtin/{mid}`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The Celebrity's display name.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Celebrity's display name.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Celebrity's display name.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The Celebrity's display name.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The Celebrity's display name.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The Celebrity's description.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Celebrity's description.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Celebrity's description.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * The Celebrity's description.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * The Celebrity's description.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Celebrity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Celebrity) - private static final com.google.cloud.vision.v1p4beta1.Celebrity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Celebrity(); - } - - public static com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Celebrity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Celebrity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Celebrity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java deleted file mode 100644 index cbac3c1853f0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CelebrityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Celebrity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the preloaded Celebrity. Has the format
-   * `builtin/{mid}`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the preloaded Celebrity. Has the format
-   * `builtin/{mid}`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The Celebrity's display name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The Celebrity's display name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * The Celebrity's description.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The Celebrity's description.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java deleted file mode 100644 index cb44a776079b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CelebrityProto.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class CelebrityProto { - private CelebrityProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n(google/cloud/vision/v1p4beta1/face.pro" + - "to\022\035google.cloud.vision.v1p4beta1\032,googl" + - "e/cloud/vision/v1p4beta1/geometry.proto\"" + - ".\n\025FaceRecognitionParams\022\025\n\rcelebrity_se" + - "t\030\001 \003(\t\"D\n\tCelebrity\022\014\n\004name\030\001 \001(\t\022\024\n\014di" + - "splay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\"h\n" + - "\025FaceRecognitionResult\022;\n\tcelebrity\030\001 \001(" + - "\0132(.google.cloud.vision.v1p4beta1.Celebr" + - "ity\022\022\n\nconfidence\030\002 \001(\002B\204\001\n!com.google.c" + - "loud.vision.v1p4beta1B\016CelebrityProtoP\001Z" + - "Cgoogle.golang.org/genproto/googleapis/c" + - "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + - "proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor, - new java.lang.String[] { "CelebritySet", }); - internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_Celebrity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Celebrity_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", }); - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor, - new java.lang.String[] { "Celebrity", "Confidence", }); - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java deleted file mode 100644 index 8998d3391d3c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Color information consists of RGB channels, score, and the fraction of
- * the image that the color occupies in the image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ColorInfo} - */ -public final class ColorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ColorInfo) - ColorInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use ColorInfo.newBuilder() to construct. - private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ColorInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ColorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Color.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(com.google.type.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 29: { - - pixelFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ColorInfo.class, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder.class); - } - - public static final int COLOR_FIELD_NUMBER = 1; - private com.google.type.Color color_; - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - @java.lang.Override - public boolean hasColor() { - return color_ != null; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - @java.lang.Override - public com.google.type.Color getColor() { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - @java.lang.Override - public com.google.type.ColorOrBuilder getColorOrBuilder() { - return getColor(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PIXEL_FRACTION_FIELD_NUMBER = 3; - private float pixelFraction_; - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (color_ != null) { - output.writeMessage(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - output.writeFloat(3, pixelFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getColor()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (java.lang.Float.floatToRawIntBits(pixelFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, pixelFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ColorInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ColorInfo other = (com.google.cloud.vision.v1p4beta1.ColorInfo) obj; - - if (hasColor() != other.hasColor()) return false; - if (hasColor()) { - if (!getColor() - .equals(other.getColor())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getPixelFraction()) - != java.lang.Float.floatToIntBits( - other.getPixelFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PIXEL_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPixelFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ColorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ColorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Color information consists of RGB channels, score, and the fraction of
-   * the image that the color occupies in the image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ColorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ColorInfo) - com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ColorInfo.class, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - score_ = 0F; - - pixelFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfo build() { - com.google.cloud.vision.v1p4beta1.ColorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfo buildPartial() { - com.google.cloud.vision.v1p4beta1.ColorInfo result = new com.google.cloud.vision.v1p4beta1.ColorInfo(this); - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - result.score_ = score_; - result.pixelFraction_ = pixelFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ColorInfo) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ColorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ColorInfo other) { - if (other == com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()) return this; - if (other.hasColor()) { - mergeColor(other.getColor()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getPixelFraction() != 0F) { - setPixelFraction(other.getPixelFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ColorInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ColorInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Color color_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - public com.google.type.Color getColor() { - if (colorBuilder_ == null) { - return color_ == null ? com.google.type.Color.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder setColor( - com.google.type.Color.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder mergeColor(com.google.type.Color value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - com.google.type.Color.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.Color.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - public com.google.type.ColorOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - com.google.type.Color.getDefaultInstance() : color_; - } - } - /** - *
-     * RGB components of the color.
-     * 
- * - * .google.type.Color color = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - - private float score_ ; - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Image-specific score for this color. Value in range [0, 1].
-     * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float pixelFraction_ ; - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - @java.lang.Override - public float getPixelFraction() { - return pixelFraction_; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @param value The pixelFraction to set. - * @return This builder for chaining. - */ - public Builder setPixelFraction(float value) { - - pixelFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * The fraction of pixels the color occupies in the image.
-     * Value in range [0, 1].
-     * 
- * - * float pixel_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearPixelFraction() { - - pixelFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ColorInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ColorInfo) - private static final com.google.cloud.vision.v1p4beta1.ColorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ColorInfo(); - } - - public static com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java deleted file mode 100644 index 362574b0fd13..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfoOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ColorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ColorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return Whether the color field is set. - */ - boolean hasColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - * @return The color. - */ - com.google.type.Color getColor(); - /** - *
-   * RGB components of the color.
-   * 
- * - * .google.type.Color color = 1; - */ - com.google.type.ColorOrBuilder getColorOrBuilder(); - - /** - *
-   * Image-specific score for this color. Value in range [0, 1].
-   * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-   * The fraction of pixels the color occupies in the image.
-   * Value in range [0, 1].
-   * 
- * - * float pixel_fraction = 3; - * @return The pixelFraction. - */ - float getPixelFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java deleted file mode 100644 index 1fc8e2b85b66..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java +++ /dev/null @@ -1,1032 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `CreateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductRequest} - */ -public final class CreateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateProductRequest) - CreateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductRequest.newBuilder() to construct. - private CreateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductRequest() { - parent_ = ""; - productId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.Product product_; - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int PRODUCT_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productId_; - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - @java.lang.Override - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (product_ != null) { - output.writeMessage(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProduct()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CreateProductRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (!getProductId() - .equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateProductRequest) - com.google.cloud.vision.v1p4beta1.CreateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateProductRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - productId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductRequest build() { - com.google.cloud.vision.v1p4beta1.CreateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.CreateProductRequest result = new com.google.cloud.vision.v1p4beta1.CreateProductRequest(this); - result.parent_ = parent_; - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.productId_ = productId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CreateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateProductRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.CreateProductRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (!other.getProductId().isEmpty()) { - productId_ = other.productId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CreateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the Product should be created.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The product to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private java.lang.Object productId_ = ""; - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The productId. - */ - public java.lang.String getProductId() { - java.lang.Object ref = productId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - public com.google.protobuf.ByteString - getProductIdBytes() { - java.lang.Object ref = productId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The productId to set. - * @return This builder for chaining. - */ - public Builder setProductId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductId() { - - productId_ = getDefaultInstance().getProductId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this Product. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_id = 3; - * @param value The bytes for productId to set. - * @return This builder for chaining. - */ - public Builder setProductIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductRequest) - private static final com.google.cloud.vision.v1p4beta1.CreateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateProductRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java deleted file mode 100644 index ce7922518e7e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequestOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CreateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the Product should be created.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1p4beta1.Product getProduct(); - /** - *
-   * Required. The product to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The productId. - */ - java.lang.String getProductId(); - /** - *
-   * A user-supplied resource id for this Product. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_id = 3; - * @return The bytes for productId. - */ - com.google.protobuf.ByteString - getProductIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java deleted file mode 100644 index 10e5cb30d382..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java +++ /dev/null @@ -1,1025 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `CreateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductSetRequest} - */ -public final class CreateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - CreateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateProductSetRequest.newBuilder() to construct. - private CreateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateProductSetRequest() { - parent_ = ""; - productSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - productSetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int PRODUCT_SET_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object productSetId_; - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - @java.lang.Override - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (productSet_ != null) { - output.writeMessage(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productSetId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProductSet()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productSetId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (!getProductSetId() - .equals(other.getProductSetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductSetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - com.google.cloud.vision.v1p4beta1.CreateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - productSetId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest result = new com.google.cloud.vision.v1p4beta1.CreateProductSetRequest(this); - result.parent_ = parent_; - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - result.productSetId_ = productSetId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.CreateProductSetRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (!other.getProductSetId().isEmpty()) { - productSetId_ = other.productSetId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CreateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSet should be created.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet to create.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private java.lang.Object productSetId_ = ""; - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSetId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @return This builder for chaining. - */ - public Builder clearProductSetId() { - - productSetId_ = getDefaultInstance().getProductSetId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for this ProductSet. If set, the server will
-     * attempt to use this value as the resource id. If it is already in use, an
-     * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-     * long. It cannot contain the character `/`.
-     * 
- * - * string product_set_id = 3; - * @param value The bytes for productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSetId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.CreateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java deleted file mode 100644 index 68f3f7c8265c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CreateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSet should be created.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet to create.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The productSetId. - */ - java.lang.String getProductSetId(); - /** - *
-   * A user-supplied resource id for this ProductSet. If set, the server will
-   * attempt to use this value as the resource id. If it is already in use, an
-   * error is returned with code ALREADY_EXISTS. Must be at most 128 characters
-   * long. It cannot contain the character `/`.
-   * 
- * - * string product_set_id = 3; - * @return The bytes for productSetId. - */ - com.google.protobuf.ByteString - getProductSetIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java deleted file mode 100644 index 9bb7b84b69f3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java +++ /dev/null @@ -1,1051 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `CreateReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} - */ -public final class CreateReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - CreateReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateReferenceImageRequest.newBuilder() to construct. - private CreateReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateReferenceImageRequest() { - parent_ = ""; - referenceImageId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder subBuilder = null; - if (referenceImage_ != null) { - subBuilder = referenceImage_.toBuilder(); - } - referenceImage_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(referenceImage_); - referenceImage_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - referenceImageId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product in which to create the reference
-   * image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product in which to create the reference
-   * image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REFERENCE_IMAGE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_; - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - @java.lang.Override - public boolean hasReferenceImage() { - return referenceImage_ != null; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage() { - return referenceImage_ == null ? com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - return getReferenceImage(); - } - - public static final int REFERENCE_IMAGE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object referenceImageId_; - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - @java.lang.Override - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } - } - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (referenceImage_ != null) { - output.writeMessage(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referenceImageId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (referenceImage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReferenceImage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceImageId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referenceImageId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReferenceImage() != other.hasReferenceImage()) return false; - if (hasReferenceImage()) { - if (!getReferenceImage() - .equals(other.getReferenceImage())) return false; - } - if (!getReferenceImageId() - .equals(other.getReferenceImageId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReferenceImage()) { - hash = (37 * hash) + REFERENCE_IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImage().hashCode(); - } - hash = (37 * hash) + REFERENCE_IMAGE_ID_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImageId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `CreateReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - referenceImageId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest build() { - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest(this); - result.parent_ = parent_; - if (referenceImageBuilder_ == null) { - result.referenceImage_ = referenceImage_; - } else { - result.referenceImage_ = referenceImageBuilder_.build(); - } - result.referenceImageId_ = referenceImageId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReferenceImage()) { - mergeReferenceImage(other.getReferenceImage()); - } - if (!other.getReferenceImageId().isEmpty()) { - referenceImageId_ = other.referenceImageId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product in which to create the reference
-     * image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference
-     * image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product in which to create the reference
-     * image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference
-     * image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product in which to create the reference
-     * image.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImageBuilder_; - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - public boolean hasReferenceImage() { - return referenceImageBuilder_ != null || referenceImage_ != null; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage() { - if (referenceImageBuilder_ == null) { - return referenceImage_ == null ? com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } else { - return referenceImageBuilder_.getMessage(); - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - referenceImage_ = value; - onChanged(); - } else { - referenceImageBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReferenceImage( - com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImageBuilder_ == null) { - referenceImage_ = builderForValue.build(); - onChanged(); - } else { - referenceImageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeReferenceImage(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImageBuilder_ == null) { - if (referenceImage_ != null) { - referenceImage_ = - com.google.cloud.vision.v1p4beta1.ReferenceImage.newBuilder(referenceImage_).mergeFrom(value).buildPartial(); - } else { - referenceImage_ = value; - } - onChanged(); - } else { - referenceImageBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearReferenceImage() { - if (referenceImageBuilder_ == null) { - referenceImage_ = null; - onChanged(); - } else { - referenceImage_ = null; - referenceImageBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImageBuilder() { - - onChanged(); - return getReferenceImageFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder() { - if (referenceImageBuilder_ != null) { - return referenceImageBuilder_.getMessageOrBuilder(); - } else { - return referenceImage_ == null ? - com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance() : referenceImage_; - } - } - /** - *
-     * Required. The reference image to create.
-     * If an image ID is specified, it is ignored.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> - getReferenceImageFieldBuilder() { - if (referenceImageBuilder_ == null) { - referenceImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( - getReferenceImage(), - getParentForChildren(), - isClean()); - referenceImage_ = null; - } - return referenceImageBuilder_; - } - - private java.lang.Object referenceImageId_ = ""; - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - public java.lang.String getReferenceImageId() { - java.lang.Object ref = referenceImageId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - referenceImageId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - public com.google.protobuf.ByteString - getReferenceImageIdBytes() { - java.lang.Object ref = referenceImageId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - referenceImageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - referenceImageId_ = value; - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @return This builder for chaining. - */ - public Builder clearReferenceImageId() { - - referenceImageId_ = getDefaultInstance().getReferenceImageId(); - onChanged(); - return this; - } - /** - *
-     * A user-supplied resource id for the ReferenceImage to be added. If set,
-     * the server will attempt to use this value as the resource id. If it is
-     * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-     * most 128 characters long. It cannot contain the character `/`.
-     * 
- * - * string reference_image_id = 3; - * @param value The bytes for referenceImageId to set. - * @return This builder for chaining. - */ - public Builder setReferenceImageIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - referenceImageId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - private static final com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java deleted file mode 100644 index 3c48cbcb43f5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CreateReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product in which to create the reference
-   * image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product in which to create the reference
-   * image.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the referenceImage field is set. - */ - boolean hasReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The referenceImage. - */ - com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage(); - /** - *
-   * Required. The reference image to create.
-   * If an image ID is specified, it is ignored.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImageOrBuilder(); - - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The referenceImageId. - */ - java.lang.String getReferenceImageId(); - /** - *
-   * A user-supplied resource id for the ReferenceImage to be added. If set,
-   * the server will attempt to use this value as the resource id. If it is
-   * already in use, an error is returned with code ALREADY_EXISTS. Must be at
-   * most 128 characters long. It cannot contain the character `/`.
-   * 
- * - * string reference_image_id = 3; - * @return The bytes for referenceImageId. - */ - com.google.protobuf.ByteString - getReferenceImageIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java deleted file mode 100644 index 2594a271dc98..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java +++ /dev/null @@ -1,845 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Single crop hint that is used to generate a new crop when serving an image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHint} - */ -public final class CropHint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHint) - CropHintOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHint.newBuilder() to construct. - private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHint() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHint(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHint( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - case 29: { - - importanceFraction_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHint.class, com.google.cloud.vision.v1p4beta1.CropHint.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - public static final int IMPORTANCE_FRACTION_FIELD_NUMBER = 3; - private float importanceFraction_; - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - output.writeFloat(3, importanceFraction_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - if (java.lang.Float.floatToRawIntBits(importanceFraction_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, importanceFraction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHint)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CropHint other = (com.google.cloud.vision.v1p4beta1.CropHint) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getImportanceFraction()) - != java.lang.Float.floatToIntBits( - other.getImportanceFraction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + IMPORTANCE_FRACTION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getImportanceFraction()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Single crop hint that is used to generate a new crop when serving an image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHint) - com.google.cloud.vision.v1p4beta1.CropHintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHint.class, com.google.cloud.vision.v1p4beta1.CropHint.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CropHint.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - confidence_ = 0F; - - importanceFraction_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHint build() { - com.google.cloud.vision.v1p4beta1.CropHint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHint buildPartial() { - com.google.cloud.vision.v1p4beta1.CropHint result = new com.google.cloud.vision.v1p4beta1.CropHint(this); - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.confidence_ = confidence_; - result.importanceFraction_ = importanceFraction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CropHint) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHint other) { - if (other == com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getImportanceFraction() != 0F) { - setImportanceFraction(other.getImportanceFraction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CropHint parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon for the crop region. The coordinates of the bounding
-     * box are in the original image's scale.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of this being a salient region.  Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float importanceFraction_ ; - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - @java.lang.Override - public float getImportanceFraction() { - return importanceFraction_; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @param value The importanceFraction to set. - * @return This builder for chaining. - */ - public Builder setImportanceFraction(float value) { - - importanceFraction_ = value; - onChanged(); - return this; - } - /** - *
-     * Fraction of importance of this salient region with respect to the original
-     * image.
-     * 
- * - * float importance_fraction = 3; - * @return This builder for chaining. - */ - public Builder clearImportanceFraction() { - - importanceFraction_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHint) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHint) - private static final com.google.cloud.vision.v1p4beta1.CropHint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHint(); - } - - public static com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHint parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHint(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java deleted file mode 100644 index b6b460e2315b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CropHintOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHint) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon for the crop region. The coordinates of the bounding
-   * box are in the original image's scale.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * Confidence of this being a salient region.  Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - - /** - *
-   * Fraction of importance of this salient region with respect to the original
-   * image.
-   * 
- * - * float importance_fraction = 3; - * @return The importanceFraction. - */ - float getImportanceFraction(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java deleted file mode 100644 index 80d54ed43cc4..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Set of crop hints that are used to generate new crops when serving images.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsAnnotation} - */ -public final class CropHintsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - CropHintsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsAnnotation.newBuilder() to construct. - private CropHintsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsAnnotation() { - cropHints_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cropHints_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.CropHint.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder.class); - } - - public static final int CROP_HINTS_FIELD_NUMBER = 1; - private java.util.List cropHints_; - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List getCropHintsList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public java.util.List - getCropHintsOrBuilderList() { - return cropHints_; - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public int getCropHintsCount() { - return cropHints_.size(); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index) { - return cropHints_.get(index); - } - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - return cropHints_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < cropHints_.size(); i++) { - output.writeMessage(1, cropHints_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < cropHints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, cropHints_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHintsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) obj; - - if (!getCropHintsList() - .equals(other.getCropHintsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCropHintsCount() > 0) { - hash = (37 * hash) + CROP_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of crop hints that are used to generate new crops when serving images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.class, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCropHintsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation build() { - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation result = new com.google.cloud.vision.v1p4beta1.CropHintsAnnotation(this); - int from_bitField0_ = bitField0_; - if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - cropHints_ = java.util.Collections.unmodifiableList(cropHints_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.cropHints_ = cropHints_; - } else { - result.cropHints_ = cropHintsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHintsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHintsAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance()) return this; - if (cropHintsBuilder_ == null) { - if (!other.cropHints_.isEmpty()) { - if (cropHints_.isEmpty()) { - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCropHintsIsMutable(); - cropHints_.addAll(other.cropHints_); - } - onChanged(); - } - } else { - if (!other.cropHints_.isEmpty()) { - if (cropHintsBuilder_.isEmpty()) { - cropHintsBuilder_.dispose(); - cropHintsBuilder_ = null; - cropHints_ = other.cropHints_; - bitField0_ = (bitField0_ & ~0x00000001); - cropHintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCropHintsFieldBuilder() : null; - } else { - cropHintsBuilder_.addAllMessages(other.cropHints_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CropHintsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List cropHints_ = - java.util.Collections.emptyList(); - private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - cropHints_ = new java.util.ArrayList(cropHints_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder> cropHintsBuilder_; - - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public java.util.List getCropHintsList() { - if (cropHintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(cropHints_); - } else { - return cropHintsBuilder_.getMessageList(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public int getCropHintsCount() { - if (cropHintsBuilder_ == null) { - return cropHints_.size(); - } else { - return cropHintsBuilder_.getCount(); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); - } else { - return cropHintsBuilder_.getMessage(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p4beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.set(index, value); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder setCropHints( - int index, com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.set(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints(com.google.cloud.vision.v1p4beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p4beta1.CropHint value) { - if (cropHintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCropHintsIsMutable(); - cropHints_.add(index, value); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder addCropHints( - int index, com.google.cloud.vision.v1p4beta1.CropHint.Builder builderForValue) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.add(index, builderForValue.build()); - onChanged(); - } else { - cropHintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder addAllCropHints( - java.lang.Iterable values) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, cropHints_); - onChanged(); - } else { - cropHintsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder clearCropHints() { - if (cropHintsBuilder_ == null) { - cropHints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - cropHintsBuilder_.clear(); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public Builder removeCropHints(int index) { - if (cropHintsBuilder_ == null) { - ensureCropHintsIsMutable(); - cropHints_.remove(index); - onChanged(); - } else { - cropHintsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p4beta1.CropHint.Builder getCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().getBuilder(index); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index) { - if (cropHintsBuilder_ == null) { - return cropHints_.get(index); } else { - return cropHintsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsOrBuilderList() { - if (cropHintsBuilder_ != null) { - return cropHintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cropHints_); - } - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder() { - return getCropHintsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder( - int index) { - return getCropHintsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.CropHint.getDefaultInstance()); - } - /** - *
-     * Crop hint results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - public java.util.List - getCropHintsBuilderList() { - return getCropHintsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder> - getCropHintsFieldBuilder() { - if (cropHintsBuilder_ == null) { - cropHintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - cropHints_ = null; - } - return cropHintsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - private static final com.google.cloud.vision.v1p4beta1.CropHintsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHintsAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java deleted file mode 100644 index 37cbfcbe2899..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CropHintsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p4beta1.CropHint getCropHints(int index); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - int getCropHintsCount(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - java.util.List - getCropHintsOrBuilderList(); - /** - *
-   * Crop hint results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.CropHint crop_hints = 1; - */ - com.google.cloud.vision.v1p4beta1.CropHintOrBuilder getCropHintsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java deleted file mode 100644 index 03f3deb04e74..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Parameters for crop hints annotation request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsParams} - */ -public final class CropHintsParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.CropHintsParams) - CropHintsParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CropHintsParams.newBuilder() to construct. - private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CropHintsParams() { - aspectRatios_ = emptyFloatList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CropHintsParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CropHintsParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - aspectRatios_.addFloat(input.readFloat()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - aspectRatios_ = newFloatList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - aspectRatios_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHintsParams.class, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder.class); - } - - public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.FloatList aspectRatios_; - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - @java.lang.Override - public java.util.List - getAspectRatiosList() { - return aspectRatios_; - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - private int aspectRatiosMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getAspectRatiosList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); - } - for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.getFloat(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * getAspectRatiosList().size(); - size += dataSize; - if (!getAspectRatiosList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - aspectRatiosMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.CropHintsParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.CropHintsParams other = (com.google.cloud.vision.v1p4beta1.CropHintsParams) obj; - - if (!getAspectRatiosList() - .equals(other.getAspectRatiosList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAspectRatiosCount() > 0) { - hash = (37 * hash) + ASPECT_RATIOS_FIELD_NUMBER; - hash = (53 * hash) + getAspectRatiosList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.CropHintsParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.CropHintsParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.CropHintsParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.CropHintsParams) - com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.CropHintsParams.class, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.CropHintsParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParams build() { - com.google.cloud.vision.v1p4beta1.CropHintsParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParams buildPartial() { - com.google.cloud.vision.v1p4beta1.CropHintsParams result = new com.google.cloud.vision.v1p4beta1.CropHintsParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - aspectRatios_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aspectRatios_ = aspectRatios_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.CropHintsParams) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.CropHintsParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.CropHintsParams other) { - if (other == com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance()) return this; - if (!other.aspectRatios_.isEmpty()) { - if (aspectRatios_.isEmpty()) { - aspectRatios_ = other.aspectRatios_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAspectRatiosIsMutable(); - aspectRatios_.addAll(other.aspectRatios_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.CropHintsParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.CropHintsParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); - private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - aspectRatios_ = mutableCopy(aspectRatios_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - public java.util.List - getAspectRatiosList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(aspectRatios_) : aspectRatios_; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - public int getAspectRatiosCount() { - return aspectRatios_.size(); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - public float getAspectRatios(int index) { - return aspectRatios_.getFloat(index); - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param index The index to set the value at. - * @param value The aspectRatios to set. - * @return This builder for chaining. - */ - public Builder setAspectRatios( - int index, float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.setFloat(index, value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param value The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAspectRatios(float value) { - ensureAspectRatiosIsMutable(); - aspectRatios_.addFloat(value); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @param values The aspectRatios to add. - * @return This builder for chaining. - */ - public Builder addAllAspectRatios( - java.lang.Iterable values) { - ensureAspectRatiosIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aspectRatios_); - onChanged(); - return this; - } - /** - *
-     * Aspect ratios in floats, representing the ratio of the width to the height
-     * of the image. For example, if the desired aspect ratio is 4/3, the
-     * corresponding float value should be 1.33333.  If not specified, the
-     * best possible crop is returned. The number of provided aspect ratios is
-     * limited to a maximum of 16; any aspect ratios provided after the 16th are
-     * ignored.
-     * 
- * - * repeated float aspect_ratios = 1; - * @return This builder for chaining. - */ - public Builder clearAspectRatios() { - aspectRatios_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.CropHintsParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsParams) - private static final com.google.cloud.vision.v1p4beta1.CropHintsParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.CropHintsParams(); - } - - public static com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CropHintsParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CropHintsParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java deleted file mode 100644 index e599bbad2557..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParamsOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface CropHintsParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.CropHintsParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return A list containing the aspectRatios. - */ - java.util.List getAspectRatiosList(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @return The count of aspectRatios. - */ - int getAspectRatiosCount(); - /** - *
-   * Aspect ratios in floats, representing the ratio of the width to the height
-   * of the image. For example, if the desired aspect ratio is 4/3, the
-   * corresponding float value should be 1.33333.  If not specified, the
-   * best possible crop is returned. The number of provided aspect ratios is
-   * limited to a maximum of 16; any aspect ratios provided after the 16th are
-   * ignored.
-   * 
- * - * repeated float aspect_ratios = 1; - * @param index The index of the element to return. - * @return The aspectRatios at the given index. - */ - float getAspectRatios(int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java deleted file mode 100644 index 3d1f84fc24f0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `DeleteProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductRequest} - */ -public final class DeleteProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteProductRequest) - DeleteProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductRequest.newBuilder() to construct. - private DeleteProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteProductRequest) - com.google.cloud.vision.v1p4beta1.DeleteProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteProductRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductRequest build() { - com.google.cloud.vision.v1p4beta1.DeleteProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.DeleteProductRequest result = new com.google.cloud.vision.v1p4beta1.DeleteProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteProductRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.DeleteProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.DeleteProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of product to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductRequest) - private static final com.google.cloud.vision.v1p4beta1.DeleteProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteProductRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java deleted file mode 100644 index e279feab23b0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface DeleteProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of product to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java deleted file mode 100644 index b9948566e302..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `DeleteProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductSetRequest} - */ -public final class DeleteProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - DeleteProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteProductSetRequest.newBuilder() to construct. - private DeleteProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.class, com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest result = new com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java deleted file mode 100644 index 521a1ae8a3cc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface DeleteProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java deleted file mode 100644 index aecc9d0eef57..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `DeleteReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} - */ -public final class DeleteReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - DeleteReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteReferenceImageRequest.newBuilder() to construct. - private DeleteReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `DeleteReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest build() { - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the reference image to delete.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - private static final com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java deleted file mode 100644 index a14db61508f8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface DeleteReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the reference image to delete.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java deleted file mode 100644 index ab8b30593178..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Set of dominant colors and their corresponding scores.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DominantColorsAnnotation} - */ -public final class DominantColorsAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - DominantColorsAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DominantColorsAnnotation.newBuilder() to construct. - private DominantColorsAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DominantColorsAnnotation() { - colors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DominantColorsAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DominantColorsAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colors_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ColorInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder.class); - } - - public static final int COLORS_FIELD_NUMBER = 1; - private java.util.List colors_; - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List getColorsList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public java.util.List - getColorsOrBuilderList() { - return colors_; - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public int getColorsCount() { - return colors_.size(); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index) { - return colors_.get(index); - } - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - return colors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < colors_.size(); i++) { - output.writeMessage(1, colors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < colors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, colors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) obj; - - if (!getColorsList() - .equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getColorsCount() > 0) { - hash = (37 * hash) + COLORS_FIELD_NUMBER; - hash = (53 * hash) + getColorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of dominant colors and their corresponding scores.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.DominantColorsAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.class, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getColorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - colorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation build() { - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation result = new com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation(this); - int from_bitField0_ = bitField0_; - if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - colors_ = java.util.Collections.unmodifiableList(colors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.colors_ = colors_; - } else { - result.colors_ = colorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance()) return this; - if (colorsBuilder_ == null) { - if (!other.colors_.isEmpty()) { - if (colors_.isEmpty()) { - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColorsIsMutable(); - colors_.addAll(other.colors_); - } - onChanged(); - } - } else { - if (!other.colors_.isEmpty()) { - if (colorsBuilder_.isEmpty()) { - colorsBuilder_.dispose(); - colorsBuilder_ = null; - colors_ = other.colors_; - bitField0_ = (bitField0_ & ~0x00000001); - colorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getColorsFieldBuilder() : null; - } else { - colorsBuilder_.addAllMessages(other.colors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List colors_ = - java.util.Collections.emptyList(); - private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - colors_ = new java.util.ArrayList(colors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder> colorsBuilder_; - - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public java.util.List getColorsList() { - if (colorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(colors_); - } else { - return colorsBuilder_.getMessageList(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public int getColorsCount() { - if (colorsBuilder_ == null) { - return colors_.size(); - } else { - return colorsBuilder_.getCount(); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); - } else { - return colorsBuilder_.getMessage(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p4beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.set(index, value); - onChanged(); - } else { - colorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder setColors( - int index, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.set(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder addColors(com.google.cloud.vision.v1p4beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(value); - onChanged(); - } else { - colorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p4beta1.ColorInfo value) { - if (colorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColorsIsMutable(); - colors_.add(index, value); - onChanged(); - } else { - colorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder addColors( - com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder addColors( - int index, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder builderForValue) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.add(index, builderForValue.build()); - onChanged(); - } else { - colorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder addAllColors( - java.lang.Iterable values) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, colors_); - onChanged(); - } else { - colorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder clearColors() { - if (colorsBuilder_ == null) { - colors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - colorsBuilder_.clear(); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public Builder removeColors(int index) { - if (colorsBuilder_ == null) { - ensureColorsIsMutable(); - colors_.remove(index); - onChanged(); - } else { - colorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder getColorsBuilder( - int index) { - return getColorsFieldBuilder().getBuilder(index); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index) { - if (colorsBuilder_ == null) { - return colors_.get(index); } else { - return colorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsOrBuilderList() { - if (colorsBuilder_ != null) { - return colorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(colors_); - } - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder() { - return getColorsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder( - int index) { - return getColorsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ColorInfo.getDefaultInstance()); - } - /** - *
-     * RGB color values with their score and pixel fraction.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - public java.util.List - getColorsBuilderList() { - return getColorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder> - getColorsFieldBuilder() { - if (colorsBuilder_ == null) { - colorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - colors_ = null; - } - return colorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - private static final com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DominantColorsAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DominantColorsAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java deleted file mode 100644 index a8d649e11d0b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface DominantColorsAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p4beta1.ColorInfo getColors(int index); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - int getColorsCount(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - java.util.List - getColorsOrBuilderList(); - /** - *
-   * RGB color values with their score and pixel fraction.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ColorInfo colors = 1; - */ - com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder getColorsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java deleted file mode 100644 index 8940d16c1947..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java +++ /dev/null @@ -1,2480 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Set of detected entity features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.EntityAnnotation} - */ -public final class EntityAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.EntityAnnotation) - EntityAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityAnnotation.newBuilder() to construct. - private EntityAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityAnnotation() { - mid_ = ""; - locale_ = ""; - description_ = ""; - locations_ = java.util.Collections.emptyList(); - properties_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - locale_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - case 53: { - - topicality_ = input.readFloat(); - break; - } - case 58: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.LocationInfo.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - properties_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Property.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.class, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCALE_FIELD_NUMBER = 2; - private volatile java.lang.Object locale_; - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - @java.lang.Override - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } - } - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 - * @return The confidence. - */ - @java.lang.Override - @java.lang.Deprecated public float getConfidence() { - return confidence_; - } - - public static final int TOPICALITY_FIELD_NUMBER = 6; - private float topicality_; - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 7; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 8; - private java.util.List locations_; - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List getLocationsList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public java.util.List - getLocationsOrBuilderList() { - return locations_; - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public int getLocationsCount() { - return locations_.size(); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index) { - return locations_.get(index); - } - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 9; - private java.util.List properties_; - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List getPropertiesList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - @java.lang.Override - public java.util.List - getPropertiesOrBuilderList() { - return properties_; - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - @java.lang.Override - public int getPropertiesCount() { - return properties_.size(); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Property getProperties(int index) { - return properties_.get(index); - } - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - return properties_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - output.writeFloat(6, topicality_); - } - if (boundingPoly_ != null) { - output.writeMessage(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - output.writeMessage(9, properties_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locale_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locale_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - if (java.lang.Float.floatToRawIntBits(topicality_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, topicality_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getBoundingPoly()); - } - for (int i = 0; i < locations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, locations_.get(i)); - } - for (int i = 0; i < properties_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, properties_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.EntityAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.EntityAnnotation other = (com.google.cloud.vision.v1p4beta1.EntityAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLocale() - .equals(other.getLocale())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (java.lang.Float.floatToIntBits(getTopicality()) - != java.lang.Float.floatToIntBits( - other.getTopicality())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getLocationsList() - .equals(other.getLocationsList())) return false; - if (!getPropertiesList() - .equals(other.getPropertiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LOCALE_FIELD_NUMBER; - hash = (53 * hash) + getLocale().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (37 * hash) + TOPICALITY_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTopicality()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (getPropertiesCount() > 0) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + getPropertiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected entity features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.EntityAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.EntityAnnotation) - com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.EntityAnnotation.class, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.EntityAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLocationsFieldBuilder(); - getPropertiesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - locale_ = ""; - - description_ = ""; - - score_ = 0F; - - confidence_ = 0F; - - topicality_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - locationsBuilder_.clear(); - } - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - propertiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation build() { - com.google.cloud.vision.v1p4beta1.EntityAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.EntityAnnotation result = new com.google.cloud.vision.v1p4beta1.EntityAnnotation(this); - int from_bitField0_ = bitField0_; - result.mid_ = mid_; - result.locale_ = locale_; - result.description_ = description_; - result.score_ = score_; - result.confidence_ = confidence_; - result.topicality_ = topicality_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); - } - if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - properties_ = java.util.Collections.unmodifiableList(properties_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.properties_ = properties_; - } else { - result.properties_ = propertiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.EntityAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.EntityAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.EntityAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLocale().isEmpty()) { - locale_ = other.locale_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - if (other.getTopicality() != 0F) { - setTopicality(other.getTopicality()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - locationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; - } else { - locationsBuilder_.addAllMessages(other.locations_); - } - } - } - if (propertiesBuilder_ == null) { - if (!other.properties_.isEmpty()) { - if (properties_.isEmpty()) { - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePropertiesIsMutable(); - properties_.addAll(other.properties_); - } - onChanged(); - } - } else { - if (!other.properties_.isEmpty()) { - if (propertiesBuilder_.isEmpty()) { - propertiesBuilder_.dispose(); - propertiesBuilder_ = null; - properties_ = other.properties_; - bitField0_ = (bitField0_ & ~0x00000002); - propertiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPropertiesFieldBuilder() : null; - } else { - propertiesBuilder_.addAllMessages(other.properties_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.EntityAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.EntityAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object mid_ = ""; - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Opaque entity ID. Some IDs may be available in
-     * [Google Knowledge Graph Search
-     * API](https://developers.google.com/knowledge-graph/).
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object locale_ = ""; - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The locale. - */ - public java.lang.String getLocale() { - java.lang.Object ref = locale_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locale_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - public com.google.protobuf.ByteString - getLocaleBytes() { - java.lang.Object ref = locale_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locale_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The locale to set. - * @return This builder for chaining. - */ - public Builder setLocale( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locale_ = value; - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @return This builder for chaining. - */ - public Builder clearLocale() { - - locale_ = getDefaultInstance().getLocale(); - onChanged(); - return this; - } - /** - *
-     * The language code for the locale in which the entity textual
-     * `description` is expressed.
-     * 
- * - * string locale = 2; - * @param value The bytes for locale to set. - * @return This builder for chaining. - */ - public Builder setLocaleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locale_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Entity textual description, expressed in its `locale` language.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Overall score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 - * @return The confidence. - */ - @java.lang.Override - @java.lang.Deprecated public float getConfidence() { - return confidence_; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 - * @param value The confidence to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * **Deprecated. Use `score` instead.**
-     * The accuracy of the entity detection in an image.
-     * For example, for an image in which the "Eiffel Tower" entity is detected,
-     * this field represents the confidence that there is a tower in the query
-     * image. Range [0, 1].
-     * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 - * @return This builder for chaining. - */ - @java.lang.Deprecated public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - - private float topicality_ ; - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return The topicality. - */ - @java.lang.Override - public float getTopicality() { - return topicality_; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @param value The topicality to set. - * @return This builder for chaining. - */ - public Builder setTopicality(float value) { - - topicality_ = value; - onChanged(); - return this; - } - /** - *
-     * The relevancy of the ICA (Image Content Annotation) label to the
-     * image. For example, the relevancy of "tower" is likely higher to an image
-     * containing the detected "Eiffel Tower" than to an image containing a
-     * detected distant towering building, even though the confidence that
-     * there is a tower in each image may be the same. Range [0, 1].
-     * 
- * - * float topicality = 6; - * @return This builder for chaining. - */ - public Builder clearTopicality() { - - topicality_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this entity belongs. Not produced
-     * for `LABEL_DETECTION` features.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder> locationsBuilder_; - - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p4beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder setLocations( - int index, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder addLocations(com.google.cloud.vision.v1p4beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p4beta1.LocationInfo value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder addLocations( - int index, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - locationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()); - } - /** - *
-     * The location information for the detected entity. Multiple
-     * `LocationInfo` elements can be present because one location may
-     * indicate the location of the scene in the image, and another location
-     * may indicate the location of the place where the image was taken.
-     * Location information is usually present for landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - - private java.util.List properties_ = - java.util.Collections.emptyList(); - private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - properties_ = new java.util.ArrayList(properties_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder> propertiesBuilder_; - - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public java.util.List getPropertiesList() { - if (propertiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(properties_); - } else { - return propertiesBuilder_.getMessageList(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public int getPropertiesCount() { - if (propertiesBuilder_ == null) { - return properties_.size(); - } else { - return propertiesBuilder_.getCount(); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p4beta1.Property getProperties(int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); - } else { - return propertiesBuilder_.getMessage(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p4beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.set(index, value); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder setProperties( - int index, com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.set(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder addProperties(com.google.cloud.vision.v1p4beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(value); - onChanged(); - } else { - propertiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p4beta1.Property value) { - if (propertiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropertiesIsMutable(); - properties_.add(index, value); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder addProperties( - com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder addProperties( - int index, com.google.cloud.vision.v1p4beta1.Property.Builder builderForValue) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.add(index, builderForValue.build()); - onChanged(); - } else { - propertiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder addAllProperties( - java.lang.Iterable values) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, properties_); - onChanged(); - } else { - propertiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder clearProperties() { - if (propertiesBuilder_ == null) { - properties_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - propertiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public Builder removeProperties(int index) { - if (propertiesBuilder_ == null) { - ensurePropertiesIsMutable(); - properties_.remove(index); - onChanged(); - } else { - propertiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p4beta1.Property.Builder getPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index) { - if (propertiesBuilder_ == null) { - return properties_.get(index); } else { - return propertiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public java.util.List - getPropertiesOrBuilderList() { - if (propertiesBuilder_ != null) { - return propertiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(properties_); - } - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder() { - return getPropertiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder( - int index) { - return getPropertiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()); - } - /** - *
-     * Some entities may have optional user-supplied `Property` (name/value)
-     * fields, such a score or string that qualifies the entity.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - public java.util.List - getPropertiesBuilderList() { - return getPropertiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder> - getPropertiesFieldBuilder() { - if (propertiesBuilder_ == null) { - propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - properties_ = null; - } - return propertiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.EntityAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.EntityAnnotation) - private static final com.google.cloud.vision.v1p4beta1.EntityAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.EntityAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.EntityAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java deleted file mode 100644 index 31f9fb2bd65b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotationOrBuilder.java +++ /dev/null @@ -1,258 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface EntityAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.EntityAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Opaque entity ID. Some IDs may be available in
-   * [Google Knowledge Graph Search
-   * API](https://developers.google.com/knowledge-graph/).
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The locale. - */ - java.lang.String getLocale(); - /** - *
-   * The language code for the locale in which the entity textual
-   * `description` is expressed.
-   * 
- * - * string locale = 2; - * @return The bytes for locale. - */ - com.google.protobuf.ByteString - getLocaleBytes(); - - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Entity textual description, expressed in its `locale` language.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Overall score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * **Deprecated. Use `score` instead.**
-   * The accuracy of the entity detection in an image.
-   * For example, for an image in which the "Eiffel Tower" entity is detected,
-   * this field represents the confidence that there is a tower in the query
-   * image. Range [0, 1].
-   * 
- * - * float confidence = 5 [deprecated = true]; - * @deprecated google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. - * See google/cloud/vision/v1p4beta1/image_annotator.proto;l=478 - * @return The confidence. - */ - @java.lang.Deprecated float getConfidence(); - - /** - *
-   * The relevancy of the ICA (Image Content Annotation) label to the
-   * image. For example, the relevancy of "tower" is likely higher to an image
-   * containing the detected "Eiffel Tower" than to an image containing a
-   * detected distant towering building, even though the confidence that
-   * there is a tower in each image may be the same. Range [0, 1].
-   * 
- * - * float topicality = 6; - * @return The topicality. - */ - float getTopicality(); - - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this entity belongs. Not produced
-   * for `LABEL_DETECTION` features.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p4beta1.LocationInfo getLocations(int index); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - int getLocationsCount(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - java.util.List - getLocationsOrBuilderList(); - /** - *
-   * The location information for the detected entity. Multiple
-   * `LocationInfo` elements can be present because one location may
-   * indicate the location of the scene in the image, and another location
-   * may indicate the location of the place where the image was taken.
-   * Location information is usually present for landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8; - */ - com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder getLocationsOrBuilder( - int index); - - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - java.util.List - getPropertiesList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p4beta1.Property getProperties(int index); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - int getPropertiesCount(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - java.util.List - getPropertiesOrBuilderList(); - /** - *
-   * Some entities may have optional user-supplied `Property` (name/value)
-   * fields, such a score or string that qualifies the entity.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Property properties = 9; - */ - com.google.cloud.vision.v1p4beta1.PropertyOrBuilder getPropertiesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java deleted file mode 100644 index ce737b5d6f9d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java +++ /dev/null @@ -1,4832 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A face annotation object contains the results of face detection.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation} - */ -public final class FaceAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceAnnotation) - FaceAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceAnnotation.newBuilder() to construct. - private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceAnnotation() { - landmarks_ = java.util.Collections.emptyList(); - joyLikelihood_ = 0; - sorrowLikelihood_ = 0; - angerLikelihood_ = 0; - surpriseLikelihood_ = 0; - underExposedLikelihood_ = 0; - blurredLikelihood_ = 0; - headwearLikelihood_ = 0; - recognitionResult_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (fdBoundingPoly_ != null) { - subBuilder = fdBoundingPoly_.toBuilder(); - } - fdBoundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fdBoundingPoly_); - fdBoundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - landmarks_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.parser(), extensionRegistry)); - break; - } - case 37: { - - rollAngle_ = input.readFloat(); - break; - } - case 45: { - - panAngle_ = input.readFloat(); - break; - } - case 53: { - - tiltAngle_ = input.readFloat(); - break; - } - case 61: { - - detectionConfidence_ = input.readFloat(); - break; - } - case 69: { - - landmarkingConfidence_ = input.readFloat(); - break; - } - case 72: { - int rawValue = input.readEnum(); - - joyLikelihood_ = rawValue; - break; - } - case 80: { - int rawValue = input.readEnum(); - - sorrowLikelihood_ = rawValue; - break; - } - case 88: { - int rawValue = input.readEnum(); - - angerLikelihood_ = rawValue; - break; - } - case 96: { - int rawValue = input.readEnum(); - - surpriseLikelihood_ = rawValue; - break; - } - case 104: { - int rawValue = input.readEnum(); - - underExposedLikelihood_ = rawValue; - break; - } - case 112: { - int rawValue = input.readEnum(); - - blurredLikelihood_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - headwearLikelihood_ = rawValue; - break; - } - case 130: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - recognitionResult_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - recognitionResult_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - recognitionResult_ = java.util.Collections.unmodifiableList(recognitionResult_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder.class); - } - - public interface LandmarkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType(); - - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return Whether the position field is set. - */ - boolean hasPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return The position. - */ - com.google.cloud.vision.v1p4beta1.Position getPosition(); - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder(); - } - /** - *
-   * A face-specific landmark (for example, a face feature).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} - */ - public static final class Landmark extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - LandmarkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Landmark.newBuilder() to construct. - private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Landmark() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Landmark(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Landmark( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - com.google.cloud.vision.v1p4beta1.Position.Builder subBuilder = null; - if (position_ != null) { - subBuilder = position_.toBuilder(); - } - position_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(position_); - position_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder.class); - } - - /** - *
-     * Face landmark (feature) type.
-     * Left and right are defined from the vantage of the viewer of the image
-     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
-     * typically, is the person's right eye.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - UNKNOWN_LANDMARK(0), - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - LEFT_EYE(1), - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - RIGHT_EYE(2), - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - LEFT_OF_LEFT_EYEBROW(3), - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - RIGHT_OF_LEFT_EYEBROW(4), - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - LEFT_OF_RIGHT_EYEBROW(5), - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - RIGHT_OF_RIGHT_EYEBROW(6), - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - MIDPOINT_BETWEEN_EYES(7), - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - NOSE_TIP(8), - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - UPPER_LIP(9), - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - LOWER_LIP(10), - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - MOUTH_LEFT(11), - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - MOUTH_RIGHT(12), - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - MOUTH_CENTER(13), - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - NOSE_BOTTOM_RIGHT(14), - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - NOSE_BOTTOM_LEFT(15), - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - NOSE_BOTTOM_CENTER(16), - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - LEFT_EYE_TOP_BOUNDARY(17), - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - LEFT_EYE_RIGHT_CORNER(18), - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - LEFT_EYE_BOTTOM_BOUNDARY(19), - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - LEFT_EYE_LEFT_CORNER(20), - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - RIGHT_EYE_TOP_BOUNDARY(21), - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - RIGHT_EYE_RIGHT_CORNER(22), - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - RIGHT_EYE_BOTTOM_BOUNDARY(23), - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - RIGHT_EYE_LEFT_CORNER(24), - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - LEFT_EYEBROW_UPPER_MIDPOINT(25), - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - RIGHT_EYEBROW_UPPER_MIDPOINT(26), - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - LEFT_EAR_TRAGION(27), - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - RIGHT_EAR_TRAGION(28), - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - LEFT_EYE_PUPIL(29), - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - RIGHT_EYE_PUPIL(30), - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - FOREHEAD_GLABELLA(31), - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - CHIN_GNATHION(32), - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - CHIN_LEFT_GONION(33), - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - CHIN_RIGHT_GONION(34), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown face landmark detected. Should not be filled.
-       * 
- * - * UNKNOWN_LANDMARK = 0; - */ - public static final int UNKNOWN_LANDMARK_VALUE = 0; - /** - *
-       * Left eye.
-       * 
- * - * LEFT_EYE = 1; - */ - public static final int LEFT_EYE_VALUE = 1; - /** - *
-       * Right eye.
-       * 
- * - * RIGHT_EYE = 2; - */ - public static final int RIGHT_EYE_VALUE = 2; - /** - *
-       * Left of left eyebrow.
-       * 
- * - * LEFT_OF_LEFT_EYEBROW = 3; - */ - public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; - /** - *
-       * Right of left eyebrow.
-       * 
- * - * RIGHT_OF_LEFT_EYEBROW = 4; - */ - public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; - /** - *
-       * Left of right eyebrow.
-       * 
- * - * LEFT_OF_RIGHT_EYEBROW = 5; - */ - public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; - /** - *
-       * Right of right eyebrow.
-       * 
- * - * RIGHT_OF_RIGHT_EYEBROW = 6; - */ - public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; - /** - *
-       * Midpoint between eyes.
-       * 
- * - * MIDPOINT_BETWEEN_EYES = 7; - */ - public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; - /** - *
-       * Nose tip.
-       * 
- * - * NOSE_TIP = 8; - */ - public static final int NOSE_TIP_VALUE = 8; - /** - *
-       * Upper lip.
-       * 
- * - * UPPER_LIP = 9; - */ - public static final int UPPER_LIP_VALUE = 9; - /** - *
-       * Lower lip.
-       * 
- * - * LOWER_LIP = 10; - */ - public static final int LOWER_LIP_VALUE = 10; - /** - *
-       * Mouth left.
-       * 
- * - * MOUTH_LEFT = 11; - */ - public static final int MOUTH_LEFT_VALUE = 11; - /** - *
-       * Mouth right.
-       * 
- * - * MOUTH_RIGHT = 12; - */ - public static final int MOUTH_RIGHT_VALUE = 12; - /** - *
-       * Mouth center.
-       * 
- * - * MOUTH_CENTER = 13; - */ - public static final int MOUTH_CENTER_VALUE = 13; - /** - *
-       * Nose, bottom right.
-       * 
- * - * NOSE_BOTTOM_RIGHT = 14; - */ - public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; - /** - *
-       * Nose, bottom left.
-       * 
- * - * NOSE_BOTTOM_LEFT = 15; - */ - public static final int NOSE_BOTTOM_LEFT_VALUE = 15; - /** - *
-       * Nose, bottom center.
-       * 
- * - * NOSE_BOTTOM_CENTER = 16; - */ - public static final int NOSE_BOTTOM_CENTER_VALUE = 16; - /** - *
-       * Left eye, top boundary.
-       * 
- * - * LEFT_EYE_TOP_BOUNDARY = 17; - */ - public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; - /** - *
-       * Left eye, right corner.
-       * 
- * - * LEFT_EYE_RIGHT_CORNER = 18; - */ - public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; - /** - *
-       * Left eye, bottom boundary.
-       * 
- * - * LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; - /** - *
-       * Left eye, left corner.
-       * 
- * - * LEFT_EYE_LEFT_CORNER = 20; - */ - public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; - /** - *
-       * Right eye, top boundary.
-       * 
- * - * RIGHT_EYE_TOP_BOUNDARY = 21; - */ - public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; - /** - *
-       * Right eye, right corner.
-       * 
- * - * RIGHT_EYE_RIGHT_CORNER = 22; - */ - public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; - /** - *
-       * Right eye, bottom boundary.
-       * 
- * - * RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; - /** - *
-       * Right eye, left corner.
-       * 
- * - * RIGHT_EYE_LEFT_CORNER = 24; - */ - public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; - /** - *
-       * Left eyebrow, upper midpoint.
-       * 
- * - * LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; - /** - *
-       * Right eyebrow, upper midpoint.
-       * 
- * - * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; - /** - *
-       * Left ear tragion.
-       * 
- * - * LEFT_EAR_TRAGION = 27; - */ - public static final int LEFT_EAR_TRAGION_VALUE = 27; - /** - *
-       * Right ear tragion.
-       * 
- * - * RIGHT_EAR_TRAGION = 28; - */ - public static final int RIGHT_EAR_TRAGION_VALUE = 28; - /** - *
-       * Left eye pupil.
-       * 
- * - * LEFT_EYE_PUPIL = 29; - */ - public static final int LEFT_EYE_PUPIL_VALUE = 29; - /** - *
-       * Right eye pupil.
-       * 
- * - * RIGHT_EYE_PUPIL = 30; - */ - public static final int RIGHT_EYE_PUPIL_VALUE = 30; - /** - *
-       * Forehead glabella.
-       * 
- * - * FOREHEAD_GLABELLA = 31; - */ - public static final int FOREHEAD_GLABELLA_VALUE = 31; - /** - *
-       * Chin gnathion.
-       * 
- * - * CHIN_GNATHION = 32; - */ - public static final int CHIN_GNATHION_VALUE = 32; - /** - *
-       * Chin left gonion.
-       * 
- * - * CHIN_LEFT_GONION = 33; - */ - public static final int CHIN_LEFT_GONION_VALUE = 33; - /** - *
-       * Chin right gonion.
-       * 
- * - * CHIN_RIGHT_GONION = 34; - */ - public static final int CHIN_RIGHT_GONION_VALUE = 34; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return UNKNOWN_LANDMARK; - case 1: return LEFT_EYE; - case 2: return RIGHT_EYE; - case 3: return LEFT_OF_LEFT_EYEBROW; - case 4: return RIGHT_OF_LEFT_EYEBROW; - case 5: return LEFT_OF_RIGHT_EYEBROW; - case 6: return RIGHT_OF_RIGHT_EYEBROW; - case 7: return MIDPOINT_BETWEEN_EYES; - case 8: return NOSE_TIP; - case 9: return UPPER_LIP; - case 10: return LOWER_LIP; - case 11: return MOUTH_LEFT; - case 12: return MOUTH_RIGHT; - case 13: return MOUTH_CENTER; - case 14: return NOSE_BOTTOM_RIGHT; - case 15: return NOSE_BOTTOM_LEFT; - case 16: return NOSE_BOTTOM_CENTER; - case 17: return LEFT_EYE_TOP_BOUNDARY; - case 18: return LEFT_EYE_RIGHT_CORNER; - case 19: return LEFT_EYE_BOTTOM_BOUNDARY; - case 20: return LEFT_EYE_LEFT_CORNER; - case 21: return RIGHT_EYE_TOP_BOUNDARY; - case 22: return RIGHT_EYE_RIGHT_CORNER; - case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; - case 24: return RIGHT_EYE_LEFT_CORNER; - case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; - case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; - case 27: return LEFT_EAR_TRAGION; - case 28: return RIGHT_EAR_TRAGION; - case 29: return LEFT_EYE_PUPIL; - case 30: return RIGHT_EYE_PUPIL; - case 31: return FOREHEAD_GLABELLA; - case 32: return CHIN_GNATHION; - case 33: return CHIN_LEFT_GONION; - case 34: return CHIN_RIGHT_GONION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type) - } - - public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Face landmark type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - - public static final int POSITION_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p4beta1.Position position_; - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return Whether the position field is set. - */ - @java.lang.Override - public boolean hasPosition() { - return position_ != null; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return The position. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Position getPosition() { - return position_ == null ? com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; - } - /** - *
-     * Face landmark position.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder() { - return getPosition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - output.writeEnum(3, type_); - } - if (position_ != null) { - output.writeMessage(4, getPosition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_); - } - if (position_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPosition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) obj; - - if (type_ != other.type_) return false; - if (hasPosition() != other.hasPosition()) return false; - if (hasPosition()) { - if (!getPosition() - .equals(other.getPosition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - if (hasPosition()) { - hash = (37 * hash) + POSITION_FIELD_NUMBER; - hash = (53 * hash) + getPosition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A face-specific landmark (for example, a face feature).
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - if (positionBuilder_ == null) { - position_ = null; - } else { - position_ = null; - positionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark build() { - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark buildPartial() { - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark(this); - result.type_ = type_; - if (positionBuilder_ == null) { - result.position_ = position_; - } else { - result.position_ = positionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark other) { - if (other == com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.hasPosition()) { - mergePosition(other.getPosition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Face landmark type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.Position position_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder> positionBuilder_; - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return Whether the position field is set. - */ - public boolean hasPosition() { - return positionBuilder_ != null || position_ != null; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - * @return The position. - */ - public com.google.cloud.vision.v1p4beta1.Position getPosition() { - if (positionBuilder_ == null) { - return position_ == null ? com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; - } else { - return positionBuilder_.getMessage(); - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public Builder setPosition(com.google.cloud.vision.v1p4beta1.Position value) { - if (positionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - position_ = value; - onChanged(); - } else { - positionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public Builder setPosition( - com.google.cloud.vision.v1p4beta1.Position.Builder builderForValue) { - if (positionBuilder_ == null) { - position_ = builderForValue.build(); - onChanged(); - } else { - positionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public Builder mergePosition(com.google.cloud.vision.v1p4beta1.Position value) { - if (positionBuilder_ == null) { - if (position_ != null) { - position_ = - com.google.cloud.vision.v1p4beta1.Position.newBuilder(position_).mergeFrom(value).buildPartial(); - } else { - position_ = value; - } - onChanged(); - } else { - positionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public Builder clearPosition() { - if (positionBuilder_ == null) { - position_ = null; - onChanged(); - } else { - position_ = null; - positionBuilder_ = null; - } - - return this; - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p4beta1.Position.Builder getPositionBuilder() { - - onChanged(); - return getPositionFieldBuilder().getBuilder(); - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - public com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder() { - if (positionBuilder_ != null) { - return positionBuilder_.getMessageOrBuilder(); - } else { - return position_ == null ? - com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance() : position_; - } - } - /** - *
-       * Face landmark position.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Position position = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder> - getPositionFieldBuilder() { - if (positionBuilder_ == null) { - positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, com.google.cloud.vision.v1p4beta1.PositionOrBuilder>( - getPosition(), - getParentForChildren(), - isClean()); - position_ = null; - } - return positionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - private static final com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark(); - } - - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Landmark parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Landmark(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_; - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - @java.lang.Override - public boolean hasFdBoundingPoly() { - return fdBoundingPoly_ != null; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly() { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - return getFdBoundingPoly(); - } - - public static final int LANDMARKS_FIELD_NUMBER = 3; - private java.util.List landmarks_; - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List getLandmarksList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public java.util.List - getLandmarksOrBuilderList() { - return landmarks_; - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public int getLandmarksCount() { - return landmarks_.size(); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index) { - return landmarks_.get(index); - } - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - return landmarks_.get(index); - } - - public static final int ROLL_ANGLE_FIELD_NUMBER = 4; - private float rollAngle_; - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - - public static final int PAN_ANGLE_FIELD_NUMBER = 5; - private float panAngle_; - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - - public static final int TILT_ANGLE_FIELD_NUMBER = 6; - private float tiltAngle_; - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - - public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; - private float detectionConfidence_; - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - - public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; - private float landmarkingConfidence_; - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - - public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; - private int joyLikelihood_; - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; - private int sorrowLikelihood_; - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; - private int angerLikelihood_; - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; - private int surpriseLikelihood_; - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; - private int underExposedLikelihood_; - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; - private int blurredLikelihood_; - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; - private int headwearLikelihood_; - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RECOGNITION_RESULT_FIELD_NUMBER = 16; - private java.util.List recognitionResult_; - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - @java.lang.Override - public java.util.List getRecognitionResultList() { - return recognitionResult_; - } - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - @java.lang.Override - public java.util.List - getRecognitionResultOrBuilderList() { - return recognitionResult_; - } - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - @java.lang.Override - public int getRecognitionResultCount() { - return recognitionResult_.size(); - } - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index) { - return recognitionResult_.get(index); - } - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( - int index) { - return recognitionResult_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - output.writeMessage(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - output.writeMessage(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - output.writeFloat(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - output.writeFloat(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - output.writeFloat(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - output.writeFloat(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - output.writeFloat(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(15, headwearLikelihood_); - } - for (int i = 0; i < recognitionResult_.size(); i++) { - output.writeMessage(16, recognitionResult_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - if (fdBoundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFdBoundingPoly()); - } - for (int i = 0; i < landmarks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, landmarks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, rollAngle_); - } - if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, panAngle_); - } - if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, tiltAngle_); - } - if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(7, detectionConfidence_); - } - if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(8, landmarkingConfidence_); - } - if (joyLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, joyLikelihood_); - } - if (sorrowLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, sorrowLikelihood_); - } - if (angerLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, angerLikelihood_); - } - if (surpriseLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(12, surpriseLikelihood_); - } - if (underExposedLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(13, underExposedLikelihood_); - } - if (blurredLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, blurredLikelihood_); - } - if (headwearLikelihood_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, headwearLikelihood_); - } - for (int i = 0; i < recognitionResult_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, recognitionResult_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.FaceAnnotation other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; - if (hasFdBoundingPoly()) { - if (!getFdBoundingPoly() - .equals(other.getFdBoundingPoly())) return false; - } - if (!getLandmarksList() - .equals(other.getLandmarksList())) return false; - if (java.lang.Float.floatToIntBits(getRollAngle()) - != java.lang.Float.floatToIntBits( - other.getRollAngle())) return false; - if (java.lang.Float.floatToIntBits(getPanAngle()) - != java.lang.Float.floatToIntBits( - other.getPanAngle())) return false; - if (java.lang.Float.floatToIntBits(getTiltAngle()) - != java.lang.Float.floatToIntBits( - other.getTiltAngle())) return false; - if (java.lang.Float.floatToIntBits(getDetectionConfidence()) - != java.lang.Float.floatToIntBits( - other.getDetectionConfidence())) return false; - if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - != java.lang.Float.floatToIntBits( - other.getLandmarkingConfidence())) return false; - if (joyLikelihood_ != other.joyLikelihood_) return false; - if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; - if (angerLikelihood_ != other.angerLikelihood_) return false; - if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; - if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; - if (blurredLikelihood_ != other.blurredLikelihood_) return false; - if (headwearLikelihood_ != other.headwearLikelihood_) return false; - if (!getRecognitionResultList() - .equals(other.getRecognitionResultList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (hasFdBoundingPoly()) { - hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getFdBoundingPoly().hashCode(); - } - if (getLandmarksCount() > 0) { - hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; - hash = (53 * hash) + getLandmarksList().hashCode(); - } - hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRollAngle()); - hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getPanAngle()); - hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getTiltAngle()); - hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getDetectionConfidence()); - hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLandmarkingConfidence()); - hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + joyLikelihood_; - hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + sorrowLikelihood_; - hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + angerLikelihood_; - hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + surpriseLikelihood_; - hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + underExposedLikelihood_; - hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + blurredLikelihood_; - hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + headwearLikelihood_; - if (getRecognitionResultCount() > 0) { - hash = (37 * hash) + RECOGNITION_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getRecognitionResultList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A face annotation object contains the results of face detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceAnnotation) - com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.class, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.FaceAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getLandmarksFieldBuilder(); - getRecognitionResultFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - landmarksBuilder_.clear(); - } - rollAngle_ = 0F; - - panAngle_ = 0F; - - tiltAngle_ = 0F; - - detectionConfidence_ = 0F; - - landmarkingConfidence_ = 0F; - - joyLikelihood_ = 0; - - sorrowLikelihood_ = 0; - - angerLikelihood_ = 0; - - surpriseLikelihood_ = 0; - - underExposedLikelihood_ = 0; - - blurredLikelihood_ = 0; - - headwearLikelihood_ = 0; - - if (recognitionResultBuilder_ == null) { - recognitionResult_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - recognitionResultBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation build() { - com.google.cloud.vision.v1p4beta1.FaceAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.FaceAnnotation result = new com.google.cloud.vision.v1p4beta1.FaceAnnotation(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (fdBoundingPolyBuilder_ == null) { - result.fdBoundingPoly_ = fdBoundingPoly_; - } else { - result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); - } - if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - landmarks_ = java.util.Collections.unmodifiableList(landmarks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.landmarks_ = landmarks_; - } else { - result.landmarks_ = landmarksBuilder_.build(); - } - result.rollAngle_ = rollAngle_; - result.panAngle_ = panAngle_; - result.tiltAngle_ = tiltAngle_; - result.detectionConfidence_ = detectionConfidence_; - result.landmarkingConfidence_ = landmarkingConfidence_; - result.joyLikelihood_ = joyLikelihood_; - result.sorrowLikelihood_ = sorrowLikelihood_; - result.angerLikelihood_ = angerLikelihood_; - result.surpriseLikelihood_ = surpriseLikelihood_; - result.underExposedLikelihood_ = underExposedLikelihood_; - result.blurredLikelihood_ = blurredLikelihood_; - result.headwearLikelihood_ = headwearLikelihood_; - if (recognitionResultBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - recognitionResult_ = java.util.Collections.unmodifiableList(recognitionResult_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.recognitionResult_ = recognitionResult_; - } else { - result.recognitionResult_ = recognitionResultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.FaceAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.hasFdBoundingPoly()) { - mergeFdBoundingPoly(other.getFdBoundingPoly()); - } - if (landmarksBuilder_ == null) { - if (!other.landmarks_.isEmpty()) { - if (landmarks_.isEmpty()) { - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLandmarksIsMutable(); - landmarks_.addAll(other.landmarks_); - } - onChanged(); - } - } else { - if (!other.landmarks_.isEmpty()) { - if (landmarksBuilder_.isEmpty()) { - landmarksBuilder_.dispose(); - landmarksBuilder_ = null; - landmarks_ = other.landmarks_; - bitField0_ = (bitField0_ & ~0x00000001); - landmarksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLandmarksFieldBuilder() : null; - } else { - landmarksBuilder_.addAllMessages(other.landmarks_); - } - } - } - if (other.getRollAngle() != 0F) { - setRollAngle(other.getRollAngle()); - } - if (other.getPanAngle() != 0F) { - setPanAngle(other.getPanAngle()); - } - if (other.getTiltAngle() != 0F) { - setTiltAngle(other.getTiltAngle()); - } - if (other.getDetectionConfidence() != 0F) { - setDetectionConfidence(other.getDetectionConfidence()); - } - if (other.getLandmarkingConfidence() != 0F) { - setLandmarkingConfidence(other.getLandmarkingConfidence()); - } - if (other.joyLikelihood_ != 0) { - setJoyLikelihoodValue(other.getJoyLikelihoodValue()); - } - if (other.sorrowLikelihood_ != 0) { - setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); - } - if (other.angerLikelihood_ != 0) { - setAngerLikelihoodValue(other.getAngerLikelihoodValue()); - } - if (other.surpriseLikelihood_ != 0) { - setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); - } - if (other.underExposedLikelihood_ != 0) { - setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); - } - if (other.blurredLikelihood_ != 0) { - setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); - } - if (other.headwearLikelihood_ != 0) { - setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); - } - if (recognitionResultBuilder_ == null) { - if (!other.recognitionResult_.isEmpty()) { - if (recognitionResult_.isEmpty()) { - recognitionResult_ = other.recognitionResult_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRecognitionResultIsMutable(); - recognitionResult_.addAll(other.recognitionResult_); - } - onChanged(); - } - } else { - if (!other.recognitionResult_.isEmpty()) { - if (recognitionResultBuilder_.isEmpty()) { - recognitionResultBuilder_.dispose(); - recognitionResultBuilder_ = null; - recognitionResult_ = other.recognitionResult_; - bitField0_ = (bitField0_ & ~0x00000002); - recognitionResultBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRecognitionResultFieldBuilder() : null; - } else { - recognitionResultBuilder_.addAllMessages(other.recognitionResult_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.FaceAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the face. The coordinates of the bounding box
-     * are in the original image's scale.
-     * The bounding box is computed to "frame" the face in accordance with human
-     * expectations. It is based on the landmarker results.
-     * Note that one or more x and/or y coordinates may not be generated in the
-     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-     * appears in the image to be annotated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - public boolean hasFdBoundingPoly() { - return fdBoundingPolyBuilder_ != null || fdBoundingPoly_ != null; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } else { - return fdBoundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fdBoundingPoly_ = value; - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder setFdBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = builderForValue.build(); - onChanged(); - } else { - fdBoundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (fdBoundingPolyBuilder_ == null) { - if (fdBoundingPoly_ != null) { - fdBoundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(fdBoundingPoly_).mergeFrom(value).buildPartial(); - } else { - fdBoundingPoly_ = value; - } - onChanged(); - } else { - fdBoundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public Builder clearFdBoundingPoly() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPoly_ = null; - onChanged(); - } else { - fdBoundingPoly_ = null; - fdBoundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { - - onChanged(); - return getFdBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { - if (fdBoundingPolyBuilder_ != null) { - return fdBoundingPolyBuilder_.getMessageOrBuilder(); - } else { - return fdBoundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; - } - } - /** - *
-     * The `fd_bounding_poly` bounding polygon is tighter than the
-     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-     * is used to eliminate the face from any image analysis that detects the
-     * "amount of skin" visible in an image. It is not based on the
-     * landmarker results, only on the initial face detection, hence
-     * the <code>fd</code> (face detection) prefix.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getFdBoundingPolyFieldBuilder() { - if (fdBoundingPolyBuilder_ == null) { - fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getFdBoundingPoly(), - getParentForChildren(), - isClean()); - fdBoundingPoly_ = null; - } - return fdBoundingPolyBuilder_; - } - - private java.util.List landmarks_ = - java.util.Collections.emptyList(); - private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - landmarks_ = new java.util.ArrayList(landmarks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; - - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List getLandmarksList() { - if (landmarksBuilder_ == null) { - return java.util.Collections.unmodifiableList(landmarks_); - } else { - return landmarksBuilder_.getMessageList(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public int getLandmarksCount() { - if (landmarksBuilder_ == null) { - return landmarks_.size(); - } else { - return landmarksBuilder_.getCount(); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); - } else { - return landmarksBuilder_.getMessage(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.set(index, value); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder setLandmarks( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.set(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks(com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(value); - onChanged(); - } else { - landmarksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark value) { - if (landmarksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLandmarksIsMutable(); - landmarks_.add(index, value); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addLandmarks( - int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder builderForValue) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.add(index, builderForValue.build()); - onChanged(); - } else { - landmarksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder addAllLandmarks( - java.lang.Iterable values) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, landmarks_); - onChanged(); - } else { - landmarksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder clearLandmarks() { - if (landmarksBuilder_ == null) { - landmarks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - landmarksBuilder_.clear(); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public Builder removeLandmarks(int index) { - if (landmarksBuilder_ == null) { - ensureLandmarksIsMutable(); - landmarks_.remove(index); - onChanged(); - } else { - landmarksBuilder_.remove(index); - } - return this; - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().getBuilder(index); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index) { - if (landmarksBuilder_ == null) { - return landmarks_.get(index); } else { - return landmarksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksOrBuilderList() { - if (landmarksBuilder_ != null) { - return landmarksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(landmarks_); - } - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { - return getLandmarksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( - int index) { - return getLandmarksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.getDefaultInstance()); - } - /** - *
-     * Detected face landmarks.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - public java.util.List - getLandmarksBuilderList() { - return getLandmarksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder> - getLandmarksFieldBuilder() { - if (landmarksBuilder_ == null) { - landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - landmarks_ = null; - } - return landmarksBuilder_; - } - - private float rollAngle_ ; - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - @java.lang.Override - public float getRollAngle() { - return rollAngle_; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @param value The rollAngle to set. - * @return This builder for chaining. - */ - public Builder setRollAngle(float value) { - - rollAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-     * of the face relative to the image vertical about the axis perpendicular to
-     * the face. Range [-180,180].
-     * 
- * - * float roll_angle = 4; - * @return This builder for chaining. - */ - public Builder clearRollAngle() { - - rollAngle_ = 0F; - onChanged(); - return this; - } - - private float panAngle_ ; - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - @java.lang.Override - public float getPanAngle() { - return panAngle_; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @param value The panAngle to set. - * @return This builder for chaining. - */ - public Builder setPanAngle(float value) { - - panAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Yaw angle, which indicates the leftward/rightward angle that the face is
-     * pointing relative to the vertical plane perpendicular to the image. Range
-     * [-180,180].
-     * 
- * - * float pan_angle = 5; - * @return This builder for chaining. - */ - public Builder clearPanAngle() { - - panAngle_ = 0F; - onChanged(); - return this; - } - - private float tiltAngle_ ; - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - @java.lang.Override - public float getTiltAngle() { - return tiltAngle_; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @param value The tiltAngle to set. - * @return This builder for chaining. - */ - public Builder setTiltAngle(float value) { - - tiltAngle_ = value; - onChanged(); - return this; - } - /** - *
-     * Pitch angle, which indicates the upwards/downwards angle that the face is
-     * pointing relative to the image's horizontal plane. Range [-180,180].
-     * 
- * - * float tilt_angle = 6; - * @return This builder for chaining. - */ - public Builder clearTiltAngle() { - - tiltAngle_ = 0F; - onChanged(); - return this; - } - - private float detectionConfidence_ ; - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - @java.lang.Override - public float getDetectionConfidence() { - return detectionConfidence_; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @param value The detectionConfidence to set. - * @return This builder for chaining. - */ - public Builder setDetectionConfidence(float value) { - - detectionConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Detection confidence. Range [0, 1].
-     * 
- * - * float detection_confidence = 7; - * @return This builder for chaining. - */ - public Builder clearDetectionConfidence() { - - detectionConfidence_ = 0F; - onChanged(); - return this; - } - - private float landmarkingConfidence_ ; - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - @java.lang.Override - public float getLandmarkingConfidence() { - return landmarkingConfidence_; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @param value The landmarkingConfidence to set. - * @return This builder for chaining. - */ - public Builder setLandmarkingConfidence(float value) { - - landmarkingConfidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Face landmarking confidence. Range [0, 1].
-     * 
- * - * float landmarking_confidence = 8; - * @return This builder for chaining. - */ - public Builder clearLandmarkingConfidence() { - - landmarkingConfidence_ = 0F; - onChanged(); - return this; - } - - private int joyLikelihood_ = 0; - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - @java.lang.Override public int getJoyLikelihoodValue() { - return joyLikelihood_; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @param value The enum numeric value on the wire for joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihoodValue(int value) { - - joyLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(joyLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @param value The joyLikelihood to set. - * @return This builder for chaining. - */ - public Builder setJoyLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - joyLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Joy likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return This builder for chaining. - */ - public Builder clearJoyLikelihood() { - - joyLikelihood_ = 0; - onChanged(); - return this; - } - - private int sorrowLikelihood_ = 0; - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - @java.lang.Override public int getSorrowLikelihoodValue() { - return sorrowLikelihood_; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @param value The enum numeric value on the wire for sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihoodValue(int value) { - - sorrowLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(sorrowLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @param value The sorrowLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSorrowLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - sorrowLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Sorrow likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return This builder for chaining. - */ - public Builder clearSorrowLikelihood() { - - sorrowLikelihood_ = 0; - onChanged(); - return this; - } - - private int angerLikelihood_ = 0; - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - @java.lang.Override public int getAngerLikelihoodValue() { - return angerLikelihood_; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @param value The enum numeric value on the wire for angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihoodValue(int value) { - - angerLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(angerLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @param value The angerLikelihood to set. - * @return This builder for chaining. - */ - public Builder setAngerLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - angerLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Anger likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return This builder for chaining. - */ - public Builder clearAngerLikelihood() { - - angerLikelihood_ = 0; - onChanged(); - return this; - } - - private int surpriseLikelihood_ = 0; - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - @java.lang.Override public int getSurpriseLikelihoodValue() { - return surpriseLikelihood_; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @param value The enum numeric value on the wire for surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihoodValue(int value) { - - surpriseLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(surpriseLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @param value The surpriseLikelihood to set. - * @return This builder for chaining. - */ - public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - surpriseLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Surprise likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return This builder for chaining. - */ - public Builder clearSurpriseLikelihood() { - - surpriseLikelihood_ = 0; - onChanged(); - return this; - } - - private int underExposedLikelihood_ = 0; - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - @java.lang.Override public int getUnderExposedLikelihoodValue() { - return underExposedLikelihood_; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @param value The enum numeric value on the wire for underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihoodValue(int value) { - - underExposedLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(underExposedLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @param value The underExposedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - underExposedLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Under-exposed likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return This builder for chaining. - */ - public Builder clearUnderExposedLikelihood() { - - underExposedLikelihood_ = 0; - onChanged(); - return this; - } - - private int blurredLikelihood_ = 0; - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - @java.lang.Override public int getBlurredLikelihoodValue() { - return blurredLikelihood_; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @param value The enum numeric value on the wire for blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihoodValue(int value) { - - blurredLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(blurredLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @param value The blurredLikelihood to set. - * @return This builder for chaining. - */ - public Builder setBlurredLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - blurredLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Blurred likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return This builder for chaining. - */ - public Builder clearBlurredLikelihood() { - - blurredLikelihood_ = 0; - onChanged(); - return this; - } - - private int headwearLikelihood_ = 0; - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - @java.lang.Override public int getHeadwearLikelihoodValue() { - return headwearLikelihood_; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @param value The enum numeric value on the wire for headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihoodValue(int value) { - - headwearLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(headwearLikelihood_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @param value The headwearLikelihood to set. - * @return This builder for chaining. - */ - public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - headwearLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Headwear likelihood.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return This builder for chaining. - */ - public Builder clearHeadwearLikelihood() { - - headwearLikelihood_ = 0; - onChanged(); - return this; - } - - private java.util.List recognitionResult_ = - java.util.Collections.emptyList(); - private void ensureRecognitionResultIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - recognitionResult_ = new java.util.ArrayList(recognitionResult_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder> recognitionResultBuilder_; - - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public java.util.List getRecognitionResultList() { - if (recognitionResultBuilder_ == null) { - return java.util.Collections.unmodifiableList(recognitionResult_); - } else { - return recognitionResultBuilder_.getMessageList(); - } - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public int getRecognitionResultCount() { - if (recognitionResultBuilder_ == null) { - return recognitionResult_.size(); - } else { - return recognitionResultBuilder_.getCount(); - } - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index) { - if (recognitionResultBuilder_ == null) { - return recognitionResult_.get(index); - } else { - return recognitionResultBuilder_.getMessage(index); - } - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder setRecognitionResult( - int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { - if (recognitionResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecognitionResultIsMutable(); - recognitionResult_.set(index, value); - onChanged(); - } else { - recognitionResultBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder setRecognitionResult( - int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { - if (recognitionResultBuilder_ == null) { - ensureRecognitionResultIsMutable(); - recognitionResult_.set(index, builderForValue.build()); - onChanged(); - } else { - recognitionResultBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder addRecognitionResult(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { - if (recognitionResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecognitionResultIsMutable(); - recognitionResult_.add(value); - onChanged(); - } else { - recognitionResultBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder addRecognitionResult( - int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult value) { - if (recognitionResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecognitionResultIsMutable(); - recognitionResult_.add(index, value); - onChanged(); - } else { - recognitionResultBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder addRecognitionResult( - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { - if (recognitionResultBuilder_ == null) { - ensureRecognitionResultIsMutable(); - recognitionResult_.add(builderForValue.build()); - onChanged(); - } else { - recognitionResultBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder addRecognitionResult( - int index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder builderForValue) { - if (recognitionResultBuilder_ == null) { - ensureRecognitionResultIsMutable(); - recognitionResult_.add(index, builderForValue.build()); - onChanged(); - } else { - recognitionResultBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder addAllRecognitionResult( - java.lang.Iterable values) { - if (recognitionResultBuilder_ == null) { - ensureRecognitionResultIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, recognitionResult_); - onChanged(); - } else { - recognitionResultBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder clearRecognitionResult() { - if (recognitionResultBuilder_ == null) { - recognitionResult_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - recognitionResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public Builder removeRecognitionResult(int index) { - if (recognitionResultBuilder_ == null) { - ensureRecognitionResultIsMutable(); - recognitionResult_.remove(index); - onChanged(); - } else { - recognitionResultBuilder_.remove(index); - } - return this; - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder getRecognitionResultBuilder( - int index) { - return getRecognitionResultFieldBuilder().getBuilder(index); - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( - int index) { - if (recognitionResultBuilder_ == null) { - return recognitionResult_.get(index); } else { - return recognitionResultBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public java.util.List - getRecognitionResultOrBuilderList() { - if (recognitionResultBuilder_ != null) { - return recognitionResultBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(recognitionResult_); - } - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder addRecognitionResultBuilder() { - return getRecognitionResultFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()); - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder addRecognitionResultBuilder( - int index) { - return getRecognitionResultFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()); - } - /** - *
-     * Additional recognition information. Only computed if
-     * image_context.face_recognition_params is provided, **and** a match is found
-     * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-     * sorted in order of decreasing confidence values.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - public java.util.List - getRecognitionResultBuilderList() { - return getRecognitionResultFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder> - getRecognitionResultFieldBuilder() { - if (recognitionResultBuilder_ == null) { - recognitionResultBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder>( - recognitionResult_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - recognitionResult_ = null; - } - return recognitionResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation) - private static final com.google.cloud.vision.v1p4beta1.FaceAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java deleted file mode 100644 index 99d90c21870c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotationOrBuilder.java +++ /dev/null @@ -1,392 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface FaceAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the face. The coordinates of the bounding box
-   * are in the original image's scale.
-   * The bounding box is computed to "frame" the face in accordance with human
-   * expectations. It is based on the landmarker results.
-   * Note that one or more x and/or y coordinates may not be generated in the
-   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
-   * appears in the image to be annotated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return Whether the fdBoundingPoly field is set. - */ - boolean hasFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - * @return The fdBoundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getFdBoundingPoly(); - /** - *
-   * The `fd_bounding_poly` bounding polygon is tighter than the
-   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
-   * is used to eliminate the face from any image analysis that detects the
-   * "amount of skin" visible in an image. It is not based on the
-   * landmarker results, only on the initial face detection, hence
-   * the <code>fd</code> (face detection) prefix.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly fd_bounding_poly = 2; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder(); - - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark getLandmarks(int index); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - int getLandmarksCount(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - java.util.List - getLandmarksOrBuilderList(); - /** - *
-   * Detected face landmarks.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark landmarks = 3; - */ - com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( - int index); - - /** - *
-   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
-   * of the face relative to the image vertical about the axis perpendicular to
-   * the face. Range [-180,180].
-   * 
- * - * float roll_angle = 4; - * @return The rollAngle. - */ - float getRollAngle(); - - /** - *
-   * Yaw angle, which indicates the leftward/rightward angle that the face is
-   * pointing relative to the vertical plane perpendicular to the image. Range
-   * [-180,180].
-   * 
- * - * float pan_angle = 5; - * @return The panAngle. - */ - float getPanAngle(); - - /** - *
-   * Pitch angle, which indicates the upwards/downwards angle that the face is
-   * pointing relative to the image's horizontal plane. Range [-180,180].
-   * 
- * - * float tilt_angle = 6; - * @return The tiltAngle. - */ - float getTiltAngle(); - - /** - *
-   * Detection confidence. Range [0, 1].
-   * 
- * - * float detection_confidence = 7; - * @return The detectionConfidence. - */ - float getDetectionConfidence(); - - /** - *
-   * Face landmarking confidence. Range [0, 1].
-   * 
- * - * float landmarking_confidence = 8; - * @return The landmarkingConfidence. - */ - float getLandmarkingConfidence(); - - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The enum numeric value on the wire for joyLikelihood. - */ - int getJoyLikelihoodValue(); - /** - *
-   * Joy likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood joy_likelihood = 9; - * @return The joyLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getJoyLikelihood(); - - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The enum numeric value on the wire for sorrowLikelihood. - */ - int getSorrowLikelihoodValue(); - /** - *
-   * Sorrow likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood sorrow_likelihood = 10; - * @return The sorrowLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getSorrowLikelihood(); - - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The enum numeric value on the wire for angerLikelihood. - */ - int getAngerLikelihoodValue(); - /** - *
-   * Anger likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood anger_likelihood = 11; - * @return The angerLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getAngerLikelihood(); - - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The enum numeric value on the wire for surpriseLikelihood. - */ - int getSurpriseLikelihoodValue(); - /** - *
-   * Surprise likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood surprise_likelihood = 12; - * @return The surpriseLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getSurpriseLikelihood(); - - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The enum numeric value on the wire for underExposedLikelihood. - */ - int getUnderExposedLikelihoodValue(); - /** - *
-   * Under-exposed likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood under_exposed_likelihood = 13; - * @return The underExposedLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getUnderExposedLikelihood(); - - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The enum numeric value on the wire for blurredLikelihood. - */ - int getBlurredLikelihoodValue(); - /** - *
-   * Blurred likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood blurred_likelihood = 14; - * @return The blurredLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getBlurredLikelihood(); - - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The enum numeric value on the wire for headwearLikelihood. - */ - int getHeadwearLikelihoodValue(); - /** - *
-   * Headwear likelihood.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood headwear_likelihood = 15; - * @return The headwearLikelihood. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getHeadwearLikelihood(); - - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - java.util.List - getRecognitionResultList(); - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getRecognitionResult(int index); - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - int getRecognitionResultCount(); - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - java.util.List - getRecognitionResultOrBuilderList(); - /** - *
-   * Additional recognition information. Only computed if
-   * image_context.face_recognition_params is provided, **and** a match is found
-   * to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is
-   * sorted in order of decreasing confidence values.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.FaceRecognitionResult recognition_result = 16; - */ - com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder getRecognitionResultOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java deleted file mode 100644 index ba867daccf93..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParams.java +++ /dev/null @@ -1,728 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Parameters for a celebrity recognition request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionParams} - */ -public final class FaceRecognitionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceRecognitionParams) - FaceRecognitionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceRecognitionParams.newBuilder() to construct. - private FaceRecognitionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceRecognitionParams() { - celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceRecognitionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceRecognitionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - celebritySet_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - celebritySet_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - celebritySet_ = celebritySet_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder.class); - } - - public static final int CELEBRITY_SET_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList celebritySet_; - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @return A list containing the celebritySet. - */ - public com.google.protobuf.ProtocolStringList - getCelebritySetList() { - return celebritySet_; - } - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @return The count of celebritySet. - */ - public int getCelebritySetCount() { - return celebritySet_.size(); - } - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the element to return. - * @return The celebritySet at the given index. - */ - public java.lang.String getCelebritySet(int index) { - return celebritySet_.get(index); - } - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the value to return. - * @return The bytes of the celebritySet at the given index. - */ - public com.google.protobuf.ByteString - getCelebritySetBytes(int index) { - return celebritySet_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < celebritySet_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, celebritySet_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < celebritySet_.size(); i++) { - dataSize += computeStringSizeNoTag(celebritySet_.getRaw(i)); - } - size += dataSize; - size += 1 * getCelebritySetList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams other = (com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) obj; - - if (!getCelebritySetList() - .equals(other.getCelebritySetList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getCelebritySetCount() > 0) { - hash = (37 * hash) + CELEBRITY_SET_FIELD_NUMBER; - hash = (53 * hash) + getCelebritySetList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for a celebrity recognition request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceRecognitionParams) - com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams build() { - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams buildPartial() { - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams result = new com.google.cloud.vision.v1p4beta1.FaceRecognitionParams(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - celebritySet_ = celebritySet_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.celebritySet_ = celebritySet_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceRecognitionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams other) { - if (other == com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance()) return this; - if (!other.celebritySet_.isEmpty()) { - if (celebritySet_.isEmpty()) { - celebritySet_ = other.celebritySet_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCelebritySetIsMutable(); - celebritySet_.addAll(other.celebritySet_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceRecognitionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureCelebritySetIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - celebritySet_ = new com.google.protobuf.LazyStringArrayList(celebritySet_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @return A list containing the celebritySet. - */ - public com.google.protobuf.ProtocolStringList - getCelebritySetList() { - return celebritySet_.getUnmodifiableView(); - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @return The count of celebritySet. - */ - public int getCelebritySetCount() { - return celebritySet_.size(); - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the element to return. - * @return The celebritySet at the given index. - */ - public java.lang.String getCelebritySet(int index) { - return celebritySet_.get(index); - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the value to return. - * @return The bytes of the celebritySet at the given index. - */ - public com.google.protobuf.ByteString - getCelebritySetBytes(int index) { - return celebritySet_.getByteString(index); - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param index The index to set the value at. - * @param value The celebritySet to set. - * @return This builder for chaining. - */ - public Builder setCelebritySet( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelebritySetIsMutable(); - celebritySet_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param value The celebritySet to add. - * @return This builder for chaining. - */ - public Builder addCelebritySet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCelebritySetIsMutable(); - celebritySet_.add(value); - onChanged(); - return this; - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param values The celebritySet to add. - * @return This builder for chaining. - */ - public Builder addAllCelebritySet( - java.lang.Iterable values) { - ensureCelebritySetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, celebritySet_); - onChanged(); - return this; - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @return This builder for chaining. - */ - public Builder clearCelebritySet() { - celebritySet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The resource names for one or more
-     * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-     * set is preloaded and can be specified as "builtin/default". If this is
-     * specified, the algorithm will try to match the faces detected in the input
-     * image to the Celebrities in the CelebritySets.
-     * 
- * - * repeated string celebrity_set = 1; - * @param value The bytes of the celebritySet to add. - * @return This builder for chaining. - */ - public Builder addCelebritySetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureCelebritySetIsMutable(); - celebritySet_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceRecognitionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionParams) - private static final com.google.cloud.vision.v1p4beta1.FaceRecognitionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceRecognitionParams(); - } - - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceRecognitionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceRecognitionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java deleted file mode 100644 index 8844c1c8e1ad..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionParamsOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface FaceRecognitionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceRecognitionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @return A list containing the celebritySet. - */ - java.util.List - getCelebritySetList(); - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @return The count of celebritySet. - */ - int getCelebritySetCount(); - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the element to return. - * @return The celebritySet at the given index. - */ - java.lang.String getCelebritySet(int index); - /** - *
-   * The resource names for one or more
-   * [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity
-   * set is preloaded and can be specified as "builtin/default". If this is
-   * specified, the algorithm will try to match the faces detected in the input
-   * image to the Celebrities in the CelebritySets.
-   * 
- * - * repeated string celebrity_set = 1; - * @param index The index of the value to return. - * @return The bytes of the celebritySet at the given index. - */ - com.google.protobuf.ByteString - getCelebritySetBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java deleted file mode 100644 index ce40c856b46f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResult.java +++ /dev/null @@ -1,759 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Information about a face's identity.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionResult} - */ -public final class FaceRecognitionResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - FaceRecognitionResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use FaceRecognitionResult.newBuilder() to construct. - private FaceRecognitionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FaceRecognitionResult() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FaceRecognitionResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FaceRecognitionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.Celebrity.Builder subBuilder = null; - if (celebrity_ != null) { - subBuilder = celebrity_.toBuilder(); - } - celebrity_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Celebrity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(celebrity_); - celebrity_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder.class); - } - - public static final int CELEBRITY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.Celebrity celebrity_; - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return Whether the celebrity field is set. - */ - @java.lang.Override - public boolean hasCelebrity() { - return celebrity_ != null; - } - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return The celebrity. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity() { - return celebrity_ == null ? com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; - } - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder() { - return getCelebrity(); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-   * Recognition confidence. Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (celebrity_ != null) { - output.writeMessage(1, getCelebrity()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (celebrity_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCelebrity()); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionResult)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult other = (com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) obj; - - if (hasCelebrity() != other.hasCelebrity()) return false; - if (hasCelebrity()) { - if (!getCelebrity() - .equals(other.getCelebrity())) return false; - } - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCelebrity()) { - hash = (37 * hash) + CELEBRITY_FIELD_NUMBER; - hash = (53 * hash) + getCelebrity().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Information about a face's identity.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.FaceRecognitionResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - com.google.cloud.vision.v1p4beta1.FaceRecognitionResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.class, com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (celebrityBuilder_ == null) { - celebrity_ = null; - } else { - celebrity_ = null; - celebrityBuilder_ = null; - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.CelebrityProto.internal_static_google_cloud_vision_v1p4beta1_FaceRecognitionResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult build() { - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult buildPartial() { - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult result = new com.google.cloud.vision.v1p4beta1.FaceRecognitionResult(this); - if (celebrityBuilder_ == null) { - result.celebrity_ = celebrity_; - } else { - result.celebrity_ = celebrityBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.FaceRecognitionResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.FaceRecognitionResult other) { - if (other == com.google.cloud.vision.v1p4beta1.FaceRecognitionResult.getDefaultInstance()) return this; - if (other.hasCelebrity()) { - mergeCelebrity(other.getCelebrity()); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.FaceRecognitionResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.FaceRecognitionResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.Celebrity celebrity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder> celebrityBuilder_; - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return Whether the celebrity field is set. - */ - public boolean hasCelebrity() { - return celebrityBuilder_ != null || celebrity_ != null; - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return The celebrity. - */ - public com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity() { - if (celebrityBuilder_ == null) { - return celebrity_ == null ? com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; - } else { - return celebrityBuilder_.getMessage(); - } - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public Builder setCelebrity(com.google.cloud.vision.v1p4beta1.Celebrity value) { - if (celebrityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - celebrity_ = value; - onChanged(); - } else { - celebrityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public Builder setCelebrity( - com.google.cloud.vision.v1p4beta1.Celebrity.Builder builderForValue) { - if (celebrityBuilder_ == null) { - celebrity_ = builderForValue.build(); - onChanged(); - } else { - celebrityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public Builder mergeCelebrity(com.google.cloud.vision.v1p4beta1.Celebrity value) { - if (celebrityBuilder_ == null) { - if (celebrity_ != null) { - celebrity_ = - com.google.cloud.vision.v1p4beta1.Celebrity.newBuilder(celebrity_).mergeFrom(value).buildPartial(); - } else { - celebrity_ = value; - } - onChanged(); - } else { - celebrityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public Builder clearCelebrity() { - if (celebrityBuilder_ == null) { - celebrity_ = null; - onChanged(); - } else { - celebrity_ = null; - celebrityBuilder_ = null; - } - - return this; - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public com.google.cloud.vision.v1p4beta1.Celebrity.Builder getCelebrityBuilder() { - - onChanged(); - return getCelebrityFieldBuilder().getBuilder(); - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - public com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder() { - if (celebrityBuilder_ != null) { - return celebrityBuilder_.getMessageOrBuilder(); - } else { - return celebrity_ == null ? - com.google.cloud.vision.v1p4beta1.Celebrity.getDefaultInstance() : celebrity_; - } - } - /** - *
-     * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-     * matched to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder> - getCelebrityFieldBuilder() { - if (celebrityBuilder_ == null) { - celebrityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Celebrity, com.google.cloud.vision.v1p4beta1.Celebrity.Builder, com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder>( - getCelebrity(), - getParentForChildren(), - isClean()); - celebrity_ = null; - } - return celebrityBuilder_; - } - - private float confidence_ ; - /** - *
-     * Recognition confidence. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Recognition confidence. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Recognition confidence. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - private static final com.google.cloud.vision.v1p4beta1.FaceRecognitionResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.FaceRecognitionResult(); - } - - public static com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FaceRecognitionResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FaceRecognitionResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java deleted file mode 100644 index aca1c9f898f0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceRecognitionResultOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/face.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface FaceRecognitionResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return Whether the celebrity field is set. - */ - boolean hasCelebrity(); - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - * @return The celebrity. - */ - com.google.cloud.vision.v1p4beta1.Celebrity getCelebrity(); - /** - *
-   * The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was
-   * matched to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Celebrity celebrity = 1; - */ - com.google.cloud.vision.v1p4beta1.CelebrityOrBuilder getCelebrityOrBuilder(); - - /** - *
-   * Recognition confidence. Range [0, 1].
-   * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java deleted file mode 100644 index 0d85d7972745..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java +++ /dev/null @@ -1,1153 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The type of Google Cloud Vision API detection to perform, and the maximum
- * number of results to return for that type. Multiple `Feature` objects can
- * be specified in the `features` list.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Feature} - */ -public final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Feature) - FeatureOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feature.newBuilder() to construct. - private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feature() { - type_ = 0; - model_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feature(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - maxResults_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - model_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Feature.class, com.google.cloud.vision.v1p4beta1.Feature.Builder.class); - } - - /** - *
-   * Type of Google Cloud Vision API feature to be extracted.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.Feature.Type} - */ - public enum Type - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - FACE_DETECTION(1), - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - LANDMARK_DETECTION(2), - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - LOGO_DETECTION(3), - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - LABEL_DETECTION(4), - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - TEXT_DETECTION(5), - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - DOCUMENT_TEXT_DETECTION(11), - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - SAFE_SEARCH_DETECTION(6), - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - IMAGE_PROPERTIES(7), - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - CROP_HINTS(9), - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - WEB_DETECTION(10), - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - PRODUCT_SEARCH(12), - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - OBJECT_LOCALIZATION(19), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified feature type.
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Run face detection.
-     * 
- * - * FACE_DETECTION = 1; - */ - public static final int FACE_DETECTION_VALUE = 1; - /** - *
-     * Run landmark detection.
-     * 
- * - * LANDMARK_DETECTION = 2; - */ - public static final int LANDMARK_DETECTION_VALUE = 2; - /** - *
-     * Run logo detection.
-     * 
- * - * LOGO_DETECTION = 3; - */ - public static final int LOGO_DETECTION_VALUE = 3; - /** - *
-     * Run label detection.
-     * 
- * - * LABEL_DETECTION = 4; - */ - public static final int LABEL_DETECTION_VALUE = 4; - /** - *
-     * Run text detection / optical character recognition (OCR). Text detection
-     * is optimized for areas of text within a larger image; if the image is
-     * a document, use `DOCUMENT_TEXT_DETECTION` instead.
-     * 
- * - * TEXT_DETECTION = 5; - */ - public static final int TEXT_DETECTION_VALUE = 5; - /** - *
-     * Run dense text document OCR. Takes precedence when both
-     * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.
-     * 
- * - * DOCUMENT_TEXT_DETECTION = 11; - */ - public static final int DOCUMENT_TEXT_DETECTION_VALUE = 11; - /** - *
-     * Run Safe Search to detect potentially unsafe
-     * or undesirable content.
-     * 
- * - * SAFE_SEARCH_DETECTION = 6; - */ - public static final int SAFE_SEARCH_DETECTION_VALUE = 6; - /** - *
-     * Compute a set of image properties, such as the
-     * image's dominant colors.
-     * 
- * - * IMAGE_PROPERTIES = 7; - */ - public static final int IMAGE_PROPERTIES_VALUE = 7; - /** - *
-     * Run crop hints.
-     * 
- * - * CROP_HINTS = 9; - */ - public static final int CROP_HINTS_VALUE = 9; - /** - *
-     * Run web detection.
-     * 
- * - * WEB_DETECTION = 10; - */ - public static final int WEB_DETECTION_VALUE = 10; - /** - *
-     * Run Product Search.
-     * 
- * - * PRODUCT_SEARCH = 12; - */ - public static final int PRODUCT_SEARCH_VALUE = 12; - /** - *
-     * Run localizer for object detection.
-     * 
- * - * OBJECT_LOCALIZATION = 19; - */ - public static final int OBJECT_LOCALIZATION_VALUE = 19; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Type valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return FACE_DETECTION; - case 2: return LANDMARK_DETECTION; - case 3: return LOGO_DETECTION; - case 4: return LABEL_DETECTION; - case 5: return TEXT_DETECTION; - case 11: return DOCUMENT_TEXT_DETECTION; - case 6: return SAFE_SEARCH_DETECTION; - case 7: return IMAGE_PROPERTIES; - case 9: return CROP_HINTS; - case 10: return WEB_DETECTION; - case 12: return PRODUCT_SEARCH; - case 19: return OBJECT_LOCALIZATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Type> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.Feature.getDescriptor().getEnumTypes().get(0); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Feature.Type) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Feature.Type result = com.google.cloud.vision.v1p4beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.Feature.Type.UNRECOGNIZED : result; - } - - public static final int MAX_RESULTS_FIELD_NUMBER = 2; - private int maxResults_; - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - - public static final int MODEL_FIELD_NUMBER = 3; - private volatile java.lang.Object model_; - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - @java.lang.Override - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } - } - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p4beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (maxResults_ != 0) { - output.writeInt32(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p4beta1.Feature.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (maxResults_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxResults_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Feature)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Feature other = (com.google.cloud.vision.v1p4beta1.Feature) obj; - - if (type_ != other.type_) return false; - if (getMaxResults() - != other.getMaxResults()) return false; - if (!getModel() - .equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxResults(); - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Feature prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The type of Google Cloud Vision API detection to perform, and the maximum
-   * number of results to return for that type. Multiple `Feature` objects can
-   * be specified in the `features` list.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Feature} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Feature) - com.google.cloud.vision.v1p4beta1.FeatureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Feature.class, com.google.cloud.vision.v1p4beta1.Feature.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Feature.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - maxResults_ = 0; - - model_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature build() { - com.google.cloud.vision.v1p4beta1.Feature result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature buildPartial() { - com.google.cloud.vision.v1p4beta1.Feature result = new com.google.cloud.vision.v1p4beta1.Feature(this); - result.type_ = type_; - result.maxResults_ = maxResults_; - result.model_ = model_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Feature) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Feature)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Feature other) { - if (other == com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getMaxResults() != 0) { - setMaxResults(other.getMaxResults()); - } - if (!other.getModel().isEmpty()) { - model_ = other.model_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Feature parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Feature) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature.Type getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Feature.Type result = com.google.cloud.vision.v1p4beta1.Feature.Type.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.Feature.Type.UNRECOGNIZED : result; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p4beta1.Feature.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The feature type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int maxResults_ ; - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - @java.lang.Override - public int getMaxResults() { - return maxResults_; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @param value The maxResults to set. - * @return This builder for chaining. - */ - public Builder setMaxResults(int value) { - - maxResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Maximum number of results of this type. Does not apply to
-     * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-     * 
- * - * int32 max_results = 2; - * @return This builder for chaining. - */ - public Builder clearMaxResults() { - - maxResults_ = 0; - onChanged(); - return this; - } - - private java.lang.Object model_ = ""; - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The model. - */ - public java.lang.String getModel() { - java.lang.Object ref = model_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - model_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return The bytes for model. - */ - public com.google.protobuf.ByteString - getModelBytes() { - java.lang.Object ref = model_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - model_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The model to set. - * @return This builder for chaining. - */ - public Builder setModel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - model_ = value; - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @return This builder for chaining. - */ - public Builder clearModel() { - - model_ = getDefaultInstance().getModel(); - onChanged(); - return this; - } - /** - *
-     * Model to use for the feature.
-     * Supported values: "builtin/stable" (the default if unset) and
-     * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-     * support "builtin/weekly" for the bleeding edge release updated weekly.
-     * 
- * - * string model = 3; - * @param value The bytes for model to set. - * @return This builder for chaining. - */ - public Builder setModelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - model_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Feature) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Feature) - private static final com.google.cloud.vision.v1p4beta1.Feature DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Feature(); - } - - public static com.google.cloud.vision.v1p4beta1.Feature getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feature(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Feature getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java deleted file mode 100644 index 077657a3b86d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FeatureOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Feature) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The feature type.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Feature.Type type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p4beta1.Feature.Type getType(); - - /** - *
-   * Maximum number of results of this type. Does not apply to
-   * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
-   * 
- * - * int32 max_results = 2; - * @return The maxResults. - */ - int getMaxResults(); - - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The model. - */ - java.lang.String getModel(); - /** - *
-   * Model to use for the feature.
-   * Supported values: "builtin/stable" (the default if unset) and
-   * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
-   * support "builtin/weekly" for the bleeding edge release updated weekly.
-   * 
- * - * string model = 3; - * @return The bytes for model. - */ - com.google.protobuf.ByteString - getModelBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java deleted file mode 100644 index db7192858625..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java +++ /dev/null @@ -1,714 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The Google Cloud Storage location where the output will be written to.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GcsDestination.class, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.GcsDestination other = (com.google.cloud.vision.v1p4beta1.GcsDestination) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the output will be written to.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GcsDestination) - com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GcsDestination.class, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestination build() { - com.google.cloud.vision.v1p4beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestination buildPartial() { - com.google.cloud.vision.v1p4beta1.GcsDestination result = new com.google.cloud.vision.v1p4beta1.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.GcsDestination) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GcsDestination other) { - if (other == com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI prefix where the results will be stored. Results
-     * will be in JSON format and preceded by its corresponding input URI prefix.
-     * This field can either represent a gcs file prefix or gcs directory. In
-     * either case, the uri should be unique because in order to get all of the
-     * output files, you will need to do a wildcard gcs search on the uri prefix
-     * you provide.
-     * Examples:
-     * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-     * will be created in gs://bucket-name/here/ and the names of the
-     * output files will begin with "filenameprefix".
-     * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-     * will be created in gs://bucket-name/some/location/ and the names of the
-     * output files could be anything because there was no filename prefix
-     * specified.
-     * If multiple outputs, each response is still AnnotateFileResponse, each of
-     * which contains some subset of the full list of AnnotateImageResponse.
-     * Multiple outputs can happen if, for example, the output JSON is too large
-     * and overflows into multiple sharded files.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsDestination) - private static final com.google.cloud.vision.v1p4beta1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GcsDestination(); - } - - public static com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index a03073206d73..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI prefix where the results will be stored. Results
-   * will be in JSON format and preceded by its corresponding input URI prefix.
-   * This field can either represent a gcs file prefix or gcs directory. In
-   * either case, the uri should be unique because in order to get all of the
-   * output files, you will need to do a wildcard gcs search on the uri prefix
-   * you provide.
-   * Examples:
-   * *    File Prefix: gs://bucket-name/here/filenameprefix   The output files
-   * will be created in gs://bucket-name/here/ and the names of the
-   * output files will begin with "filenameprefix".
-   * *    Directory Prefix: gs://bucket-name/some/location/   The output files
-   * will be created in gs://bucket-name/some/location/ and the names of the
-   * output files could be anything because there was no filename prefix
-   * specified.
-   * If multiple outputs, each response is still AnnotateFileResponse, each of
-   * which contains some subset of the full list of AnnotateImageResponse.
-   * Multiple outputs can happen if, for example, the output JSON is too large
-   * and overflows into multiple sharded files.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java deleted file mode 100644 index 482c4df2870d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The Google Cloud Storage location where the input will be read from.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsSource} - */ -public final class GcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GcsSource) - GcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsSource() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GcsSource.class, com.google.cloud.vision.v1p4beta1.GcsSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.GcsSource other = (com.google.cloud.vision.v1p4beta1.GcsSource) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location where the input will be read from.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GcsSource) - com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GcsSource.class, com.google.cloud.vision.v1p4beta1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSource build() { - com.google.cloud.vision.v1p4beta1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSource buildPartial() { - com.google.cloud.vision.v1p4beta1.GcsSource result = new com.google.cloud.vision.v1p4beta1.GcsSource(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.GcsSource) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.GcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GcsSource other) { - if (other == com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Google Cloud Storage URI for the input file. This must only be a
-     * Google Cloud Storage object. Wildcards are not currently supported.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsSource) - private static final com.google.cloud.vision.v1p4beta1.GcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GcsSource(); - } - - public static com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java deleted file mode 100644 index aee02ac59c02..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface GcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Google Cloud Storage URI for the input file. This must only be a
-   * Google Cloud Storage object. Wildcards are not currently supported.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java deleted file mode 100644 index 6119c9958f98..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GeometryProto.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class GeometryProto { - private GeometryProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/vision/v1p4beta1/geometry" + - ".proto\022\035google.cloud.vision.v1p4beta1\"\036\n" + - "\006Vertex\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020Normali" + - "zedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"\225\001\n\014Boun" + - "dingPoly\0227\n\010vertices\030\001 \003(\0132%.google.clou" + - "d.vision.v1p4beta1.Vertex\022L\n\023normalized_" + - "vertices\030\002 \003(\0132/.google.cloud.vision.v1p" + - "4beta1.NormalizedVertex\"+\n\010Position\022\t\n\001x" + - "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002B\203\001\n!com.goo" + - "gle.cloud.vision.v1p4beta1B\rGeometryProt" + - "oP\001ZCgoogle.golang.org/genproto/googleap" + - "is/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GC" + - "VNb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor, - new java.lang.String[] { "X", "Y", }); - internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BoundingPoly_descriptor, - new java.lang.String[] { "Vertices", "NormalizedVertices", }); - internal_static_google_cloud_vision_v1p4beta1_Position_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Position_descriptor, - new java.lang.String[] { "X", "Y", "Z", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java deleted file mode 100644 index 80cfd627cea4..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `GetProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductRequest} - */ -public final class GetProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetProductRequest) - GetProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductRequest.newBuilder() to construct. - private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetProductRequest.class, com.google.cloud.vision.v1p4beta1.GetProductRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.GetProductRequest other = (com.google.cloud.vision.v1p4beta1.GetProductRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetProductRequest) - com.google.cloud.vision.v1p4beta1.GetProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetProductRequest.class, com.google.cloud.vision.v1p4beta1.GetProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductRequest build() { - com.google.cloud.vision.v1p4beta1.GetProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.GetProductRequest result = new com.google.cloud.vision.v1p4beta1.GetProductRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.GetProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.GetProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetProductRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.GetProductRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.GetProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.GetProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the Product to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductRequest) - private static final com.google.cloud.vision.v1p4beta1.GetProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetProductRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java deleted file mode 100644 index 5e52735fd71f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface GetProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the Product to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java deleted file mode 100644 index dede5ee3995b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `GetProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductSetRequest} - */ -public final class GetProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetProductSetRequest) - GetProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetProductSetRequest.newBuilder() to construct. - private GetProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetProductSetRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p4beta1.GetProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p4beta1.GetProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetProductSetRequest) - com.google.cloud.vision.v1p4beta1.GetProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetProductSetRequest.class, com.google.cloud.vision.v1p4beta1.GetProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.GetProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.GetProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.GetProductSetRequest result = new com.google.cloud.vision.v1p4beta1.GetProductSetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.GetProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.GetProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.GetProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.GetProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.GetProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the ProductSet to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.GetProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java deleted file mode 100644 index 3582244f4bc1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface GetProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the ProductSet to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java deleted file mode 100644 index 4ed37a907db0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `GetReferenceImage` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetReferenceImageRequest} - */ -public final class GetReferenceImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - GetReferenceImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetReferenceImageRequest.newBuilder() to construct. - private GetReferenceImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetReferenceImageRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetReferenceImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetReferenceImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `GetReferenceImage` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.GetReferenceImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.class, com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest build() { - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest result = new com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the ReferenceImage to get.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - private static final com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetReferenceImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetReferenceImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java deleted file mode 100644 index 3b372ed67019..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface GetReferenceImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name of the ReferenceImage to get.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java deleted file mode 100644 index acf102b5e4b9..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java +++ /dev/null @@ -1,781 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Client image to perform Google Cloud Vision API tasks over.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Image} - */ -public final class Image extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Image) - ImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Image() { - content_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - content_ = input.readBytes(); - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.ImageSource.Builder subBuilder = null; - if (source_ != null) { - subBuilder = source_.toBuilder(); - } - source_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImageSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(source_); - source_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Image.class, com.google.cloud.vision.v1p4beta1.Image.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString content_; - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int SOURCE_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.ImageSource source_; - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - @java.lang.Override - public boolean hasSource() { - return source_ != null; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return The source. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSource getSource() { - return source_ == null ? com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; - } - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder() { - return getSource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!content_.isEmpty()) { - output.writeBytes(1, content_); - } - if (source_ != null) { - output.writeMessage(2, getSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, content_); - } - if (source_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Image)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Image other = (com.google.cloud.vision.v1p4beta1.Image) obj; - - if (!getContent() - .equals(other.getContent())) return false; - if (hasSource() != other.hasSource()) return false; - if (hasSource()) { - if (!getSource() - .equals(other.getSource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasSource()) { - hash = (37 * hash) + SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Image parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Client image to perform Google Cloud Vision API tasks over.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Image} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Image) - com.google.cloud.vision.v1p4beta1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Image.class, com.google.cloud.vision.v1p4beta1.Image.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = com.google.protobuf.ByteString.EMPTY; - - if (sourceBuilder_ == null) { - source_ = null; - } else { - source_ = null; - sourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Image getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Image build() { - com.google.cloud.vision.v1p4beta1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Image buildPartial() { - com.google.cloud.vision.v1p4beta1.Image result = new com.google.cloud.vision.v1p4beta1.Image(this); - result.content_ = content_; - if (sourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = sourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Image) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Image)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Image other) { - if (other == com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance()) return this; - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (other.hasSource()) { - mergeSource(other.getSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * Image content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes content = 1; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.ImageSource source_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder> sourceBuilder_; - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - public boolean hasSource() { - return sourceBuilder_ != null || source_ != null; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return The source. - */ - public com.google.cloud.vision.v1p4beta1.ImageSource getSource() { - if (sourceBuilder_ == null) { - return source_ == null ? com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; - } else { - return sourceBuilder_.getMessage(); - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public Builder setSource(com.google.cloud.vision.v1p4beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - sourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public Builder setSource( - com.google.cloud.vision.v1p4beta1.ImageSource.Builder builderForValue) { - if (sourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - sourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public Builder mergeSource(com.google.cloud.vision.v1p4beta1.ImageSource value) { - if (sourceBuilder_ == null) { - if (source_ != null) { - source_ = - com.google.cloud.vision.v1p4beta1.ImageSource.newBuilder(source_).mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - sourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public Builder clearSource() { - if (sourceBuilder_ == null) { - source_ = null; - onChanged(); - } else { - source_ = null; - sourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p4beta1.ImageSource.Builder getSourceBuilder() { - - onChanged(); - return getSourceFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - public com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder() { - if (sourceBuilder_ != null) { - return sourceBuilder_.getMessageOrBuilder(); - } else { - return source_ == null ? - com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance() : source_; - } - } - /** - *
-     * Google Cloud Storage image location, or publicly-accessible image
-     * URL. If both `content` and `source` are provided for an image, `content`
-     * takes precedence and is used to perform the image annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder> - getSourceFieldBuilder() { - if (sourceBuilder_ == null) { - sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder>( - getSource(), - getParentForChildren(), - isClean()); - source_ = null; - } - return sourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Image) - private static final com.google.cloud.vision.v1p4beta1.Image DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Image(); - } - - public static com.google.cloud.vision.v1p4beta1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java deleted file mode 100644 index ae08dff582fb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java +++ /dev/null @@ -1,681 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * If an image was produced from a file (e.g. a PDF), this message gives
- * information about the source of that image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageAnnotationContext} - */ -public final class ImageAnnotationContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - ImageAnnotationContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageAnnotationContext.newBuilder() to construct. - private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageAnnotationContext() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageAnnotationContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageAnnotationContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 16: { - - pageNumber_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 2; - private int pageNumber_; - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - if (pageNumber_ != 0) { - output.writeInt32(2, pageNumber_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageNumber_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageAnnotationContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (getPageNumber() - != other.getPageNumber()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * If an image was produced from a file (e.g. a PDF), this message gives
-   * information about the source of that image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageAnnotationContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.class, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - pageNumber_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext build() { - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext buildPartial() { - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext result = new com.google.cloud.vision.v1p4beta1.ImageAnnotationContext(this); - result.uri_ = uri_; - result.pageNumber_ = pageNumber_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageAnnotationContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext other) { - if (other == com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImageAnnotationContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the file used to produce the image.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private int pageNumber_ ; - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - @java.lang.Override - public int getPageNumber() { - return pageNumber_; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - - pageNumber_ = value; - onChanged(); - return this; - } - /** - *
-     * If the file was a PDF or TIFF, this field gives the page number within
-     * the file used to produce the image.
-     * 
- * - * int32 page_number = 2; - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - - pageNumber_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - private static final com.google.cloud.vision.v1p4beta1.ImageAnnotationContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageAnnotationContext(); - } - - public static com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageAnnotationContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageAnnotationContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java deleted file mode 100644 index 73a22344aec1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContextOrBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImageAnnotationContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The URI of the file used to produce the image.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * If the file was a PDF or TIFF, this field gives the page number within
-   * the file used to produce the image.
-   * 
- * - * int32 page_number = 2; - * @return The pageNumber. - */ - int getPageNumber(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java deleted file mode 100644 index c7dd05354649..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotatorProto.java +++ /dev/null @@ -1,765 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class ImageAnnotatorProto { - private ImageAnnotatorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Image_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p4beta1/image_an" + - "notator.proto\022\035google.cloud.vision.v1p4b" + - "eta1\032\034google/api/annotations.proto\032\027goog" + - "le/api/client.proto\032\037google/api/field_be" + - "havior.proto\032(google/cloud/vision/v1p4be" + - "ta1/face.proto\032,google/cloud/vision/v1p4" + - "beta1/geometry.proto\0322google/cloud/visio" + - "n/v1p4beta1/product_search.proto\0323google" + - "/cloud/vision/v1p4beta1/text_annotation." + - "proto\0321google/cloud/vision/v1p4beta1/web" + - "_detection.proto\032#google/longrunning/ope" + - "rations.proto\032\037google/protobuf/timestamp" + - ".proto\032\027google/rpc/status.proto\032\027google/" + - "type/color.proto\032\030google/type/latlng.pro" + - "to\"\216\003\n\007Feature\0229\n\004type\030\001 \001(\0162+.google.cl" + - "oud.vision.v1p4beta1.Feature.Type\022\023\n\013max" + - "_results\030\002 \001(\005\022\r\n\005model\030\003 \001(\t\"\243\002\n\004Type\022\024" + - "\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016FACE_DETECTION\020\001" + - "\022\026\n\022LANDMARK_DETECTION\020\002\022\022\n\016LOGO_DETECTI" + - "ON\020\003\022\023\n\017LABEL_DETECTION\020\004\022\022\n\016TEXT_DETECT" + - "ION\020\005\022\033\n\027DOCUMENT_TEXT_DETECTION\020\013\022\031\n\025SA" + - "FE_SEARCH_DETECTION\020\006\022\024\n\020IMAGE_PROPERTIE" + - "S\020\007\022\016\n\nCROP_HINTS\020\t\022\021\n\rWEB_DETECTION\020\n\022\022" + - "\n\016PRODUCT_SEARCH\020\014\022\027\n\023OBJECT_LOCALIZATIO" + - "N\020\023\"7\n\013ImageSource\022\025\n\rgcs_image_uri\030\001 \001(" + - "\t\022\021\n\timage_uri\030\002 \001(\t\"T\n\005Image\022\017\n\007content" + - "\030\001 \001(\014\022:\n\006source\030\002 \001(\0132*.google.cloud.vi" + - "sion.v1p4beta1.ImageSource\"\355\016\n\016FaceAnnot" + - "ation\022B\n\rbounding_poly\030\001 \001(\0132+.google.cl" + - "oud.vision.v1p4beta1.BoundingPoly\022E\n\020fd_" + - "bounding_poly\030\002 \001(\0132+.google.cloud.visio" + - "n.v1p4beta1.BoundingPoly\022I\n\tlandmarks\030\003 " + - "\003(\01326.google.cloud.vision.v1p4beta1.Face" + - "Annotation.Landmark\022\022\n\nroll_angle\030\004 \001(\002\022" + - "\021\n\tpan_angle\030\005 \001(\002\022\022\n\ntilt_angle\030\006 \001(\002\022\034" + - "\n\024detection_confidence\030\007 \001(\002\022\036\n\026landmark" + - "ing_confidence\030\010 \001(\002\022A\n\016joy_likelihood\030\t" + - " \001(\0162).google.cloud.vision.v1p4beta1.Lik" + - "elihood\022D\n\021sorrow_likelihood\030\n \001(\0162).goo" + - "gle.cloud.vision.v1p4beta1.Likelihood\022C\n" + - "\020anger_likelihood\030\013 \001(\0162).google.cloud.v" + - "ision.v1p4beta1.Likelihood\022F\n\023surprise_l" + - "ikelihood\030\014 \001(\0162).google.cloud.vision.v1" + - "p4beta1.Likelihood\022K\n\030under_exposed_like" + - "lihood\030\r \001(\0162).google.cloud.vision.v1p4b" + - "eta1.Likelihood\022E\n\022blurred_likelihood\030\016 " + - "\001(\0162).google.cloud.vision.v1p4beta1.Like" + - "lihood\022F\n\023headwear_likelihood\030\017 \001(\0162).go" + - "ogle.cloud.vision.v1p4beta1.Likelihood\022P" + - "\n\022recognition_result\030\020 \003(\01324.google.clou" + - "d.vision.v1p4beta1.FaceRecognitionResult" + - "\032\307\007\n\010Landmark\022I\n\004type\030\003 \001(\0162;.google.clo" + - "ud.vision.v1p4beta1.FaceAnnotation.Landm" + - "ark.Type\0229\n\010position\030\004 \001(\0132\'.google.clou" + - "d.vision.v1p4beta1.Position\"\264\006\n\004Type\022\024\n\020" + - "UNKNOWN_LANDMARK\020\000\022\014\n\010LEFT_EYE\020\001\022\r\n\tRIGH" + - "T_EYE\020\002\022\030\n\024LEFT_OF_LEFT_EYEBROW\020\003\022\031\n\025RIG" + - "HT_OF_LEFT_EYEBROW\020\004\022\031\n\025LEFT_OF_RIGHT_EY" + - "EBROW\020\005\022\032\n\026RIGHT_OF_RIGHT_EYEBROW\020\006\022\031\n\025M" + - "IDPOINT_BETWEEN_EYES\020\007\022\014\n\010NOSE_TIP\020\010\022\r\n\t" + - "UPPER_LIP\020\t\022\r\n\tLOWER_LIP\020\n\022\016\n\nMOUTH_LEFT" + - "\020\013\022\017\n\013MOUTH_RIGHT\020\014\022\020\n\014MOUTH_CENTER\020\r\022\025\n" + - "\021NOSE_BOTTOM_RIGHT\020\016\022\024\n\020NOSE_BOTTOM_LEFT" + - "\020\017\022\026\n\022NOSE_BOTTOM_CENTER\020\020\022\031\n\025LEFT_EYE_T" + - "OP_BOUNDARY\020\021\022\031\n\025LEFT_EYE_RIGHT_CORNER\020\022" + - "\022\034\n\030LEFT_EYE_BOTTOM_BOUNDARY\020\023\022\030\n\024LEFT_E" + - "YE_LEFT_CORNER\020\024\022\032\n\026RIGHT_EYE_TOP_BOUNDA" + - "RY\020\025\022\032\n\026RIGHT_EYE_RIGHT_CORNER\020\026\022\035\n\031RIGH" + - "T_EYE_BOTTOM_BOUNDARY\020\027\022\031\n\025RIGHT_EYE_LEF" + - "T_CORNER\020\030\022\037\n\033LEFT_EYEBROW_UPPER_MIDPOIN" + - "T\020\031\022 \n\034RIGHT_EYEBROW_UPPER_MIDPOINT\020\032\022\024\n" + - "\020LEFT_EAR_TRAGION\020\033\022\025\n\021RIGHT_EAR_TRAGION" + - "\020\034\022\022\n\016LEFT_EYE_PUPIL\020\035\022\023\n\017RIGHT_EYE_PUPI" + - "L\020\036\022\025\n\021FOREHEAD_GLABELLA\020\037\022\021\n\rCHIN_GNATH" + - "ION\020 \022\024\n\020CHIN_LEFT_GONION\020!\022\025\n\021CHIN_RIGH" + - "T_GONION\020\"\"4\n\014LocationInfo\022$\n\007lat_lng\030\001 " + - "\001(\0132\023.google.type.LatLng\"=\n\010Property\022\014\n\004" + - "name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\022\024\n\014uint64_valu" + - "e\030\003 \001(\004\"\300\002\n\020EntityAnnotation\022\013\n\003mid\030\001 \001(" + - "\t\022\016\n\006locale\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\r" + - "\n\005score\030\004 \001(\002\022\026\n\nconfidence\030\005 \001(\002B\002\030\001\022\022\n" + - "\ntopicality\030\006 \001(\002\022B\n\rbounding_poly\030\007 \001(\013" + - "2+.google.cloud.vision.v1p4beta1.Boundin" + - "gPoly\022>\n\tlocations\030\010 \003(\0132+.google.cloud." + - "vision.v1p4beta1.LocationInfo\022;\n\npropert" + - "ies\030\t \003(\0132\'.google.cloud.vision.v1p4beta" + - "1.Property\"\240\001\n\031LocalizedObjectAnnotation" + - "\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022\014\n\004" + - "name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\022B\n\rbounding_po" + - "ly\030\005 \001(\0132+.google.cloud.vision.v1p4beta1" + - ".BoundingPoly\"\274\002\n\024SafeSearchAnnotation\0228" + - "\n\005adult\030\001 \001(\0162).google.cloud.vision.v1p4" + - "beta1.Likelihood\0228\n\005spoof\030\002 \001(\0162).google" + - ".cloud.vision.v1p4beta1.Likelihood\022:\n\007me" + - "dical\030\003 \001(\0162).google.cloud.vision.v1p4be" + - "ta1.Likelihood\022;\n\010violence\030\004 \001(\0162).googl" + - "e.cloud.vision.v1p4beta1.Likelihood\0227\n\004r" + - "acy\030\t \001(\0162).google.cloud.vision.v1p4beta" + - "1.Likelihood\"a\n\013LatLongRect\022(\n\013min_lat_l" + - "ng\030\001 \001(\0132\023.google.type.LatLng\022(\n\013max_lat" + - "_lng\030\002 \001(\0132\023.google.type.LatLng\"U\n\tColor" + - "Info\022!\n\005color\030\001 \001(\0132\022.google.type.Color\022" + - "\r\n\005score\030\002 \001(\002\022\026\n\016pixel_fraction\030\003 \001(\002\"T" + - "\n\030DominantColorsAnnotation\0228\n\006colors\030\001 \003" + - "(\0132(.google.cloud.vision.v1p4beta1.Color" + - "Info\"c\n\017ImageProperties\022P\n\017dominant_colo" + - "rs\030\001 \001(\01327.google.cloud.vision.v1p4beta1" + - ".DominantColorsAnnotation\"\177\n\010CropHint\022B\n" + - "\rbounding_poly\030\001 \001(\0132+.google.cloud.visi" + - "on.v1p4beta1.BoundingPoly\022\022\n\nconfidence\030" + - "\002 \001(\002\022\033\n\023importance_fraction\030\003 \001(\002\"R\n\023Cr" + - "opHintsAnnotation\022;\n\ncrop_hints\030\001 \003(\0132\'." + - "google.cloud.vision.v1p4beta1.CropHint\"(" + - "\n\017CropHintsParams\022\025\n\raspect_ratios\030\001 \003(\002" + - "\"1\n\022WebDetectionParams\022\033\n\023include_geo_re" + - "sults\030\002 \001(\010\"c\n\023TextDetectionParams\022.\n&en" + - "able_text_detection_confidence_score\030\t \001" + - "(\010\022\034\n\024advanced_ocr_options\030\013 \003(\t\"\202\004\n\014Ima" + - "geContext\022A\n\rlat_long_rect\030\001 \001(\0132*.googl" + - "e.cloud.vision.v1p4beta1.LatLongRect\022\026\n\016" + - "language_hints\030\002 \003(\t\022I\n\021crop_hints_param" + - "s\030\004 \001(\0132..google.cloud.vision.v1p4beta1." + - "CropHintsParams\022U\n\027face_recognition_para" + - "ms\030\n \001(\01324.google.cloud.vision.v1p4beta1" + - ".FaceRecognitionParams\022Q\n\025product_search" + - "_params\030\005 \001(\01322.google.cloud.vision.v1p4" + - "beta1.ProductSearchParams\022O\n\024web_detecti" + - "on_params\030\006 \001(\01321.google.cloud.vision.v1" + - "p4beta1.WebDetectionParams\022Q\n\025text_detec" + - "tion_params\030\014 \001(\01322.google.cloud.vision." + - "v1p4beta1.TextDetectionParams\"\311\001\n\024Annota" + - "teImageRequest\0223\n\005image\030\001 \001(\0132$.google.c" + - "loud.vision.v1p4beta1.Image\0228\n\010features\030" + - "\002 \003(\0132&.google.cloud.vision.v1p4beta1.Fe" + - "ature\022B\n\rimage_context\030\003 \001(\0132+.google.cl" + - "oud.vision.v1p4beta1.ImageContext\":\n\026Ima" + - "geAnnotationContext\022\013\n\003uri\030\001 \001(\t\022\023\n\013page" + - "_number\030\002 \001(\005\"\277\010\n\025AnnotateImageResponse\022" + - "G\n\020face_annotations\030\001 \003(\0132-.google.cloud" + - ".vision.v1p4beta1.FaceAnnotation\022M\n\024land" + - "mark_annotations\030\002 \003(\0132/.google.cloud.vi" + - "sion.v1p4beta1.EntityAnnotation\022I\n\020logo_" + - "annotations\030\003 \003(\0132/.google.cloud.vision." + - "v1p4beta1.EntityAnnotation\022J\n\021label_anno" + - "tations\030\004 \003(\0132/.google.cloud.vision.v1p4" + - "beta1.EntityAnnotation\022^\n\034localized_obje" + - "ct_annotations\030\026 \003(\01328.google.cloud.visi" + - "on.v1p4beta1.LocalizedObjectAnnotation\022I" + - "\n\020text_annotations\030\005 \003(\0132/.google.cloud." + - "vision.v1p4beta1.EntityAnnotation\022K\n\024ful" + - "l_text_annotation\030\014 \001(\0132-.google.cloud.v" + - "ision.v1p4beta1.TextAnnotation\022S\n\026safe_s" + - "earch_annotation\030\006 \001(\01323.google.cloud.vi" + - "sion.v1p4beta1.SafeSearchAnnotation\022S\n\033i" + - "mage_properties_annotation\030\010 \001(\0132..googl" + - "e.cloud.vision.v1p4beta1.ImageProperties" + - "\022Q\n\025crop_hints_annotation\030\013 \001(\01322.google" + - ".cloud.vision.v1p4beta1.CropHintsAnnotat" + - "ion\022B\n\rweb_detection\030\r \001(\0132+.google.clou" + - "d.vision.v1p4beta1.WebDetection\022S\n\026produ" + - "ct_search_results\030\016 \001(\01323.google.cloud.v" + - "ision.v1p4beta1.ProductSearchResults\022!\n\005" + - "error\030\t \001(\0132\022.google.rpc.Status\022F\n\007conte" + - "xt\030\025 \001(\01325.google.cloud.vision.v1p4beta1" + - ".ImageAnnotationContext\"h\n\032BatchAnnotate" + - "ImagesRequest\022J\n\010requests\030\001 \003(\01323.google" + - ".cloud.vision.v1p4beta1.AnnotateImageReq" + - "uestB\003\340A\002\"f\n\033BatchAnnotateImagesResponse" + - "\022G\n\tresponses\030\001 \003(\01324.google.cloud.visio" + - "n.v1p4beta1.AnnotateImageResponse\"\344\001\n\023An" + - "notateFileRequest\022@\n\014input_config\030\001 \001(\0132" + - "*.google.cloud.vision.v1p4beta1.InputCon" + - "fig\0228\n\010features\030\002 \003(\0132&.google.cloud.vis" + - "ion.v1p4beta1.Feature\022B\n\rimage_context\030\003" + - " \001(\0132+.google.cloud.vision.v1p4beta1.Ima" + - "geContext\022\r\n\005pages\030\004 \003(\005\"\331\001\n\024AnnotateFil" + - "eResponse\022@\n\014input_config\030\001 \001(\0132*.google" + - ".cloud.vision.v1p4beta1.InputConfig\022G\n\tr" + - "esponses\030\002 \003(\01324.google.cloud.vision.v1p" + - "4beta1.AnnotateImageResponse\022\023\n\013total_pa" + - "ges\030\003 \001(\005\022!\n\005error\030\004 \001(\0132\022.google.rpc.St" + - "atus\"f\n\031BatchAnnotateFilesRequest\022I\n\010req" + - "uests\030\001 \003(\01322.google.cloud.vision.v1p4be" + - "ta1.AnnotateFileRequestB\003\340A\002\"d\n\032BatchAnn" + - "otateFilesResponse\022F\n\tresponses\030\001 \003(\01323." + - "google.cloud.vision.v1p4beta1.AnnotateFi" + - "leResponse\"\236\002\n\030AsyncAnnotateFileRequest\022" + - "@\n\014input_config\030\001 \001(\0132*.google.cloud.vis" + - "ion.v1p4beta1.InputConfig\0228\n\010features\030\002 " + - "\003(\0132&.google.cloud.vision.v1p4beta1.Feat" + - "ure\022B\n\rimage_context\030\003 \001(\0132+.google.clou" + - "d.vision.v1p4beta1.ImageContext\022B\n\routpu" + - "t_config\030\004 \001(\0132+.google.cloud.vision.v1p" + - "4beta1.OutputConfig\"_\n\031AsyncAnnotateFile" + - "Response\022B\n\routput_config\030\001 \001(\0132+.google" + - ".cloud.vision.v1p4beta1.OutputConfig\"\266\001\n" + - "\037AsyncBatchAnnotateImagesRequest\022J\n\010requ" + - "ests\030\001 \003(\01323.google.cloud.vision.v1p4bet" + - "a1.AnnotateImageRequestB\003\340A\002\022G\n\routput_c" + - "onfig\030\002 \001(\0132+.google.cloud.vision.v1p4be" + - "ta1.OutputConfigB\003\340A\002\"f\n AsyncBatchAnnot" + - "ateImagesResponse\022B\n\routput_config\030\001 \001(\013" + - "2+.google.cloud.vision.v1p4beta1.OutputC" + - "onfig\"p\n\036AsyncBatchAnnotateFilesRequest\022" + - "N\n\010requests\030\001 \003(\01327.google.cloud.vision." + - "v1p4beta1.AsyncAnnotateFileRequestB\003\340A\002\"" + - "n\n\037AsyncBatchAnnotateFilesResponse\022K\n\tre" + - "sponses\030\001 \003(\01328.google.cloud.vision.v1p4" + - "beta1.AsyncAnnotateFileResponse\"o\n\013Input" + - "Config\022<\n\ngcs_source\030\001 \001(\0132(.google.clou" + - "d.vision.v1p4beta1.GcsSource\022\017\n\007content\030" + - "\003 \001(\014\022\021\n\tmime_type\030\002 \001(\t\"j\n\014OutputConfig" + - "\022F\n\017gcs_destination\030\001 \001(\0132-.google.cloud" + - ".vision.v1p4beta1.GcsDestination\022\022\n\nbatc" + - "h_size\030\002 \001(\005\"\030\n\tGcsSource\022\013\n\003uri\030\001 \001(\t\"\035" + - "\n\016GcsDestination\022\013\n\003uri\030\001 \001(\t\"\217\002\n\021Operat" + - "ionMetadata\022E\n\005state\030\001 \001(\01626.google.clou" + - "d.vision.v1p4beta1.OperationMetadata.Sta" + - "te\022/\n\013create_time\030\005 \001(\0132\032.google.protobu" + - "f.Timestamp\022/\n\013update_time\030\006 \001(\0132\032.googl" + - "e.protobuf.Timestamp\"Q\n\005State\022\025\n\021STATE_U" + - "NSPECIFIED\020\000\022\013\n\007CREATED\020\001\022\013\n\007RUNNING\020\002\022\010" + - "\n\004DONE\020\003\022\r\n\tCANCELLED\020\004*e\n\nLikelihood\022\013\n" + - "\007UNKNOWN\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKEL" + - "Y\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LI" + - "KELY\020\0052\361\007\n\016ImageAnnotator\022\276\001\n\023BatchAnnot" + - "ateImages\0229.google.cloud.vision.v1p4beta" + - "1.BatchAnnotateImagesRequest\032:.google.cl" + - "oud.vision.v1p4beta1.BatchAnnotateImages" + - "Response\"0\202\323\344\223\002\037\"\032/v1p4beta1/images:anno" + - "tate:\001*\332A\010requests\022\272\001\n\022BatchAnnotateFile" + - "s\0228.google.cloud.vision.v1p4beta1.BatchA" + - "nnotateFilesRequest\0329.google.cloud.visio" + - "n.v1p4beta1.BatchAnnotateFilesResponse\"/" + - "\202\323\344\223\002\036\"\031/v1p4beta1/files:annotate:\001*\332A\010r" + - "equests\022\374\001\n\030AsyncBatchAnnotateImages\022>.g" + - "oogle.cloud.vision.v1p4beta1.AsyncBatchA" + - "nnotateImagesRequest\032\035.google.longrunnin" + - "g.Operation\"\200\001\202\323\344\223\002)\"$/v1p4beta1/images:" + - "asyncBatchAnnotate:\001*\332A\026requests,output_" + - "config\312A5\n AsyncBatchAnnotateImagesRespo" + - "nse\022\021OperationMetadata\022\351\001\n\027AsyncBatchAnn" + - "otateFiles\022=.google.cloud.vision.v1p4bet" + - "a1.AsyncBatchAnnotateFilesRequest\032\035.goog" + - "le.longrunning.Operation\"p\202\323\344\223\002(\"#/v1p4b" + - "eta1/files:asyncBatchAnnotate:\001*\332A\010reque" + - "sts\312A4\n\037AsyncBatchAnnotateFilesResponse\022" + - "\021OperationMetadata\032v\312A\025vision.googleapis" + - ".com\322A[https://www.googleapis.com/auth/c" + - "loud-platform,https://www.googleapis.com" + - "/auth/cloud-visionB\211\001\n!com.google.cloud." + - "vision.v1p4beta1B\023ImageAnnotatorProtoP\001Z" + - "Cgoogle.golang.org/genproto/googleapis/c" + - "loud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006" + - "proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.CelebrityProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.ProductSearchProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.ColorProto.getDescriptor(), - com.google.type.LatLngProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_Feature_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Feature_descriptor, - new java.lang.String[] { "Type", "MaxResults", "Model", }); - internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor, - new java.lang.String[] { "GcsImageUri", "ImageUri", }); - internal_static_google_cloud_vision_v1p4beta1_Image_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_Image_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Image_descriptor, - new java.lang.String[] { "Content", "Source", }); - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor, - new java.lang.String[] { "BoundingPoly", "FdBoundingPoly", "Landmarks", "RollAngle", "PanAngle", "TiltAngle", "DetectionConfidence", "LandmarkingConfidence", "JoyLikelihood", "SorrowLikelihood", "AngerLikelihood", "SurpriseLikelihood", "UnderExposedLikelihood", "BlurredLikelihood", "HeadwearLikelihood", "RecognitionResult", }); - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor = - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_FaceAnnotation_Landmark_descriptor, - new java.lang.String[] { "Type", "Position", }); - internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor, - new java.lang.String[] { "LatLng", }); - internal_static_google_cloud_vision_v1p4beta1_Property_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Property_descriptor, - new java.lang.String[] { "Name", "Value", "Uint64Value", }); - internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_EntityAnnotation_descriptor, - new java.lang.String[] { "Mid", "Locale", "Description", "Score", "Confidence", "Topicality", "BoundingPoly", "Locations", "Properties", }); - internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor, - new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", "BoundingPoly", }); - internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor, - new java.lang.String[] { "Adult", "Spoof", "Medical", "Violence", "Racy", }); - internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor, - new java.lang.String[] { "MinLatLng", "MaxLatLng", }); - internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p4beta1_ColorInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ColorInfo_descriptor, - new java.lang.String[] { "Color", "Score", "PixelFraction", }); - internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_DominantColorsAnnotation_descriptor, - new java.lang.String[] { "Colors", }); - internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor, - new java.lang.String[] { "DominantColors", }); - internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p4beta1_CropHint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CropHint_descriptor, - new java.lang.String[] { "BoundingPoly", "Confidence", "ImportanceFraction", }); - internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CropHintsAnnotation_descriptor, - new java.lang.String[] { "CropHints", }); - internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CropHintsParams_descriptor, - new java.lang.String[] { "AspectRatios", }); - internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor, - new java.lang.String[] { "IncludeGeoResults", }); - internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor, - new java.lang.String[] { "EnableTextDetectionConfidenceScore", "AdvancedOcrOptions", }); - internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor, - new java.lang.String[] { "LatLongRect", "LanguageHints", "CropHintsParams", "FaceRecognitionParams", "ProductSearchParams", "WebDetectionParams", "TextDetectionParams", }); - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageRequest_descriptor, - new java.lang.String[] { "Image", "Features", "ImageContext", }); - internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImageAnnotationContext_descriptor, - new java.lang.String[] { "Uri", "PageNumber", }); - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AnnotateImageResponse_descriptor, - new java.lang.String[] { "FaceAnnotations", "LandmarkAnnotations", "LogoAnnotations", "LabelAnnotations", "LocalizedObjectAnnotations", "TextAnnotations", "FullTextAnnotation", "SafeSearchAnnotation", "ImagePropertiesAnnotation", "CropHintsAnnotation", "WebDetection", "ProductSearchResults", "Error", "Context", }); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateImagesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileRequest_descriptor, - new java.lang.String[] { "InputConfig", "Features", "ImageContext", "Pages", }); - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor, - new java.lang.String[] { "InputConfig", "Responses", "TotalPages", "Error", }); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BatchAnnotateFilesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileRequest_descriptor, - new java.lang.String[] { "InputConfig", "Features", "ImageContext", "OutputConfig", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor, - new java.lang.String[] { "OutputConfig", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesRequest_descriptor, - new java.lang.String[] { "Requests", "OutputConfig", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateImagesResponse_descriptor, - new java.lang.String[] { "OutputConfig", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor, - new java.lang.String[] { "Requests", }); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor, - new java.lang.String[] { "Responses", }); - internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor, - new java.lang.String[] { "GcsSource", "Content", "MimeType", }); - internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BatchSize", }); - internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_cloud_vision_v1p4beta1_GcsSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_GcsSource_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_cloud_vision_v1p4beta1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor, - new java.lang.String[] { "State", "CreateTime", "UpdateTime", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.CelebrityProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.ProductSearchProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.TextAnnotationProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.WebDetectionProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.ColorProto.getDescriptor(); - com.google.type.LatLngProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java deleted file mode 100644 index 5f620da30f8d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java +++ /dev/null @@ -1,2183 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Image context and/or feature-specific parameters.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageContext} - */ -public final class ImageContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageContext) - ImageContextOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageContext.newBuilder() to construct. - private ImageContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageContext() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.LatLongRect.Builder subBuilder = null; - if (latLongRect_ != null) { - subBuilder = latLongRect_.toBuilder(); - } - latLongRect_ = input.readMessage(com.google.cloud.vision.v1p4beta1.LatLongRect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLongRect_); - latLongRect_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageHints_.add(s); - break; - } - case 34: { - com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder subBuilder = null; - if (cropHintsParams_ != null) { - subBuilder = cropHintsParams_.toBuilder(); - } - cropHintsParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.CropHintsParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cropHintsParams_); - cropHintsParams_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder subBuilder = null; - if (productSearchParams_ != null) { - subBuilder = productSearchParams_.toBuilder(); - } - productSearchParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSearchParams_); - productSearchParams_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder subBuilder = null; - if (webDetectionParams_ != null) { - subBuilder = webDetectionParams_.toBuilder(); - } - webDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(webDetectionParams_); - webDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder subBuilder = null; - if (faceRecognitionParams_ != null) { - subBuilder = faceRecognitionParams_.toBuilder(); - } - faceRecognitionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(faceRecognitionParams_); - faceRecognitionParams_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder subBuilder = null; - if (textDetectionParams_ != null) { - subBuilder = textDetectionParams_.toBuilder(); - } - textDetectionParams_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextDetectionParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textDetectionParams_); - textDetectionParams_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageContext.class, com.google.cloud.vision.v1p4beta1.ImageContext.Builder.class); - } - - public static final int LAT_LONG_RECT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_; - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - @java.lang.Override - public boolean hasLatLongRect() { - return latLongRect_ != null; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect() { - return latLongRect_ == null ? com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - return getLatLongRect(); - } - - public static final int LANGUAGE_HINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList languageHints_; - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_; - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - - public static final int CROP_HINTS_PARAMS_FIELD_NUMBER = 4; - private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_; - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - @java.lang.Override - public boolean hasCropHintsParams() { - return cropHintsParams_ != null; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams() { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - return getCropHintsParams(); - } - - public static final int FACE_RECOGNITION_PARAMS_FIELD_NUMBER = 10; - private com.google.cloud.vision.v1p4beta1.FaceRecognitionParams faceRecognitionParams_; - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return Whether the faceRecognitionParams field is set. - */ - @java.lang.Override - public boolean hasFaceRecognitionParams() { - return faceRecognitionParams_ != null; - } - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return The faceRecognitionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams() { - return faceRecognitionParams_ == null ? com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; - } - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder() { - return getFaceRecognitionParams(); - } - - public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_; - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - @java.lang.Override - public boolean hasProductSearchParams() { - return productSearchParams_ != null; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams() { - return productSearchParams_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - return getProductSearchParams(); - } - - public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER = 6; - private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_; - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - @java.lang.Override - public boolean hasWebDetectionParams() { - return webDetectionParams_ != null; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams() { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - return getWebDetectionParams(); - } - - public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER = 12; - private com.google.cloud.vision.v1p4beta1.TextDetectionParams textDetectionParams_; - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - @java.lang.Override - public boolean hasTextDetectionParams() { - return textDetectionParams_ != null; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams() { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - return getTextDetectionParams(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLongRect_ != null) { - output.writeMessage(1, getLatLongRect()); - } - for (int i = 0; i < languageHints_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageHints_.getRaw(i)); - } - if (cropHintsParams_ != null) { - output.writeMessage(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - output.writeMessage(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - output.writeMessage(6, getWebDetectionParams()); - } - if (faceRecognitionParams_ != null) { - output.writeMessage(10, getFaceRecognitionParams()); - } - if (textDetectionParams_ != null) { - output.writeMessage(12, getTextDetectionParams()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLongRect_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLongRect()); - } - { - int dataSize = 0; - for (int i = 0; i < languageHints_.size(); i++) { - dataSize += computeStringSizeNoTag(languageHints_.getRaw(i)); - } - size += dataSize; - size += 1 * getLanguageHintsList().size(); - } - if (cropHintsParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCropHintsParams()); - } - if (productSearchParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getProductSearchParams()); - } - if (webDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getWebDetectionParams()); - } - if (faceRecognitionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getFaceRecognitionParams()); - } - if (textDetectionParams_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getTextDetectionParams()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageContext)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImageContext other = (com.google.cloud.vision.v1p4beta1.ImageContext) obj; - - if (hasLatLongRect() != other.hasLatLongRect()) return false; - if (hasLatLongRect()) { - if (!getLatLongRect() - .equals(other.getLatLongRect())) return false; - } - if (!getLanguageHintsList() - .equals(other.getLanguageHintsList())) return false; - if (hasCropHintsParams() != other.hasCropHintsParams()) return false; - if (hasCropHintsParams()) { - if (!getCropHintsParams() - .equals(other.getCropHintsParams())) return false; - } - if (hasFaceRecognitionParams() != other.hasFaceRecognitionParams()) return false; - if (hasFaceRecognitionParams()) { - if (!getFaceRecognitionParams() - .equals(other.getFaceRecognitionParams())) return false; - } - if (hasProductSearchParams() != other.hasProductSearchParams()) return false; - if (hasProductSearchParams()) { - if (!getProductSearchParams() - .equals(other.getProductSearchParams())) return false; - } - if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; - if (hasWebDetectionParams()) { - if (!getWebDetectionParams() - .equals(other.getWebDetectionParams())) return false; - } - if (hasTextDetectionParams() != other.hasTextDetectionParams()) return false; - if (hasTextDetectionParams()) { - if (!getTextDetectionParams() - .equals(other.getTextDetectionParams())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLongRect()) { - hash = (37 * hash) + LAT_LONG_RECT_FIELD_NUMBER; - hash = (53 * hash) + getLatLongRect().hashCode(); - } - if (getLanguageHintsCount() > 0) { - hash = (37 * hash) + LANGUAGE_HINTS_FIELD_NUMBER; - hash = (53 * hash) + getLanguageHintsList().hashCode(); - } - if (hasCropHintsParams()) { - hash = (37 * hash) + CROP_HINTS_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getCropHintsParams().hashCode(); - } - if (hasFaceRecognitionParams()) { - hash = (37 * hash) + FACE_RECOGNITION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getFaceRecognitionParams().hashCode(); - } - if (hasProductSearchParams()) { - hash = (37 * hash) + PRODUCT_SEARCH_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getProductSearchParams().hashCode(); - } - if (hasWebDetectionParams()) { - hash = (37 * hash) + WEB_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getWebDetectionParams().hashCode(); - } - if (hasTextDetectionParams()) { - hash = (37 * hash) + TEXT_DETECTION_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getTextDetectionParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Image context and/or feature-specific parameters.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageContext) - com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageContext.class, com.google.cloud.vision.v1p4beta1.ImageContext.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - if (faceRecognitionParamsBuilder_ == null) { - faceRecognitionParams_ = null; - } else { - faceRecognitionParams_ = null; - faceRecognitionParamsBuilder_ = null; - } - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext build() { - com.google.cloud.vision.v1p4beta1.ImageContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext buildPartial() { - com.google.cloud.vision.v1p4beta1.ImageContext result = new com.google.cloud.vision.v1p4beta1.ImageContext(this); - int from_bitField0_ = bitField0_; - if (latLongRectBuilder_ == null) { - result.latLongRect_ = latLongRect_; - } else { - result.latLongRect_ = latLongRectBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - languageHints_ = languageHints_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.languageHints_ = languageHints_; - if (cropHintsParamsBuilder_ == null) { - result.cropHintsParams_ = cropHintsParams_; - } else { - result.cropHintsParams_ = cropHintsParamsBuilder_.build(); - } - if (faceRecognitionParamsBuilder_ == null) { - result.faceRecognitionParams_ = faceRecognitionParams_; - } else { - result.faceRecognitionParams_ = faceRecognitionParamsBuilder_.build(); - } - if (productSearchParamsBuilder_ == null) { - result.productSearchParams_ = productSearchParams_; - } else { - result.productSearchParams_ = productSearchParamsBuilder_.build(); - } - if (webDetectionParamsBuilder_ == null) { - result.webDetectionParams_ = webDetectionParams_; - } else { - result.webDetectionParams_ = webDetectionParamsBuilder_.build(); - } - if (textDetectionParamsBuilder_ == null) { - result.textDetectionParams_ = textDetectionParams_; - } else { - result.textDetectionParams_ = textDetectionParamsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImageContext) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageContext other) { - if (other == com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()) return this; - if (other.hasLatLongRect()) { - mergeLatLongRect(other.getLatLongRect()); - } - if (!other.languageHints_.isEmpty()) { - if (languageHints_.isEmpty()) { - languageHints_ = other.languageHints_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLanguageHintsIsMutable(); - languageHints_.addAll(other.languageHints_); - } - onChanged(); - } - if (other.hasCropHintsParams()) { - mergeCropHintsParams(other.getCropHintsParams()); - } - if (other.hasFaceRecognitionParams()) { - mergeFaceRecognitionParams(other.getFaceRecognitionParams()); - } - if (other.hasProductSearchParams()) { - mergeProductSearchParams(other.getProductSearchParams()); - } - if (other.hasWebDetectionParams()) { - mergeWebDetectionParams(other.getWebDetectionParams()); - } - if (other.hasTextDetectionParams()) { - mergeTextDetectionParams(other.getTextDetectionParams()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImageContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder> latLongRectBuilder_; - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - public boolean hasLatLongRect() { - return latLongRectBuilder_ != null || latLongRect_ != null; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - public com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect() { - if (latLongRectBuilder_ == null) { - return latLongRect_ == null ? com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } else { - return latLongRectBuilder_.getMessage(); - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect(com.google.cloud.vision.v1p4beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLongRect_ = value; - onChanged(); - } else { - latLongRectBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public Builder setLatLongRect( - com.google.cloud.vision.v1p4beta1.LatLongRect.Builder builderForValue) { - if (latLongRectBuilder_ == null) { - latLongRect_ = builderForValue.build(); - onChanged(); - } else { - latLongRectBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public Builder mergeLatLongRect(com.google.cloud.vision.v1p4beta1.LatLongRect value) { - if (latLongRectBuilder_ == null) { - if (latLongRect_ != null) { - latLongRect_ = - com.google.cloud.vision.v1p4beta1.LatLongRect.newBuilder(latLongRect_).mergeFrom(value).buildPartial(); - } else { - latLongRect_ = value; - } - onChanged(); - } else { - latLongRectBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public Builder clearLatLongRect() { - if (latLongRectBuilder_ == null) { - latLongRect_ = null; - onChanged(); - } else { - latLongRect_ = null; - latLongRectBuilder_ = null; - } - - return this; - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p4beta1.LatLongRect.Builder getLatLongRectBuilder() { - - onChanged(); - return getLatLongRectFieldBuilder().getBuilder(); - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - public com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder() { - if (latLongRectBuilder_ != null) { - return latLongRectBuilder_.getMessageOrBuilder(); - } else { - return latLongRect_ == null ? - com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance() : latLongRect_; - } - } - /** - *
-     * Not used.
-     * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder> - getLatLongRectFieldBuilder() { - if (latLongRectBuilder_ == null) { - latLongRectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder>( - getLatLongRect(), - getParentForChildren(), - isClean()); - latLongRect_ = null; - } - return latLongRectBuilder_; - } - - private com.google.protobuf.LazyStringList languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - public com.google.protobuf.ProtocolStringList - getLanguageHintsList() { - return languageHints_.getUnmodifiableView(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - public int getLanguageHintsCount() { - return languageHints_.size(); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - public java.lang.String getLanguageHints(int index) { - return languageHints_.get(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - public com.google.protobuf.ByteString - getLanguageHintsBytes(int index) { - return languageHints_.getByteString(index); - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param index The index to set the value at. - * @param value The languageHints to set. - * @return This builder for chaining. - */ - public Builder setLanguageHints( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHints( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param values The languageHints to add. - * @return This builder for chaining. - */ - public Builder addAllLanguageHints( - java.lang.Iterable values) { - ensureLanguageHintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, languageHints_); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageHints() { - languageHints_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-     * yields the best results since it enables automatic language detection. For
-     * languages based on the Latin alphabet, setting `language_hints` is not
-     * needed. In rare cases, when the language of the text in the image is known,
-     * setting a hint will help get better results (although it will be a
-     * significant hindrance if the hint is wrong). Text detection returns an
-     * error if one or more of the specified languages is not one of the
-     * [supported languages](https://cloud.google.com/vision/docs/languages).
-     * 
- * - * repeated string language_hints = 2; - * @param value The bytes of the languageHints to add. - * @return This builder for chaining. - */ - public Builder addLanguageHintsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLanguageHintsIsMutable(); - languageHints_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder> cropHintsParamsBuilder_; - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - public boolean hasCropHintsParams() { - return cropHintsParamsBuilder_ != null || cropHintsParams_ != null; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - public com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - return cropHintsParams_ == null ? com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } else { - return cropHintsParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams(com.google.cloud.vision.v1p4beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cropHintsParams_ = value; - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder setCropHintsParams( - com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder builderForValue) { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = builderForValue.build(); - onChanged(); - } else { - cropHintsParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder mergeCropHintsParams(com.google.cloud.vision.v1p4beta1.CropHintsParams value) { - if (cropHintsParamsBuilder_ == null) { - if (cropHintsParams_ != null) { - cropHintsParams_ = - com.google.cloud.vision.v1p4beta1.CropHintsParams.newBuilder(cropHintsParams_).mergeFrom(value).buildPartial(); - } else { - cropHintsParams_ = value; - } - onChanged(); - } else { - cropHintsParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public Builder clearCropHintsParams() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParams_ = null; - onChanged(); - } else { - cropHintsParams_ = null; - cropHintsParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder getCropHintsParamsBuilder() { - - onChanged(); - return getCropHintsParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - public com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder() { - if (cropHintsParamsBuilder_ != null) { - return cropHintsParamsBuilder_.getMessageOrBuilder(); - } else { - return cropHintsParams_ == null ? - com.google.cloud.vision.v1p4beta1.CropHintsParams.getDefaultInstance() : cropHintsParams_; - } - } - /** - *
-     * Parameters for crop hints annotation request.
-     * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder> - getCropHintsParamsFieldBuilder() { - if (cropHintsParamsBuilder_ == null) { - cropHintsParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder>( - getCropHintsParams(), - getParentForChildren(), - isClean()); - cropHintsParams_ = null; - } - return cropHintsParamsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.FaceRecognitionParams faceRecognitionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder> faceRecognitionParamsBuilder_; - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return Whether the faceRecognitionParams field is set. - */ - public boolean hasFaceRecognitionParams() { - return faceRecognitionParamsBuilder_ != null || faceRecognitionParams_ != null; - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return The faceRecognitionParams. - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams() { - if (faceRecognitionParamsBuilder_ == null) { - return faceRecognitionParams_ == null ? com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; - } else { - return faceRecognitionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public Builder setFaceRecognitionParams(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams value) { - if (faceRecognitionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - faceRecognitionParams_ = value; - onChanged(); - } else { - faceRecognitionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public Builder setFaceRecognitionParams( - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder builderForValue) { - if (faceRecognitionParamsBuilder_ == null) { - faceRecognitionParams_ = builderForValue.build(); - onChanged(); - } else { - faceRecognitionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public Builder mergeFaceRecognitionParams(com.google.cloud.vision.v1p4beta1.FaceRecognitionParams value) { - if (faceRecognitionParamsBuilder_ == null) { - if (faceRecognitionParams_ != null) { - faceRecognitionParams_ = - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.newBuilder(faceRecognitionParams_).mergeFrom(value).buildPartial(); - } else { - faceRecognitionParams_ = value; - } - onChanged(); - } else { - faceRecognitionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public Builder clearFaceRecognitionParams() { - if (faceRecognitionParamsBuilder_ == null) { - faceRecognitionParams_ = null; - onChanged(); - } else { - faceRecognitionParams_ = null; - faceRecognitionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder getFaceRecognitionParamsBuilder() { - - onChanged(); - return getFaceRecognitionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - public com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder() { - if (faceRecognitionParamsBuilder_ != null) { - return faceRecognitionParamsBuilder_.getMessageOrBuilder(); - } else { - return faceRecognitionParams_ == null ? - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.getDefaultInstance() : faceRecognitionParams_; - } - } - /** - *
-     * Parameters for face recognition.
-     * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder> - getFaceRecognitionParamsFieldBuilder() { - if (faceRecognitionParamsBuilder_ == null) { - faceRecognitionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams, com.google.cloud.vision.v1p4beta1.FaceRecognitionParams.Builder, com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder>( - getFaceRecognitionParams(), - getParentForChildren(), - isClean()); - faceRecognitionParams_ = null; - } - return faceRecognitionParamsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder> productSearchParamsBuilder_; - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - public boolean hasProductSearchParams() { - return productSearchParamsBuilder_ != null || productSearchParams_ != null; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - return productSearchParams_ == null ? com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } else { - return productSearchParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams(com.google.cloud.vision.v1p4beta1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSearchParams_ = value; - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public Builder setProductSearchParams( - com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder builderForValue) { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = builderForValue.build(); - onChanged(); - } else { - productSearchParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public Builder mergeProductSearchParams(com.google.cloud.vision.v1p4beta1.ProductSearchParams value) { - if (productSearchParamsBuilder_ == null) { - if (productSearchParams_ != null) { - productSearchParams_ = - com.google.cloud.vision.v1p4beta1.ProductSearchParams.newBuilder(productSearchParams_).mergeFrom(value).buildPartial(); - } else { - productSearchParams_ = value; - } - onChanged(); - } else { - productSearchParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public Builder clearProductSearchParams() { - if (productSearchParamsBuilder_ == null) { - productSearchParams_ = null; - onChanged(); - } else { - productSearchParams_ = null; - productSearchParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder getProductSearchParamsBuilder() { - - onChanged(); - return getProductSearchParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder() { - if (productSearchParamsBuilder_ != null) { - return productSearchParamsBuilder_.getMessageOrBuilder(); - } else { - return productSearchParams_ == null ? - com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance() : productSearchParams_; - } - } - /** - *
-     * Parameters for product search.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder> - getProductSearchParamsFieldBuilder() { - if (productSearchParamsBuilder_ == null) { - productSearchParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder>( - getProductSearchParams(), - getParentForChildren(), - isClean()); - productSearchParams_ = null; - } - return productSearchParamsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder> webDetectionParamsBuilder_; - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - public boolean hasWebDetectionParams() { - return webDetectionParamsBuilder_ != null || webDetectionParams_ != null; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - public com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - return webDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } else { - return webDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams(com.google.cloud.vision.v1p4beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - webDetectionParams_ = value; - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder setWebDetectionParams( - com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder builderForValue) { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - webDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder mergeWebDetectionParams(com.google.cloud.vision.v1p4beta1.WebDetectionParams value) { - if (webDetectionParamsBuilder_ == null) { - if (webDetectionParams_ != null) { - webDetectionParams_ = - com.google.cloud.vision.v1p4beta1.WebDetectionParams.newBuilder(webDetectionParams_).mergeFrom(value).buildPartial(); - } else { - webDetectionParams_ = value; - } - onChanged(); - } else { - webDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public Builder clearWebDetectionParams() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParams_ = null; - onChanged(); - } else { - webDetectionParams_ = null; - webDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder getWebDetectionParamsBuilder() { - - onChanged(); - return getWebDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder() { - if (webDetectionParamsBuilder_ != null) { - return webDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return webDetectionParams_ == null ? - com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance() : webDetectionParams_; - } - } - /** - *
-     * Parameters for web detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder> - getWebDetectionParamsFieldBuilder() { - if (webDetectionParamsBuilder_ == null) { - webDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder>( - getWebDetectionParams(), - getParentForChildren(), - isClean()); - webDetectionParams_ = null; - } - return webDetectionParamsBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.TextDetectionParams textDetectionParams_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder> textDetectionParamsBuilder_; - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - public boolean hasTextDetectionParams() { - return textDetectionParamsBuilder_ != null || textDetectionParams_ != null; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - public com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - return textDetectionParams_ == null ? com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } else { - return textDetectionParamsBuilder_.getMessage(); - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams(com.google.cloud.vision.v1p4beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textDetectionParams_ = value; - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder setTextDetectionParams( - com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder builderForValue) { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = builderForValue.build(); - onChanged(); - } else { - textDetectionParamsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder mergeTextDetectionParams(com.google.cloud.vision.v1p4beta1.TextDetectionParams value) { - if (textDetectionParamsBuilder_ == null) { - if (textDetectionParams_ != null) { - textDetectionParams_ = - com.google.cloud.vision.v1p4beta1.TextDetectionParams.newBuilder(textDetectionParams_).mergeFrom(value).buildPartial(); - } else { - textDetectionParams_ = value; - } - onChanged(); - } else { - textDetectionParamsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public Builder clearTextDetectionParams() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParams_ = null; - onChanged(); - } else { - textDetectionParams_ = null; - textDetectionParamsBuilder_ = null; - } - - return this; - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder getTextDetectionParamsBuilder() { - - onChanged(); - return getTextDetectionParamsFieldBuilder().getBuilder(); - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - public com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder() { - if (textDetectionParamsBuilder_ != null) { - return textDetectionParamsBuilder_.getMessageOrBuilder(); - } else { - return textDetectionParams_ == null ? - com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance() : textDetectionParams_; - } - } - /** - *
-     * Parameters for text detection and document text detection.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder> - getTextDetectionParamsFieldBuilder() { - if (textDetectionParamsBuilder_ == null) { - textDetectionParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextDetectionParams, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder, com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder>( - getTextDetectionParams(), - getParentForChildren(), - isClean()); - textDetectionParams_ = null; - } - return textDetectionParamsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageContext) - private static final com.google.cloud.vision.v1p4beta1.ImageContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageContext(); - } - - public static com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java deleted file mode 100644 index 7c65993e3537..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContextOrBuilder.java +++ /dev/null @@ -1,240 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImageContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return Whether the latLongRect field is set. - */ - boolean hasLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - * @return The latLongRect. - */ - com.google.cloud.vision.v1p4beta1.LatLongRect getLatLongRect(); - /** - *
-   * Not used.
-   * 
- * - * .google.cloud.vision.v1p4beta1.LatLongRect lat_long_rect = 1; - */ - com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBuilder(); - - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return A list containing the languageHints. - */ - java.util.List - getLanguageHintsList(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @return The count of languageHints. - */ - int getLanguageHintsCount(); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the element to return. - * @return The languageHints at the given index. - */ - java.lang.String getLanguageHints(int index); - /** - *
-   * List of languages to use for TEXT_DETECTION. In most cases, an empty value
-   * yields the best results since it enables automatic language detection. For
-   * languages based on the Latin alphabet, setting `language_hints` is not
-   * needed. In rare cases, when the language of the text in the image is known,
-   * setting a hint will help get better results (although it will be a
-   * significant hindrance if the hint is wrong). Text detection returns an
-   * error if one or more of the specified languages is not one of the
-   * [supported languages](https://cloud.google.com/vision/docs/languages).
-   * 
- * - * repeated string language_hints = 2; - * @param index The index of the value to return. - * @return The bytes of the languageHints at the given index. - */ - com.google.protobuf.ByteString - getLanguageHintsBytes(int index); - - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return Whether the cropHintsParams field is set. - */ - boolean hasCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - * @return The cropHintsParams. - */ - com.google.cloud.vision.v1p4beta1.CropHintsParams getCropHintsParams(); - /** - *
-   * Parameters for crop hints annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.CropHintsParams crop_hints_params = 4; - */ - com.google.cloud.vision.v1p4beta1.CropHintsParamsOrBuilder getCropHintsParamsOrBuilder(); - - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return Whether the faceRecognitionParams field is set. - */ - boolean hasFaceRecognitionParams(); - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - * @return The faceRecognitionParams. - */ - com.google.cloud.vision.v1p4beta1.FaceRecognitionParams getFaceRecognitionParams(); - /** - *
-   * Parameters for face recognition.
-   * 
- * - * .google.cloud.vision.v1p4beta1.FaceRecognitionParams face_recognition_params = 10; - */ - com.google.cloud.vision.v1p4beta1.FaceRecognitionParamsOrBuilder getFaceRecognitionParamsOrBuilder(); - - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return Whether the productSearchParams field is set. - */ - boolean hasProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - * @return The productSearchParams. - */ - com.google.cloud.vision.v1p4beta1.ProductSearchParams getProductSearchParams(); - /** - *
-   * Parameters for product search.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSearchParams product_search_params = 5; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder(); - - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return Whether the webDetectionParams field is set. - */ - boolean hasWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - * @return The webDetectionParams. - */ - com.google.cloud.vision.v1p4beta1.WebDetectionParams getWebDetectionParams(); - /** - *
-   * Parameters for web detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.WebDetectionParams web_detection_params = 6; - */ - com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder(); - - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return Whether the textDetectionParams field is set. - */ - boolean hasTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - * @return The textDetectionParams. - */ - com.google.cloud.vision.v1p4beta1.TextDetectionParams getTextDetectionParams(); - /** - *
-   * Parameters for text detection and document text detection.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextDetectionParams text_detection_params = 12; - */ - com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java deleted file mode 100644 index 710fcc3e1063..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Image content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes content = 1; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return Whether the source field is set. - */ - boolean hasSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - * @return The source. - */ - com.google.cloud.vision.v1p4beta1.ImageSource getSource(); - /** - *
-   * Google Cloud Storage image location, or publicly-accessible image
-   * URL. If both `content` and `source` are provided for an image, `content`
-   * takes precedence and is used to perform the image annotation request.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImageSource source = 2; - */ - com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java deleted file mode 100644 index 14f27e7c7024..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Stores image properties, such as dominant colors.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageProperties} - */ -public final class ImageProperties extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageProperties) - ImagePropertiesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageProperties.newBuilder() to construct. - private ImageProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageProperties() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageProperties(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageProperties( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder subBuilder = null; - if (dominantColors_ != null) { - subBuilder = dominantColors_.toBuilder(); - } - dominantColors_ = input.readMessage(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dominantColors_); - dominantColors_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageProperties.class, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder.class); - } - - public static final int DOMINANT_COLORS_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_; - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - @java.lang.Override - public boolean hasDominantColors() { - return dominantColors_ != null; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors() { - return dominantColors_ == null ? com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - return getDominantColors(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dominantColors_ != null) { - output.writeMessage(1, getDominantColors()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dominantColors_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDominantColors()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageProperties)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImageProperties other = (com.google.cloud.vision.v1p4beta1.ImageProperties) obj; - - if (hasDominantColors() != other.hasDominantColors()) return false; - if (hasDominantColors()) { - if (!getDominantColors() - .equals(other.getDominantColors())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDominantColors()) { - hash = (37 * hash) + DOMINANT_COLORS_FIELD_NUMBER; - hash = (53 * hash) + getDominantColors().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageProperties parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageProperties prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Stores image properties, such as dominant colors.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageProperties} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageProperties) - com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageProperties.class, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImageProperties.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageProperties_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageProperties build() { - com.google.cloud.vision.v1p4beta1.ImageProperties result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageProperties buildPartial() { - com.google.cloud.vision.v1p4beta1.ImageProperties result = new com.google.cloud.vision.v1p4beta1.ImageProperties(this); - if (dominantColorsBuilder_ == null) { - result.dominantColors_ = dominantColors_; - } else { - result.dominantColors_ = dominantColorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImageProperties) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageProperties)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageProperties other) { - if (other == com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance()) return this; - if (other.hasDominantColors()) { - mergeDominantColors(other.getDominantColors()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImageProperties parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageProperties) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder> dominantColorsBuilder_; - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - public boolean hasDominantColors() { - return dominantColorsBuilder_ != null || dominantColors_ != null; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors() { - if (dominantColorsBuilder_ == null) { - return dominantColors_ == null ? com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } else { - return dominantColorsBuilder_.getMessage(); - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dominantColors_ = value; - onChanged(); - } else { - dominantColorsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder setDominantColors( - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder builderForValue) { - if (dominantColorsBuilder_ == null) { - dominantColors_ = builderForValue.build(); - onChanged(); - } else { - dominantColorsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder mergeDominantColors(com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation value) { - if (dominantColorsBuilder_ == null) { - if (dominantColors_ != null) { - dominantColors_ = - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.newBuilder(dominantColors_).mergeFrom(value).buildPartial(); - } else { - dominantColors_ = value; - } - onChanged(); - } else { - dominantColorsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public Builder clearDominantColors() { - if (dominantColorsBuilder_ == null) { - dominantColors_ = null; - onChanged(); - } else { - dominantColors_ = null; - dominantColorsBuilder_ = null; - } - - return this; - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder getDominantColorsBuilder() { - - onChanged(); - return getDominantColorsFieldBuilder().getBuilder(); - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder() { - if (dominantColorsBuilder_ != null) { - return dominantColorsBuilder_.getMessageOrBuilder(); - } else { - return dominantColors_ == null ? - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.getDefaultInstance() : dominantColors_; - } - } - /** - *
-     * If present, dominant colors completed successfully.
-     * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder> - getDominantColorsFieldBuilder() { - if (dominantColorsBuilder_ == null) { - dominantColorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder>( - getDominantColors(), - getParentForChildren(), - isClean()); - dominantColors_ = null; - } - return dominantColorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageProperties) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageProperties) - private static final com.google.cloud.vision.v1p4beta1.ImageProperties DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageProperties(); - } - - public static com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageProperties getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java deleted file mode 100644 index b0fffd0baa07..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImagePropertiesOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImagePropertiesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageProperties) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return Whether the dominantColors field is set. - */ - boolean hasDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - * @return The dominantColors. - */ - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation getDominantColors(); - /** - *
-   * If present, dominant colors completed successfully.
-   * 
- * - * .google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominant_colors = 1; - */ - com.google.cloud.vision.v1p4beta1.DominantColorsAnnotationOrBuilder getDominantColorsOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java deleted file mode 100644 index 0bb4bbfa190e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java +++ /dev/null @@ -1,880 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * External image source (Google Cloud Storage or web URL image location).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageSource} - */ -public final class ImageSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImageSource) - ImageSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageSource.newBuilder() to construct. - private ImageSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageSource() { - gcsImageUri_ = ""; - imageUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - gcsImageUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageSource.class, com.google.cloud.vision.v1p4beta1.ImageSource.Builder.class); - } - - public static final int GCS_IMAGE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsImageUri_; - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - @java.lang.Override - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } - } - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IMAGE_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object imageUri_; - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsImageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsImageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImageSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImageSource other = (com.google.cloud.vision.v1p4beta1.ImageSource) obj; - - if (!getGcsImageUri() - .equals(other.getGcsImageUri())) return false; - if (!getImageUri() - .equals(other.getImageUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + GCS_IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getGcsImageUri().hashCode(); - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImageSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImageSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * External image source (Google Cloud Storage or web URL image location).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImageSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImageSource) - com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImageSource.class, com.google.cloud.vision.v1p4beta1.ImageSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImageSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - gcsImageUri_ = ""; - - imageUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_ImageSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSource build() { - com.google.cloud.vision.v1p4beta1.ImageSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSource buildPartial() { - com.google.cloud.vision.v1p4beta1.ImageSource result = new com.google.cloud.vision.v1p4beta1.ImageSource(this); - result.gcsImageUri_ = gcsImageUri_; - result.imageUri_ = imageUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImageSource) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImageSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImageSource other) { - if (other == com.google.cloud.vision.v1p4beta1.ImageSource.getDefaultInstance()) return this; - if (!other.getGcsImageUri().isEmpty()) { - gcsImageUri_ = other.gcsImageUri_; - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImageSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImageSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsImageUri_ = ""; - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - public java.lang.String getGcsImageUri() { - java.lang.Object ref = gcsImageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcsImageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - public com.google.protobuf.ByteString - getGcsImageUriBytes() { - java.lang.Object ref = gcsImageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - gcsImageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcsImageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @return This builder for chaining. - */ - public Builder clearGcsImageUri() { - - gcsImageUri_ = getDefaultInstance().getGcsImageUri(); - onChanged(); - return this; - } - /** - *
-     * **Use `image_uri` instead.**
-     * The Google Cloud Storage  URI of the form
-     * `gs://bucket_name/object_name`. Object versioning is not supported. See
-     * [Google Cloud Storage Request
-     * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-     * 
- * - * string gcs_image_uri = 1; - * @param value The bytes for gcsImageUri to set. - * @return This builder for chaining. - */ - public Builder setGcsImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcsImageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString - getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - *
-     * The URI of the source image. Can be either:
-     * 1. A Google Cloud Storage URI of the form
-     *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-     *    [Google Cloud Storage Request
-     *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-     *    info.
-     * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-     *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-     *    completed. Your request may fail if the specified host denies the
-     *    request (e.g. due to request throttling or DOS prevention), or if Google
-     *    throttles requests to the site for abuse prevention. You should not
-     *    depend on externally-hosted images for production applications.
-     * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-     * precedence.
-     * 
- * - * string image_uri = 2; - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImageSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageSource) - private static final com.google.cloud.vision.v1p4beta1.ImageSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImageSource(); - } - - public static com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImageSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java deleted file mode 100644 index f0aaf41fdf8c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSourceOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImageSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImageSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The gcsImageUri. - */ - java.lang.String getGcsImageUri(); - /** - *
-   * **Use `image_uri` instead.**
-   * The Google Cloud Storage  URI of the form
-   * `gs://bucket_name/object_name`. Object versioning is not supported. See
-   * [Google Cloud Storage Request
-   * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
-   * 
- * - * string gcs_image_uri = 1; - * @return The bytes for gcsImageUri. - */ - com.google.protobuf.ByteString - getGcsImageUriBytes(); - - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - *
-   * The URI of the source image. Can be either:
-   * 1. A Google Cloud Storage URI of the form
-   *    `gs://bucket_name/object_name`. Object versioning is not supported. See
-   *    [Google Cloud Storage Request
-   *    URIs](https://cloud.google.com/storage/docs/reference-uris) for more
-   *    info.
-   * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
-   *    HTTP/HTTPS URLs, Google cannot guarantee that the request will be
-   *    completed. Your request may fail if the specified host denies the
-   *    request (e.g. due to request throttling or DOS prevention), or if Google
-   *    throttles requests to the site for abuse prevention. You should not
-   *    depend on externally-hosted images for production applications.
-   * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
-   * precedence.
-   * 
- * - * string image_uri = 2; - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString - getImageUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java deleted file mode 100644 index fb590200bfe8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java +++ /dev/null @@ -1,933 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The Google Cloud Storage location for a csv file which preserves a list of
- * ImportProductSetRequests in each line.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} - */ -public final class ImportProductSetsGcsSource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - ImportProductSetsGcsSourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsGcsSource.newBuilder() to construct. - private ImportProductSetsGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsGcsSource() { - csvFileUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsGcsSource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsGcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - csvFileUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder.class); - } - - public static final int CSV_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object csvFileUri_; - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-   * and the `labels` column refers to
-   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-   * field for the product to a space (" "). You can update the `display_name`
-   * later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - @java.lang.Override - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } - } - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-   * and the `labels` column refers to
-   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-   * field for the product to a space (" "). You can update the `display_name`
-   * later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, csvFileUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(csvFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, csvFileUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) obj; - - if (!getCsvFileUri() - .equals(other.getCsvFileUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CSV_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getCsvFileUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list of
-   * ImportProductSetRequests in each line.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - csvFileUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource build() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource buildPartial() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource(this); - result.csvFileUri_ = csvFileUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource other) { - if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance()) return this; - if (!other.getCsvFileUri().isEmpty()) { - csvFileUri_ = other.csvFileUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object csvFileUri_ = ""; - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-     * and the `labels` column refers to
-     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-     * field for the product to a space (" "). You can update the `display_name`
-     * later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - public java.lang.String getCsvFileUri() { - java.lang.Object ref = csvFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - csvFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-     * and the `labels` column refers to
-     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-     * field for the product to a space (" "). You can update the `display_name`
-     * later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - public com.google.protobuf.ByteString - getCsvFileUriBytes() { - java.lang.Object ref = csvFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - csvFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-     * and the `labels` column refers to
-     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-     * field for the product to a space (" "). You can update the `display_name`
-     * later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @param value The csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - csvFileUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-     * and the `labels` column refers to
-     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-     * field for the product to a space (" "). You can update the `display_name`
-     * later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @return This builder for chaining. - */ - public Builder clearCsvFileUri() { - - csvFileUri_ = getDefaultInstance().getCsvFileUri(); - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Storage URI of the input csv file.
-     * The URI must start with `gs://`.
-     * The format of the input csv file should be one image per line.
-     * In each line, there are 8 columns.
-     * 1.  image-uri
-     * 2.  image-id
-     * 3.  product-set-id
-     * 4.  product-id
-     * 5.  product-category
-     * 6.  product-display-name
-     * 7.  labels
-     * 8.  bounding-poly
-     * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-     * columns are required. All other columns are optional.
-     * If the `ProductSet` or `Product` specified by the `product-set-id` and
-     * `product-id` values does not exist, then the system will create a new
-     * `ProductSet` or `Product` for the image. In this case, the
-     * `product-display-name` column refers to
-     * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-     * `product-category` column refers to
-     * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-     * and the `labels` column refers to
-     * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-     * The `image-id` column is optional but must be unique if provided. If it is
-     * empty, the system will automatically assign a unique id to the image.
-     * The `product-display-name` column is optional. If it is empty, the system
-     * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-     * field for the product to a space (" "). You can update the `display_name`
-     * later by using the API.
-     * If a `Product` with the specified `product-id` already exists, then the
-     * system ignores the `product-display-name`, `product-category`, and `labels`
-     * columns.
-     * The `labels` column (optional) is a line containing a list of
-     * comma-separated key-value pairs, in the following format:
-     *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-     * The `bounding-poly` column (optional) identifies one region of
-     * interest from the image in the same manner as `CreateReferenceImage`. If
-     * you do not specify the `bounding-poly` column, then the system will try to
-     * detect regions of interest automatically.
-     * At most one `bounding-poly` column is allowed per line. If the image
-     * contains multiple regions of interest, add a line to the CSV file that
-     * includes the same product information, and the `bounding-poly` values for
-     * each region of interest.
-     * The `bounding-poly` column must contain an even number of comma-separated
-     * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-     * non-negative integers for absolute bounding polygons, and float values
-     * in [0, 1] for normalized bounding polygons.
-     * The system will resize the image if the image resolution is too
-     * large to process (larger than 20MP).
-     * 
- * - * string csv_file_uri = 1; - * @param value The bytes for csvFileUri to set. - * @return This builder for chaining. - */ - public Builder setCsvFileUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - csvFileUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource(); - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsGcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsGcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java deleted file mode 100644 index adea37a5b395..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSourceOrBuilder.java +++ /dev/null @@ -1,125 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImportProductSetsGcsSourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-   * and the `labels` column refers to
-   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-   * field for the product to a space (" "). You can update the `display_name`
-   * later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The csvFileUri. - */ - java.lang.String getCsvFileUri(); - /** - *
-   * The Google Cloud Storage URI of the input csv file.
-   * The URI must start with `gs://`.
-   * The format of the input csv file should be one image per line.
-   * In each line, there are 8 columns.
-   * 1.  image-uri
-   * 2.  image-id
-   * 3.  product-set-id
-   * 4.  product-id
-   * 5.  product-category
-   * 6.  product-display-name
-   * 7.  labels
-   * 8.  bounding-poly
-   * The `image-uri`, `product-set-id`, `product-id`, and `product-category`
-   * columns are required. All other columns are optional.
-   * If the `ProductSet` or `Product` specified by the `product-set-id` and
-   * `product-id` values does not exist, then the system will create a new
-   * `ProductSet` or `Product` for the image. In this case, the
-   * `product-display-name` column refers to
-   * [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the
-   * `product-category` column refers to
-   * [product_category][google.cloud.vision.v1p4beta1.Product.product_category],
-   * and the `labels` column refers to
-   * [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels].
-   * The `image-id` column is optional but must be unique if provided. If it is
-   * empty, the system will automatically assign a unique id to the image.
-   * The `product-display-name` column is optional. If it is empty, the system
-   * sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name]
-   * field for the product to a space (" "). You can update the `display_name`
-   * later by using the API.
-   * If a `Product` with the specified `product-id` already exists, then the
-   * system ignores the `product-display-name`, `product-category`, and `labels`
-   * columns.
-   * The `labels` column (optional) is a line containing a list of
-   * comma-separated key-value pairs, in the following format:
-   *     "key_1=value_1,key_2=value_2,...,key_n=value_n"
-   * The `bounding-poly` column (optional) identifies one region of
-   * interest from the image in the same manner as `CreateReferenceImage`. If
-   * you do not specify the `bounding-poly` column, then the system will try to
-   * detect regions of interest automatically.
-   * At most one `bounding-poly` column is allowed per line. If the image
-   * contains multiple regions of interest, add a line to the CSV file that
-   * includes the same product information, and the `bounding-poly` values for
-   * each region of interest.
-   * The `bounding-poly` column must contain an even number of comma-separated
-   * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
-   * non-negative integers for absolute bounding polygons, and float values
-   * in [0, 1] for normalized bounding polygons.
-   * The system will resize the image if the image resolution is too
-   * large to process (larger than 20MP).
-   * 
- * - * string csv_file_uri = 1; - * @return The bytes for csvFileUri. - */ - com.google.protobuf.ByteString - getCsvFileUriBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java deleted file mode 100644 index c703bb523c0e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java +++ /dev/null @@ -1,773 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The input content for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} - */ -public final class ImportProductSetsInputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - ImportProductSetsInputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsInputConfig.newBuilder() to construct. - private ImportProductSetsInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsInputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsInputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_SOURCE(1), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: return GCS_SOURCE; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The input content for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig build() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig buildPartial() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig(this); - if (sourceCase_ == 1) { - if (gcsSourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = gcsSourceBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig other) { - if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case GCS_SOURCE: { - mergeGcsSource(other.getGcsSource()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 && - source_ != com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance()) { - source_ = com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.newBuilder((com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - gcsSourceBuilder_.mergeFrom(value); - } else { - gcsSourceBuilder_.setMessage(value); - } - } - sourceCase_ = 1; - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_; - } - return com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - } - /** - *
-     * The Google Cloud Storage location for a csv file which preserves a list
-     * of ImportProductSetRequests in each line.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder>( - (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged();; - return gcsSourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig(); - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsInputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsInputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java deleted file mode 100644 index a76404b96397..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfigOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImportProductSetsInputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location for a csv file which preserves a list
-   * of ImportProductSetRequests in each line.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceOrBuilder getGcsSourceOrBuilder(); - - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java deleted file mode 100644 index 660a4779ac47..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `ImportProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsRequest} - */ -public final class ImportProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - ImportProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsRequest.newBuilder() to construct. - private ImportProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_; - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - @java.lang.Override - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig() { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inputConfig_ != null) { - output.writeMessage(2, getInputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig() - .equals(other.getInputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ImportProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest build() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest(this); - result.parent_ = parent_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project in which the ProductSets should be imported.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder> inputConfigBuilder_; - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null ? com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInputConfig( - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null ? - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.getDefaultInstance() : inputConfig_; - } - } - /** - *
-     * Required. The input content for the list of requests.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder>( - getInputConfig(), - getParentForChildren(), - isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java deleted file mode 100644 index 719684bff187..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImportProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project in which the ProductSets should be imported.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inputConfig. - */ - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig getInputConfig(); - /** - *
-   * Required. The input content for the list of requests.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigOrBuilder getInputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java deleted file mode 100644 index 46f251f6a0cb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java +++ /dev/null @@ -1,1414 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response message for the `ImportProductSets` method.
- * This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
- * method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response]
- * field.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsResponse} - */ -public final class ImportProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - ImportProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImportProductSetsResponse.newBuilder() to construct. - private ImportProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImportProductSetsResponse() { - referenceImages_ = java.util.Collections.emptyList(); - statuses_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImportProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImportProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - statuses_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int STATUSES_FIELD_NUMBER = 2; - private java.util.List statuses_; - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List getStatusesList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public java.util.List - getStatusesOrBuilderList() { - return statuses_; - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public int getStatusesCount() { - return statuses_.size(); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.Status getStatuses(int index) { - return statuses_.get(index); - } - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - return statuses_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - output.writeMessage(2, statuses_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - for (int i = 0; i < statuses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, statuses_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (!getStatusesList() - .equals(other.getStatusesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - if (getStatusesCount() > 0) { - hash = (37 * hash) + STATUSES_FIELD_NUMBER; - hash = (53 * hash) + getStatusesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ImportProductSets` method.
-   * This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
-   * method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
-   * field.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ImportProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - getStatusesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - statusesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse build() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse result = new com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.statuses_ = statuses_; - } else { - result.statuses_ = statusesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (statusesBuilder_ == null) { - if (!other.statuses_.isEmpty()) { - if (statuses_.isEmpty()) { - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureStatusesIsMutable(); - statuses_.addAll(other.statuses_); - } - onChanged(); - } - } else { - if (!other.statuses_.isEmpty()) { - if (statusesBuilder_.isEmpty()) { - statusesBuilder_.dispose(); - statusesBuilder_ = null; - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000002); - statusesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getStatusesFieldBuilder() : null; - } else { - statusesBuilder_.addAllMessages(other.statuses_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference_images that are imported successfully.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private java.util.List statuses_ = - java.util.Collections.emptyList(); - private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - statuses_ = new java.util.ArrayList(statuses_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusesBuilder_; - - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List getStatusesList() { - if (statusesBuilder_ == null) { - return java.util.Collections.unmodifiableList(statuses_); - } else { - return statusesBuilder_.getMessageList(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public int getStatusesCount() { - if (statusesBuilder_ == null) { - return statuses_.size(); - } else { - return statusesBuilder_.getCount(); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status getStatuses(int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); - } else { - return statusesBuilder_.getMessage(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.set(index, value); - onChanged(); - } else { - statusesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder setStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.set(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses(com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(value); - onChanged(); - } else { - statusesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(index, value); - onChanged(); - } else { - statusesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addStatuses( - int index, com.google.rpc.Status.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder addAllStatuses( - java.lang.Iterable values) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, statuses_); - onChanged(); - } else { - statusesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder clearStatuses() { - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - statusesBuilder_.clear(); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public Builder removeStatuses(int index) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.remove(index); - onChanged(); - } else { - statusesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder getStatusesBuilder( - int index) { - return getStatusesFieldBuilder().getBuilder(index); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); } else { - return statusesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesOrBuilderList() { - if (statusesBuilder_ != null) { - return statusesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statuses_); - } - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder() { - return getStatusesFieldBuilder().addBuilder( - com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public com.google.rpc.Status.Builder addStatusesBuilder( - int index) { - return getStatusesFieldBuilder().addBuilder( - index, com.google.rpc.Status.getDefaultInstance()); - } - /** - *
-     * The rpc status for each ImportProductSet request, including both successes
-     * and errors.
-     * The number of statuses here matches the number of lines in the csv file,
-     * and statuses[i] stores the success or failure status of processing the i-th
-     * line of the csv, starting from line 0.
-     * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - public java.util.List - getStatusesBuilderList() { - return getStatusesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusesFieldBuilder() { - if (statusesBuilder_ == null) { - statusesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - statuses_ = null; - } - return statusesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - private static final com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java deleted file mode 100644 index 01f166bcc1ee..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ImportProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference_images that are imported successfully.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.Status getStatuses(int index); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - int getStatusesCount(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - java.util.List - getStatusesOrBuilderList(); - /** - *
-   * The rpc status for each ImportProductSet request, including both successes
-   * and errors.
-   * The number of statuses here matches the number of lines in the csv file,
-   * and statuses[i] stores the success or failure status of processing the i-th
-   * line of the csv, starting from line 0.
-   * 
- * - * repeated .google.rpc.Status statuses = 2; - */ - com.google.rpc.StatusOrBuilder getStatusesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java deleted file mode 100644 index 3cb8c40cee18..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java +++ /dev/null @@ -1,938 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The desired input location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.InputConfig} - */ -public final class InputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.InputConfig) - InputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InputConfig() { - content_ = com.google.protobuf.ByteString.EMPTY; - mimeType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.GcsSource.Builder subBuilder = null; - if (gcsSource_ != null) { - subBuilder = gcsSource_.toBuilder(); - } - gcsSource_ = input.readMessage(com.google.cloud.vision.v1p4beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsSource_); - gcsSource_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 26: { - - content_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.InputConfig.class, com.google.cloud.vision.v1p4beta1.InputConfig.Builder.class); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_; - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - @java.lang.Override - public boolean hasGcsSource() { - return gcsSource_ != null; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource() { - return gcsSource_ == null ? com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return getGcsSource(); - } - - public static final int CONTENT_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString content_; - /** - *
-   * File content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateFiles requests. It does
-   * not work for AsyncBatchAnnotateFiles requests.
-   * 
- * - * bytes content = 3; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - - public static final int MIME_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object mimeType_; - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - @java.lang.Override - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } - } - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsSource_ != null) { - output.writeMessage(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); - } - if (!content_.isEmpty()) { - output.writeBytes(3, content_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsSource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsSource()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); - } - if (!content_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, content_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.InputConfig other = (com.google.cloud.vision.v1p4beta1.InputConfig) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource() - .equals(other.getGcsSource())) return false; - } - if (!getContent() - .equals(other.getContent())) return false; - if (!getMimeType() - .equals(other.getMimeType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired input location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.InputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.InputConfig) - com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.InputConfig.class, com.google.cloud.vision.v1p4beta1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - content_ = com.google.protobuf.ByteString.EMPTY; - - mimeType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig build() { - com.google.cloud.vision.v1p4beta1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig buildPartial() { - com.google.cloud.vision.v1p4beta1.InputConfig result = new com.google.cloud.vision.v1p4beta1.InputConfig(this); - if (gcsSourceBuilder_ == null) { - result.gcsSource_ = gcsSource_; - } else { - result.gcsSource_ = gcsSourceBuilder_.build(); - } - result.content_ = content_; - result.mimeType_ = mimeType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.InputConfig) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.InputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.InputConfig other) { - if (other == com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()) return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - if (other.getContent() != com.google.protobuf.ByteString.EMPTY) { - setContent(other.getContent()); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder> gcsSourceBuilder_; - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSourceBuilder_ != null || gcsSource_ != null; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - public com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null ? com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.vision.v1p4beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource( - com.google.cloud.vision.v1p4beta1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.vision.v1p4beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (gcsSource_ != null) { - gcsSource_ = - com.google.cloud.vision.v1p4beta1.GcsSource.newBuilder(gcsSource_).mergeFrom(value).buildPartial(); - } else { - gcsSource_ = value; - } - onChanged(); - } else { - gcsSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - onChanged(); - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p4beta1.GcsSource.Builder getGcsSourceBuilder() { - - onChanged(); - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null ? - com.google.cloud.vision.v1p4beta1.GcsSource.getDefaultInstance() : gcsSource_; - } - } - /** - *
-     * The Google Cloud Storage location to read the input from.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder>( - getGcsSource(), - getParentForChildren(), - isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @return The content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContent() { - return content_; - } - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - *
-     * File content, represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * Currently, this field only works for BatchAnnotateFiles requests. It does
-     * not work for AsyncBatchAnnotateFiles requests.
-     * 
- * - * bytes content = 3; - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - - private java.lang.Object mimeType_ = ""; - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString - getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mimeType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - *
-     * The type of the file. Currently only "application/pdf", "image/tiff" and
-     * "image/gif" are supported. Wildcards are not supported.
-     * 
- * - * string mime_type = 2; - * @param value The bytes for mimeType to set. - * @return This builder for chaining. - */ - public Builder setMimeTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mimeType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.InputConfig) - private static final com.google.cloud.vision.v1p4beta1.InputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.InputConfig(); - } - - public static com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java deleted file mode 100644 index 9f58b2070c43..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfigOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface InputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - * @return The gcsSource. - */ - com.google.cloud.vision.v1p4beta1.GcsSource getGcsSource(); - /** - *
-   * The Google Cloud Storage location to read the input from.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.vision.v1p4beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - *
-   * File content, represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * Currently, this field only works for BatchAnnotateFiles requests. It does
-   * not work for AsyncBatchAnnotateFiles requests.
-   * 
- * - * bytes content = 3; - * @return The content. - */ - com.google.protobuf.ByteString getContent(); - - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - *
-   * The type of the file. Currently only "application/pdf", "image/tiff" and
-   * "image/gif" are supported. Wildcards are not supported.
-   * 
- * - * string mime_type = 2; - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString - getMimeTypeBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java deleted file mode 100644 index e0df3f18e7dc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Rectangle determined by min and max `LatLng` pairs.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LatLongRect} - */ -public final class LatLongRect extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LatLongRect) - LatLongRectOrBuilder { -private static final long serialVersionUID = 0L; - // Use LatLongRect.newBuilder() to construct. - private LatLongRect(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LatLongRect() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LatLongRect(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LatLongRect( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (minLatLng_ != null) { - subBuilder = minLatLng_.toBuilder(); - } - minLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minLatLng_); - minLatLng_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.type.LatLng.Builder subBuilder = null; - if (maxLatLng_ != null) { - subBuilder = maxLatLng_.toBuilder(); - } - maxLatLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxLatLng_); - maxLatLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LatLongRect.class, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder.class); - } - - public static final int MIN_LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng minLatLng_; - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - @java.lang.Override - public boolean hasMinLatLng() { - return minLatLng_ != null; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMinLatLng() { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - return getMinLatLng(); - } - - public static final int MAX_LAT_LNG_FIELD_NUMBER = 2; - private com.google.type.LatLng maxLatLng_; - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - @java.lang.Override - public boolean hasMaxLatLng() { - return maxLatLng_ != null; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - @java.lang.Override - public com.google.type.LatLng getMaxLatLng() { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - return getMaxLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minLatLng_ != null) { - output.writeMessage(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - output.writeMessage(2, getMaxLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinLatLng()); - } - if (maxLatLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LatLongRect)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.LatLongRect other = (com.google.cloud.vision.v1p4beta1.LatLongRect) obj; - - if (hasMinLatLng() != other.hasMinLatLng()) return false; - if (hasMinLatLng()) { - if (!getMinLatLng() - .equals(other.getMinLatLng())) return false; - } - if (hasMaxLatLng() != other.hasMaxLatLng()) return false; - if (hasMaxLatLng()) { - if (!getMaxLatLng() - .equals(other.getMaxLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinLatLng()) { - hash = (37 * hash) + MIN_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMinLatLng().hashCode(); - } - if (hasMaxLatLng()) { - hash = (37 * hash) + MAX_LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getMaxLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LatLongRect parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LatLongRect prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rectangle determined by min and max `LatLng` pairs.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LatLongRect} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LatLongRect) - com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LatLongRect.class, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.LatLongRect.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LatLongRect_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRect build() { - com.google.cloud.vision.v1p4beta1.LatLongRect result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRect buildPartial() { - com.google.cloud.vision.v1p4beta1.LatLongRect result = new com.google.cloud.vision.v1p4beta1.LatLongRect(this); - if (minLatLngBuilder_ == null) { - result.minLatLng_ = minLatLng_; - } else { - result.minLatLng_ = minLatLngBuilder_.build(); - } - if (maxLatLngBuilder_ == null) { - result.maxLatLng_ = maxLatLng_; - } else { - result.maxLatLng_ = maxLatLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.LatLongRect) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.LatLongRect)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LatLongRect other) { - if (other == com.google.cloud.vision.v1p4beta1.LatLongRect.getDefaultInstance()) return this; - if (other.hasMinLatLng()) { - mergeMinLatLng(other.getMinLatLng()); - } - if (other.hasMaxLatLng()) { - mergeMaxLatLng(other.getMaxLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.LatLongRect parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.LatLongRect) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng minLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - public boolean hasMinLatLng() { - return minLatLngBuilder_ != null || minLatLng_ != null; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - public com.google.type.LatLng getMinLatLng() { - if (minLatLngBuilder_ == null) { - return minLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } else { - return minLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minLatLng_ = value; - onChanged(); - } else { - minLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder setMinLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (minLatLngBuilder_ == null) { - minLatLng_ = builderForValue.build(); - onChanged(); - } else { - minLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder mergeMinLatLng(com.google.type.LatLng value) { - if (minLatLngBuilder_ == null) { - if (minLatLng_ != null) { - minLatLng_ = - com.google.type.LatLng.newBuilder(minLatLng_).mergeFrom(value).buildPartial(); - } else { - minLatLng_ = value; - } - onChanged(); - } else { - minLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public Builder clearMinLatLng() { - if (minLatLngBuilder_ == null) { - minLatLng_ = null; - onChanged(); - } else { - minLatLng_ = null; - minLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLng.Builder getMinLatLngBuilder() { - - onChanged(); - return getMinLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { - if (minLatLngBuilder_ != null) { - return minLatLngBuilder_.getMessageOrBuilder(); - } else { - return minLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : minLatLng_; - } - } - /** - *
-     * Min lat/long pair.
-     * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMinLatLngFieldBuilder() { - if (minLatLngBuilder_ == null) { - minLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMinLatLng(), - getParentForChildren(), - isClean()); - minLatLng_ = null; - } - return minLatLngBuilder_; - } - - private com.google.type.LatLng maxLatLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - public boolean hasMaxLatLng() { - return maxLatLngBuilder_ != null || maxLatLng_ != null; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - public com.google.type.LatLng getMaxLatLng() { - if (maxLatLngBuilder_ == null) { - return maxLatLng_ == null ? com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } else { - return maxLatLngBuilder_.getMessage(); - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxLatLng_ = value; - onChanged(); - } else { - maxLatLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder setMaxLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = builderForValue.build(); - onChanged(); - } else { - maxLatLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder mergeMaxLatLng(com.google.type.LatLng value) { - if (maxLatLngBuilder_ == null) { - if (maxLatLng_ != null) { - maxLatLng_ = - com.google.type.LatLng.newBuilder(maxLatLng_).mergeFrom(value).buildPartial(); - } else { - maxLatLng_ = value; - } - onChanged(); - } else { - maxLatLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public Builder clearMaxLatLng() { - if (maxLatLngBuilder_ == null) { - maxLatLng_ = null; - onChanged(); - } else { - maxLatLng_ = null; - maxLatLngBuilder_ = null; - } - - return this; - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLng.Builder getMaxLatLngBuilder() { - - onChanged(); - return getMaxLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { - if (maxLatLngBuilder_ != null) { - return maxLatLngBuilder_.getMessageOrBuilder(); - } else { - return maxLatLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : maxLatLng_; - } - } - /** - *
-     * Max lat/long pair.
-     * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getMaxLatLngFieldBuilder() { - if (maxLatLngBuilder_ == null) { - maxLatLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getMaxLatLng(), - getParentForChildren(), - isClean()); - maxLatLng_ = null; - } - return maxLatLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LatLongRect) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LatLongRect) - private static final com.google.cloud.vision.v1p4beta1.LatLongRect DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LatLongRect(); - } - - public static com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LatLongRect parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LatLongRect(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LatLongRect getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java deleted file mode 100644 index cdbd20fc75c0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRectOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface LatLongRectOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LatLongRect) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return Whether the minLatLng field is set. - */ - boolean hasMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - * @return The minLatLng. - */ - com.google.type.LatLng getMinLatLng(); - /** - *
-   * Min lat/long pair.
-   * 
- * - * .google.type.LatLng min_lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getMinLatLngOrBuilder(); - - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return Whether the maxLatLng field is set. - */ - boolean hasMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - * @return The maxLatLng. - */ - com.google.type.LatLng getMaxLatLng(); - /** - *
-   * Max lat/long pair.
-   * 
- * - * .google.type.LatLng max_lat_lng = 2; - */ - com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java deleted file mode 100644 index c9e148cfe8f8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Likelihood.java +++ /dev/null @@ -1,202 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A bucketized representation of likelihood, which is intended to give clients
- * highly stable results across model upgrades.
- * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-   * It is very unlikely.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - *
-   * It is unlikely.
-   * 
- * - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * It is possible.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - *
-   * It is likely.
-   * 
- * - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * It is very likely.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown likelihood.
-   * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-   * It is very unlikely.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - *
-   * It is unlikely.
-   * 
- * - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * It is possible.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - *
-   * It is likely.
-   * 
- * - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * It is very likely.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.Likelihood) -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java deleted file mode 100644 index f06a7a0244ed..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsRequest} - */ -public final class ListProductSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - ListProductSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsRequest.newBuilder() to construct. - private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - com.google.cloud.vision.v1p4beta1.ListProductSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest build() { - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest result = new com.google.cloud.vision.v1p4beta1.ListProductSetsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductSetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductSetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project from which ProductSets should be listed.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - private static final com.google.cloud.vision.v1p4beta1.ListProductSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductSetsRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java deleted file mode 100644 index 123a9b78982c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequestOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project from which ProductSets should be listed.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java deleted file mode 100644 index 1f6d9f941880..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response message for the `ListProductSets` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsResponse} - */ -public final class ListProductSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - ListProductSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductSetsResponse.newBuilder() to construct. - private ListProductSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductSetsResponse() { - productSets_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductSetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductSetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productSets_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.Builder.class); - } - - public static final int PRODUCT_SETS_FIELD_NUMBER = 1; - private java.util.List productSets_; - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List getProductSetsList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public java.util.List - getProductSetsOrBuilderList() { - return productSets_; - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public int getProductSetsCount() { - return productSets_.size(); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index) { - return productSets_.get(index); - } - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - return productSets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < productSets_.size(); i++) { - output.writeMessage(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < productSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, productSets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) obj; - - if (!getProductSetsList() - .equals(other.getProductSetsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductSetsCount() > 0) { - hash = (37 * hash) + PRODUCT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getProductSetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductSets` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - com.google.cloud.vision.v1p4beta1.ListProductSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductSetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productSetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse build() { - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse result = new com.google.cloud.vision.v1p4beta1.ListProductSetsResponse(this); - int from_bitField0_ = bitField0_; - if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productSets_ = java.util.Collections.unmodifiableList(productSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productSets_ = productSets_; - } else { - result.productSets_ = productSetsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductSetsResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductSetsResponse.getDefaultInstance()) return this; - if (productSetsBuilder_ == null) { - if (!other.productSets_.isEmpty()) { - if (productSets_.isEmpty()) { - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductSetsIsMutable(); - productSets_.addAll(other.productSets_); - } - onChanged(); - } - } else { - if (!other.productSets_.isEmpty()) { - if (productSetsBuilder_.isEmpty()) { - productSetsBuilder_.dispose(); - productSetsBuilder_ = null; - productSets_ = other.productSets_; - bitField0_ = (bitField0_ & ~0x00000001); - productSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductSetsFieldBuilder() : null; - } else { - productSetsBuilder_.addAllMessages(other.productSets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductSetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List productSets_ = - java.util.Collections.emptyList(); - private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productSets_ = new java.util.ArrayList(productSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetsBuilder_; - - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public java.util.List getProductSetsList() { - if (productSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productSets_); - } else { - return productSetsBuilder_.getMessageList(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public int getProductSetsCount() { - if (productSetsBuilder_ == null) { - return productSets_.size(); - } else { - return productSetsBuilder_.getCount(); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); - } else { - return productSetsBuilder_.getMessage(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.set(index, value); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder setProductSets( - int index, com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.set(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets(com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(value); - onChanged(); - } else { - productSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductSetsIsMutable(); - productSets_.add(index, value); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder addProductSets( - int index, com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.add(index, builderForValue.build()); - onChanged(); - } else { - productSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder addAllProductSets( - java.lang.Iterable values) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productSets_); - onChanged(); - } else { - productSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder clearProductSets() { - if (productSetsBuilder_ == null) { - productSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productSetsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public Builder removeProductSets(int index) { - if (productSetsBuilder_ == null) { - ensureProductSetsIsMutable(); - productSets_.remove(index); - onChanged(); - } else { - productSetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index) { - if (productSetsBuilder_ == null) { - return productSets_.get(index); } else { - return productSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsOrBuilderList() { - if (productSetsBuilder_ != null) { - return productSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productSets_); - } - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet.Builder addProductSetsBuilder() { - return getProductSetsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet.Builder addProductSetsBuilder( - int index) { - return getProductSetsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()); - } - /** - *
-     * List of ProductSets.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - public java.util.List - getProductSetsBuilderList() { - return getProductSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> - getProductSetsFieldBuilder() { - if (productSetsBuilder_ == null) { - productSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productSets_ = null; - } - return productSetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - private static final com.google.cloud.vision.v1p4beta1.ListProductSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductSetsResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductSetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java deleted file mode 100644 index d7fb99296f89..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1p4beta1.ProductSet getProductSets(int index); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - int getProductSetsCount(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - java.util.List - getProductSetsOrBuilderList(); - /** - *
-   * List of ProductSets.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSet product_sets = 1; - */ - com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java deleted file mode 100644 index 5a3f3996fa3a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} - */ -public final class ListProductsInProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - ListProductsInProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetRequest.newBuilder() to construct. - private ListProductsInProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetRequest() { - name_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest result = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest(this); - result.name_ = name_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The ProductSet resource for which to retrieve Products.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java deleted file mode 100644 index d858818974e3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductsInProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The ProductSet resource for which to retrieve Products.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java deleted file mode 100644 index 87c18456e001..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response message for the `ListProductsInProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} - */ -public final class ListProductsInProductSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - ListProductsInProductSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsInProductSetResponse.newBuilder() to construct. - private ListProductsInProductSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsInProductSetResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsInProductSetResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsInProductSetResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProductsInProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse build() { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse result = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); - } - /** - *
-     * The list of Products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - private static final com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsInProductSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsInProductSetResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java deleted file mode 100644 index f3bf900416d1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductsInProductSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - com.google.cloud.vision.v1p4beta1.Product getProducts(int index); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * The list of Products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java deleted file mode 100644 index a9f76c9e55e3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java +++ /dev/null @@ -1,855 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsRequest} - */ -public final class ListProductsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsRequest) - ListProductsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsRequest.newBuilder() to construct. - private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsRequest) - com.google.cloud.vision.v1p4beta1.ListProductsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsRequest.class, com.google.cloud.vision.v1p4beta1.ListProductsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsRequest build() { - com.google.cloud.vision.v1p4beta1.ListProductsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductsRequest result = new com.google.cloud.vision.v1p4beta1.ListProductsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project OR ProductSet from which Products should be listed.
-     * Format:
-     * `projects/PROJECT_ID/locations/LOC_ID`
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsRequest) - private static final com.google.cloud.vision.v1p4beta1.ListProductsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java deleted file mode 100644 index 900fcf86f47b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequestOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project OR ProductSet from which Products should be listed.
-   * Format:
-   * `projects/PROJECT_ID/locations/LOC_ID`
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java deleted file mode 100644 index ac7a78e41b78..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response message for the `ListProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsResponse} - */ -public final class ListProductsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListProductsResponse) - ListProductsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListProductsResponse.newBuilder() to construct. - private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListProductsResponse() { - products_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListProductsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsResponse.Builder.class); - } - - public static final int PRODUCTS_FIELD_NUMBER = 1; - private java.util.List products_; - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List getProductsList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public java.util.List - getProductsOrBuilderList() { - return products_; - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public int getProductsCount() { - return products_.size(); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { - return products_.get(index); - } - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - return products_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < products_.size(); i++) { - output.writeMessage(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < products_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, products_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListProductsResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListProductsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsResponse) obj; - - if (!getProductsList() - .equals(other.getProductsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getProductsCount() > 0) { - hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + getProductsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListProductsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListProductsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListProductsResponse) - com.google.cloud.vision.v1p4beta1.ListProductsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListProductsResponse.class, com.google.cloud.vision.v1p4beta1.ListProductsResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsResponse build() { - com.google.cloud.vision.v1p4beta1.ListProductsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.ListProductsResponse result = new com.google.cloud.vision.v1p4beta1.ListProductsResponse(this); - int from_bitField0_ = bitField0_; - if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.products_ = products_; - } else { - result.products_ = productsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListProductsResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListProductsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListProductsResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.ListProductsResponse.getDefaultInstance()) return this; - if (productsBuilder_ == null) { - if (!other.products_.isEmpty()) { - if (products_.isEmpty()) { - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductsIsMutable(); - products_.addAll(other.products_); - } - onChanged(); - } - } else { - if (!other.products_.isEmpty()) { - if (productsBuilder_.isEmpty()) { - productsBuilder_.dispose(); - productsBuilder_ = null; - products_ = other.products_; - bitField0_ = (bitField0_ & ~0x00000001); - productsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductsFieldBuilder() : null; - } else { - productsBuilder_.addAllMessages(other.products_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListProductsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListProductsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List products_ = - java.util.Collections.emptyList(); - private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(products_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productsBuilder_; - - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List getProductsList() { - if (productsBuilder_ == null) { - return java.util.Collections.unmodifiableList(products_); - } else { - return productsBuilder_.getMessageList(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public int getProductsCount() { - if (productsBuilder_ == null) { - return products_.size(); - } else { - return productsBuilder_.getCount(); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product getProducts(int index) { - if (productsBuilder_ == null) { - return products_.get(index); - } else { - return productsBuilder_.getMessage(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.set(index, value); - onChanged(); - } else { - productsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder setProducts( - int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.set(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts(com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(value); - onChanged(); - } else { - productsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p4beta1.Product value) { - if (productsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductsIsMutable(); - products_.add(index, value); - onChanged(); - } else { - productsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addProducts( - int index, com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.add(index, builderForValue.build()); - onChanged(); - } else { - productsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder addAllProducts( - java.lang.Iterable values) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, products_); - onChanged(); - } else { - productsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder clearProducts() { - if (productsBuilder_ == null) { - products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public Builder removeProducts(int index) { - if (productsBuilder_ == null) { - ensureProductsIsMutable(); - products_.remove(index); - onChanged(); - } else { - productsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder getProductsBuilder( - int index) { - return getProductsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index) { - if (productsBuilder_ == null) { - return products_.get(index); } else { - return productsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List - getProductsOrBuilderList() { - if (productsBuilder_ != null) { - return productsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(products_); - } - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder() { - return getProductsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder( - int index) { - return getProductsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()); - } - /** - *
-     * List of products.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - public java.util.List - getProductsBuilderList() { - return getProductsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> - getProductsFieldBuilder() { - if (productsBuilder_ == null) { - productsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - products_ = null; - } - return productsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results, or empty if there are no more
-     * results in the list.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListProductsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsResponse) - private static final com.google.cloud.vision.v1p4beta1.ListProductsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListProductsResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListProductsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListProductsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java deleted file mode 100644 index 5844ea2a17da..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListProductsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListProductsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - java.util.List - getProductsList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - com.google.cloud.vision.v1p4beta1.Product getProducts(int index); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - int getProductsCount(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - java.util.List - getProductsOrBuilderList(); - /** - *
-   * List of products.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product products = 1; - */ - com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results, or empty if there are no more
-   * results in the list.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java deleted file mode 100644 index 45e744070dbf..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java +++ /dev/null @@ -1,869 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} - */ -public final class ListReferenceImagesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - ListReferenceImagesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesRequest.newBuilder() to construct. - private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest build() { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest result = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the product containing the reference images.
-     * Format is
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * A token identifying a page of results to be returned. This is the value
-     * of `nextPageToken` returned in a previous reference image list request.
-     * Defaults to the first page if not specified.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - private static final com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java deleted file mode 100644 index 421a0803343d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequestOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListReferenceImagesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Resource name of the product containing the reference images.
-   * Format is
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * A token identifying a page of results to be returned. This is the value
-   * of `nextPageToken` returned in a previous reference image list request.
-   * Defaults to the first page if not specified.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java deleted file mode 100644 index 3edd79740df4..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java +++ /dev/null @@ -1,1118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Response message for the `ListReferenceImages` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} - */ -public final class ListReferenceImagesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - ListReferenceImagesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListReferenceImagesResponse.newBuilder() to construct. - private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListReferenceImagesResponse() { - referenceImages_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListReferenceImagesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListReferenceImagesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - referenceImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ReferenceImage.parser(), extensionRegistry)); - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.Builder.class); - } - - public static final int REFERENCE_IMAGES_FIELD_NUMBER = 1; - private java.util.List referenceImages_; - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List getReferenceImagesList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public java.util.List - getReferenceImagesOrBuilderList() { - return referenceImages_; - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public int getReferenceImagesCount() { - return referenceImages_.size(); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { - return referenceImages_.get(index); - } - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - return referenceImages_.get(index); - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < referenceImages_.size(); i++) { - output.writeMessage(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < referenceImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, referenceImages_.get(i)); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) obj; - - if (!getReferenceImagesList() - .equals(other.getReferenceImagesList())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getReferenceImagesCount() > 0) { - hash = (37 * hash) + REFERENCE_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getReferenceImagesList().hashCode(); - } - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for the `ListReferenceImages` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.class, com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getReferenceImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - referenceImagesBuilder_.clear(); - } - pageSize_ = 0; - - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse build() { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse buildPartial() { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse result = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse(this); - int from_bitField0_ = bitField0_; - if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.referenceImages_ = referenceImages_; - } else { - result.referenceImages_ = referenceImagesBuilder_.build(); - } - result.pageSize_ = pageSize_; - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse other) { - if (other == com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.getDefaultInstance()) return this; - if (referenceImagesBuilder_ == null) { - if (!other.referenceImages_.isEmpty()) { - if (referenceImages_.isEmpty()) { - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReferenceImagesIsMutable(); - referenceImages_.addAll(other.referenceImages_); - } - onChanged(); - } - } else { - if (!other.referenceImages_.isEmpty()) { - if (referenceImagesBuilder_.isEmpty()) { - referenceImagesBuilder_.dispose(); - referenceImagesBuilder_ = null; - referenceImages_ = other.referenceImages_; - bitField0_ = (bitField0_ & ~0x00000001); - referenceImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getReferenceImagesFieldBuilder() : null; - } else { - referenceImagesBuilder_.addAllMessages(other.referenceImages_); - } - } - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List referenceImages_ = - java.util.Collections.emptyList(); - private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - referenceImages_ = new java.util.ArrayList(referenceImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> referenceImagesBuilder_; - - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List getReferenceImagesList() { - if (referenceImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(referenceImages_); - } else { - return referenceImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public int getReferenceImagesCount() { - if (referenceImagesBuilder_ == null) { - return referenceImages_.size(); - } else { - return referenceImagesBuilder_.getCount(); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); - } else { - return referenceImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, value); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder setReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages(com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage value) { - if (referenceImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, value); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addReferenceImages( - int index, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder builderForValue) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder addAllReferenceImages( - java.lang.Iterable values) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, referenceImages_); - onChanged(); - } else { - referenceImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder clearReferenceImages() { - if (referenceImagesBuilder_ == null) { - referenceImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - referenceImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public Builder removeReferenceImages(int index) { - if (referenceImagesBuilder_ == null) { - ensureReferenceImagesIsMutable(); - referenceImages_.remove(index); - onChanged(); - } else { - referenceImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder getReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index) { - if (referenceImagesBuilder_ == null) { - return referenceImages_.get(index); } else { - return referenceImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesOrBuilderList() { - if (referenceImagesBuilder_ != null) { - return referenceImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(referenceImages_); - } - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder() { - return getReferenceImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImagesBuilder( - int index) { - return getReferenceImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()); - } - /** - *
-     * The list of reference images.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - public java.util.List - getReferenceImagesBuilderList() { - return getReferenceImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder> - getReferenceImagesFieldBuilder() { - if (referenceImagesBuilder_ == null) { - referenceImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( - referenceImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - referenceImages_ = null; - } - return referenceImagesBuilder_; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of items to return. Default 10, maximum 100.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * The next_page_token returned from a previous List request, if any.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - private static final com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse(); - } - - public static com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListReferenceImagesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferenceImagesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java deleted file mode 100644 index 0460633c3e20..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponseOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ListReferenceImagesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImages(int index); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - int getReferenceImagesCount(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - java.util.List - getReferenceImagesOrBuilderList(); - /** - *
-   * The list of reference images.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ReferenceImage reference_images = 1; - */ - com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder getReferenceImagesOrBuilder( - int index); - - /** - *
-   * The maximum number of items to return. Default 10, maximum 100.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The next_page_token returned from a previous List request, if any.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java deleted file mode 100644 index d1e2d9eafadc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java +++ /dev/null @@ -1,1259 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Set of detected objects with bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} - */ -public final class LocalizedObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - LocalizedObjectAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocalizedObjectAnnotation.newBuilder() to construct. - private LocalizedObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocalizedObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocalizedObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocalizedObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - case 42: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 5; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - if (boundingPoly_ != null) { - output.writeMessage(5, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of detected objects with bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocalizedObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation build() { - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation result = new com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * Image region to which this object belongs. This must be populated.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - private static final com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocalizedObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalizedObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java deleted file mode 100644 index f73265e41746..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotationOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface LocalizedObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-   * Object ID that should align with EntityAnnotation mid.
-   * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-   * information, see
-   * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-   * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Object name, expressed in its `language_code` language.
-   * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Score of the result. Range [0, 1].
-   * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * Image region to which this object belongs. This must be populated.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 5; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java deleted file mode 100644 index 7f8849a10f22..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Detected entity location information.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LocationInfo} - */ -public final class LocationInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.LocationInfo) - LocationInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use LocationInfo.newBuilder() to construct. - private LocationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LocationInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LocationInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LocationInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.LatLng.Builder subBuilder = null; - if (latLng_ != null) { - subBuilder = latLng_.toBuilder(); - } - latLng_ = input.readMessage(com.google.type.LatLng.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(latLng_); - latLng_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LocationInfo.class, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder.class); - } - - public static final int LAT_LNG_FIELD_NUMBER = 1; - private com.google.type.LatLng latLng_; - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - @java.lang.Override - public boolean hasLatLng() { - return latLng_ != null; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - @java.lang.Override - public com.google.type.LatLng getLatLng() { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - @java.lang.Override - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - return getLatLng(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latLng_ != null) { - output.writeMessage(1, getLatLng()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latLng_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLatLng()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.LocationInfo)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.LocationInfo other = (com.google.cloud.vision.v1p4beta1.LocationInfo) obj; - - if (hasLatLng() != other.hasLatLng()) return false; - if (hasLatLng()) { - if (!getLatLng() - .equals(other.getLatLng())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLatLng()) { - hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; - hash = (53 * hash) + getLatLng().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.LocationInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.LocationInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected entity location information.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.LocationInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.LocationInfo) - com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.LocationInfo.class, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.LocationInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (latLngBuilder_ == null) { - latLng_ = null; - } else { - latLng_ = null; - latLngBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_LocationInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfo build() { - com.google.cloud.vision.v1p4beta1.LocationInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfo buildPartial() { - com.google.cloud.vision.v1p4beta1.LocationInfo result = new com.google.cloud.vision.v1p4beta1.LocationInfo(this); - if (latLngBuilder_ == null) { - result.latLng_ = latLng_; - } else { - result.latLng_ = latLngBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.LocationInfo) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.LocationInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.LocationInfo other) { - if (other == com.google.cloud.vision.v1p4beta1.LocationInfo.getDefaultInstance()) return this; - if (other.hasLatLng()) { - mergeLatLng(other.getLatLng()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.LocationInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.LocationInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.LatLng latLng_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - public boolean hasLatLng() { - return latLngBuilder_ != null || latLng_ != null; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - public com.google.type.LatLng getLatLng() { - if (latLngBuilder_ == null) { - return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; - } else { - return latLngBuilder_.getMessage(); - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - latLng_ = value; - onChanged(); - } else { - latLngBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder setLatLng( - com.google.type.LatLng.Builder builderForValue) { - if (latLngBuilder_ == null) { - latLng_ = builderForValue.build(); - onChanged(); - } else { - latLngBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder mergeLatLng(com.google.type.LatLng value) { - if (latLngBuilder_ == null) { - if (latLng_ != null) { - latLng_ = - com.google.type.LatLng.newBuilder(latLng_).mergeFrom(value).buildPartial(); - } else { - latLng_ = value; - } - onChanged(); - } else { - latLngBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public Builder clearLatLng() { - if (latLngBuilder_ == null) { - latLng_ = null; - onChanged(); - } else { - latLng_ = null; - latLngBuilder_ = null; - } - - return this; - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLng.Builder getLatLngBuilder() { - - onChanged(); - return getLatLngFieldBuilder().getBuilder(); - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { - if (latLngBuilder_ != null) { - return latLngBuilder_.getMessageOrBuilder(); - } else { - return latLng_ == null ? - com.google.type.LatLng.getDefaultInstance() : latLng_; - } - } - /** - *
-     * lat/long location coordinates.
-     * 
- * - * .google.type.LatLng lat_lng = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> - getLatLngFieldBuilder() { - if (latLngBuilder_ == null) { - latLngBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>( - getLatLng(), - getParentForChildren(), - isClean()); - latLng_ = null; - } - return latLngBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.LocationInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocationInfo) - private static final com.google.cloud.vision.v1p4beta1.LocationInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.LocationInfo(); - } - - public static com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LocationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.LocationInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java deleted file mode 100644 index f186f7fc05ec..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface LocationInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.LocationInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return Whether the latLng field is set. - */ - boolean hasLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - * @return The latLng. - */ - com.google.type.LatLng getLatLng(); - /** - *
-   * lat/long location coordinates.
-   * 
- * - * .google.type.LatLng lat_lng = 1; - */ - com.google.type.LatLngOrBuilder getLatLngOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java deleted file mode 100644 index be3765fca205..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java deleted file mode 100644 index 8a6062a4abb5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java +++ /dev/null @@ -1,597 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the normalized vertex coordinates are relative to the original image
- * and range from 0 to 1.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.NormalizedVertex} - */ -public final class NormalizedVertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.NormalizedVertex) - NormalizedVertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use NormalizedVertex.newBuilder() to construct. - private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NormalizedVertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NormalizedVertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedVertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.NormalizedVertex.class, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.NormalizedVertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.NormalizedVertex other = (com.google.cloud.vision.v1p4beta1.NormalizedVertex) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.NormalizedVertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the normalized vertex coordinates are relative to the original image
-   * and range from 0 to 1.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.NormalizedVertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.NormalizedVertex) - com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.NormalizedVertex.class, com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.NormalizedVertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertex build() { - com.google.cloud.vision.v1p4beta1.NormalizedVertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertex buildPartial() { - com.google.cloud.vision.v1p4beta1.NormalizedVertex result = new com.google.cloud.vision.v1p4beta1.NormalizedVertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.NormalizedVertex) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.NormalizedVertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.NormalizedVertex other) { - if (other == com.google.cloud.vision.v1p4beta1.NormalizedVertex.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.NormalizedVertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.NormalizedVertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.NormalizedVertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.NormalizedVertex) - private static final com.google.cloud.vision.v1p4beta1.NormalizedVertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.NormalizedVertex(); - } - - public static com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NormalizedVertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedVertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.NormalizedVertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java deleted file mode 100644 index 80edfacff25d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface NormalizedVertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.NormalizedVertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java deleted file mode 100644 index 87edb7fc713d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java +++ /dev/null @@ -1,1204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Contains metadata for the BatchAnnotateImages operation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.OperationMetadata} - */ -public final class OperationMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.OperationMetadata) - OperationMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OperationMetadata() { - state_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.OperationMetadata.class, com.google.cloud.vision.v1p4beta1.OperationMetadata.Builder.class); - } - - /** - *
-   * Batch operation states.
-   * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.OperationMetadata.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - CREATED(1), - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - DONE(3), - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Invalid.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Request is received.
-     * 
- * - * CREATED = 1; - */ - public static final int CREATED_VALUE = 1; - /** - *
-     * Request is actively being processed.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - *
-     * The batch processing is done.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - /** - *
-     * The batch processing was cancelled.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return CREATED; - case 2: return RUNNING; - case 3: return DONE; - case 4: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.OperationMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.OperationMetadata.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.OperationMetadata.State result = com.google.cloud.vision.v1p4beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p4beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (state_ != com.google.cloud.vision.v1p4beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.vision.v1p4beta1.OperationMetadata.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.OperationMetadata other = (com.google.cloud.vision.v1p4beta1.OperationMetadata) obj; - - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains metadata for the BatchAnnotateImages operation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.OperationMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.OperationMetadata) - com.google.cloud.vision.v1p4beta1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.OperationMetadata.class, com.google.cloud.vision.v1p4beta1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OperationMetadata build() { - com.google.cloud.vision.v1p4beta1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OperationMetadata buildPartial() { - com.google.cloud.vision.v1p4beta1.OperationMetadata result = new com.google.cloud.vision.v1p4beta1.OperationMetadata(this); - result.state_ = state_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.OperationMetadata) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.OperationMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.OperationMetadata other) { - if (other == com.google.cloud.vision.v1p4beta1.OperationMetadata.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The state. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.OperationMetadata.State result = com.google.cloud.vision.v1p4beta1.OperationMetadata.State.valueOf(state_); - return result == null ? com.google.cloud.vision.v1p4beta1.OperationMetadata.State.UNRECOGNIZED : result; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.vision.v1p4beta1.OperationMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Current state of the batch operation.
-     * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time when the batch request was received.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The time when the operation result was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OperationMetadata) - private static final com.google.cloud.vision.v1p4beta1.OperationMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.OperationMetadata(); - } - - public static com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java deleted file mode 100644 index 3bb8651242c7..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface OperationMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Current state of the batch operation.
-   * 
- * - * .google.cloud.vision.v1p4beta1.OperationMetadata.State state = 1; - * @return The state. - */ - com.google.cloud.vision.v1p4beta1.OperationMetadata.State getState(); - - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time when the batch request was received.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The time when the operation result was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java deleted file mode 100644 index 6bdb7e150e4e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java +++ /dev/null @@ -1,777 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * The desired output location and metadata.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.GcsDestination.Builder subBuilder = null; - if (gcsDestination_ != null) { - subBuilder = gcsDestination_.toBuilder(); - } - gcsDestination_ = input.readMessage(com.google.cloud.vision.v1p4beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsDestination_); - gcsDestination_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - batchSize_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.OutputConfig.class, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder.class); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_; - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return gcsDestination_ != null; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination() { - return gcsDestination_ == null ? com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - return getGcsDestination(); - } - - public static final int BATCH_SIZE_FIELD_NUMBER = 2; - private int batchSize_; - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (gcsDestination_ != null) { - output.writeMessage(1, getGcsDestination()); - } - if (batchSize_ != 0) { - output.writeInt32(2, batchSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsDestination_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getGcsDestination()); - } - if (batchSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, batchSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.OutputConfig other = (com.google.cloud.vision.v1p4beta1.OutputConfig) obj; - - if (hasGcsDestination() != other.hasGcsDestination()) return false; - if (hasGcsDestination()) { - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - } - if (getBatchSize() - != other.getBatchSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasGcsDestination()) { - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - } - hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getBatchSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The desired output location and metadata.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.OutputConfig) - com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.OutputConfig.class, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - batchSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig build() { - com.google.cloud.vision.v1p4beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig buildPartial() { - com.google.cloud.vision.v1p4beta1.OutputConfig result = new com.google.cloud.vision.v1p4beta1.OutputConfig(this); - if (gcsDestinationBuilder_ == null) { - result.gcsDestination_ = gcsDestination_; - } else { - result.gcsDestination_ = gcsDestinationBuilder_.build(); - } - result.batchSize_ = batchSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.OutputConfig) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.OutputConfig other) { - if (other == com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()) return this; - if (other.hasGcsDestination()) { - mergeGcsDestination(other.getGcsDestination()); - } - if (other.getBatchSize() != 0) { - setBatchSize(other.getBatchSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return gcsDestinationBuilder_ != null || gcsDestination_ != null; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - public com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - return gcsDestination_ == null ? com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } else { - return gcsDestinationBuilder_.getMessage(); - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.vision.v1p4beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsDestination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.vision.v1p4beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.vision.v1p4beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (gcsDestination_ != null) { - gcsDestination_ = - com.google.cloud.vision.v1p4beta1.GcsDestination.newBuilder(gcsDestination_).mergeFrom(value).buildPartial(); - } else { - gcsDestination_ = value; - } - onChanged(); - } else { - gcsDestinationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - gcsDestination_ = null; - onChanged(); - } else { - gcsDestination_ = null; - gcsDestinationBuilder_ = null; - } - - return this; - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p4beta1.GcsDestination.Builder getGcsDestinationBuilder() { - - onChanged(); - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (gcsDestinationBuilder_ != null) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - return gcsDestination_ == null ? - com.google.cloud.vision.v1p4beta1.GcsDestination.getDefaultInstance() : gcsDestination_; - } - } - /** - *
-     * The Google Cloud Storage location to write the output(s) to.
-     * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder>( - getGcsDestination(), - getParentForChildren(), - isClean()); - gcsDestination_ = null; - } - return gcsDestinationBuilder_; - } - - private int batchSize_ ; - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - @java.lang.Override - public int getBatchSize() { - return batchSize_; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @param value The batchSize to set. - * @return This builder for chaining. - */ - public Builder setBatchSize(int value) { - - batchSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The max number of response protos to put into each output JSON file on
-     * Google Cloud Storage.
-     * The valid range is [1, 100]. If not specified, the default value is 20.
-     * For example, for one pdf file with 100 pages, 100 response protos will
-     * be generated. If `batch_size` = 20, then 5 json files each
-     * containing 20 response protos will be written under the prefix
-     * `gcs_destination`.`uri`.
-     * Currently, batch_size only applies to GcsDestination, with potential future
-     * support for other output configurations.
-     * 
- * - * int32 batch_size = 2; - * @return This builder for chaining. - */ - public Builder clearBatchSize() { - - batchSize_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OutputConfig) - private static final com.google.cloud.vision.v1p4beta1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.OutputConfig(); - } - - public static com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 3548d5df257c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.vision.v1p4beta1.GcsDestination getGcsDestination(); - /** - *
-   * The Google Cloud Storage location to write the output(s) to.
-   * 
- * - * .google.cloud.vision.v1p4beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.vision.v1p4beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * The max number of response protos to put into each output JSON file on
-   * Google Cloud Storage.
-   * The valid range is [1, 100]. If not specified, the default value is 20.
-   * For example, for one pdf file with 100 pages, 100 response protos will
-   * be generated. If `batch_size` = 20, then 5 json files each
-   * containing 20 response protos will be written under the prefix
-   * `gcs_destination`.`uri`.
-   * Currently, batch_size only applies to GcsDestination, with potential future
-   * support for other output configurations.
-   * 
- * - * int32 batch_size = 2; - * @return The batchSize. - */ - int getBatchSize(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java deleted file mode 100644 index 779046420894..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java +++ /dev/null @@ -1,1358 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Detected page from OCR.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Page} - */ -public final class Page extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Page) - PageOrBuilder { -private static final long serialVersionUID = 0L; - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Page() { - blocks_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Page(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - width_ = input.readInt32(); - break; - } - case 24: { - - height_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blocks_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Block.parser(), extensionRegistry)); - break; - } - case 45: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Page.class, com.google.cloud.vision.v1p4beta1.Page.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private int width_; - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int BLOCKS_FIELD_NUMBER = 4; - private java.util.List blocks_; - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List getBlocksList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - @java.lang.Override - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - @java.lang.Override - public int getBlocksCount() { - return blocks_.size(); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Block getBlocks(int index) { - return blocks_.get(index); - } - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 5; - private float confidence_; - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (width_ != 0) { - output.writeInt32(2, width_); - } - if (height_ != 0) { - output.writeInt32(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(5, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, height_); - } - for (int i = 0; i < blocks_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, blocks_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Page)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Page other = (com.google.cloud.vision.v1p4beta1.Page) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!getBlocksList() - .equals(other.getBlocksList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - if (getBlocksCount() > 0) { - hash = (37 * hash) + BLOCKS_FIELD_NUMBER; - hash = (53 * hash) + getBlocksList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Detected page from OCR.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Page} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Page) - com.google.cloud.vision.v1p4beta1.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Page.class, com.google.cloud.vision.v1p4beta1.Page.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - width_ = 0; - - height_ = 0; - - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Page getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Page build() { - com.google.cloud.vision.v1p4beta1.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Page buildPartial() { - com.google.cloud.vision.v1p4beta1.Page result = new com.google.cloud.vision.v1p4beta1.Page(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - result.width_ = width_; - result.height_ = height_; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Page) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Page other) { - if (other == com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Page) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected on the page.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private int width_ ; - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Page width. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 width = 2; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Page height. For PDFs the unit is points. For images (including
-     * TIFFs) the unit is pixels.
-     * 
- * - * int32 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder> blocksBuilder_; - - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p4beta1.Block getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p4beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder setBlocks( - int index, com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder addBlocks(com.google.cloud.vision.v1p4beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p4beta1.Block value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder addBlocks( - com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder addBlocks( - int index, com.google.cloud.vision.v1p4beta1.Block.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder addAllBlocks( - java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p4beta1.Block.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p4beta1.Block.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public com.google.cloud.vision.v1p4beta1.Block.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Block.getDefaultInstance()); - } - /** - *
-     * List of blocks of text, images etc on this page.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results on the page. Range [0, 1].
-     * 
- * - * float confidence = 5; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Page) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Page) - private static final com.google.cloud.vision.v1p4beta1.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Page(); - } - - public static com.google.cloud.vision.v1p4beta1.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Page(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java deleted file mode 100644 index 28ea75a681c2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PageOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Page) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected on the page.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * Page width. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 width = 2; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Page height. For PDFs the unit is points. For images (including
-   * TIFFs) the unit is pixels.
-   * 
- * - * int32 height = 3; - * @return The height. - */ - int getHeight(); - - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - java.util.List - getBlocksList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p4beta1.Block getBlocks(int index); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - int getBlocksCount(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - java.util.List - getBlocksOrBuilderList(); - /** - *
-   * List of blocks of text, images etc on this page.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Block blocks = 4; - */ - com.google.cloud.vision.v1p4beta1.BlockOrBuilder getBlocksOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results on the page. Range [0, 1].
-   * 
- * - * float confidence = 5; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java deleted file mode 100644 index b12009a759f3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Structural unit of text representing a number of words in certain order.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Paragraph} - */ -public final class Paragraph extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Paragraph) - ParagraphOrBuilder { -private static final long serialVersionUID = 0L; - // Use Paragraph.newBuilder() to construct. - private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Paragraph() { - words_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Paragraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Paragraph( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Word.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Paragraph.class, com.google.cloud.vision.v1p4beta1.Paragraph.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int WORDS_FIELD_NUMBER = 3; - private java.util.List words_; - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List getWordsList() { - return words_; - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - @java.lang.Override - public java.util.List - getWordsOrBuilderList() { - return words_; - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - @java.lang.Override - public int getWordsCount() { - return words_.size(); - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Word getWords(int index) { - return words_.get(index); - } - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( - int index) { - return words_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - output.writeMessage(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < words_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, words_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Paragraph)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Paragraph other = (com.google.cloud.vision.v1p4beta1.Paragraph) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Paragraph parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Paragraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structural unit of text representing a number of words in certain order.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Paragraph} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Paragraph) - com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Paragraph.class, com.google.cloud.vision.v1p4beta1.Paragraph.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Paragraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWordsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - wordsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Paragraph build() { - com.google.cloud.vision.v1p4beta1.Paragraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Paragraph buildPartial() { - com.google.cloud.vision.v1p4beta1.Paragraph result = new com.google.cloud.vision.v1p4beta1.Paragraph(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - words_ = java.util.Collections.unmodifiableList(words_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - } else { - result.words_ = wordsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Paragraph) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Paragraph)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Paragraph other) { - if (other == com.google.cloud.vision.v1p4beta1.Paragraph.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (wordsBuilder_ == null) { - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - } else { - if (!other.words_.isEmpty()) { - if (wordsBuilder_.isEmpty()) { - wordsBuilder_.dispose(); - wordsBuilder_ = null; - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - wordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWordsFieldBuilder() : null; - } else { - wordsBuilder_.addAllMessages(other.words_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Paragraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Paragraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the paragraph.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the paragraph.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List words_ = - java.util.Collections.emptyList(); - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new java.util.ArrayList(words_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder> wordsBuilder_; - - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public java.util.List getWordsList() { - if (wordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(words_); - } else { - return wordsBuilder_.getMessageList(); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public int getWordsCount() { - if (wordsBuilder_ == null) { - return words_.size(); - } else { - return wordsBuilder_.getCount(); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p4beta1.Word getWords(int index) { - if (wordsBuilder_ == null) { - return words_.get(index); - } else { - return wordsBuilder_.getMessage(index); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p4beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - } else { - wordsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder setWords( - int index, com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.set(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder addWords(com.google.cloud.vision.v1p4beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - } else { - wordsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p4beta1.Word value) { - if (wordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(index, value); - onChanged(); - } else { - wordsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder addWords( - com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder addWords( - int index, com.google.cloud.vision.v1p4beta1.Word.Builder builderForValue) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.add(index, builderForValue.build()); - onChanged(); - } else { - wordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder addAllWords( - java.lang.Iterable values) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - } else { - wordsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder clearWords() { - if (wordsBuilder_ == null) { - words_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - wordsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public Builder removeWords(int index) { - if (wordsBuilder_ == null) { - ensureWordsIsMutable(); - words_.remove(index); - onChanged(); - } else { - wordsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p4beta1.Word.Builder getWordsBuilder( - int index) { - return getWordsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( - int index) { - if (wordsBuilder_ == null) { - return words_.get(index); } else { - return wordsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public java.util.List - getWordsOrBuilderList() { - if (wordsBuilder_ != null) { - return wordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(words_); - } - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p4beta1.Word.Builder addWordsBuilder() { - return getWordsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public com.google.cloud.vision.v1p4beta1.Word.Builder addWordsBuilder( - int index) { - return getWordsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()); - } - /** - *
-     * List of all words in this paragraph.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - public java.util.List - getWordsBuilderList() { - return getWordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder> - getWordsFieldBuilder() { - if (wordsBuilder_ == null) { - wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - words_ = null; - } - return wordsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the paragraph. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Paragraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Paragraph) - private static final com.google.cloud.vision.v1p4beta1.Paragraph DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Paragraph(); - } - - public static com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Paragraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Paragraph(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Paragraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java deleted file mode 100644 index 96b5616591ee..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ParagraphOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ParagraphOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Paragraph) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the paragraph.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the paragraph.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - java.util.List - getWordsList(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - com.google.cloud.vision.v1p4beta1.Word getWords(int index); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - int getWordsCount(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - java.util.List - getWordsOrBuilderList(); - /** - *
-   * List of all words in this paragraph.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Word words = 3; - */ - com.google.cloud.vision.v1p4beta1.WordOrBuilder getWordsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the paragraph. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java deleted file mode 100644 index 78d4cbbeb7a0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A 3D position in the image, used primarily for Face detection landmarks.
- * A valid Position must have both x and y coordinates.
- * The position coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Position} - */ -public final class Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Position) - PositionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Position.newBuilder() to construct. - private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Position() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Position(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Position( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - x_ = input.readFloat(); - break; - } - case 21: { - - y_ = input.readFloat(); - break; - } - case 29: { - - z_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Position.class, com.google.cloud.vision.v1p4beta1.Position.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - - public static final int Z_FIELD_NUMBER = 3; - private float z_; - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - output.writeFloat(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - output.writeFloat(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - output.writeFloat(3, z_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(x_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, x_); - } - if (java.lang.Float.floatToRawIntBits(y_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, y_); - } - if (java.lang.Float.floatToRawIntBits(z_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, z_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Position)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Position other = (com.google.cloud.vision.v1p4beta1.Position) obj; - - if (java.lang.Float.floatToIntBits(getX()) - != java.lang.Float.floatToIntBits( - other.getX())) return false; - if (java.lang.Float.floatToIntBits(getY()) - != java.lang.Float.floatToIntBits( - other.getY())) return false; - if (java.lang.Float.floatToIntBits(getZ()) - != java.lang.Float.floatToIntBits( - other.getZ())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getY()); - hash = (37 * hash) + Z_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getZ()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A 3D position in the image, used primarily for Face detection landmarks.
-   * A valid Position must have both x and y coordinates.
-   * The position coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Position) - com.google.cloud.vision.v1p4beta1.PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Position.class, com.google.cloud.vision.v1p4beta1.Position.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Position.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - z_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Position_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Position getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Position build() { - com.google.cloud.vision.v1p4beta1.Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Position buildPartial() { - com.google.cloud.vision.v1p4beta1.Position result = new com.google.cloud.vision.v1p4beta1.Position(this); - result.x_ = x_; - result.y_ = y_; - result.z_ = z_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Position) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Position other) { - if (other == com.google.cloud.vision.v1p4beta1.Position.getDefaultInstance()) return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - if (other.getZ() != 0F) { - setZ(other.getZ()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Position parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return The x. - */ - @java.lang.Override - public float getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * float x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return The y. - */ - @java.lang.Override - public float getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * float y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0F; - onChanged(); - return this; - } - - private float z_ ; - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return The z. - */ - @java.lang.Override - public float getZ() { - return z_; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @param value The z to set. - * @return This builder for chaining. - */ - public Builder setZ(float value) { - - z_ = value; - onChanged(); - return this; - } - /** - *
-     * Z coordinate (or depth).
-     * 
- * - * float z = 3; - * @return This builder for chaining. - */ - public Builder clearZ() { - - z_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Position) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Position) - private static final com.google.cloud.vision.v1p4beta1.Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Position(); - } - - public static com.google.cloud.vision.v1p4beta1.Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Position parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java deleted file mode 100644 index 780b193f9927..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PositionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Position) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * float x = 1; - * @return The x. - */ - float getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * float y = 2; - * @return The y. - */ - float getY(); - - /** - *
-   * Z coordinate (or depth).
-   * 
- * - * float z = 3; - * @return The z. - */ - float getZ(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java deleted file mode 100644 index e00e0bca2587..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java +++ /dev/null @@ -1,2617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A Product contains ReferenceImages.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Product} - */ -public final class Product extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Product) - ProductOrBuilder { -private static final long serialVersionUID = 0L; - // Use Product.newBuilder() to construct. - private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Product() { - name_ = ""; - displayName_ = ""; - description_ = ""; - productCategory_ = ""; - productLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Product(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - productCategory_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productLabels_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Product.KeyValue.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Product.class, com.google.cloud.vision.v1p4beta1.Product.Builder.class); - } - - public interface KeyValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Product.KeyValue) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - java.lang.String getKey(); - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - *
-   * A product label represented as a key-value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Product.KeyValue} - */ - public static final class KeyValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Product.KeyValue) - KeyValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use KeyValue.newBuilder() to construct. - private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KeyValue() { - key_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KeyValue(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KeyValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Product.KeyValue.class, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - *
-     * The key of the label attached to the product. Cannot be empty and cannot
-     * exceed 128 bytes.
-     * 
- * - * string key = 1; - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-     * The value of the label attached to the product. Cannot be empty and
-     * cannot exceed 128 bytes.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Product.KeyValue)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Product.KeyValue other = (com.google.cloud.vision.v1p4beta1.Product.KeyValue) obj; - - if (!getKey() - .equals(other.getKey())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Product.KeyValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A product label represented as a key-value pair.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Product.KeyValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Product.KeyValue) - com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Product.KeyValue.class, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Product.KeyValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - key_ = ""; - - value_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValue build() { - com.google.cloud.vision.v1p4beta1.Product.KeyValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValue buildPartial() { - com.google.cloud.vision.v1p4beta1.Product.KeyValue result = new com.google.cloud.vision.v1p4beta1.Product.KeyValue(this); - result.key_ = key_; - result.value_ = value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Product.KeyValue) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Product.KeyValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Product.KeyValue other) { - if (other == com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Product.KeyValue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Product.KeyValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return The bytes for key. - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - *
-       * The key of the label attached to the product. Cannot be empty and cannot
-       * exceed 128 bytes.
-       * 
- * - * string key = 1; - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-       * The value of the label attached to the product. Cannot be empty and
-       * cannot exceed 128 bytes.
-       * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Product.KeyValue) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product.KeyValue) - private static final com.google.cloud.vision.v1p4beta1.Product.KeyValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Product.KeyValue(); - } - - public static com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KeyValue parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValue(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORY_FIELD_NUMBER = 4; - private volatile java.lang.Object productCategory_; - /** - *
-   * Immutable. The category for the product identified by the reference image.
-   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-   * legacy categories "homegoods", "apparel", and "toys" are still supported,
-   * but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - @java.lang.Override - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } - } - /** - *
-   * Immutable. The category for the product identified by the reference image.
-   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-   * legacy categories "homegoods", "apparel", and "toys" are still supported,
-   * but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_LABELS_FIELD_NUMBER = 5; - private java.util.List productLabels_; - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List getProductLabelsList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public java.util.List - getProductLabelsOrBuilderList() { - return productLabels_; - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public int getProductLabelsCount() { - return productLabels_.size(); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index) { - return productLabels_.get(index); - } - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - return productLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - output.writeMessage(5, productLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCategory_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, productCategory_); - } - for (int i = 0; i < productLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, productLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Product)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Product other = (com.google.cloud.vision.v1p4beta1.Product) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getProductCategory() - .equals(other.getProductCategory())) return false; - if (!getProductLabelsList() - .equals(other.getProductLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + PRODUCT_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getProductCategory().hashCode(); - if (getProductLabelsCount() > 0) { - hash = (37 * hash) + PRODUCT_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getProductLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Product parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Product prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Product contains ReferenceImages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Product} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Product) - com.google.cloud.vision.v1p4beta1.ProductOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Product.class, com.google.cloud.vision.v1p4beta1.Product.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getProductLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - productCategory_ = ""; - - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product build() { - com.google.cloud.vision.v1p4beta1.Product result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product buildPartial() { - com.google.cloud.vision.v1p4beta1.Product result = new com.google.cloud.vision.v1p4beta1.Product(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.productCategory_ = productCategory_; - if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - productLabels_ = java.util.Collections.unmodifiableList(productLabels_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productLabels_ = productLabels_; - } else { - result.productLabels_ = productLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Product) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Product)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Product other) { - if (other == com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getProductCategory().isEmpty()) { - productCategory_ = other.productCategory_; - onChanged(); - } - if (productLabelsBuilder_ == null) { - if (!other.productLabels_.isEmpty()) { - if (productLabels_.isEmpty()) { - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductLabelsIsMutable(); - productLabels_.addAll(other.productLabels_); - } - onChanged(); - } - } else { - if (!other.productLabels_.isEmpty()) { - if (productLabelsBuilder_.isEmpty()) { - productLabelsBuilder_.dispose(); - productLabelsBuilder_ = null; - productLabels_ = other.productLabels_; - bitField0_ = (bitField0_ & ~0x00000001); - productLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductLabelsFieldBuilder() : null; - } else { - productLabelsBuilder_.addAllMessages(other.productLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Product parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Product) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the product.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-     * This field is ignored when creating a product.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this Product. Must not be empty. Must be at most
-     * 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * User-provided metadata to be stored with this product. Must be at most 4096
-     * characters long.
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object productCategory_ = ""; - /** - *
-     * Immutable. The category for the product identified by the reference image.
-     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-     * legacy categories "homegoods", "apparel", and "toys" are still supported,
-     * but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - public java.lang.String getProductCategory() { - java.lang.Object ref = productCategory_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productCategory_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image.
-     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-     * legacy categories "homegoods", "apparel", and "toys" are still supported,
-     * but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - public com.google.protobuf.ByteString - getProductCategoryBytes() { - java.lang.Object ref = productCategory_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productCategory_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Immutable. The category for the product identified by the reference image.
-     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-     * legacy categories "homegoods", "apparel", and "toys" are still supported,
-     * but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategory( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productCategory_ = value; - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image.
-     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-     * legacy categories "homegoods", "apparel", and "toys" are still supported,
-     * but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return This builder for chaining. - */ - public Builder clearProductCategory() { - - productCategory_ = getDefaultInstance().getProductCategory(); - onChanged(); - return this; - } - /** - *
-     * Immutable. The category for the product identified by the reference image.
-     * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-     * legacy categories "homegoods", "apparel", and "toys" are still supported,
-     * but these should not be used for new products.
-     * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param value The bytes for productCategory to set. - * @return This builder for chaining. - */ - public Builder setProductCategoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productCategory_ = value; - onChanged(); - return this; - } - - private java.util.List productLabels_ = - java.util.Collections.emptyList(); - private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productLabels_ = new java.util.ArrayList(productLabels_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder> productLabelsBuilder_; - - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List getProductLabelsList() { - if (productLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productLabels_); - } else { - return productLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public int getProductLabelsCount() { - if (productLabelsBuilder_ == null) { - return productLabels_.size(); - } else { - return productLabelsBuilder_.getCount(); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); - } else { - return productLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.set(index, value); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder setProductLabels( - int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels(com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue value) { - if (productLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductLabelsIsMutable(); - productLabels_.add(index, value); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder addProductLabels( - int index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder builderForValue) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - productLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder addAllProductLabels( - java.lang.Iterable values) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productLabels_); - onChanged(); - } else { - productLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder clearProductLabels() { - if (productLabelsBuilder_ == null) { - productLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - productLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public Builder removeProductLabels(int index) { - if (productLabelsBuilder_ == null) { - ensureProductLabelsIsMutable(); - productLabels_.remove(index); - onChanged(); - } else { - productLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder getProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index) { - if (productLabelsBuilder_ == null) { - return productLabels_.get(index); } else { - return productLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsOrBuilderList() { - if (productLabelsBuilder_ != null) { - return productLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productLabels_); - } - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabelsBuilder() { - return getProductLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabelsBuilder( - int index) { - return getProductLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Product.KeyValue.getDefaultInstance()); - } - /** - *
-     * Key-value pairs that can be attached to a product. At query time,
-     * constraints can be specified based on the product_labels.
-     * Note that integer values can be provided as strings, e.g. "1199". Only
-     * strings with integer values can match a range-based restriction which is
-     * to be supported soon.
-     * Multiple values can be assigned to the same key. One product may have up to
-     * 500 product_labels.
-     * Notice that the total number of distinct product_labels over all products
-     * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-     * will refuse to work for that ProductSet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - public java.util.List - getProductLabelsBuilderList() { - return getProductLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder> - getProductLabelsFieldBuilder() { - if (productLabelsBuilder_ == null) { - productLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product.KeyValue, com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder>( - productLabels_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - productLabels_ = null; - } - return productLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Product) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product) - private static final com.google.cloud.vision.v1p4beta1.Product DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Product(); - } - - public static com.google.cloud.vision.v1p4beta1.Product getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Product parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java deleted file mode 100644 index d20b0dcba791..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - - @Deprecated - protected ProductName() { - project = null; - location = null; - product = null; - } - - private ProductName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductName of(String project, String location, String product) { - return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); - } - - public static String format(String project, String location, String product) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .build() - .toString(); - } - - public static ProductName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT.validatedMatch( - formattedString, "ProductName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT.instantiate( - "project", project, "location", location, "product", product); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductName that = ((ProductName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - return h; - } - - /** Builder for projects/{project}/locations/{location}/products/{product}. */ - public static class Builder { - private String project; - private String location; - private String product; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - private Builder(ProductName productName) { - this.project = productName.project; - this.location = productName.location; - this.product = productName.product; - } - - public ProductName build() { - return new ProductName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java deleted file mode 100644 index 1255e6fd99c7..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductOrBuilder.java +++ /dev/null @@ -1,194 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ProductOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Product) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the product.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
-   * This field is ignored when creating a product.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this Product. Must not be empty. Must be at most
-   * 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * User-provided metadata to be stored with this product. Must be at most 4096
-   * characters long.
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Immutable. The category for the product identified by the reference image.
-   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-   * legacy categories "homegoods", "apparel", and "toys" are still supported,
-   * but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The productCategory. - */ - java.lang.String getProductCategory(); - /** - *
-   * Immutable. The category for the product identified by the reference image.
-   * This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The
-   * legacy categories "homegoods", "apparel", and "toys" are still supported,
-   * but these should not be used for new products.
-   * 
- * - * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return The bytes for productCategory. - */ - com.google.protobuf.ByteString - getProductCategoryBytes(); - - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1p4beta1.Product.KeyValue getProductLabels(int index); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - int getProductLabelsCount(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - java.util.List - getProductLabelsOrBuilderList(); - /** - *
-   * Key-value pairs that can be attached to a product. At query time,
-   * constraints can be specified based on the product_labels.
-   * Note that integer values can be provided as strings, e.g. "1199". Only
-   * strings with integer values can match a range-based restriction which is
-   * to be supported soon.
-   * Multiple values can be assigned to the same key. One product may have up to
-   * 500 product_labels.
-   * Notice that the total number of distinct product_labels over all products
-   * in one ProductSet cannot exceed 1M, otherwise the product search pipeline
-   * will refuse to work for that ProductSet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Product.KeyValue product_labels = 5; - */ - com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder getProductLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java deleted file mode 100644 index abb07a79269f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java +++ /dev/null @@ -1,1404 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Parameters for a product search request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchParams} - */ -public final class ProductSearchParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchParams) - ProductSearchParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchParams.newBuilder() to construct. - private ProductSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchParams() { - productSet_ = ""; - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - productSet_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - productCategories_.add(s); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 74: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchParams.class, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 9; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 6; - private volatile java.lang.Object productSet_; - /** - *
-   * The resource name of a
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-   * similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - @java.lang.Override - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } - } - /** - *
-   * The resource name of a
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-   * similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_CATEGORIES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList productCategories_; - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_; - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - - public static final int FILTER_FIELD_NUMBER = 8; - private volatile java.lang.Object filter_; - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, productSet_); - } - for (int i = 0; i < productCategories_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, productCategories_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, filter_); - } - if (boundingPoly_ != null) { - output.writeMessage(9, getBoundingPoly()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSet_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, productSet_); - } - { - int dataSize = 0; - for (int i = 0; i < productCategories_.size(); i++) { - dataSize += computeStringSizeNoTag(productCategories_.getRaw(i)); - } - size += dataSize; - size += 1 * getProductCategoriesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, filter_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getBoundingPoly()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSearchParams other = (com.google.cloud.vision.v1p4beta1.ProductSearchParams) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getProductSet() - .equals(other.getProductSet())) return false; - if (!getProductCategoriesList() - .equals(other.getProductCategoriesList())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - if (getProductCategoriesCount() > 0) { - hash = (37 * hash) + PRODUCT_CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getProductCategoriesList().hashCode(); - } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchParams) - com.google.cloud.vision.v1p4beta1.ProductSearchParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchParams.class, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - productSet_ = ""; - - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParams build() { - com.google.cloud.vision.v1p4beta1.ProductSearchParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParams buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSearchParams result = new com.google.cloud.vision.v1p4beta1.ProductSearchParams(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.productSet_ = productSet_; - if (((bitField0_ & 0x00000001) != 0)) { - productCategories_ = productCategories_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.productCategories_ = productCategories_; - result.filter_ = filter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchParams) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchParams other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSearchParams.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (!other.getProductSet().isEmpty()) { - productSet_ = other.productSet_; - onChanged(); - } - if (!other.productCategories_.isEmpty()) { - if (productCategories_.isEmpty()) { - productCategories_ = other.productCategories_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureProductCategoriesIsMutable(); - productCategories_.addAll(other.productCategories_); - } - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSearchParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-     * The bounding polygon around the area of interest in the image.
-     * If it is not specified, system discretion will be applied.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.lang.Object productSet_ = ""; - /** - *
-     * The resource name of a
-     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-     * similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - public java.lang.String getProductSet() { - java.lang.Object ref = productSet_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSet_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of a
-     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-     * similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - public com.google.protobuf.ByteString - getProductSetBytes() { - java.lang.Object ref = productSet_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of a
-     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-     * similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSet_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of a
-     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-     * similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProductSet() { - - productSet_ = getDefaultInstance().getProductSet(); - onChanged(); - return this; - } - /** - *
-     * The resource name of a
-     * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-     * similar images.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @param value The bytes for productSet to set. - * @return This builder for chaining. - */ - public Builder setProductSetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSet_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - public com.google.protobuf.ProtocolStringList - getProductCategoriesList() { - return productCategories_.getUnmodifiableView(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - public int getProductCategoriesCount() { - return productCategories_.size(); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - public java.lang.String getProductCategories(int index) { - return productCategories_.get(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - public com.google.protobuf.ByteString - getProductCategoriesBytes(int index) { - return productCategories_.getByteString(index); - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param index The index to set the value at. - * @param value The productCategories to set. - * @return This builder for chaining. - */ - public Builder setProductCategories( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategories( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param values The productCategories to add. - * @return This builder for chaining. - */ - public Builder addAllProductCategories( - java.lang.Iterable values) { - ensureProductCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productCategories_); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @return This builder for chaining. - */ - public Builder clearProductCategories() { - productCategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The list of product categories to search in. Currently, we only consider
-     * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-     * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-     * categories "homegoods", "apparel", and "toys" are still supported but will
-     * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-     * or "toys-v2" for better product search accuracy. It is recommended to
-     * migrate existing products to these categories as well.
-     * 
- * - * repeated string product_categories = 7; - * @param value The bytes of the productCategories to add. - * @return This builder for chaining. - */ - public Builder addProductCategoriesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProductCategoriesIsMutable(); - productCategories_.add(value); - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * The filtering expression. This can be used to restrict search results based
-     * on Product labels. We currently support an AND of OR of key-value
-     * expressions, where each expression within an OR must have the same key. An
-     * '=' should be used to connect the key and value.
-     * For example, "(color = red OR color = blue) AND brand = Google" is
-     * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-     * "color: red" is not acceptable because it uses a ':' instead of an '='.
-     * 
- * - * string filter = 8; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchParams) - private static final com.google.cloud.vision.v1p4beta1.ProductSearchParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchParams(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java deleted file mode 100644 index 865e292baead..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParamsOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ProductSearchParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-   * The bounding polygon around the area of interest in the image.
-   * If it is not specified, system discretion will be applied.
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-   * The resource name of a
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-   * similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The productSet. - */ - java.lang.String getProductSet(); - /** - *
-   * The resource name of a
-   * [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
-   * similar images.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * 
- * - * string product_set = 6 [(.google.api.resource_reference) = { ... } - * @return The bytes for productSet. - */ - com.google.protobuf.ByteString - getProductSetBytes(); - - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return A list containing the productCategories. - */ - java.util.List - getProductCategoriesList(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @return The count of productCategories. - */ - int getProductCategoriesCount(); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the element to return. - * @return The productCategories at the given index. - */ - java.lang.String getProductCategories(int index); - /** - *
-   * The list of product categories to search in. Currently, we only consider
-   * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
-   * "packagedgoods-v1", or "general-v1" should be specified. The legacy
-   * categories "homegoods", "apparel", and "toys" are still supported but will
-   * be deprecated. For new products, please use "homegoods-v2", "apparel-v2",
-   * or "toys-v2" for better product search accuracy. It is recommended to
-   * migrate existing products to these categories as well.
-   * 
- * - * repeated string product_categories = 7; - * @param index The index of the value to return. - * @return The bytes of the productCategories at the given index. - */ - com.google.protobuf.ByteString - getProductCategoriesBytes(int index); - - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * The filtering expression. This can be used to restrict search results based
-   * on Product labels. We currently support an AND of OR of key-value
-   * expressions, where each expression within an OR must have the same key. An
-   * '=' should be used to connect the key and value.
-   * For example, "(color = red OR color = blue) AND brand = Google" is
-   * acceptable, but "(color = red OR brand = Google)" is not acceptable.
-   * "color: red" is not acceptable because it uses a ':' instead of an '='.
-   * 
- * - * string filter = 8; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java deleted file mode 100644 index 4c9b54824f4d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchProto.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class ProductSearchProto { - private ProductSearchProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n2google/cloud/vision/v1p4beta1/product_" + - "search.proto\022\035google.cloud.vision.v1p4be" + - "ta1\032\031google/api/resource.proto\032,google/c" + - "loud/vision/v1p4beta1/geometry.proto\032:go" + - "ogle/cloud/vision/v1p4beta1/product_sear" + - "ch_service.proto\032\037google/protobuf/timest" + - "amp.proto\"\301\001\n\023ProductSearchParams\022B\n\rbou" + - "nding_poly\030\t \001(\0132+.google.cloud.vision.v" + - "1p4beta1.BoundingPoly\022:\n\013product_set\030\006 \001" + - "(\tB%\372A\"\n vision.googleapis.com/ProductSe" + - "t\022\032\n\022product_categories\030\007 \003(\t\022\016\n\006filter\030" + - "\010 \001(\t\"\262\005\n\024ProductSearchResults\022.\n\nindex_" + - "time\030\002 \001(\0132\032.google.protobuf.Timestamp\022K" + - "\n\007results\030\005 \003(\0132:.google.cloud.vision.v1" + - "p4beta1.ProductSearchResults.Result\022b\n\027p" + - "roduct_grouped_results\030\006 \003(\0132A.google.cl" + - "oud.vision.v1p4beta1.ProductSearchResult" + - "s.GroupedResult\032_\n\006Result\0227\n\007product\030\001 \001" + - "(\0132&.google.cloud.vision.v1p4beta1.Produ" + - "ct\022\r\n\005score\030\002 \001(\002\022\r\n\005image\030\003 \001(\t\032S\n\020Obje" + - "ctAnnotation\022\013\n\003mid\030\001 \001(\t\022\025\n\rlanguage_co" + - "de\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\r\n\005score\030\004 \001(\002\032\202\002" + - "\n\rGroupedResult\022B\n\rbounding_poly\030\001 \001(\0132+" + - ".google.cloud.vision.v1p4beta1.BoundingP" + - "oly\022K\n\007results\030\002 \003(\0132:.google.cloud.visi" + - "on.v1p4beta1.ProductSearchResults.Result" + - "\022`\n\022object_annotations\030\003 \003(\0132D.google.cl" + - "oud.vision.v1p4beta1.ProductSearchResult" + - "s.ObjectAnnotationB\210\001\n!com.google.cloud." + - "vision.v1p4beta1B\022ProductSearchProtoP\001ZC" + - "google.golang.org/genproto/googleapis/cl" + - "oud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSearchParams_descriptor, - new java.lang.String[] { "BoundingPoly", "ProductSet", "ProductCategories", "Filter", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor, - new java.lang.String[] { "IndexTime", "Results", "ProductGroupedResults", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor = - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor, - new java.lang.String[] { "Product", "Score", "Image", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor = - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor, - new java.lang.String[] { "Mid", "LanguageCode", "Name", "Score", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor = - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor, - new java.lang.String[] { "BoundingPoly", "Results", "ObjectAnnotations", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java deleted file mode 100644 index f2313eff9425..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java +++ /dev/null @@ -1,5384 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Results for a product search request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults} - */ -public final class ProductSearchResults extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults) - ProductSearchResultsOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSearchResults.newBuilder() to construct. - private ProductSearchResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSearchResults() { - results_ = java.util.Collections.emptyList(); - productGroupedResults_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSearchResults(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSearchResults( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productGroupedResults_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder.class); - } - - public interface ResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return The product. - */ - com.google.cloud.vision.v1p4beta1.Product getProduct(); - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - java.lang.String getImage(); - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - com.google.protobuf.ByteString - getImageBytes(); - } - /** - *
-   * Information about a product.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.Result} - */ - public static final class Result extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Result() { - image_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.Product product_; - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - /** - *
-     * The Product.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * A confidence level on the match, ranging from 0 (no confidence) to
-     * 1 (full confidence).
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int IMAGE_FIELD_NUMBER = 3; - private volatile java.lang.Object image_; - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The image. - */ - @java.lang.Override - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } - } - /** - *
-     * The resource name of the image from the product that is the closest match
-     * to the query.
-     * 
- * - * string image = 3; - * @return The bytes for image. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getImage() - .equals(other.getImage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about a product.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.Result} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - score_ = 0F; - - image_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_Result_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result build() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - result.score_ = score_; - result.image_ = image_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getImage().isEmpty()) { - image_ = other.image_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - * @return The product. - */ - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public Builder setProduct( - com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-       * The Product.
-       * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private float score_ ; - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * A confidence level on the match, ranging from 0 (no confidence) to
-       * 1 (full confidence).
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object image_ = ""; - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The image. - */ - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return The bytes for image. - */ - public com.google.protobuf.ByteString - getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The image to set. - * @return This builder for chaining. - */ - public Builder setImage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - image_ = value; - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @return This builder for chaining. - */ - public Builder clearImage() { - - image_ = getDefaultInstance().getImage(); - onChanged(); - return this; - } - /** - *
-       * The resource name of the image from the product that is the closest match
-       * to the query.
-       * 
- * - * string image = 3; - * @param value The bytes for image to set. - * @return This builder for chaining. - */ - public Builder setImageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - image_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ObjectAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - java.lang.String getMid(); - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - com.google.protobuf.ByteString - getMidBytes(); - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Prediction for what the object in the bounding box is.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} - */ - public static final class ObjectAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) - ObjectAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ObjectAnnotation.newBuilder() to construct. - private ObjectAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ObjectAnnotation() { - mid_ = ""; - languageCode_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ObjectAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ObjectAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - mid_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 37: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - public static final int MID_FIELD_NUMBER = 1; - private volatile java.lang.Object mid_; - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The mid. - */ - @java.lang.Override - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } - } - /** - *
-     * Object ID that should align with EntityAnnotation mid.
-     * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * Object name, expressed in its `language_code` language.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - *
-     * Score of the result. Range [0, 1].
-     * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(4, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) obj; - - if (!getMid() - .equals(other.getMid())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getName() - .equals(other.getName())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MID_FIELD_NUMBER; - hash = (53 * hash) + getMid().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Prediction for what the object in the bounding box is.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - mid_ = ""; - - languageCode_ = ""; - - name_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_ObjectAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation build() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation(this); - result.mid_ = mid_; - result.languageCode_ = languageCode_; - result.name_ = name_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()) return this; - if (!other.getMid().isEmpty()) { - mid_ = other.mid_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object mid_ = ""; - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The mid. - */ - public java.lang.String getMid() { - java.lang.Object ref = mid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return The bytes for mid. - */ - public com.google.protobuf.ByteString - getMidBytes() { - java.lang.Object ref = mid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The mid to set. - * @return This builder for chaining. - */ - public Builder setMid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mid_ = value; - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @return This builder for chaining. - */ - public Builder clearMid() { - - mid_ = getDefaultInstance().getMid(); - onChanged(); - return this; - } - /** - *
-       * Object ID that should align with EntityAnnotation mid.
-       * 
- * - * string mid = 1; - * @param value The bytes for mid to set. - * @return This builder for chaining. - */ - public Builder setMidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mid_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * Object name, expressed in its `language_code` language.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Score of the result. Range [0, 1].
-       * 
- * - * float score = 4; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) - private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ObjectAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ObjectAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GroupedResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly(); - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - int getResultsCount(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - int getObjectAnnotationsCount(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - java.util.List - getObjectAnnotationsOrBuilderList(); - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index); - } - /** - *
-   * Information about the products similar to a single product in a query
-   * image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} - */ - public static final class GroupedResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - GroupedResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use GroupedResult.newBuilder() to construct. - private GroupedResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GroupedResult() { - results_ = java.util.Collections.emptyList(); - objectAnnotations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GroupedResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GroupedResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - objectAnnotations_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder.class); - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - @java.lang.Override - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - /** - *
-     * The bounding polygon around the product detected in the query image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int RESULTS_FIELD_NUMBER = 2; - private java.util.List results_; - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int OBJECT_ANNOTATIONS_FIELD_NUMBER = 3; - private java.util.List objectAnnotations_; - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List getObjectAnnotationsList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public java.util.List - getObjectAnnotationsOrBuilderList() { - return objectAnnotations_; - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public int getObjectAnnotationsCount() { - return objectAnnotations_.size(); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - return objectAnnotations_.get(index); - } - /** - *
-     * List of generic predictions for the object in the bounding box.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - return objectAnnotations_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (boundingPoly_ != null) { - output.writeMessage(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - output.writeMessage(3, objectAnnotations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBoundingPoly()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, results_.get(i)); - } - for (int i = 0; i < objectAnnotations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, objectAnnotations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) obj; - - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly() - .equals(other.getBoundingPoly())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getObjectAnnotationsList() - .equals(other.getObjectAnnotationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getObjectAnnotationsCount() > 0) { - hash = (37 * hash) + OBJECT_ANNOTATIONS_FIELD_NUMBER; - hash = (53 * hash) + getObjectAnnotationsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about the products similar to a single product in a query
-     * image.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getObjectAnnotationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_GroupedResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult build() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult(this); - int from_bitField0_ = bitField0_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (objectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = java.util.Collections.unmodifiableList(objectAnnotations_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.objectAnnotations_ = objectAnnotations_; - } else { - result.objectAnnotations_ = objectAnnotationsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()) return this; - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (objectAnnotationsBuilder_ == null) { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotations_.isEmpty()) { - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.addAll(other.objectAnnotations_); - } - onChanged(); - } - } else { - if (!other.objectAnnotations_.isEmpty()) { - if (objectAnnotationsBuilder_.isEmpty()) { - objectAnnotationsBuilder_.dispose(); - objectAnnotationsBuilder_ = null; - objectAnnotations_ = other.objectAnnotations_; - bitField0_ = (bitField0_ & ~0x00000002); - objectAnnotationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getObjectAnnotationsFieldBuilder() : null; - } else { - objectAnnotationsBuilder_.addAllMessages(other.objectAnnotations_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - * @return The boundingPoly. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder setBoundingPoly( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder mergeBoundingPoly(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingPoly_).mergeFrom(value).buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; - } - } - /** - *
-       * The bounding polygon around the product detected in the query image.
-       * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), - getParentForChildren(), - isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-       * List of results, one for each product match.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 2; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List objectAnnotations_ = - java.util.Collections.emptyList(); - private void ensureObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - objectAnnotations_ = new java.util.ArrayList(objectAnnotations_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder> objectAnnotationsBuilder_; - - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List getObjectAnnotationsList() { - if (objectAnnotationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } else { - return objectAnnotationsBuilder_.getMessageList(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public int getObjectAnnotationsCount() { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.size(); - } else { - return objectAnnotationsBuilder_.getCount(); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation getObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); - } else { - return objectAnnotationsBuilder_.getMessage(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder setObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.set(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations(com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation value) { - if (objectAnnotationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, value); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addObjectAnnotations( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder builderForValue) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.add(index, builderForValue.build()); - onChanged(); - } else { - objectAnnotationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder addAllObjectAnnotations( - java.lang.Iterable values) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, objectAnnotations_); - onChanged(); - } else { - objectAnnotationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder clearObjectAnnotations() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - objectAnnotationsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public Builder removeObjectAnnotations(int index) { - if (objectAnnotationsBuilder_ == null) { - ensureObjectAnnotationsIsMutable(); - objectAnnotations_.remove(index); - onChanged(); - } else { - objectAnnotationsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder getObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder getObjectAnnotationsOrBuilder( - int index) { - if (objectAnnotationsBuilder_ == null) { - return objectAnnotations_.get(index); } else { - return objectAnnotationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsOrBuilderList() { - if (objectAnnotationsBuilder_ != null) { - return objectAnnotationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(objectAnnotations_); - } - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder() { - return getObjectAnnotationsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder addObjectAnnotationsBuilder( - int index) { - return getObjectAnnotationsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.getDefaultInstance()); - } - /** - *
-       * List of generic predictions for the object in the bounding box.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - public java.util.List - getObjectAnnotationsBuilderList() { - return getObjectAnnotationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder> - getObjectAnnotationsFieldBuilder() { - if (objectAnnotationsBuilder_ == null) { - objectAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationOrBuilder>( - objectAnnotations_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - objectAnnotations_ = null; - } - return objectAnnotationsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GroupedResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GroupedResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INDEX_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int RESULTS_FIELD_NUMBER = 5; - private java.util.List results_; - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { - return results_.get(index); - } - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int PRODUCT_GROUPED_RESULTS_FIELD_NUMBER = 6; - private java.util.List productGroupedResults_; - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List getProductGroupedResultsList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public java.util.List - getProductGroupedResultsOrBuilderList() { - return productGroupedResults_; - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public int getProductGroupedResultsCount() { - return productGroupedResults_.size(); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - return productGroupedResults_.get(index); - } - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - return productGroupedResults_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (indexTime_ != null) { - output.writeMessage(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - output.writeMessage(6, productGroupedResults_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getIndexTime()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, results_.get(i)); - } - for (int i = 0; i < productGroupedResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, productGroupedResults_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSearchResults other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults) obj; - - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getProductGroupedResultsList() - .equals(other.getProductGroupedResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - if (getProductGroupedResultsCount() > 0) { - hash = (37 * hash) + PRODUCT_GROUPED_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getProductGroupedResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSearchResults prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results for a product search request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSearchResults} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSearchResults) - com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.class, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSearchResults.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getProductGroupedResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchProto.internal_static_google_cloud_vision_v1p4beta1_ProductSearchResults_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults build() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSearchResults result = new com.google.cloud.vision.v1p4beta1.ProductSearchResults(this); - int from_bitField0_ = bitField0_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - if (productGroupedResultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.productGroupedResults_ = productGroupedResults_; - } else { - result.productGroupedResults_ = productGroupedResultsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSearchResults) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSearchResults)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSearchResults other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance()) return this; - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (productGroupedResultsBuilder_ == null) { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResults_.isEmpty()) { - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.addAll(other.productGroupedResults_); - } - onChanged(); - } - } else { - if (!other.productGroupedResults_.isEmpty()) { - if (productGroupedResultsBuilder_.isEmpty()) { - productGroupedResultsBuilder_.dispose(); - productGroupedResultsBuilder_ = null; - productGroupedResults_ = other.productGroupedResults_; - bitField0_ = (bitField0_ & ~0x00000002); - productGroupedResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getProductGroupedResultsFieldBuilder() : null; - } else { - productGroupedResultsBuilder_.addAllMessages(other.productGroupedResults_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSearchResults parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSearchResults) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Timestamp of the index which provided these results. Products added to the
-     * product set and products removed from the product set after this time are
-     * not reflected in the current results.
-     * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> resultsBuilder_; - - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder setResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder addResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.getDefaultInstance()); - } - /** - *
-     * List of results, one for each product match.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.util.List productGroupedResults_ = - java.util.Collections.emptyList(); - private void ensureProductGroupedResultsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - productGroupedResults_ = new java.util.ArrayList(productGroupedResults_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder> productGroupedResultsBuilder_; - - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List getProductGroupedResultsList() { - if (productGroupedResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } else { - return productGroupedResultsBuilder_.getMessageList(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public int getProductGroupedResultsCount() { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.size(); - } else { - return productGroupedResultsBuilder_.getCount(); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); - } else { - return productGroupedResultsBuilder_.getMessage(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder setProductGroupedResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.set(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults(com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult value) { - if (productGroupedResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, value); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addProductGroupedResults( - int index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder builderForValue) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.add(index, builderForValue.build()); - onChanged(); - } else { - productGroupedResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder addAllProductGroupedResults( - java.lang.Iterable values) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, productGroupedResults_); - onChanged(); - } else { - productGroupedResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder clearProductGroupedResults() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - productGroupedResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public Builder removeProductGroupedResults(int index) { - if (productGroupedResultsBuilder_ == null) { - ensureProductGroupedResultsIsMutable(); - productGroupedResults_.remove(index); - onChanged(); - } else { - productGroupedResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder getProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index) { - if (productGroupedResultsBuilder_ == null) { - return productGroupedResults_.get(index); } else { - return productGroupedResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsOrBuilderList() { - if (productGroupedResultsBuilder_ != null) { - return productGroupedResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(productGroupedResults_); - } - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder() { - return getProductGroupedResultsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder addProductGroupedResultsBuilder( - int index) { - return getProductGroupedResultsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.getDefaultInstance()); - } - /** - *
-     * List of results grouped by products detected in the query image. Each entry
-     * corresponds to one bounding polygon in the query image, and contains the
-     * matching products specific to that region. There may be duplicate product
-     * matches in the union of all the per-product results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - public java.util.List - getProductGroupedResultsBuilderList() { - return getProductGroupedResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder> - getProductGroupedResultsFieldBuilder() { - if (productGroupedResultsBuilder_ == null) { - productGroupedResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder>( - productGroupedResults_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - productGroupedResults_ = null; - } - return productGroupedResultsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSearchResults) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults) - private static final com.google.cloud.vision.v1p4beta1.ProductSearchResults DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSearchResults(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSearchResults parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSearchResults(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSearchResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java deleted file mode 100644 index 727cac78ce1f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResultsOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ProductSearchResultsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSearchResults) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Timestamp of the index which provided these results. Products added to the
-   * product set and products removed from the product set after this time are
-   * not reflected in the current results.
-   * 
- * - * .google.protobuf.Timestamp index_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result getResults(int index); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - int getResultsCount(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * List of results, one for each product match.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.Result results = 5; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult getProductGroupedResults(int index); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - int getProductGroupedResultsCount(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - java.util.List - getProductGroupedResultsOrBuilderList(); - /** - *
-   * List of results grouped by products detected in the query image. Each entry
-   * corresponds to one bounding polygon in the query image, and contains the
-   * matching products specific to that region. There may be duplicate product
-   * matches in the union of all the per-product results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder getProductGroupedResultsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java deleted file mode 100644 index 2673ab52824c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchServiceProto.java +++ /dev/null @@ -1,649 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class ProductSearchServiceProto { - private ProductSearchServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Product_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n:google/cloud/vision/v1p4beta1/product_" + - "search_service.proto\022\035google.cloud.visio" + - "n.v1p4beta1\032\034google/api/annotations.prot" + - "o\032\027google/api/client.proto\032\037google/api/f" + - "ield_behavior.proto\032\031google/api/resource" + - ".proto\032,google/cloud/vision/v1p4beta1/ge" + - "ometry.proto\032#google/longrunning/operati" + - "ons.proto\032\033google/protobuf/empty.proto\032 " + - "google/protobuf/field_mask.proto\032\037google" + - "/protobuf/timestamp.proto\032\027google/rpc/st" + - "atus.proto\"\262\002\n\007Product\022\014\n\004name\030\001 \001(\t\022\024\n\014" + - "display_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022" + - "\035\n\020product_category\030\004 \001(\tB\003\340A\005\022G\n\016produc" + - "t_labels\030\005 \003(\0132/.google.cloud.vision.v1p" + - "4beta1.Product.KeyValue\032&\n\010KeyValue\022\013\n\003k" + - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:^\352A[\n\035vision.goo" + - "gleapis.com/Product\022:projects/{project}/" + - "locations/{location}/products/{product}\"" + - "\375\001\n\nProductSet\022\014\n\004name\030\001 \001(\t\022\024\n\014display_" + - "name\030\002 \001(\t\0223\n\nindex_time\030\003 \001(\0132\032.google." + - "protobuf.TimestampB\003\340A\003\022,\n\013index_error\030\004" + - " \001(\0132\022.google.rpc.StatusB\003\340A\003:h\352Ae\n visi" + - "on.googleapis.com/ProductSet\022Aprojects/{" + - "project}/locations/{location}/productSet" + - "s/{product_set}\"\205\002\n\016ReferenceImage\022\014\n\004na" + - "me\030\001 \001(\t\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022H\n\016bounding_p" + - "olys\030\003 \003(\0132+.google.cloud.vision.v1p4bet" + - "a1.BoundingPolyB\003\340A\001:\210\001\352A\204\001\n$vision.goog" + - "leapis.com/ReferenceImage\022\\projects/{pro" + - "ject}/locations/{location}/products/{pro" + - "duct}/referenceImages/{reference_image}\"" + - "\243\001\n\024CreateProductRequest\0229\n\006parent\030\001 \001(\t" + - "B)\340A\002\372A#\n!locations.googleapis.com/Locat" + - "ion\022<\n\007product\030\002 \001(\0132&.google.cloud.visi" + - "on.v1p4beta1.ProductB\003\340A\002\022\022\n\nproduct_id\030" + - "\003 \001(\t\"w\n\023ListProductsRequest\0229\n\006parent\030\001" + - " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + - "ocation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + - "\030\003 \001(\t\"i\n\024ListProductsResponse\0228\n\010produc" + - "ts\030\001 \003(\0132&.google.cloud.vision.v1p4beta1" + - ".Product\022\027\n\017next_page_token\030\002 \001(\t\"H\n\021Get" + - "ProductRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035vi" + - "sion.googleapis.com/Product\"\205\001\n\024UpdatePr" + - "oductRequest\022<\n\007product\030\001 \001(\0132&.google.c" + - "loud.vision.v1p4beta1.ProductB\003\340A\002\022/\n\013up" + - "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + - "ask\"K\n\024DeleteProductRequest\0223\n\004name\030\001 \001(" + - "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + - "\"\261\001\n\027CreateProductSetRequest\0229\n\006parent\030\001" + - " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L" + - "ocation\022C\n\013product_set\030\002 \001(\0132).google.cl" + - "oud.vision.v1p4beta1.ProductSetB\003\340A\002\022\026\n\016" + - "product_set_id\030\003 \001(\t\"z\n\026ListProductSetsR" + - "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + - "s.googleapis.com/Location\022\021\n\tpage_size\030\002" + - " \001(\005\022\022\n\npage_token\030\003 \001(\t\"s\n\027ListProductS" + - "etsResponse\022?\n\014product_sets\030\001 \003(\0132).goog" + - "le.cloud.vision.v1p4beta1.ProductSet\022\027\n\017" + - "next_page_token\030\002 \001(\t\"N\n\024GetProductSetRe" + - "quest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.goog" + - "leapis.com/ProductSet\"\217\001\n\027UpdateProductS" + - "etRequest\022C\n\013product_set\030\001 \001(\0132).google." + - "cloud.vision.v1p4beta1.ProductSetB\003\340A\002\022/" + - "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + - "eldMask\"Q\n\027DeleteProductSetRequest\0226\n\004na" + - "me\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis.com/" + - "ProductSet\"\275\001\n\033CreateReferenceImageReque" + - "st\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googl" + - "eapis.com/Product\022K\n\017reference_image\030\002 \001" + - "(\0132-.google.cloud.vision.v1p4beta1.Refer" + - "enceImageB\003\340A\002\022\032\n\022reference_image_id\030\003 \001" + - "(\t\"z\n\032ListReferenceImagesRequest\0225\n\006pare" + - "nt\030\001 \001(\tB%\340A\002\372A\037\n\035vision.googleapis.com/" + - "Product\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + - "\030\003 \001(\t\"\222\001\n\033ListReferenceImagesResponse\022G" + - "\n\020reference_images\030\001 \003(\0132-.google.cloud." + - "vision.v1p4beta1.ReferenceImage\022\021\n\tpage_" + - "size\030\002 \001(\005\022\027\n\017next_page_token\030\003 \001(\t\"V\n\030G" + - "etReferenceImageRequest\022:\n\004name\030\001 \001(\tB,\340" + - "A\002\372A&\n$vision.googleapis.com/ReferenceIm" + - "age\"Y\n\033DeleteReferenceImageRequest\022:\n\004na" + - "me\030\001 \001(\tB,\340A\002\372A&\n$vision.googleapis.com/" + - "ReferenceImage\"\217\001\n\035AddProductToProductSe" + - "tRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.g" + - "oogleapis.com/ProductSet\0226\n\007product\030\002 \001(" + - "\tB%\340A\002\372A\037\n\035vision.googleapis.com/Product" + - "\"\224\001\n\"RemoveProductFromProductSetRequest\022" + - "6\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vision.googleapis" + - ".com/ProductSet\0226\n\007product\030\002 \001(\tB%\340A\002\372A\037" + - "\n\035vision.googleapis.com/Product\"\200\001\n\037List" + - "ProductsInProductSetRequest\0226\n\004name\030\001 \001(" + - "\tB(\340A\002\372A\"\n vision.googleapis.com/Product" + - "Set\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + - "(\t\"u\n ListProductsInProductSetResponse\0228" + - "\n\010products\030\001 \003(\0132&.google.cloud.vision.v" + - "1p4beta1.Product\022\027\n\017next_page_token\030\002 \001(" + - "\t\"2\n\032ImportProductSetsGcsSource\022\024\n\014csv_f" + - "ile_uri\030\001 \001(\t\"y\n\034ImportProductSetsInputC" + - "onfig\022O\n\ngcs_source\030\001 \001(\01329.google.cloud" + - ".vision.v1p4beta1.ImportProductSetsGcsSo" + - "urceH\000B\010\n\006source\"\255\001\n\030ImportProductSetsRe" + - "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations" + - ".googleapis.com/Location\022V\n\014input_config" + - "\030\002 \001(\0132;.google.cloud.vision.v1p4beta1.I" + - "mportProductSetsInputConfigB\003\340A\002\"\212\001\n\031Imp" + - "ortProductSetsResponse\022G\n\020reference_imag" + - "es\030\001 \003(\0132-.google.cloud.vision.v1p4beta1" + - ".ReferenceImage\022$\n\010statuses\030\002 \003(\0132\022.goog" + - "le.rpc.Status\"\236\002\n\026BatchOperationMetadata" + - "\022J\n\005state\030\001 \001(\0162;.google.cloud.vision.v1" + - "p4beta1.BatchOperationMetadata.State\022/\n\013" + - "submit_time\030\002 \001(\0132\032.google.protobuf.Time" + - "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" + - "f.Timestamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIE" + - "D\020\000\022\016\n\nPROCESSING\020\001\022\016\n\nSUCCESSFUL\020\002\022\n\n\006F" + - "AILED\020\003\022\r\n\tCANCELLED\020\004\"/\n\025ProductSetPurg" + - "eConfig\022\026\n\016product_set_id\030\001 \001(\t\"\346\001\n\024Purg" + - "eProductsRequest\022X\n\030product_set_purge_co" + - "nfig\030\002 \001(\01324.google.cloud.vision.v1p4bet" + - "a1.ProductSetPurgeConfigH\000\022 \n\026delete_orp" + - "han_products\030\003 \001(\010H\000\0229\n\006parent\030\001 \001(\tB)\340A" + - "\002\372A#\n!locations.googleapis.com/Location\022" + - "\r\n\005force\030\004 \001(\010B\010\n\006target2\322 \n\rProductSear" + - "ch\022\346\001\n\020CreateProductSet\0226.google.cloud.v" + - "ision.v1p4beta1.CreateProductSetRequest\032" + - ").google.cloud.vision.v1p4beta1.ProductS" + - "et\"o\202\323\344\223\002E\"6/v1p4beta1/{parent=projects/" + - "*/locations/*}/productSets:\013product_set\332" + - "A!parent,product_set,product_set_id\022\311\001\n\017" + - "ListProductSets\0225.google.cloud.vision.v1" + - "p4beta1.ListProductSetsRequest\0326.google." + - "cloud.vision.v1p4beta1.ListProductSetsRe" + - "sponse\"G\202\323\344\223\0028\0226/v1p4beta1/{parent=proje" + - "cts/*/locations/*}/productSets\332A\006parent\022" + - "\266\001\n\rGetProductSet\0223.google.cloud.vision." + - "v1p4beta1.GetProductSetRequest\032).google." + - "cloud.vision.v1p4beta1.ProductSet\"E\202\323\344\223\002" + - "8\0226/v1p4beta1/{name=projects/*/locations" + - "/*/productSets/*}\332A\004name\022\350\001\n\020UpdateProdu" + - "ctSet\0226.google.cloud.vision.v1p4beta1.Up" + - "dateProductSetRequest\032).google.cloud.vis" + - "ion.v1p4beta1.ProductSet\"q\202\323\344\223\002Q2B/v1p4b" + - "eta1/{product_set.name=projects/*/locati" + - "ons/*/productSets/*}:\013product_set\332A\027prod" + - "uct_set,update_mask\022\251\001\n\020DeleteProductSet" + - "\0226.google.cloud.vision.v1p4beta1.DeleteP" + - "roductSetRequest\032\026.google.protobuf.Empty" + - "\"E\202\323\344\223\0028*6/v1p4beta1/{name=projects/*/lo" + - "cations/*/productSets/*}\332A\004name\022\316\001\n\rCrea" + - "teProduct\0223.google.cloud.vision.v1p4beta" + - "1.CreateProductRequest\032&.google.cloud.vi" + - "sion.v1p4beta1.Product\"`\202\323\344\223\002>\"3/v1p4bet" + - "a1/{parent=projects/*/locations/*}/produ" + - "cts:\007product\332A\031parent,product,product_id" + - "\022\275\001\n\014ListProducts\0222.google.cloud.vision." + - "v1p4beta1.ListProductsRequest\0323.google.c" + - "loud.vision.v1p4beta1.ListProductsRespon" + - "se\"D\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/" + - "*/locations/*}/products\332A\006parent\022\252\001\n\nGet" + - "Product\0220.google.cloud.vision.v1p4beta1." + - "GetProductRequest\032&.google.cloud.vision." + - "v1p4beta1.Product\"B\202\323\344\223\0025\0223/v1p4beta1/{n" + - "ame=projects/*/locations/*/products/*}\332A" + - "\004name\022\320\001\n\rUpdateProduct\0223.google.cloud.v" + - "ision.v1p4beta1.UpdateProductRequest\032&.g" + - "oogle.cloud.vision.v1p4beta1.Product\"b\202\323" + - "\344\223\002F2;/v1p4beta1/{product.name=projects/" + - "*/locations/*/products/*}:\007product\332A\023pro" + - "duct,update_mask\022\240\001\n\rDeleteProduct\0223.goo" + - "gle.cloud.vision.v1p4beta1.DeleteProduct" + - "Request\032\026.google.protobuf.Empty\"B\202\323\344\223\0025*" + - "3/v1p4beta1/{name=projects/*/locations/*" + - "/products/*}\332A\004name\022\216\002\n\024CreateReferenceI" + - "mage\022:.google.cloud.vision.v1p4beta1.Cre" + - "ateReferenceImageRequest\032-.google.cloud." + - "vision.v1p4beta1.ReferenceImage\"\212\001\202\323\344\223\002X" + - "\"E/v1p4beta1/{parent=projects/*/location" + - "s/*/products/*}/referenceImages:\017referen" + - "ce_image\332A)parent,reference_image,refere" + - "nce_image_id\022\300\001\n\024DeleteReferenceImage\022:." + - "google.cloud.vision.v1p4beta1.DeleteRefe" + - "renceImageRequest\032\026.google.protobuf.Empt" + - "y\"T\202\323\344\223\002G*E/v1p4beta1/{name=projects/*/l" + - "ocations/*/products/*/referenceImages/*}" + - "\332A\004name\022\344\001\n\023ListReferenceImages\0229.google" + - ".cloud.vision.v1p4beta1.ListReferenceIma" + - "gesRequest\032:.google.cloud.vision.v1p4bet" + - "a1.ListReferenceImagesResponse\"V\202\323\344\223\002G\022E" + - "/v1p4beta1/{parent=projects/*/locations/" + - "*/products/*}/referenceImages\332A\006parent\022\321" + - "\001\n\021GetReferenceImage\0227.google.cloud.visi" + - "on.v1p4beta1.GetReferenceImageRequest\032-." + - "google.cloud.vision.v1p4beta1.ReferenceI" + - "mage\"T\202\323\344\223\002G\022E/v1p4beta1/{name=projects/" + - "*/locations/*/products/*/referenceImages" + - "/*}\332A\004name\022\313\001\n\026AddProductToProductSet\022<." + - "google.cloud.vision.v1p4beta1.AddProduct" + - "ToProductSetRequest\032\026.google.protobuf.Em" + - "pty\"[\202\323\344\223\002F\"A/v1p4beta1/{name=projects/*" + - "/locations/*/productSets/*}:addProduct:\001" + - "*\332A\014name,product\022\330\001\n\033RemoveProductFromPr" + - "oductSet\022A.google.cloud.vision.v1p4beta1" + - ".RemoveProductFromProductSetRequest\032\026.go" + - "ogle.protobuf.Empty\"^\202\323\344\223\002I\"D/v1p4beta1/" + - "{name=projects/*/locations/*/productSets" + - "/*}:removeProduct:\001*\332A\014name,product\022\353\001\n\030" + - "ListProductsInProductSet\022>.google.cloud." + - "vision.v1p4beta1.ListProductsInProductSe" + - "tRequest\032?.google.cloud.vision.v1p4beta1" + - ".ListProductsInProductSetResponse\"N\202\323\344\223\002" + - "A\022?/v1p4beta1/{name=projects/*/locations" + - "/*/productSets/*}/products\332A\004name\022\202\002\n\021Im" + - "portProductSets\0227.google.cloud.vision.v1" + - "p4beta1.ImportProductSetsRequest\032\035.googl" + - "e.longrunning.Operation\"\224\001\202\323\344\223\002B\"=/v1p4b" + - "eta1/{parent=projects/*/locations/*}/pro" + - "ductSets:import:\001*\332A\023parent,input_config" + - "\312A3\n\031ImportProductSetsResponse\022\026BatchOpe" + - "rationMetadata\022\344\001\n\rPurgeProducts\0223.googl" + - "e.cloud.vision.v1p4beta1.PurgeProductsRe" + - "quest\032\035.google.longrunning.Operation\"\177\202\323" + - "\344\223\002>\"9/v1p4beta1/{parent=projects/*/loca" + - "tions/*}/products:purge:\001*\332A\006parent\312A/\n\025" + - "google.protobuf.Empty\022\026BatchOperationMet" + - "adata\032v\312A\025vision.googleapis.com\322A[https:" + - "//www.googleapis.com/auth/cloud-platform" + - ",https://www.googleapis.com/auth/cloud-v" + - "isionB\217\001\n!com.google.cloud.vision.v1p4be" + - "ta1B\031ProductSearchServiceProtoP\001ZCgoogle" + - ".golang.org/genproto/googleapis/cloud/vi" + - "sion/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p4beta1_Product_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_Product_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Product_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", "ProductCategory", "ProductLabels", }); - internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor = - internal_static_google_cloud_vision_v1p4beta1_Product_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Product_KeyValue_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor, - new java.lang.String[] { "Name", "DisplayName", "IndexTime", "IndexError", }); - internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor, - new java.lang.String[] { "Name", "Uri", "BoundingPolys", }); - internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CreateProductRequest_descriptor, - new java.lang.String[] { "Parent", "Product", "ProductId", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductsResponse_descriptor, - new java.lang.String[] { "Products", "NextPageToken", }); - internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_GetProductRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor, - new java.lang.String[] { "Product", "UpdateMask", }); - internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_DeleteProductRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CreateProductSetRequest_descriptor, - new java.lang.String[] { "Parent", "ProductSet", "ProductSetId", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductSetsResponse_descriptor, - new java.lang.String[] { "ProductSets", "NextPageToken", }); - internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_GetProductSetRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor, - new java.lang.String[] { "ProductSet", "UpdateMask", }); - internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_DeleteProductSetRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_CreateReferenceImageRequest_descriptor, - new java.lang.String[] { "Parent", "ReferenceImage", "ReferenceImageId", }); - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesRequest_descriptor, - new java.lang.String[] { "Parent", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListReferenceImagesResponse_descriptor, - new java.lang.String[] { "ReferenceImages", "PageSize", "NextPageToken", }); - internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_GetReferenceImageRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_DeleteReferenceImageRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor, - new java.lang.String[] { "Name", "Product", }); - internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor, - new java.lang.String[] { "Name", "Product", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetRequest_descriptor, - new java.lang.String[] { "Name", "PageSize", "PageToken", }); - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ListProductsInProductSetResponse_descriptor, - new java.lang.String[] { "Products", "NextPageToken", }); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsGcsSource_descriptor, - new java.lang.String[] { "CsvFileUri", }); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsInputConfig_descriptor, - new java.lang.String[] { "GcsSource", "Source", }); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsRequest_descriptor, - new java.lang.String[] { "Parent", "InputConfig", }); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ImportProductSetsResponse_descriptor, - new java.lang.String[] { "ReferenceImages", "Statuses", }); - internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_BatchOperationMetadata_descriptor, - new java.lang.String[] { "State", "SubmitTime", "EndTime", }); - internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor, - new java.lang.String[] { "ProductSetId", }); - internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor, - new java.lang.String[] { "ProductSetPurgeConfig", "DeleteOrphanProducts", "Parent", "Force", "Target", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java deleted file mode 100644 index 322846f8d2cd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java +++ /dev/null @@ -1,1337 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A ProductSet contains Products. A ProductSet can contain a maximum of 1
- * million reference images. If the limit is exceeded, periodic indexing will
- * fail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSet} - */ -public final class ProductSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSet) - ProductSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSet.newBuilder() to construct. - private ProductSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSet() { - name_ = ""; - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (indexTime_ != null) { - subBuilder = indexTime_.toBuilder(); - } - indexTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexTime_); - indexTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (indexError_ != null) { - subBuilder = indexError_.toBuilder(); - } - indexError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(indexError_); - indexError_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSet.class, com.google.cloud.vision.v1p4beta1.ProductSet.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INDEX_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp indexTime_; - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - @java.lang.Override - public boolean hasIndexTime() { - return indexTime_ != null; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIndexTime() { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - return getIndexTime(); - } - - public static final int INDEX_ERROR_FIELD_NUMBER = 4; - private com.google.rpc.Status indexError_; - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - @java.lang.Override - public boolean hasIndexError() { - return indexError_ != null; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - @java.lang.Override - public com.google.rpc.Status getIndexError() { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - return getIndexError(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (indexTime_ != null) { - output.writeMessage(3, getIndexTime()); - } - if (indexError_ != null) { - output.writeMessage(4, getIndexError()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (indexTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIndexTime()); - } - if (indexError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIndexError()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSet)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSet other = (com.google.cloud.vision.v1p4beta1.ProductSet) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (hasIndexTime() != other.hasIndexTime()) return false; - if (hasIndexTime()) { - if (!getIndexTime() - .equals(other.getIndexTime())) return false; - } - if (hasIndexError() != other.hasIndexError()) return false; - if (hasIndexError()) { - if (!getIndexError() - .equals(other.getIndexError())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasIndexTime()) { - hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIndexTime().hashCode(); - } - if (hasIndexError()) { - hash = (37 * hash) + INDEX_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getIndexError().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A ProductSet contains Products. A ProductSet can contain a maximum of 1
-   * million reference images. If the limit is exceeded, periodic indexing will
-   * fail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSet) - com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSet.class, com.google.cloud.vision.v1p4beta1.ProductSet.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - if (indexTimeBuilder_ == null) { - indexTime_ = null; - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - if (indexErrorBuilder_ == null) { - indexError_ = null; - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSet_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet build() { - com.google.cloud.vision.v1p4beta1.ProductSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSet result = new com.google.cloud.vision.v1p4beta1.ProductSet(this); - result.name_ = name_; - result.displayName_ = displayName_; - if (indexTimeBuilder_ == null) { - result.indexTime_ = indexTime_; - } else { - result.indexTime_ = indexTimeBuilder_.build(); - } - if (indexErrorBuilder_ == null) { - result.indexError_ = indexError_; - } else { - result.indexError_ = indexErrorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSet) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSet other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.hasIndexTime()) { - mergeIndexTime(other.getIndexTime()); - } - if (other.hasIndexError()) { - mergeIndexError(other.getIndexError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user-provided name for this ProductSet. Must not be empty. Must be at
-     * most 4096 characters long.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp indexTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> indexTimeBuilder_; - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - public boolean hasIndexTime() { - return indexTimeBuilder_ != null || indexTime_ != null; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - public com.google.protobuf.Timestamp getIndexTime() { - if (indexTimeBuilder_ == null) { - return indexTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } else { - return indexTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexTime_ = value; - onChanged(); - } else { - indexTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (indexTimeBuilder_ == null) { - indexTime_ = builderForValue.build(); - onChanged(); - } else { - indexTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { - if (indexTimeBuilder_ == null) { - if (indexTime_ != null) { - indexTime_ = - com.google.protobuf.Timestamp.newBuilder(indexTime_).mergeFrom(value).buildPartial(); - } else { - indexTime_ = value; - } - onChanged(); - } else { - indexTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexTime() { - if (indexTimeBuilder_ == null) { - indexTime_ = null; - onChanged(); - } else { - indexTime_ = null; - indexTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - - onChanged(); - return getIndexTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { - if (indexTimeBuilder_ != null) { - return indexTimeBuilder_.getMessageOrBuilder(); - } else { - return indexTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : indexTime_; - } - } - /** - *
-     * Output only. The time at which this ProductSet was last indexed. Query
-     * results will reflect all updates before this time. If this ProductSet has
-     * never been indexed, this timestamp is the default value
-     * "1970-01-01T00:00:00Z".
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getIndexTimeFieldBuilder() { - if (indexTimeBuilder_ == null) { - indexTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getIndexTime(), - getParentForChildren(), - isClean()); - indexTime_ = null; - } - return indexTimeBuilder_; - } - - private com.google.rpc.Status indexError_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - public boolean hasIndexError() { - return indexErrorBuilder_ != null || indexError_ != null; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - public com.google.rpc.Status getIndexError() { - if (indexErrorBuilder_ == null) { - return indexError_ == null ? com.google.rpc.Status.getDefaultInstance() : indexError_; - } else { - return indexErrorBuilder_.getMessage(); - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexError_ = value; - onChanged(); - } else { - indexErrorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setIndexError( - com.google.rpc.Status.Builder builderForValue) { - if (indexErrorBuilder_ == null) { - indexError_ = builderForValue.build(); - onChanged(); - } else { - indexErrorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeIndexError(com.google.rpc.Status value) { - if (indexErrorBuilder_ == null) { - if (indexError_ != null) { - indexError_ = - com.google.rpc.Status.newBuilder(indexError_).mergeFrom(value).buildPartial(); - } else { - indexError_ = value; - } - onChanged(); - } else { - indexErrorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearIndexError() { - if (indexErrorBuilder_ == null) { - indexError_ = null; - onChanged(); - } else { - indexError_ = null; - indexErrorBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.Status.Builder getIndexErrorBuilder() { - - onChanged(); - return getIndexErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { - if (indexErrorBuilder_ != null) { - return indexErrorBuilder_.getMessageOrBuilder(); - } else { - return indexError_ == null ? - com.google.rpc.Status.getDefaultInstance() : indexError_; - } - } - /** - *
-     * Output only. If there was an error with indexing the product set, the field
-     * is populated.
-     * This field is ignored when creating a ProductSet.
-     * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getIndexErrorFieldBuilder() { - if (indexErrorBuilder_ == null) { - indexErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getIndexError(), - getParentForChildren(), - isClean()); - indexError_ = null; - } - return indexErrorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSet) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSet) - private static final com.google.cloud.vision.v1p4beta1.ProductSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSet(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java deleted file mode 100644 index 0323799a1111..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProductSetName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_SET = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/productSets/{product_set}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String productSet; - - @Deprecated - protected ProductSetName() { - project = null; - location = null; - productSet = null; - } - - private ProductSetName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - productSet = Preconditions.checkNotNull(builder.getProductSet()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProductSetName of(String project, String location, String productSet) { - return newBuilder().setProject(project).setLocation(location).setProductSet(productSet).build(); - } - - public static String format(String project, String location, String productSet) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProductSet(productSet) - .build() - .toString(); - } - - public static ProductSetName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_SET.validatedMatch( - formattedString, "ProductSetName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("product_set")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProductSetName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_SET.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (productSet != null) { - fieldMapBuilder.put("product_set", productSet); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_SET.instantiate( - "project", project, "location", location, "product_set", productSet); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProductSetName that = ((ProductSetName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.productSet, that.productSet); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(productSet); - return h; - } - - /** Builder for projects/{project}/locations/{location}/productSets/{product_set}. */ - public static class Builder { - private String project; - private String location; - private String productSet; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProductSet() { - return productSet; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProductSet(String productSet) { - this.productSet = productSet; - return this; - } - - private Builder(ProductSetName productSetName) { - this.project = productSetName.project; - this.location = productSetName.location; - this.productSet = productSetName.productSet; - } - - public ProductSetName build() { - return new ProductSetName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java deleted file mode 100644 index 9b10318dc40d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetOrBuilder.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ProductSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user-provided name for this ProductSet. Must not be empty. Must be at
-   * most 4096 characters long.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexTime field is set. - */ - boolean hasIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexTime. - */ - com.google.protobuf.Timestamp getIndexTime(); - /** - *
-   * Output only. The time at which this ProductSet was last indexed. Query
-   * results will reflect all updates before this time. If this ProductSet has
-   * never been indexed, this timestamp is the default value
-   * "1970-01-01T00:00:00Z".
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder(); - - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the indexError field is set. - */ - boolean hasIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The indexError. - */ - com.google.rpc.Status getIndexError(); - /** - *
-   * Output only. If there was an error with indexing the product set, the field
-   * is populated.
-   * This field is ignored when creating a ProductSet.
-   * 
- * - * .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java deleted file mode 100644 index 30d6cd995b28..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfig.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Config to control which ProductSet contains the Products to be deleted.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} - */ -public final class ProductSetPurgeConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) - ProductSetPurgeConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProductSetPurgeConfig.newBuilder() to construct. - private ProductSetPurgeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProductSetPurgeConfig() { - productSetId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProductSetPurgeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProductSetPurgeConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - productSetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder.class); - } - - public static final int PRODUCT_SET_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object productSetId_; - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - @java.lang.Override - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } - } - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, productSetId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, productSetId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig other = (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) obj; - - if (!getProductSetId() - .equals(other.getProductSetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PRODUCT_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getProductSetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Config to control which ProductSet contains the Products to be deleted.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.class, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - productSetId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ProductSetPurgeConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig build() { - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig buildPartial() { - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig result = new com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig(this); - result.productSetId_ = productSetId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig other) { - if (other == com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance()) return this; - if (!other.getProductSetId().isEmpty()) { - productSetId_ = other.productSetId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object productSetId_ = ""; - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - public java.lang.String getProductSetId() { - java.lang.Object ref = productSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - productSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - public com.google.protobuf.ByteString - getProductSetIdBytes() { - java.lang.Object ref = productSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - productSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @param value The productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - productSetId_ = value; - onChanged(); - return this; - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @return This builder for chaining. - */ - public Builder clearProductSetId() { - - productSetId_ = getDefaultInstance().getProductSetId(); - onChanged(); - return this; - } - /** - *
-     * The ProductSet that contains the Products to delete. If a Product is a
-     * member of product_set_id in addition to other ProductSets, the Product will
-     * still be deleted.
-     * 
- * - * string product_set_id = 1; - * @param value The bytes for productSetId to set. - * @return This builder for chaining. - */ - public Builder setProductSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - productSetId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) - private static final com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig(); - } - - public static com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProductSetPurgeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductSetPurgeConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java deleted file mode 100644 index 6da4f7de9bae..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSetPurgeConfigOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ProductSetPurgeConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The productSetId. - */ - java.lang.String getProductSetId(); - /** - *
-   * The ProductSet that contains the Products to delete. If a Product is a
-   * member of product_set_id in addition to other ProductSets, the Product will
-   * still be deleted.
-   * 
- * - * string product_set_id = 1; - * @return The bytes for productSetId. - */ - com.google.protobuf.ByteString - getProductSetIdBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java deleted file mode 100644 index 102b6ba750b2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java +++ /dev/null @@ -1,842 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A `Property` consists of a user-supplied name/value pair.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Property} - */ -public final class Property extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Property) - PropertyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Property.newBuilder() to construct. - private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Property() { - name_ = ""; - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Property(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Property( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 24: { - - uint64Value_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Property.class, com.google.cloud.vision.v1p4beta1.Property.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UINT64_VALUE_FIELD_NUMBER = 3; - private long uint64Value_; - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - if (uint64Value_ != 0L) { - output.writeUInt64(3, uint64Value_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - if (uint64Value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, uint64Value_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Property)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Property other = (com.google.cloud.vision.v1p4beta1.Property) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getValue() - .equals(other.getValue())) return false; - if (getUint64Value() - != other.getUint64Value()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Value()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Property parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Property parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Property parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Property prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `Property` consists of a user-supplied name/value pair.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Property} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Property) - com.google.cloud.vision.v1p4beta1.PropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Property.class, com.google.cloud.vision.v1p4beta1.Property.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Property.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - value_ = ""; - - uint64Value_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_Property_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Property getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Property build() { - com.google.cloud.vision.v1p4beta1.Property result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Property buildPartial() { - com.google.cloud.vision.v1p4beta1.Property result = new com.google.cloud.vision.v1p4beta1.Property(this); - result.name_ = name_; - result.value_ = value_; - result.uint64Value_ = uint64Value_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Property) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Property)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Property other) { - if (other == com.google.cloud.vision.v1p4beta1.Property.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getUint64Value() != 0L) { - setUint64Value(other.getUint64Value()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Property parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Property) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the property.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - *
-     * Value of the property.
-     * 
- * - * string value = 2; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - - private long uint64Value_ ; - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - @java.lang.Override - public long getUint64Value() { - return uint64Value_; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @param value The uint64Value to set. - * @return This builder for chaining. - */ - public Builder setUint64Value(long value) { - - uint64Value_ = value; - onChanged(); - return this; - } - /** - *
-     * Value of numeric properties.
-     * 
- * - * uint64 uint64_value = 3; - * @return This builder for chaining. - */ - public Builder clearUint64Value() { - - uint64Value_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Property) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Property) - private static final com.google.cloud.vision.v1p4beta1.Property DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Property(); - } - - public static com.google.cloud.vision.v1p4beta1.Property getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Property parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Property(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Property getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java deleted file mode 100644 index eba732a7d8d5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PropertyOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface PropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Property) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the property.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * Value of the property.
-   * 
- * - * string value = 2; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Value of numeric properties.
-   * 
- * - * uint64 uint64_value = 3; - * @return The uint64Value. - */ - long getUint64Value(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java deleted file mode 100644 index 30c0e2389897..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequest.java +++ /dev/null @@ -1,1143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `PurgeProducts` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.PurgeProductsRequest} - */ -public final class PurgeProductsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - PurgeProductsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use PurgeProductsRequest.newBuilder() to construct. - private PurgeProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PurgeProductsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PurgeProductsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PurgeProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder subBuilder = null; - if (targetCase_ == 2) { - subBuilder = ((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_).toBuilder(); - } - target_ = - input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); - target_ = subBuilder.buildPartial(); - } - targetCase_ = 2; - break; - } - case 24: { - target_ = input.readBool(); - targetCase_ = 3; - break; - } - case 32: { - - force_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.Builder.class); - } - - private int targetCase_ = 0; - private java.lang.Object target_; - public enum TargetCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PRODUCT_SET_PURGE_CONFIG(2), - DELETE_ORPHAN_PRODUCTS(3), - TARGET_NOT_SET(0); - private final int value; - private TargetCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TargetCase valueOf(int value) { - return forNumber(value); - } - - public static TargetCase forNumber(int value) { - switch (value) { - case 2: return PRODUCT_SET_PURGE_CONFIG; - case 3: return DELETE_ORPHAN_PRODUCTS; - case 0: return TARGET_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public static final int PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER = 2; - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - @java.lang.Override - public boolean hasProductSetPurgeConfig() { - return targetCase_ == 2; - } - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig() { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - - public static final int DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER = 3; - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - @java.lang.Override - public boolean hasDeleteOrphanProducts() { - return targetCase_ == 3; - } - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - @java.lang.Override - public boolean getDeleteOrphanProducts() { - if (targetCase_ == 3) { - return (java.lang.Boolean) target_; - } - return false; - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 4; - private boolean force_; - /** - *
-   * The default value is false. Override this value to true to actually perform
-   * the purge.
-   * 
- * - * bool force = 4; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (targetCase_ == 2) { - output.writeMessage(2, (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); - } - if (targetCase_ == 3) { - output.writeBool( - 3, (boolean)((java.lang.Boolean) target_)); - } - if (force_ != false) { - output.writeBool(4, force_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (targetCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_); - } - if (targetCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 3, (boolean)((java.lang.Boolean) target_)); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, force_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest other = (com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getForce() - != other.getForce()) return false; - if (!getTargetCase().equals(other.getTargetCase())) return false; - switch (targetCase_) { - case 2: - if (!getProductSetPurgeConfig() - .equals(other.getProductSetPurgeConfig())) return false; - break; - case 3: - if (getDeleteOrphanProducts() - != other.getDeleteOrphanProducts()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - switch (targetCase_) { - case 2: - hash = (37 * hash) + PRODUCT_SET_PURGE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getProductSetPurgeConfig().hashCode(); - break; - case 3: - hash = (37 * hash) + DELETE_ORPHAN_PRODUCTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDeleteOrphanProducts()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `PurgeProducts` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.PurgeProductsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - com.google.cloud.vision.v1p4beta1.PurgeProductsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.class, com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - force_ = false; - - targetCase_ = 0; - target_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_PurgeProductsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest build() { - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest result = new com.google.cloud.vision.v1p4beta1.PurgeProductsRequest(this); - if (targetCase_ == 2) { - if (productSetPurgeConfigBuilder_ == null) { - result.target_ = target_; - } else { - result.target_ = productSetPurgeConfigBuilder_.build(); - } - } - if (targetCase_ == 3) { - result.target_ = target_; - } - result.parent_ = parent_; - result.force_ = force_; - result.targetCase_ = targetCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - switch (other.getTargetCase()) { - case PRODUCT_SET_PURGE_CONFIG: { - mergeProductSetPurgeConfig(other.getProductSetPurgeConfig()); - break; - } - case DELETE_ORPHAN_PRODUCTS: { - setDeleteOrphanProducts(other.getDeleteOrphanProducts()); - break; - } - case TARGET_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.PurgeProductsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.PurgeProductsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int targetCase_ = 0; - private java.lang.Object target_; - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public Builder clearTarget() { - targetCase_ = 0; - target_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder> productSetPurgeConfigBuilder_; - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - @java.lang.Override - public boolean hasProductSetPurgeConfig() { - return targetCase_ == 2; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig() { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } else { - if (targetCase_ == 2) { - return productSetPurgeConfigBuilder_.getMessage(); - } - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder setProductSetPurgeConfig(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig value) { - if (productSetPurgeConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - onChanged(); - } else { - productSetPurgeConfigBuilder_.setMessage(value); - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder setProductSetPurgeConfig( - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder builderForValue) { - if (productSetPurgeConfigBuilder_ == null) { - target_ = builderForValue.build(); - onChanged(); - } else { - productSetPurgeConfigBuilder_.setMessage(builderForValue.build()); - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder mergeProductSetPurgeConfig(com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig value) { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2 && - target_ != com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance()) { - target_ = com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.newBuilder((com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_) - .mergeFrom(value).buildPartial(); - } else { - target_ = value; - } - onChanged(); - } else { - if (targetCase_ == 2) { - productSetPurgeConfigBuilder_.mergeFrom(value); - } else { - productSetPurgeConfigBuilder_.setMessage(value); - } - } - targetCase_ = 2; - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public Builder clearProductSetPurgeConfig() { - if (productSetPurgeConfigBuilder_ == null) { - if (targetCase_ == 2) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - } else { - if (targetCase_ == 2) { - targetCase_ = 0; - target_ = null; - } - productSetPurgeConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder getProductSetPurgeConfigBuilder() { - return getProductSetPurgeConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder() { - if ((targetCase_ == 2) && (productSetPurgeConfigBuilder_ != null)) { - return productSetPurgeConfigBuilder_.getMessageOrBuilder(); - } else { - if (targetCase_ == 2) { - return (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_; - } - return com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - } - /** - *
-     * Specify which ProductSet contains the Products to be deleted.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder> - getProductSetPurgeConfigFieldBuilder() { - if (productSetPurgeConfigBuilder_ == null) { - if (!(targetCase_ == 2)) { - target_ = com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.getDefaultInstance(); - } - productSetPurgeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.Builder, com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder>( - (com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) target_, - getParentForChildren(), - isClean()); - target_ = null; - } - targetCase_ = 2; - onChanged();; - return productSetPurgeConfigBuilder_; - } - - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - public boolean hasDeleteOrphanProducts() { - return targetCase_ == 3; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - public boolean getDeleteOrphanProducts() { - if (targetCase_ == 3) { - return (java.lang.Boolean) target_; - } - return false; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @param value The deleteOrphanProducts to set. - * @return This builder for chaining. - */ - public Builder setDeleteOrphanProducts(boolean value) { - targetCase_ = 3; - target_ = value; - onChanged(); - return this; - } - /** - *
-     * If delete_orphan_products is true, all Products that are not in any
-     * ProductSet will be deleted.
-     * 
- * - * bool delete_orphan_products = 3; - * @return This builder for chaining. - */ - public Builder clearDeleteOrphanProducts() { - if (targetCase_ == 3) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The project and location in which the Products should be deleted.
-     * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * The default value is false. Override this value to true to actually perform
-     * the purge.
-     * 
- * - * bool force = 4; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - private static final com.google.cloud.vision.v1p4beta1.PurgeProductsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.PurgeProductsRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PurgeProductsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeProductsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java deleted file mode 100644 index 1674236f2db8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/PurgeProductsRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface PurgeProductsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return Whether the productSetPurgeConfig field is set. - */ - boolean hasProductSetPurgeConfig(); - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return The productSetPurgeConfig. - */ - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig getProductSetPurgeConfig(); - /** - *
-   * Specify which ProductSet contains the Products to be deleted.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSetPurgeConfig product_set_purge_config = 2; - */ - com.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigOrBuilder getProductSetPurgeConfigOrBuilder(); - - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return Whether the deleteOrphanProducts field is set. - */ - boolean hasDeleteOrphanProducts(); - /** - *
-   * If delete_orphan_products is true, all Products that are not in any
-   * ProductSet will be deleted.
-   * 
- * - * bool delete_orphan_products = 3; - * @return The deleteOrphanProducts. - */ - boolean getDeleteOrphanProducts(); - - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The project and location in which the Products should be deleted.
-   * Format is `projects/PROJECT_ID/locations/LOC_ID`.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The default value is false. Override this value to true to actually perform
-   * the purge.
-   * 
- * - * bool force = 4; - * @return The force. - */ - boolean getForce(); - - public com.google.cloud.vision.v1p4beta1.PurgeProductsRequest.TargetCase getTargetCase(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java deleted file mode 100644 index 1db5a0eb6920..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java +++ /dev/null @@ -1,1372 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A `ReferenceImage` represents a product image and its associated metadata,
- * such as bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ReferenceImage} - */ -public final class ReferenceImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.ReferenceImage) - ReferenceImageOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReferenceImage.newBuilder() to construct. - private ReferenceImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReferenceImage() { - name_ = ""; - uri_ = ""; - boundingPolys_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReferenceImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReferenceImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - boundingPolys_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ReferenceImage.class, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_FIELD_NUMBER = 2; - private volatile java.lang.Object uri_; - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOUNDING_POLYS_FIELD_NUMBER = 3; - private java.util.List boundingPolys_; - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List getBoundingPolysList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.List - getBoundingPolysOrBuilderList() { - return boundingPolys_; - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public int getBoundingPolysCount() { - return boundingPolys_.size(); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index) { - return boundingPolys_.get(index); - } - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - return boundingPolys_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - output.writeMessage(3, boundingPolys_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); - } - for (int i = 0; i < boundingPolys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, boundingPolys_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.ReferenceImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.ReferenceImage other = (com.google.cloud.vision.v1p4beta1.ReferenceImage) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getUri() - .equals(other.getUri())) return false; - if (!getBoundingPolysList() - .equals(other.getBoundingPolysList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - if (getBoundingPolysCount() > 0) { - hash = (37 * hash) + BOUNDING_POLYS_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPolysList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.ReferenceImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.ReferenceImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A `ReferenceImage` represents a product image and its associated metadata,
-   * such as bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.ReferenceImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.ReferenceImage) - com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.ReferenceImage.class, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.ReferenceImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBoundingPolysFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uri_ = ""; - - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_ReferenceImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage build() { - com.google.cloud.vision.v1p4beta1.ReferenceImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage buildPartial() { - com.google.cloud.vision.v1p4beta1.ReferenceImage result = new com.google.cloud.vision.v1p4beta1.ReferenceImage(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uri_ = uri_; - if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingPolys_ = boundingPolys_; - } else { - result.boundingPolys_ = boundingPolysBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.ReferenceImage) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.ReferenceImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.ReferenceImage other) { - if (other == com.google.cloud.vision.v1p4beta1.ReferenceImage.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - if (boundingPolysBuilder_ == null) { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolys_.isEmpty()) { - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingPolysIsMutable(); - boundingPolys_.addAll(other.boundingPolys_); - } - onChanged(); - } - } else { - if (!other.boundingPolys_.isEmpty()) { - if (boundingPolysBuilder_.isEmpty()) { - boundingPolysBuilder_.dispose(); - boundingPolysBuilder_ = null; - boundingPolys_ = other.boundingPolys_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingPolysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBoundingPolysFieldBuilder() : null; - } else { - boundingPolysBuilder_.addAllMessages(other.boundingPolys_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.ReferenceImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.ReferenceImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the reference image.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-     * This field is ignored when creating a reference image.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-     * Required. The Google Cloud Storage URI of the reference image.
-     * The URI must start with `gs://`.
-     * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - private java.util.List boundingPolys_ = - java.util.Collections.emptyList(); - private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingPolys_ = new java.util.ArrayList(boundingPolys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingPolysBuilder_; - - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List getBoundingPolysList() { - if (boundingPolysBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingPolys_); - } else { - return boundingPolysBuilder_.getMessageList(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public int getBoundingPolysCount() { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.size(); - } else { - return boundingPolysBuilder_.getCount(); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); - } else { - return boundingPolysBuilder_.getMessage(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, value); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setBoundingPolys( - int index, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingPolysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, value); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addBoundingPolys( - int index, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingPolysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder addAllBoundingPolys( - java.lang.Iterable values) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, boundingPolys_); - onChanged(); - } else { - boundingPolysBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearBoundingPolys() { - if (boundingPolysBuilder_ == null) { - boundingPolys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingPolysBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder removeBoundingPolys(int index) { - if (boundingPolysBuilder_ == null) { - ensureBoundingPolysIsMutable(); - boundingPolys_.remove(index); - onChanged(); - } else { - boundingPolysBuilder_.remove(index); - } - return this; - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().getBuilder(index); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index) { - if (boundingPolysBuilder_ == null) { - return boundingPolys_.get(index); } else { - return boundingPolysBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysOrBuilderList() { - if (boundingPolysBuilder_ != null) { - return boundingPolysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingPolys_); - } - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBuilder() { - return getBoundingPolysFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBuilder( - int index) { - return getBoundingPolysFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance()); - } - /** - *
-     * Optional. Bounding polygons around the areas of interest in the reference
-     * image. If this field is empty, the system will try to detect regions of
-     * interest. At most 10 bounding polygons will be used.
-     * The provided shape is converted into a non-rotated rectangle. Once
-     * converted, the small edge of the rectangle must be greater than or equal
-     * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-     * is not).
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public java.util.List - getBoundingPolysBuilderList() { - return getBoundingPolysFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingPolysFieldBuilder() { - if (boundingPolysBuilder_ == null) { - boundingPolysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - boundingPolys_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingPolys_ = null; - } - return boundingPolysBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.ReferenceImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ReferenceImage) - private static final com.google.cloud.vision.v1p4beta1.ReferenceImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.ReferenceImage(); - } - - public static com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReferenceImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReferenceImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ReferenceImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java deleted file mode 100644 index 23f38e21c30f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageName.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ReferenceImageName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String product; - private final String referenceImage; - - @Deprecated - protected ReferenceImageName() { - project = null; - location = null; - product = null; - referenceImage = null; - } - - private ReferenceImageName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - product = Preconditions.checkNotNull(builder.getProduct()); - referenceImage = Preconditions.checkNotNull(builder.getReferenceImage()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ReferenceImageName of( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build(); - } - - public static String format( - String project, String location, String product, String referenceImage) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setProduct(product) - .setReferenceImage(referenceImage) - .build() - .toString(); - } - - public static ReferenceImageName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.validatedMatch( - formattedString, "ReferenceImageName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("product"), - matchMap.get("reference_image")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ReferenceImageName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - if (product != null) { - fieldMapBuilder.put("product", product); - } - if (referenceImage != null) { - fieldMapBuilder.put("reference_image", referenceImage); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_PRODUCT_REFERENCE_IMAGE.instantiate( - "project", - project, - "location", - location, - "product", - product, - "reference_image", - referenceImage); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ReferenceImageName that = ((ReferenceImageName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.product, that.product) - && Objects.equals(this.referenceImage, that.referenceImage); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(product); - h *= 1000003; - h ^= Objects.hashCode(referenceImage); - return h; - } - - /** - * Builder for - * projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}. - */ - public static class Builder { - private String project; - private String location; - private String product; - private String referenceImage; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getProduct() { - return product; - } - - public String getReferenceImage() { - return referenceImage; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setProduct(String product) { - this.product = product; - return this; - } - - public Builder setReferenceImage(String referenceImage) { - this.referenceImage = referenceImage; - return this; - } - - private Builder(ReferenceImageName referenceImageName) { - this.project = referenceImageName.project; - this.location = referenceImageName.location; - this.product = referenceImageName.product; - this.referenceImage = referenceImageName.referenceImage; - } - - public ReferenceImageName build() { - return new ReferenceImageName(this); - } - } -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java deleted file mode 100644 index 0168999b06e7..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImageOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface ReferenceImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.ReferenceImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the reference image.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
-   * This field is ignored when creating a reference image.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * Required. The Google Cloud Storage URI of the reference image.
-   * The URI must start with `gs://`.
-   * 
- * - * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingPolys(int index); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getBoundingPolysCount(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.List - getBoundingPolysOrBuilderList(); - /** - *
-   * Optional. Bounding polygons around the areas of interest in the reference
-   * image. If this field is empty, the system will try to detect regions of
-   * interest. At most 10 bounding polygons will be used.
-   * The provided shape is converted into a non-rotated rectangle. Once
-   * converted, the small edge of the rectangle must be greater than or equal
-   * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
-   * is not).
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolysOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java deleted file mode 100644 index fdcef3b96f73..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java +++ /dev/null @@ -1,796 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `RemoveProductFromProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} - */ -public final class RemoveProductFromProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - RemoveProductFromProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RemoveProductFromProductSetRequest.newBuilder() to construct. - private RemoveProductFromProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RemoveProductFromProductSetRequest() { - name_ = ""; - product_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RemoveProductFromProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RemoveProductFromProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - product_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCT_FIELD_NUMBER = 2; - private volatile java.lang.Object product_; - /** - *
-   * Required. The resource name for the Product to be removed from this
-   * ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - @java.lang.Override - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } - } - /** - *
-   * Required. The resource name for the Product to be removed from this
-   * ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProduct() - .equals(other.getProduct())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `RemoveProductFromProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.class, com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - product_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_RemoveProductFromProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest result = new com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest(this); - result.name_ = name_; - result.product_ = product_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProduct().isEmpty()) { - product_ = other.product_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the ProductSet to modify.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object product_ = ""; - /** - *
-     * Required. The resource name for the Product to be removed from this
-     * ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - public java.lang.String getProduct() { - java.lang.Object ref = product_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - product_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this
-     * ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - public com.google.protobuf.ByteString - getProductBytes() { - java.lang.Object ref = product_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - product_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name for the Product to be removed from this
-     * ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The product to set. - * @return This builder for chaining. - */ - public Builder setProduct( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - product_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this
-     * ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearProduct() { - - product_ = getDefaultInstance().getProduct(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name for the Product to be removed from this
-     * ProductSet.
-     * Format is:
-     * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-     * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for product to set. - * @return This builder for chaining. - */ - public Builder setProductBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - product_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RemoveProductFromProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveProductFromProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java deleted file mode 100644 index 8e1d54f4ce7d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequestOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface RemoveProductFromProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The resource name for the ProductSet to modify.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Required. The resource name for the Product to be removed from this
-   * ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The product. - */ - java.lang.String getProduct(); - /** - *
-   * Required. The resource name for the Product to be removed from this
-   * ProductSet.
-   * Format is:
-   * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
-   * 
- * - * string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for product. - */ - com.google.protobuf.ByteString - getProductBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java deleted file mode 100644 index 7586ab5abe73..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Set of features pertaining to the image, computed by computer vision
- * methods over safe-search verticals (for example, adult, spoof, medical,
- * violence).
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.SafeSearchAnnotation} - */ -public final class SafeSearchAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - SafeSearchAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use SafeSearchAnnotation.newBuilder() to construct. - private SafeSearchAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SafeSearchAnnotation() { - adult_ = 0; - spoof_ = 0; - medical_ = 0; - violence_ = 0; - racy_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SafeSearchAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SafeSearchAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - adult_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - spoof_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - medical_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - violence_ = rawValue; - break; - } - case 72: { - int rawValue = input.readEnum(); - - racy_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder.class); - } - - public static final int ADULT_FIELD_NUMBER = 1; - private int adult_; - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int SPOOF_FIELD_NUMBER = 2; - private int spoof_; - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int MEDICAL_FIELD_NUMBER = 3; - private int medical_; - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int VIOLENCE_FIELD_NUMBER = 4; - private int violence_; - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - public static final int RACY_FIELD_NUMBER = 9; - private int racy_; - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adult_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - output.writeEnum(9, racy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adult_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, adult_); - } - if (spoof_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, spoof_); - } - if (medical_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, medical_); - } - if (violence_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, violence_); - } - if (racy_ != com.google.cloud.vision.v1p4beta1.Likelihood.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(9, racy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) obj; - - if (adult_ != other.adult_) return false; - if (spoof_ != other.spoof_) return false; - if (medical_ != other.medical_) return false; - if (violence_ != other.violence_) return false; - if (racy_ != other.racy_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADULT_FIELD_NUMBER; - hash = (53 * hash) + adult_; - hash = (37 * hash) + SPOOF_FIELD_NUMBER; - hash = (53 * hash) + spoof_; - hash = (37 * hash) + MEDICAL_FIELD_NUMBER; - hash = (53 * hash) + medical_; - hash = (37 * hash) + VIOLENCE_FIELD_NUMBER; - hash = (53 * hash) + violence_; - hash = (37 * hash) + RACY_FIELD_NUMBER; - hash = (53 * hash) + racy_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of features pertaining to the image, computed by computer vision
-   * methods over safe-search verticals (for example, adult, spoof, medical,
-   * violence).
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.SafeSearchAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.class, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adult_ = 0; - - spoof_ = 0; - - medical_ = 0; - - violence_ = 0; - - racy_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_SafeSearchAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation build() { - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation result = new com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation(this); - result.adult_ = adult_; - result.spoof_ = spoof_; - result.medical_ = medical_; - result.violence_ = violence_; - result.racy_ = racy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance()) return this; - if (other.adult_ != 0) { - setAdultValue(other.getAdultValue()); - } - if (other.spoof_ != 0) { - setSpoofValue(other.getSpoofValue()); - } - if (other.medical_ != 0) { - setMedicalValue(other.getMedicalValue()); - } - if (other.violence_ != 0) { - setViolenceValue(other.getViolenceValue()); - } - if (other.racy_ != 0) { - setRacyValue(other.getRacyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int adult_ = 0; - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - @java.lang.Override public int getAdultValue() { - return adult_; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @param value The enum numeric value on the wire for adult to set. - * @return This builder for chaining. - */ - public Builder setAdultValue(int value) { - - adult_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The adult. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getAdult() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(adult_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @param value The adult to set. - * @return This builder for chaining. - */ - public Builder setAdult(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - adult_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Represents the adult content likelihood for the image. Adult content may
-     * contain elements such as nudity, pornographic images or cartoons, or
-     * sexual activities.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return This builder for chaining. - */ - public Builder clearAdult() { - - adult_ = 0; - onChanged(); - return this; - } - - private int spoof_ = 0; - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - @java.lang.Override public int getSpoofValue() { - return spoof_; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @param value The enum numeric value on the wire for spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoofValue(int value) { - - spoof_ = value; - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The spoof. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getSpoof() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(spoof_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @param value The spoof to set. - * @return This builder for chaining. - */ - public Builder setSpoof(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - spoof_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Spoof likelihood. The likelihood that an modification
-     * was made to the image's canonical version to make it appear
-     * funny or offensive.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return This builder for chaining. - */ - public Builder clearSpoof() { - - spoof_ = 0; - onChanged(); - return this; - } - - private int medical_ = 0; - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - @java.lang.Override public int getMedicalValue() { - return medical_; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @param value The enum numeric value on the wire for medical to set. - * @return This builder for chaining. - */ - public Builder setMedicalValue(int value) { - - medical_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The medical. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getMedical() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(medical_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @param value The medical to set. - * @return This builder for chaining. - */ - public Builder setMedical(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - medical_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this is a medical image.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return This builder for chaining. - */ - public Builder clearMedical() { - - medical_ = 0; - onChanged(); - return this; - } - - private int violence_ = 0; - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - @java.lang.Override public int getViolenceValue() { - return violence_; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @param value The enum numeric value on the wire for violence to set. - * @return This builder for chaining. - */ - public Builder setViolenceValue(int value) { - - violence_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The violence. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getViolence() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(violence_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @param value The violence to set. - * @return This builder for chaining. - */ - public Builder setViolence(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - violence_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that this image contains violent content.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return This builder for chaining. - */ - public Builder clearViolence() { - - violence_ = 0; - onChanged(); - return this; - } - - private int racy_ = 0; - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - @java.lang.Override public int getRacyValue() { - return racy_; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @param value The enum numeric value on the wire for racy to set. - * @return This builder for chaining. - */ - public Builder setRacyValue(int value) { - - racy_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The racy. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Likelihood getRacy() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.Likelihood result = com.google.cloud.vision.v1p4beta1.Likelihood.valueOf(racy_); - return result == null ? com.google.cloud.vision.v1p4beta1.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @param value The racy to set. - * @return This builder for chaining. - */ - public Builder setRacy(com.google.cloud.vision.v1p4beta1.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - racy_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood that the request image contains racy content. Racy content may
-     * include (but is not limited to) skimpy or sheer clothing, strategically
-     * covered nudity, lewd or provocative poses, or close-ups of sensitive
-     * body areas.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return This builder for chaining. - */ - public Builder clearRacy() { - - racy_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - private static final com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafeSearchAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SafeSearchAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java deleted file mode 100644 index 215efc0708bd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotationOrBuilder.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface SafeSearchAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The enum numeric value on the wire for adult. - */ - int getAdultValue(); - /** - *
-   * Represents the adult content likelihood for the image. Adult content may
-   * contain elements such as nudity, pornographic images or cartoons, or
-   * sexual activities.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood adult = 1; - * @return The adult. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getAdult(); - - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The enum numeric value on the wire for spoof. - */ - int getSpoofValue(); - /** - *
-   * Spoof likelihood. The likelihood that an modification
-   * was made to the image's canonical version to make it appear
-   * funny or offensive.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood spoof = 2; - * @return The spoof. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getSpoof(); - - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The enum numeric value on the wire for medical. - */ - int getMedicalValue(); - /** - *
-   * Likelihood that this is a medical image.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood medical = 3; - * @return The medical. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getMedical(); - - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The enum numeric value on the wire for violence. - */ - int getViolenceValue(); - /** - *
-   * Likelihood that this image contains violent content.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood violence = 4; - * @return The violence. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getViolence(); - - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The enum numeric value on the wire for racy. - */ - int getRacyValue(); - /** - *
-   * Likelihood that the request image contains racy content. Racy content may
-   * include (but is not limited to) skimpy or sheer clothing, strategically
-   * covered nudity, lewd or provocative poses, or close-ups of sensitive
-   * body areas.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Likelihood racy = 9; - * @return The racy. - */ - com.google.cloud.vision.v1p4beta1.Likelihood getRacy(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java deleted file mode 100644 index 704cc93c6ca5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A single symbol representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Symbol} - */ -public final class Symbol extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Symbol) - SymbolOrBuilder { -private static final long serialVersionUID = 0L; - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Symbol() { - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Symbol(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Symbol( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Symbol.class, com.google.cloud.vision.v1p4beta1.Symbol.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int TEXT_FIELD_NUMBER = 3; - private volatile java.lang.Object text_; - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Symbol)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Symbol other = (com.google.cloud.vision.v1p4beta1.Symbol) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Symbol prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single symbol representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Symbol} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Symbol) - com.google.cloud.vision.v1p4beta1.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Symbol.class, com.google.cloud.vision.v1p4beta1.Symbol.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - text_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Symbol build() { - com.google.cloud.vision.v1p4beta1.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Symbol buildPartial() { - com.google.cloud.vision.v1p4beta1.Symbol result = new com.google.cloud.vision.v1p4beta1.Symbol(this); - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.text_ = text_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Symbol) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Symbol other) { - if (other == com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Symbol) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the symbol.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the symbol.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * The actual UTF-8 representation of the symbol.
-     * 
- * - * string text = 3; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the symbol. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Symbol) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Symbol) - private static final com.google.cloud.vision.v1p4beta1.Symbol DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Symbol(); - } - - public static com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Symbol getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java deleted file mode 100644 index b4ee30e25b1d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SymbolOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Symbol) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the symbol.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the symbol.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * The actual UTF-8 representation of the symbol.
-   * 
- * - * string text = 3; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); - - /** - *
-   * Confidence of the OCR results for the symbol. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java deleted file mode 100644 index 70b394e9ce8a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java +++ /dev/null @@ -1,3814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * TextAnnotation contains a structured representation of OCR extracted text.
- * The hierarchy of an OCR extracted text structure is like this:
- *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
- * Each structural component, starting from Page, may further have their own
- * properties. Properties describe detected languages, breaks etc.. Please refer
- * to the
- * [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty]
- * message definition below for more detail.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation} - */ -public final class TextAnnotation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation) - TextAnnotationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextAnnotation.newBuilder() to construct. - private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextAnnotation() { - pages_ = java.util.Collections.emptyList(); - text_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Page.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder.class); - } - - public interface DetectedLanguageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - float getConfidence(); - } - /** - *
-   * Detected language for a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} - */ - public static final class DetectedLanguage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - DetectedLanguageOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedLanguage.newBuilder() to construct. - private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedLanguage() { - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedLanguage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedLanguage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 21: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-     * information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIDENCE_FIELD_NUMBER = 2; - private float confidence_; - /** - *
-     * Confidence of detected language. Range [0, 1].
-     * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(2, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) obj; - - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected language for a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - languageCode_ = ""; - - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage build() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage buildPartial() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage(this); - result.languageCode_ = languageCode_; - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage other) { - if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()) return this; - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
-       * information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private float confidence_ ; - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-       * Confidence of detected language. Range [0, 1].
-       * 
- * - * float confidence = 2; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage(); - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedLanguage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedLanguage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectedBreakOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType(); - - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - boolean getIsPrefix(); - } - /** - *
-   * Detected start or end of a structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} - */ - public static final class DetectedBreak extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - DetectedBreakOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectedBreak.newBuilder() to construct. - private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectedBreak() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectedBreak(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectedBreak( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 16: { - - isPrefix_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - /** - *
-     * Enum to denote the type of break found. New line, space etc.
-     * 
- * - * Protobuf enum {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType} - */ - public enum BreakType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - SPACE(1), - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - SURE_SPACE(2), - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - EOL_SURE_SPACE(3), - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - HYPHEN(4), - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - LINE_BREAK(5), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unknown break label type.
-       * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-       * Regular space.
-       * 
- * - * SPACE = 1; - */ - public static final int SPACE_VALUE = 1; - /** - *
-       * Sure space (very wide).
-       * 
- * - * SURE_SPACE = 2; - */ - public static final int SURE_SPACE_VALUE = 2; - /** - *
-       * Line-wrapping break.
-       * 
- * - * EOL_SURE_SPACE = 3; - */ - public static final int EOL_SURE_SPACE_VALUE = 3; - /** - *
-       * End-line hyphen that is not present in text; does not co-occur with
-       * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
-       * 
- * - * HYPHEN = 4; - */ - public static final int HYPHEN_VALUE = 4; - /** - *
-       * Line break that ends a paragraph.
-       * 
- * - * LINE_BREAK = 5; - */ - public static final int LINE_BREAK_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BreakType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BreakType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SPACE; - case 2: return SURE_SPACE; - case 3: return EOL_SURE_SPACE; - case 4: return HYPHEN; - case 5: return LINE_BREAK; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BreakType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BreakType findValueByNumber(int number) { - return BreakType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDescriptor().getEnumTypes().get(0); - } - - private static final BreakType[] VALUES = values(); - - public static BreakType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BreakType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Detected break type.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - - public static final int IS_PREFIX_FIELD_NUMBER = 2; - private boolean isPrefix_; - /** - *
-     * True if break prepends the element.
-     * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (isPrefix_ != false) { - output.writeBool(2, isPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (isPrefix_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, isPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) obj; - - if (type_ != other.type_) return false; - if (getIsPrefix() - != other.getIsPrefix()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + IS_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPrefix()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Detected start or end of a structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - isPrefix_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak build() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak buildPartial() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak(this); - result.type_ = type_; - result.isPrefix_ = isPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak other) { - if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getIsPrefix() != false) { - setIsPrefix(other.getIsPrefix()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType getType() { - @SuppressWarnings("deprecation") - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType result = com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.valueOf(type_); - return result == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType.UNRECOGNIZED : result; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Detected break type.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private boolean isPrefix_ ; - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return The isPrefix. - */ - @java.lang.Override - public boolean getIsPrefix() { - return isPrefix_; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @param value The isPrefix to set. - * @return This builder for chaining. - */ - public Builder setIsPrefix(boolean value) { - - isPrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * True if break prepends the element.
-       * 
- * - * bool is_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearIsPrefix() { - - isPrefix_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak(); - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectedBreak parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectedBreak(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TextPropertyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - int getDetectedLanguagesCount(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - java.util.List - getDetectedLanguagesOrBuilderList(); - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index); - - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - boolean hasDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak(); - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder(); - } - /** - *
-   * Additional information detected on the structural component.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} - */ - public static final class TextProperty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - TextPropertyOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextProperty.newBuilder() to construct. - private TextProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextProperty() { - detectedLanguages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextProperty(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextProperty( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectedLanguages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder subBuilder = null; - if (detectedBreak_ != null) { - subBuilder = detectedBreak_.toBuilder(); - } - detectedBreak_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(detectedBreak_); - detectedBreak_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder.class); - } - - public static final int DETECTED_LANGUAGES_FIELD_NUMBER = 1; - private java.util.List detectedLanguages_; - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List getDetectedLanguagesList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public java.util.List - getDetectedLanguagesOrBuilderList() { - return detectedLanguages_; - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public int getDetectedLanguagesCount() { - return detectedLanguages_.size(); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - return detectedLanguages_.get(index); - } - /** - *
-     * A list of detected languages together with confidence.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - return detectedLanguages_.get(index); - } - - public static final int DETECTED_BREAK_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_; - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - @java.lang.Override - public boolean hasDetectedBreak() { - return detectedBreak_ != null; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - return detectedBreak_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - /** - *
-     * Detected start or end of a text segment.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - return getDetectedBreak(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < detectedLanguages_.size(); i++) { - output.writeMessage(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - output.writeMessage(2, getDetectedBreak()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < detectedLanguages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, detectedLanguages_.get(i)); - } - if (detectedBreak_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetectedBreak()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) obj; - - if (!getDetectedLanguagesList() - .equals(other.getDetectedLanguagesList())) return false; - if (hasDetectedBreak() != other.hasDetectedBreak()) return false; - if (hasDetectedBreak()) { - if (!getDetectedBreak() - .equals(other.getDetectedBreak())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDetectedLanguagesCount() > 0) { - hash = (37 * hash) + DETECTED_LANGUAGES_FIELD_NUMBER; - hash = (53 * hash) + getDetectedLanguagesList().hashCode(); - } - if (hasDetectedBreak()) { - hash = (37 * hash) + DETECTED_BREAK_FIELD_NUMBER; - hash = (53 * hash) + getDetectedBreak().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Additional information detected on the structural component.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectedLanguagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectedLanguagesBuilder_.clear(); - } - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty build() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty buildPartial() { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty result = new com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty(this); - int from_bitField0_ = bitField0_; - if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectedLanguages_ = detectedLanguages_; - } else { - result.detectedLanguages_ = detectedLanguagesBuilder_.build(); - } - if (detectedBreakBuilder_ == null) { - result.detectedBreak_ = detectedBreak_; - } else { - result.detectedBreak_ = detectedBreakBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty other) { - if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance()) return this; - if (detectedLanguagesBuilder_ == null) { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguages_.isEmpty()) { - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.addAll(other.detectedLanguages_); - } - onChanged(); - } - } else { - if (!other.detectedLanguages_.isEmpty()) { - if (detectedLanguagesBuilder_.isEmpty()) { - detectedLanguagesBuilder_.dispose(); - detectedLanguagesBuilder_ = null; - detectedLanguages_ = other.detectedLanguages_; - bitField0_ = (bitField0_ & ~0x00000001); - detectedLanguagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectedLanguagesFieldBuilder() : null; - } else { - detectedLanguagesBuilder_.addAllMessages(other.detectedLanguages_); - } - } - } - if (other.hasDetectedBreak()) { - mergeDetectedBreak(other.getDetectedBreak()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List detectedLanguages_ = - java.util.Collections.emptyList(); - private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectedLanguages_ = new java.util.ArrayList(detectedLanguages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder> detectedLanguagesBuilder_; - - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List getDetectedLanguagesList() { - if (detectedLanguagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } else { - return detectedLanguagesBuilder_.getMessageList(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public int getDetectedLanguagesCount() { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.size(); - } else { - return detectedLanguagesBuilder_.getCount(); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage getDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); - } else { - return detectedLanguagesBuilder_.getMessage(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder setDetectedLanguages( - int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.set(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage value) { - if (detectedLanguagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, value); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addDetectedLanguages( - int index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder builderForValue) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.add(index, builderForValue.build()); - onChanged(); - } else { - detectedLanguagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder addAllDetectedLanguages( - java.lang.Iterable values) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectedLanguages_); - onChanged(); - } else { - detectedLanguagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder clearDetectedLanguages() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectedLanguagesBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public Builder removeDetectedLanguages(int index) { - if (detectedLanguagesBuilder_ == null) { - ensureDetectedLanguagesIsMutable(); - detectedLanguages_.remove(index); - onChanged(); - } else { - detectedLanguagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder getDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder getDetectedLanguagesOrBuilder( - int index) { - if (detectedLanguagesBuilder_ == null) { - return detectedLanguages_.get(index); } else { - return detectedLanguagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesOrBuilderList() { - if (detectedLanguagesBuilder_ != null) { - return detectedLanguagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectedLanguages_); - } - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder() { - return getDetectedLanguagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder addDetectedLanguagesBuilder( - int index) { - return getDetectedLanguagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.getDefaultInstance()); - } - /** - *
-       * A list of detected languages together with confidence.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - public java.util.List - getDetectedLanguagesBuilderList() { - return getDetectedLanguagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder> - getDetectedLanguagesFieldBuilder() { - if (detectedLanguagesBuilder_ == null) { - detectedLanguagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder>( - detectedLanguages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectedLanguages_ = null; - } - return detectedLanguagesBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder> detectedBreakBuilder_; - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return Whether the detectedBreak field is set. - */ - public boolean hasDetectedBreak() { - return detectedBreakBuilder_ != null || detectedBreak_ != null; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - * @return The detectedBreak. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak getDetectedBreak() { - if (detectedBreakBuilder_ == null) { - return detectedBreak_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } else { - return detectedBreakBuilder_.getMessage(); - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detectedBreak_ = value; - onChanged(); - } else { - detectedBreakBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder setDetectedBreak( - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder builderForValue) { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = builderForValue.build(); - onChanged(); - } else { - detectedBreakBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder mergeDetectedBreak(com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak value) { - if (detectedBreakBuilder_ == null) { - if (detectedBreak_ != null) { - detectedBreak_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.newBuilder(detectedBreak_).mergeFrom(value).buildPartial(); - } else { - detectedBreak_ = value; - } - onChanged(); - } else { - detectedBreakBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public Builder clearDetectedBreak() { - if (detectedBreakBuilder_ == null) { - detectedBreak_ = null; - onChanged(); - } else { - detectedBreak_ = null; - detectedBreakBuilder_ = null; - } - - return this; - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder getDetectedBreakBuilder() { - - onChanged(); - return getDetectedBreakFieldBuilder().getBuilder(); - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder getDetectedBreakOrBuilder() { - if (detectedBreakBuilder_ != null) { - return detectedBreakBuilder_.getMessageOrBuilder(); - } else { - return detectedBreak_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.getDefaultInstance() : detectedBreak_; - } - } - /** - *
-       * Detected start or end of a text segment.
-       * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detected_break = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder> - getDetectedBreakFieldBuilder() { - if (detectedBreakBuilder_ == null) { - detectedBreakBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreakOrBuilder>( - getDetectedBreak(), - getParentForChildren(), - isClean()); - detectedBreak_ = null; - } - return detectedBreakBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - private static final com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty(); - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextProperty parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextProperty(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PAGES_FIELD_NUMBER = 1; - private java.util.List pages_; - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List getPagesList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - @java.lang.Override - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - @java.lang.Override - public int getPagesCount() { - return pages_.size(); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Page getPages(int index) { - return pages_.get(index); - } - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } - } - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, pages_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.TextAnnotation other = (com.google.cloud.vision.v1p4beta1.TextAnnotation) obj; - - if (!getPagesList() - .equals(other.getPagesList())) return false; - if (!getText() - .equals(other.getText())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPagesCount() > 0) { - hash = (37 * hash) + PAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesList().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * TextAnnotation contains a structured representation of OCR extracted text.
-   * The hierarchy of an OCR extracted text structure is like this:
-   *     TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
-   * Each structural component, starting from Page, may further have their own
-   * properties. Properties describe detected languages, breaks etc.. Please refer
-   * to the
-   * [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty]
-   * message definition below for more detail.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextAnnotation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextAnnotation) - com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextAnnotation.class, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.TextAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pagesBuilder_.clear(); - } - text_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation build() { - com.google.cloud.vision.v1p4beta1.TextAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation buildPartial() { - com.google.cloud.vision.v1p4beta1.TextAnnotation result = new com.google.cloud.vision.v1p4beta1.TextAnnotation(this); - int from_bitField0_ = bitField0_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - result.text_ = text_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.TextAnnotation) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.TextAnnotation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextAnnotation other) { - if (other == com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance()) return this; - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000001); - pagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.TextAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.TextAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder> pagesBuilder_; - - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p4beta1.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p4beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder setPages( - int index, com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder addPages(com.google.cloud.vision.v1p4beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p4beta1.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder addPages( - com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder addPages( - int index, com.google.cloud.vision.v1p4beta1.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p4beta1.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p4beta1.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public com.google.cloud.vision.v1p4beta1.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Page.getDefaultInstance()); - } - /** - *
-     * List of pages detected by OCR.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.lang.Object text_ = ""; - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - *
-     * UTF-8 text detected on the pages.
-     * 
- * - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation) - private static final com.google.cloud.vision.v1p4beta1.TextAnnotation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextAnnotation(); - } - - public static com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java deleted file mode 100644 index 5883d723e2da..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface TextAnnotationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - java.util.List - getPagesList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p4beta1.Page getPages(int index); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - int getPagesCount(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - java.util.List - getPagesOrBuilderList(); - /** - *
-   * List of pages detected by OCR.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Page pages = 1; - */ - com.google.cloud.vision.v1p4beta1.PageOrBuilder getPagesOrBuilder( - int index); - - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - *
-   * UTF-8 text detected on the pages.
-   * 
- * - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java deleted file mode 100644 index a7b95a3adc26..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotationProto.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class TextAnnotationProto { - private TextAnnotationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Page_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Block_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/vision/v1p4beta1/text_ann" + - "otation.proto\022\035google.cloud.vision.v1p4b" + - "eta1\032,google/cloud/vision/v1p4beta1/geom" + - "etry.proto\"\262\004\n\016TextAnnotation\0222\n\005pages\030\001" + - " \003(\0132#.google.cloud.vision.v1p4beta1.Pag" + - "e\022\014\n\004text\030\002 \001(\t\032=\n\020DetectedLanguage\022\025\n\rl" + - "anguage_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\032\334" + - "\001\n\rDetectedBreak\022S\n\004type\030\001 \001(\0162E.google." + - "cloud.vision.v1p4beta1.TextAnnotation.De" + - "tectedBreak.BreakType\022\021\n\tis_prefix\030\002 \001(\010" + - "\"c\n\tBreakType\022\013\n\007UNKNOWN\020\000\022\t\n\005SPACE\020\001\022\016\n" + - "\nSURE_SPACE\020\002\022\022\n\016EOL_SURE_SPACE\020\003\022\n\n\006HYP" + - "HEN\020\004\022\016\n\nLINE_BREAK\020\005\032\277\001\n\014TextProperty\022Z" + - "\n\022detected_languages\030\001 \003(\0132>.google.clou" + - "d.vision.v1p4beta1.TextAnnotation.Detect" + - "edLanguage\022S\n\016detected_break\030\002 \001(\0132;.goo" + - "gle.cloud.vision.v1p4beta1.TextAnnotatio" + - "n.DetectedBreak\"\275\001\n\004Page\022L\n\010property\030\001 \001" + - "(\0132:.google.cloud.vision.v1p4beta1.TextA" + - "nnotation.TextProperty\022\r\n\005width\030\002 \001(\005\022\016\n" + - "\006height\030\003 \001(\005\0224\n\006blocks\030\004 \003(\0132$.google.c" + - "loud.vision.v1p4beta1.Block\022\022\n\nconfidenc" + - "e\030\005 \001(\002\"\202\003\n\005Block\022L\n\010property\030\001 \001(\0132:.go" + - "ogle.cloud.vision.v1p4beta1.TextAnnotati" + - "on.TextProperty\022A\n\014bounding_box\030\002 \001(\0132+." + - "google.cloud.vision.v1p4beta1.BoundingPo" + - "ly\022<\n\nparagraphs\030\003 \003(\0132(.google.cloud.vi" + - "sion.v1p4beta1.Paragraph\022B\n\nblock_type\030\004" + - " \001(\0162..google.cloud.vision.v1p4beta1.Blo" + - "ck.BlockType\022\022\n\nconfidence\030\005 \001(\002\"R\n\tBloc" + - "kType\022\013\n\007UNKNOWN\020\000\022\010\n\004TEXT\020\001\022\t\n\005TABLE\020\002\022" + - "\013\n\007PICTURE\020\003\022\t\n\005RULER\020\004\022\013\n\007BARCODE\020\005\"\344\001\n" + - "\tParagraph\022L\n\010property\030\001 \001(\0132:.google.cl" + - "oud.vision.v1p4beta1.TextAnnotation.Text" + - "Property\022A\n\014bounding_box\030\002 \001(\0132+.google." + - "cloud.vision.v1p4beta1.BoundingPoly\0222\n\005w" + - "ords\030\003 \003(\0132#.google.cloud.vision.v1p4bet" + - "a1.Word\022\022\n\nconfidence\030\004 \001(\002\"\343\001\n\004Word\022L\n\010" + - "property\030\001 \001(\0132:.google.cloud.vision.v1p" + - "4beta1.TextAnnotation.TextProperty\022A\n\014bo" + - "unding_box\030\002 \001(\0132+.google.cloud.vision.v" + - "1p4beta1.BoundingPoly\0226\n\007symbols\030\003 \003(\0132%" + - ".google.cloud.vision.v1p4beta1.Symbol\022\022\n" + - "\nconfidence\030\004 \001(\002\"\273\001\n\006Symbol\022L\n\010property" + - "\030\001 \001(\0132:.google.cloud.vision.v1p4beta1.T" + - "extAnnotation.TextProperty\022A\n\014bounding_b" + - "ox\030\002 \001(\0132+.google.cloud.vision.v1p4beta1" + - ".BoundingPoly\022\014\n\004text\030\003 \001(\t\022\022\n\nconfidenc" + - "e\030\004 \001(\002B\211\001\n!com.google.cloud.vision.v1p4" + - "beta1B\023TextAnnotationProtoP\001ZCgoogle.gol" + - "ang.org/genproto/googleapis/cloud/vision" + - "/v1p4beta1;vision\370\001\001\242\002\004GCVNb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(), - }); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor, - new java.lang.String[] { "Pages", "Text", }); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor = - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedLanguage_descriptor, - new java.lang.String[] { "LanguageCode", "Confidence", }); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor = - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_DetectedBreak_descriptor, - new java.lang.String[] { "Type", "IsPrefix", }); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor = - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_TextAnnotation_TextProperty_descriptor, - new java.lang.String[] { "DetectedLanguages", "DetectedBreak", }); - internal_static_google_cloud_vision_v1p4beta1_Page_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_Page_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Page_descriptor, - new java.lang.String[] { "Property", "Width", "Height", "Blocks", "Confidence", }); - internal_static_google_cloud_vision_v1p4beta1_Block_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_Block_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Block_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Paragraphs", "BlockType", "Confidence", }); - internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_vision_v1p4beta1_Paragraph_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Paragraph_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Words", "Confidence", }); - internal_static_google_cloud_vision_v1p4beta1_Word_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Word_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Symbols", "Confidence", }); - internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_vision_v1p4beta1_Symbol_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_Symbol_descriptor, - new java.lang.String[] { "Property", "BoundingBox", "Text", "Confidence", }); - com.google.cloud.vision.v1p4beta1.GeometryProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java deleted file mode 100644 index c77dee331ebb..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParams.java +++ /dev/null @@ -1,767 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Parameters for text detections. This is used to control TEXT_DETECTION and
- * DOCUMENT_TEXT_DETECTION features.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextDetectionParams} - */ -public final class TextDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.TextDetectionParams) - TextDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TextDetectionParams.newBuilder() to construct. - private TextDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TextDetectionParams() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TextDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TextDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 72: { - - enableTextDetectionConfidenceScore_ = input.readBool(); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advancedOcrOptions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextDetectionParams.class, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder.class); - } - - public static final int ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER = 9; - private boolean enableTextDetectionConfidenceScore_; - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - - public static final int ADVANCED_OCR_OPTIONS_FIELD_NUMBER = 11; - private com.google.protobuf.LazyStringList advancedOcrOptions_; - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_; - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enableTextDetectionConfidenceScore_ != false) { - output.writeBool(9, enableTextDetectionConfidenceScore_); - } - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, advancedOcrOptions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableTextDetectionConfidenceScore_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, enableTextDetectionConfidenceScore_); - } - { - int dataSize = 0; - for (int i = 0; i < advancedOcrOptions_.size(); i++) { - dataSize += computeStringSizeNoTag(advancedOcrOptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdvancedOcrOptionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.TextDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.TextDetectionParams other = (com.google.cloud.vision.v1p4beta1.TextDetectionParams) obj; - - if (getEnableTextDetectionConfidenceScore() - != other.getEnableTextDetectionConfidenceScore()) return false; - if (!getAdvancedOcrOptionsList() - .equals(other.getAdvancedOcrOptionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableTextDetectionConfidenceScore()); - if (getAdvancedOcrOptionsCount() > 0) { - hash = (37 * hash) + ADVANCED_OCR_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getAdvancedOcrOptionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.TextDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for text detections. This is used to control TEXT_DETECTION and
-   * DOCUMENT_TEXT_DETECTION features.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.TextDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.TextDetectionParams) - com.google.cloud.vision.v1p4beta1.TextDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.TextDetectionParams.class, com.google.cloud.vision.v1p4beta1.TextDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.TextDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - enableTextDetectionConfidenceScore_ = false; - - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_TextDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParams build() { - com.google.cloud.vision.v1p4beta1.TextDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParams buildPartial() { - com.google.cloud.vision.v1p4beta1.TextDetectionParams result = new com.google.cloud.vision.v1p4beta1.TextDetectionParams(this); - int from_bitField0_ = bitField0_; - result.enableTextDetectionConfidenceScore_ = enableTextDetectionConfidenceScore_; - if (((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = advancedOcrOptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.advancedOcrOptions_ = advancedOcrOptions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.TextDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.TextDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.TextDetectionParams other) { - if (other == com.google.cloud.vision.v1p4beta1.TextDetectionParams.getDefaultInstance()) return this; - if (other.getEnableTextDetectionConfidenceScore() != false) { - setEnableTextDetectionConfidenceScore(other.getEnableTextDetectionConfidenceScore()); - } - if (!other.advancedOcrOptions_.isEmpty()) { - if (advancedOcrOptions_.isEmpty()) { - advancedOcrOptions_ = other.advancedOcrOptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.addAll(other.advancedOcrOptions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.TextDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.TextDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean enableTextDetectionConfidenceScore_ ; - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - @java.lang.Override - public boolean getEnableTextDetectionConfidenceScore() { - return enableTextDetectionConfidenceScore_; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @param value The enableTextDetectionConfidenceScore to set. - * @return This builder for chaining. - */ - public Builder setEnableTextDetectionConfidenceScore(boolean value) { - - enableTextDetectionConfidenceScore_ = value; - onChanged(); - return this; - } - /** - *
-     * By default, Cloud Vision API only includes confidence score for
-     * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-     * score for TEXT_DETECTION as well.
-     * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return This builder for chaining. - */ - public Builder clearEnableTextDetectionConfidenceScore() { - - enableTextDetectionConfidenceScore_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdvancedOcrOptionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - advancedOcrOptions_ = new com.google.protobuf.LazyStringArrayList(advancedOcrOptions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - public com.google.protobuf.ProtocolStringList - getAdvancedOcrOptionsList() { - return advancedOcrOptions_.getUnmodifiableView(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - public int getAdvancedOcrOptionsCount() { - return advancedOcrOptions_.size(); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - public java.lang.String getAdvancedOcrOptions(int index) { - return advancedOcrOptions_.get(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - public com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index) { - return advancedOcrOptions_.getByteString(index); - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index to set the value at. - * @param value The advancedOcrOptions to set. - * @return This builder for chaining. - */ - public Builder setAdvancedOcrOptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param values The advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAllAdvancedOcrOptions( - java.lang.Iterable values) { - ensureAdvancedOcrOptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, advancedOcrOptions_); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @return This builder for chaining. - */ - public Builder clearAdvancedOcrOptions() { - advancedOcrOptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of advanced OCR options to fine-tune OCR behavior.
-     * 
- * - * repeated string advanced_ocr_options = 11; - * @param value The bytes of the advancedOcrOptions to add. - * @return This builder for chaining. - */ - public Builder addAdvancedOcrOptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdvancedOcrOptionsIsMutable(); - advancedOcrOptions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.TextDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextDetectionParams) - private static final com.google.cloud.vision.v1p4beta1.TextDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.TextDetectionParams(); - } - - public static com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java deleted file mode 100644 index 6740edf2cae5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextDetectionParamsOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface TextDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.TextDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * By default, Cloud Vision API only includes confidence score for
-   * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence
-   * score for TEXT_DETECTION as well.
-   * 
- * - * bool enable_text_detection_confidence_score = 9; - * @return The enableTextDetectionConfidenceScore. - */ - boolean getEnableTextDetectionConfidenceScore(); - - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return A list containing the advancedOcrOptions. - */ - java.util.List - getAdvancedOcrOptionsList(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @return The count of advancedOcrOptions. - */ - int getAdvancedOcrOptionsCount(); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the element to return. - * @return The advancedOcrOptions at the given index. - */ - java.lang.String getAdvancedOcrOptions(int index); - /** - *
-   * A list of advanced OCR options to fine-tune OCR behavior.
-   * 
- * - * repeated string advanced_ocr_options = 11; - * @param index The index of the value to return. - * @return The bytes of the advancedOcrOptions at the given index. - */ - com.google.protobuf.ByteString - getAdvancedOcrOptionsBytes(int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java deleted file mode 100644 index 261460028d11..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `UpdateProduct` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductRequest} - */ -public final class UpdateProductRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.UpdateProductRequest) - UpdateProductRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductRequest.newBuilder() to construct. - private UpdateProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = input.readMessage(com.google.cloud.vision.v1p4beta1.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductRequest.Builder.class); - } - - public static final int PRODUCT_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.Product product_; - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - @java.lang.Override - public boolean hasProduct() { - return product_ != null; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - return getProduct(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (product_ != null) { - output.writeMessage(1, getProduct()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (product_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProduct()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.UpdateProductRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductRequest) obj; - - if (hasProduct() != other.hasProduct()) return false; - if (hasProduct()) { - if (!getProduct() - .equals(other.getProduct())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProduct()) { - hash = (37 * hash) + PRODUCT_FIELD_NUMBER; - hash = (53 * hash) + getProduct().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.UpdateProductRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProduct` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.UpdateProductRequest) - com.google.cloud.vision.v1p4beta1.UpdateProductRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.UpdateProductRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productBuilder_ == null) { - product_ = null; - } else { - product_ = null; - productBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductRequest build() { - com.google.cloud.vision.v1p4beta1.UpdateProductRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.UpdateProductRequest result = new com.google.cloud.vision.v1p4beta1.UpdateProductRequest(this); - if (productBuilder_ == null) { - result.product_ = product_; - } else { - result.product_ = productBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.UpdateProductRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.UpdateProductRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.UpdateProductRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.UpdateProductRequest.getDefaultInstance()) return this; - if (other.hasProduct()) { - mergeProduct(other.getProduct()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.UpdateProductRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.UpdateProductRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.Product product_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> productBuilder_; - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - public boolean hasProduct() { - return productBuilder_ != null || product_ != null; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - public com.google.cloud.vision.v1p4beta1.Product getProduct() { - if (productBuilder_ == null) { - return product_ == null ? com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } else { - return productBuilder_.getMessage(); - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - product_ = value; - onChanged(); - } else { - productBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProduct( - com.google.cloud.vision.v1p4beta1.Product.Builder builderForValue) { - if (productBuilder_ == null) { - product_ = builderForValue.build(); - onChanged(); - } else { - productBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProduct(com.google.cloud.vision.v1p4beta1.Product value) { - if (productBuilder_ == null) { - if (product_ != null) { - product_ = - com.google.cloud.vision.v1p4beta1.Product.newBuilder(product_).mergeFrom(value).buildPartial(); - } else { - product_ = value; - } - onChanged(); - } else { - productBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProduct() { - if (productBuilder_ == null) { - product_ = null; - onChanged(); - } else { - product_ = null; - productBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.Product.Builder getProductBuilder() { - - onChanged(); - return getProductFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() { - if (productBuilder_ != null) { - return productBuilder_.getMessageOrBuilder(); - } else { - return product_ == null ? - com.google.cloud.vision.v1p4beta1.Product.getDefaultInstance() : product_; - } - } - /** - *
-     * Required. The Product resource which replaces the one on the server.
-     * product.name is immutable.
-     * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder> - getProductFieldBuilder() { - if (productBuilder_ == null) { - productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - getProduct(), - getParentForChildren(), - isClean()); - product_ = null; - } - return productBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-     * to update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask paths include `product_labels`, `display_name`, and
-     * `description`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.UpdateProductRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductRequest) - private static final com.google.cloud.vision.v1p4beta1.UpdateProductRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.UpdateProductRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java deleted file mode 100644 index 2386419471f2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface UpdateProductRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.UpdateProductRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the product field is set. - */ - boolean hasProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The product. - */ - com.google.cloud.vision.v1p4beta1.Product getProduct(); - /** - *
-   * Required. The Product resource which replaces the one on the server.
-   * product.name is immutable.
-   * 
- * - * .google.cloud.vision.v1p4beta1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
-   * to update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask paths include `product_labels`, `display_name`, and
-   * `description`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java deleted file mode 100644 index eef96da65072..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java +++ /dev/null @@ -1,937 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Request message for the `UpdateProductSet` method.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductSetRequest} - */ -public final class UpdateProductSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - UpdateProductSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateProductSetRequest.newBuilder() to construct. - private UpdateProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateProductSetRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateProductSetRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateProductSetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.ProductSet.Builder subBuilder = null; - if (productSet_ != null) { - subBuilder = productSet_.toBuilder(); - } - productSet_ = input.readMessage(com.google.cloud.vision.v1p4beta1.ProductSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productSet_); - productSet_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.Builder.class); - } - - public static final int PRODUCT_SET_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - @java.lang.Override - public boolean hasProductSet() { - return productSet_ != null; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { - return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { - return getProductSet(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (productSet_ != null) { - output.writeMessage(1, getProductSet()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (productSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProductSet()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) obj; - - if (hasProductSet() != other.hasProductSet()) return false; - if (hasProductSet()) { - if (!getProductSet() - .equals(other.getProductSet())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProductSet()) { - hash = (37 * hash) + PRODUCT_SET_FIELD_NUMBER; - hash = (53 * hash) + getProductSet().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for the `UpdateProductSet` method.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.UpdateProductSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.class, com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (productSetBuilder_ == null) { - productSet_ = null; - } else { - productSet_ = null; - productSetBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto.internal_static_google_cloud_vision_v1p4beta1_UpdateProductSetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest build() { - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest buildPartial() { - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest result = new com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest(this); - if (productSetBuilder_ == null) { - result.productSet_ = productSet_; - } else { - result.productSet_ = productSetBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest other) { - if (other == com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest.getDefaultInstance()) return this; - if (other.hasProductSet()) { - mergeProductSet(other.getProductSet()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> productSetBuilder_; - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - public boolean hasProductSet() { - return productSetBuilder_ != null || productSet_ != null; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet() { - if (productSetBuilder_ == null) { - return productSet_ == null ? com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } else { - return productSetBuilder_.getMessage(); - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - productSet_ = value; - onChanged(); - } else { - productSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setProductSet( - com.google.cloud.vision.v1p4beta1.ProductSet.Builder builderForValue) { - if (productSetBuilder_ == null) { - productSet_ = builderForValue.build(); - onChanged(); - } else { - productSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeProductSet(com.google.cloud.vision.v1p4beta1.ProductSet value) { - if (productSetBuilder_ == null) { - if (productSet_ != null) { - productSet_ = - com.google.cloud.vision.v1p4beta1.ProductSet.newBuilder(productSet_).mergeFrom(value).buildPartial(); - } else { - productSet_ = value; - } - onChanged(); - } else { - productSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearProductSet() { - if (productSetBuilder_ == null) { - productSet_ = null; - onChanged(); - } else { - productSet_ = null; - productSetBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductSet.Builder getProductSetBuilder() { - - onChanged(); - return getProductSetFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder() { - if (productSetBuilder_ != null) { - return productSetBuilder_.getMessageOrBuilder(); - } else { - return productSet_ == null ? - com.google.cloud.vision.v1p4beta1.ProductSet.getDefaultInstance() : productSet_; - } - } - /** - *
-     * Required. The ProductSet resource which replaces the one on the server.
-     * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder> - getProductSetFieldBuilder() { - if (productSetBuilder_ == null) { - productSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( - getProductSet(), - getParentForChildren(), - isClean()); - productSet_ = null; - } - return productSetBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-     * update.
-     * If update_mask isn't specified, all mutable fields are to be updated.
-     * Valid mask path is `display_name`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - private static final com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest(); - } - - public static com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateProductSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductSetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java deleted file mode 100644 index bf61f1ef04f5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequestOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/product_search_service.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface UpdateProductSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the productSet field is set. - */ - boolean hasProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The productSet. - */ - com.google.cloud.vision.v1p4beta1.ProductSet getProductSet(); - /** - *
-   * Required. The ProductSet resource which replaces the one on the server.
-   * 
- * - * .google.cloud.vision.v1p4beta1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuilder(); - - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to
-   * update.
-   * If update_mask isn't specified, all mutable fields are to be updated.
-   * Valid mask path is `display_name`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java deleted file mode 100644 index 45a6c19c1689..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A vertex represents a 2D point in the image.
- * NOTE: the vertex coordinates are in the same scale as the original image.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Vertex} - */ -public final class Vertex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Vertex) - VertexOrBuilder { -private static final long serialVersionUID = 0L; - // Use Vertex.newBuilder() to construct. - private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Vertex() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Vertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Vertex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - x_ = input.readInt32(); - break; - } - case 16: { - - y_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Vertex.class, com.google.cloud.vision.v1p4beta1.Vertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private int x_; - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private int y_; - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (x_ != 0) { - output.writeInt32(1, x_); - } - if (y_ != 0) { - output.writeInt32(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, x_); - } - if (y_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Vertex)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Vertex other = (com.google.cloud.vision.v1p4beta1.Vertex) obj; - - if (getX() - != other.getX()) return false; - if (getY() - != other.getY()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + X_FIELD_NUMBER; - hash = (53 * hash) + getX(); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + getY(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Vertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Vertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A vertex represents a 2D point in the image.
-   * NOTE: the vertex coordinates are in the same scale as the original image.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Vertex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Vertex) - com.google.cloud.vision.v1p4beta1.VertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Vertex.class, com.google.cloud.vision.v1p4beta1.Vertex.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Vertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0; - - y_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.GeometryProto.internal_static_google_cloud_vision_v1p4beta1_Vertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Vertex build() { - com.google.cloud.vision.v1p4beta1.Vertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Vertex buildPartial() { - com.google.cloud.vision.v1p4beta1.Vertex result = new com.google.cloud.vision.v1p4beta1.Vertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Vertex) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Vertex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Vertex other) { - if (other == com.google.cloud.vision.v1p4beta1.Vertex.getDefaultInstance()) return this; - if (other.getX() != 0) { - setX(other.getX()); - } - if (other.getY() != 0) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Vertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Vertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int x_ ; - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return The x. - */ - @java.lang.Override - public int getX() { - return x_; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(int value) { - - x_ = value; - onChanged(); - return this; - } - /** - *
-     * X coordinate.
-     * 
- * - * int32 x = 1; - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0; - onChanged(); - return this; - } - - private int y_ ; - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return The y. - */ - @java.lang.Override - public int getY() { - return y_; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(int value) { - - y_ = value; - onChanged(); - return this; - } - /** - *
-     * Y coordinate.
-     * 
- * - * int32 y = 2; - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Vertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Vertex) - private static final com.google.cloud.vision.v1p4beta1.Vertex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Vertex(); - } - - public static com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Vertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Vertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Vertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java deleted file mode 100644 index 7dc7ef73c9f9..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/VertexOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/geometry.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface VertexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Vertex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * X coordinate.
-   * 
- * - * int32 x = 1; - * @return The x. - */ - int getX(); - - /** - *
-   * Y coordinate.
-   * 
- * - * int32 y = 2; - * @return The y. - */ - int getY(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java deleted file mode 100644 index 3c798741eabe..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java +++ /dev/null @@ -1,7560 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/web_detection.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Relevant information for the image from the Internet.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} - */ -public final class WebDetection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection) - WebDetectionOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetection.newBuilder() to construct. - private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetection() { - webEntities_ = java.util.Collections.emptyList(); - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - visuallySimilarImages_ = java.util.Collections.emptyList(); - bestGuessLabels_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetection(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetection( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - webEntities_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pagesWithMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - visuallySimilarImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - bestGuessLabels_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); - } - - public interface WebEntityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - java.lang.String getEntityId(); - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - com.google.protobuf.ByteString - getEntityIdBytes(); - - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - *
-   * Entity deduced from similar images on the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} - */ - public static final class WebEntity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - WebEntityOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebEntity.newBuilder() to construct. - private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebEntity() { - entityId_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebEntity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebEntity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - entityId_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object entityId_; - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The entityId. - */ - @java.lang.Override - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } - } - /** - *
-     * Opaque entity ID.
-     * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * Overall relevancy score for the entity.
-     * Not normalized and not comparable across different image queries.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * Canonical description of the entity, in English.
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) obj; - - if (!getEntityId() - .equals(other.getEntityId())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Entity deduced from similar images on the Internet.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - entityId_ = ""; - - score_ = 0F; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity build() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(this); - result.entityId_ = entityId_; - result.score_ = score_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()) return this; - if (!other.getEntityId().isEmpty()) { - entityId_ = other.entityId_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object entityId_ = ""; - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The entityId. - */ - public java.lang.String getEntityId() { - java.lang.Object ref = entityId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - entityId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return The bytes for entityId. - */ - public com.google.protobuf.ByteString - getEntityIdBytes() { - java.lang.Object ref = entityId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - entityId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - entityId_ = value; - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @return This builder for chaining. - */ - public Builder clearEntityId() { - - entityId_ = getDefaultInstance().getEntityId(); - onChanged(); - return this; - } - /** - *
-       * Opaque entity ID.
-       * 
- * - * string entity_id = 1; - * @param value The bytes for entityId to set. - * @return This builder for chaining. - */ - public Builder setEntityIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - entityId_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * Overall relevancy score for the entity.
-       * Not normalized and not comparable across different image queries.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * Canonical description of the entity, in English.
-       * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebEntity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebEntity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebImageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - } - /** - *
-   * Metadata for online images.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} - */ - public static final class WebImage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - WebImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebImage.newBuilder() to construct. - private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebImage() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebImage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebImage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result image URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the image.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for online images.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage build() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(this); - result.url_ = url_; - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebImage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result image URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the image.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebImage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebImage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebImage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebPageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - float getScore(); - - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - java.lang.String getPageTitle(); - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - com.google.protobuf.ByteString - getPageTitleBytes(); - - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - int getFullMatchingImagesCount(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - int getPartialMatchingImagesCount(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - } - /** - *
-   * Metadata for web pages.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} - */ - public static final class WebPage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - WebPageOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebPage.newBuilder() to construct. - private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebPage() { - url_ = ""; - pageTitle_ = ""; - fullMatchingImages_ = java.util.Collections.emptyList(); - partialMatchingImages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebPage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebPage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 21: { - - score_ = input.readFloat(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageTitle_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fullMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - partialMatchingImages_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The result web page URL.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - *
-     * (Deprecated) Overall relevancy score for the web page.
-     * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - - public static final int PAGE_TITLE_FIELD_NUMBER = 3; - private volatile java.lang.Object pageTitle_; - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - @java.lang.Override - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } - } - /** - *
-     * Title for the web page, may contain HTML markups.
-     * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List fullMatchingImages_; - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-     * Fully matching images on the page.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; - private java.util.List partialMatchingImages_; - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-     * Partial matching images on the page.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its
-     * crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - output.writeFloat(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(5, partialMatchingImages_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (java.lang.Float.floatToRawIntBits(score_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, score_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageTitle_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, partialMatchingImages_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits( - other.getScore())) return false; - if (!getPageTitle() - .equals(other.getPageTitle())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getScore()); - hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; - hash = (53 * hash) + getPageTitle().hashCode(); - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Metadata for web pages.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - score_ = 0F; - - pageTitle_ = ""; - - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage build() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(this); - int from_bitField0_ = bitField0_; - result.url_ = url_; - result.score_ = score_; - result.pageTitle_ = pageTitle_; - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebPage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (!other.getPageTitle().isEmpty()) { - pageTitle_ = other.pageTitle_; - onChanged(); - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000001); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object url_ = ""; - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The result web page URL.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private float score_ ; - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return The score. - */ - @java.lang.Override - public float getScore() { - return score_; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-       * (Deprecated) Overall relevancy score for the web page.
-       * 
- * - * float score = 2; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object pageTitle_ = ""; - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The pageTitle. - */ - public java.lang.String getPageTitle() { - java.lang.Object ref = pageTitle_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageTitle_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return The bytes for pageTitle. - */ - public com.google.protobuf.ByteString - getPageTitleBytes() { - java.lang.Object ref = pageTitle_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageTitle_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageTitle_ = value; - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @return This builder for chaining. - */ - public Builder clearPageTitle() { - - pageTitle_ = getDefaultInstance().getPageTitle(); - onChanged(); - return this; - } - /** - *
-       * Title for the web page, may contain HTML markups.
-       * 
- * - * string page_title = 3; - * @param value The bytes for pageTitle to set. - * @return This builder for chaining. - */ - public Builder setPageTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageTitle_ = value; - onChanged(); - return this; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Fully matching images on the page.
-       * Can include resized copies of the query image.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-       * Partial matching images on the page.
-       * Those images are similar enough to share some key-point features. For
-       * example an original image will likely have partial matching for its
-       * crops.
-       * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebPage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebPage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebPage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WebLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - } - /** - *
-   * Label to provide extra metadata for the web detection.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} - */ - public static final class WebLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - WebLabelOrBuilder { - private static final long serialVersionUID = 0L; - // Use WebLabel.newBuilder() to construct. - private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebLabel() { - label_ = ""; - languageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); - } - - public static final int LABEL_FIELD_NUMBER = 1; - private volatile java.lang.Object label_; - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * Label for extra metadata.
-     * 
- * - * string label = 1; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object languageCode_; - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-     * For more information, see
-     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-     * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) obj; - - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Label to provide extra metadata for the web detection.
-     * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - label_ = ""; - - languageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel build() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(this); - result.label_ = label_; - result.languageCode_ = languageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()) return this; - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * Label for extra metadata.
-       * 
- * - * string label = 1; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
-       * For more information, see
-       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
-       * 
- * - * string language_code = 2; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int WEB_ENTITIES_FIELD_NUMBER = 1; - private java.util.List webEntities_; - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List getWebEntitiesList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public java.util.List - getWebEntitiesOrBuilderList() { - return webEntities_; - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public int getWebEntitiesCount() { - return webEntities_.size(); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { - return webEntities_.get(index); - } - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - return webEntities_.get(index); - } - - public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; - private java.util.List fullMatchingImages_; - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List getFullMatchingImagesList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public java.util.List - getFullMatchingImagesOrBuilderList() { - return fullMatchingImages_; - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public int getFullMatchingImagesCount() { - return fullMatchingImages_.size(); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { - return fullMatchingImages_.get(index); - } - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - return fullMatchingImages_.get(index); - } - - public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; - private java.util.List partialMatchingImages_; - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List getPartialMatchingImagesList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public java.util.List - getPartialMatchingImagesOrBuilderList() { - return partialMatchingImages_; - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public int getPartialMatchingImagesCount() { - return partialMatchingImages_.size(); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - return partialMatchingImages_.get(index); - } - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - return partialMatchingImages_.get(index); - } - - public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; - private java.util.List pagesWithMatchingImages_; - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List getPagesWithMatchingImagesList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - return pagesWithMatchingImages_; - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public int getPagesWithMatchingImagesCount() { - return pagesWithMatchingImages_.size(); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - return pagesWithMatchingImages_.get(index); - } - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - return pagesWithMatchingImages_.get(index); - } - - public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; - private java.util.List visuallySimilarImages_; - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List getVisuallySimilarImagesList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - return visuallySimilarImages_; - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public int getVisuallySimilarImagesCount() { - return visuallySimilarImages_.size(); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - return visuallySimilarImages_.get(index); - } - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - return visuallySimilarImages_.get(index); - } - - public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; - private java.util.List bestGuessLabels_; - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List getBestGuessLabelsList() { - return bestGuessLabels_; - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public java.util.List - getBestGuessLabelsOrBuilderList() { - return bestGuessLabels_; - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public int getBestGuessLabelsCount() { - return bestGuessLabels_.size(); - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - return bestGuessLabels_.get(index); - } - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - return bestGuessLabels_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < webEntities_.size(); i++) { - output.writeMessage(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - output.writeMessage(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - output.writeMessage(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - output.writeMessage(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - output.writeMessage(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - output.writeMessage(8, bestGuessLabels_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < webEntities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, webEntities_.get(i)); - } - for (int i = 0; i < fullMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fullMatchingImages_.get(i)); - } - for (int i = 0; i < partialMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, partialMatchingImages_.get(i)); - } - for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pagesWithMatchingImages_.get(i)); - } - for (int i = 0; i < visuallySimilarImages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, visuallySimilarImages_.get(i)); - } - for (int i = 0; i < bestGuessLabels_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, bestGuessLabels_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetection other = (com.google.cloud.vision.v1p4beta1.WebDetection) obj; - - if (!getWebEntitiesList() - .equals(other.getWebEntitiesList())) return false; - if (!getFullMatchingImagesList() - .equals(other.getFullMatchingImagesList())) return false; - if (!getPartialMatchingImagesList() - .equals(other.getPartialMatchingImagesList())) return false; - if (!getPagesWithMatchingImagesList() - .equals(other.getPagesWithMatchingImagesList())) return false; - if (!getVisuallySimilarImagesList() - .equals(other.getVisuallySimilarImagesList())) return false; - if (!getBestGuessLabelsList() - .equals(other.getBestGuessLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWebEntitiesCount() > 0) { - hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getWebEntitiesList().hashCode(); - } - if (getFullMatchingImagesCount() > 0) { - hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getFullMatchingImagesList().hashCode(); - } - if (getPartialMatchingImagesCount() > 0) { - hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); - } - if (getPagesWithMatchingImagesCount() > 0) { - hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); - } - if (getVisuallySimilarImagesCount() > 0) { - hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); - } - if (getBestGuessLabelsCount() > 0) { - hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; - hash = (53 * hash) + getBestGuessLabelsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Relevant information for the image from the Internet.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection) - com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getWebEntitiesFieldBuilder(); - getFullMatchingImagesFieldBuilder(); - getPartialMatchingImagesFieldBuilder(); - getPagesWithMatchingImagesFieldBuilder(); - getVisuallySimilarImagesFieldBuilder(); - getBestGuessLabelsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - webEntitiesBuilder_.clear(); - } - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - fullMatchingImagesBuilder_.clear(); - } - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - partialMatchingImagesBuilder_.clear(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - visuallySimilarImagesBuilder_.clear(); - } - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionProto.internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection build() { - com.google.cloud.vision.v1p4beta1.WebDetection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetection result = new com.google.cloud.vision.v1p4beta1.WebDetection(this); - int from_bitField0_ = bitField0_; - if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - webEntities_ = java.util.Collections.unmodifiableList(webEntities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.webEntities_ = webEntities_; - } else { - result.webEntities_ = webEntitiesBuilder_.build(); - } - if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fullMatchingImages_ = fullMatchingImages_; - } else { - result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); - } - if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.partialMatchingImages_ = partialMatchingImages_; - } else { - result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.pagesWithMatchingImages_ = pagesWithMatchingImages_; - } else { - result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); - } - if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.visuallySimilarImages_ = visuallySimilarImages_; - } else { - result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); - } - if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.bestGuessLabels_ = bestGuessLabels_; - } else { - result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()) return this; - if (webEntitiesBuilder_ == null) { - if (!other.webEntities_.isEmpty()) { - if (webEntities_.isEmpty()) { - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWebEntitiesIsMutable(); - webEntities_.addAll(other.webEntities_); - } - onChanged(); - } - } else { - if (!other.webEntities_.isEmpty()) { - if (webEntitiesBuilder_.isEmpty()) { - webEntitiesBuilder_.dispose(); - webEntitiesBuilder_ = null; - webEntities_ = other.webEntities_; - bitField0_ = (bitField0_ & ~0x00000001); - webEntitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWebEntitiesFieldBuilder() : null; - } else { - webEntitiesBuilder_.addAllMessages(other.webEntities_); - } - } - } - if (fullMatchingImagesBuilder_ == null) { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImages_.isEmpty()) { - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.addAll(other.fullMatchingImages_); - } - onChanged(); - } - } else { - if (!other.fullMatchingImages_.isEmpty()) { - if (fullMatchingImagesBuilder_.isEmpty()) { - fullMatchingImagesBuilder_.dispose(); - fullMatchingImagesBuilder_ = null; - fullMatchingImages_ = other.fullMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000002); - fullMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFullMatchingImagesFieldBuilder() : null; - } else { - fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); - } - } - } - if (partialMatchingImagesBuilder_ == null) { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImages_.isEmpty()) { - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.addAll(other.partialMatchingImages_); - } - onChanged(); - } - } else { - if (!other.partialMatchingImages_.isEmpty()) { - if (partialMatchingImagesBuilder_.isEmpty()) { - partialMatchingImagesBuilder_.dispose(); - partialMatchingImagesBuilder_ = null; - partialMatchingImages_ = other.partialMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000004); - partialMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPartialMatchingImagesFieldBuilder() : null; - } else { - partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); - } - } - } - if (pagesWithMatchingImagesBuilder_ == null) { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImages_.isEmpty()) { - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); - } - onChanged(); - } - } else { - if (!other.pagesWithMatchingImages_.isEmpty()) { - if (pagesWithMatchingImagesBuilder_.isEmpty()) { - pagesWithMatchingImagesBuilder_.dispose(); - pagesWithMatchingImagesBuilder_ = null; - pagesWithMatchingImages_ = other.pagesWithMatchingImages_; - bitField0_ = (bitField0_ & ~0x00000008); - pagesWithMatchingImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPagesWithMatchingImagesFieldBuilder() : null; - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); - } - } - } - if (visuallySimilarImagesBuilder_ == null) { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImages_.isEmpty()) { - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.addAll(other.visuallySimilarImages_); - } - onChanged(); - } - } else { - if (!other.visuallySimilarImages_.isEmpty()) { - if (visuallySimilarImagesBuilder_.isEmpty()) { - visuallySimilarImagesBuilder_.dispose(); - visuallySimilarImagesBuilder_ = null; - visuallySimilarImages_ = other.visuallySimilarImages_; - bitField0_ = (bitField0_ & ~0x00000010); - visuallySimilarImagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVisuallySimilarImagesFieldBuilder() : null; - } else { - visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); - } - } - } - if (bestGuessLabelsBuilder_ == null) { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabels_.isEmpty()) { - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.addAll(other.bestGuessLabels_); - } - onChanged(); - } - } else { - if (!other.bestGuessLabels_.isEmpty()) { - if (bestGuessLabelsBuilder_.isEmpty()) { - bestGuessLabelsBuilder_.dispose(); - bestGuessLabelsBuilder_ = null; - bestGuessLabels_ = other.bestGuessLabels_; - bitField0_ = (bitField0_ & ~0x00000020); - bestGuessLabelsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBestGuessLabelsFieldBuilder() : null; - } else { - bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetection parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List webEntities_ = - java.util.Collections.emptyList(); - private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - webEntities_ = new java.util.ArrayList(webEntities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; - - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List getWebEntitiesList() { - if (webEntitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(webEntities_); - } else { - return webEntitiesBuilder_.getMessageList(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public int getWebEntitiesCount() { - if (webEntitiesBuilder_ == null) { - return webEntities_.size(); - } else { - return webEntitiesBuilder_.getCount(); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); - } else { - return webEntitiesBuilder_.getMessage(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.set(index, value); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder setWebEntities( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.set(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { - if (webEntitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWebEntitiesIsMutable(); - webEntities_.add(index, value); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addWebEntities( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.add(index, builderForValue.build()); - onChanged(); - } else { - webEntitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder addAllWebEntities( - java.lang.Iterable values) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, webEntities_); - onChanged(); - } else { - webEntitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder clearWebEntities() { - if (webEntitiesBuilder_ == null) { - webEntities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - webEntitiesBuilder_.clear(); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public Builder removeWebEntities(int index) { - if (webEntitiesBuilder_ == null) { - ensureWebEntitiesIsMutable(); - webEntities_.remove(index); - onChanged(); - } else { - webEntitiesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().getBuilder(index); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index) { - if (webEntitiesBuilder_ == null) { - return webEntities_.get(index); } else { - return webEntitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesOrBuilderList() { - if (webEntitiesBuilder_ != null) { - return webEntitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(webEntities_); - } - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { - return getWebEntitiesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( - int index) { - return getWebEntitiesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); - } - /** - *
-     * Deduced entities from similar images on the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - public java.util.List - getWebEntitiesBuilderList() { - return getWebEntitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> - getWebEntitiesFieldBuilder() { - if (webEntitiesBuilder_ == null) { - webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - webEntities_ = null; - } - return webEntitiesBuilder_; - } - - private java.util.List fullMatchingImages_ = - java.util.Collections.emptyList(); - private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fullMatchingImages_ = new java.util.ArrayList(fullMatchingImages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; - - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List getFullMatchingImagesList() { - if (fullMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } else { - return fullMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public int getFullMatchingImagesCount() { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.size(); - } else { - return fullMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); - } else { - return fullMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder setFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (fullMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, value); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addFullMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder addAllFullMatchingImages( - java.lang.Iterable values) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fullMatchingImages_); - onChanged(); - } else { - fullMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder clearFullMatchingImages() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - fullMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public Builder removeFullMatchingImages(int index) { - if (fullMatchingImagesBuilder_ == null) { - ensureFullMatchingImagesIsMutable(); - fullMatchingImages_.remove(index); - onChanged(); - } else { - fullMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index) { - if (fullMatchingImagesBuilder_ == null) { - return fullMatchingImages_.get(index); } else { - return fullMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesOrBuilderList() { - if (fullMatchingImagesBuilder_ != null) { - return fullMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fullMatchingImages_); - } - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { - return getFullMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder( - int index) { - return getFullMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Fully matching images from the Internet.
-     * Can include resized copies of the query image.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - public java.util.List - getFullMatchingImagesBuilderList() { - return getFullMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> - getFullMatchingImagesFieldBuilder() { - if (fullMatchingImagesBuilder_ == null) { - fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( - fullMatchingImages_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - fullMatchingImages_ = null; - } - return fullMatchingImagesBuilder_; - } - - private java.util.List partialMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - partialMatchingImages_ = new java.util.ArrayList(partialMatchingImages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; - - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List getPartialMatchingImagesList() { - if (partialMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } else { - return partialMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public int getPartialMatchingImagesCount() { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.size(); - } else { - return partialMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); - } else { - return partialMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder setPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (partialMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, value); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addPartialMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder addAllPartialMatchingImages( - java.lang.Iterable values) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, partialMatchingImages_); - onChanged(); - } else { - partialMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder clearPartialMatchingImages() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - partialMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public Builder removePartialMatchingImages(int index) { - if (partialMatchingImagesBuilder_ == null) { - ensurePartialMatchingImagesIsMutable(); - partialMatchingImages_.remove(index); - onChanged(); - } else { - partialMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index) { - if (partialMatchingImagesBuilder_ == null) { - return partialMatchingImages_.get(index); } else { - return partialMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesOrBuilderList() { - if (partialMatchingImagesBuilder_ != null) { - return partialMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialMatchingImages_); - } - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { - return getPartialMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder( - int index) { - return getPartialMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * Partial matching images from the Internet.
-     * Those images are similar enough to share some key-point features. For
-     * example an original image will likely have partial matching for its crops.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - public java.util.List - getPartialMatchingImagesBuilderList() { - return getPartialMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> - getPartialMatchingImagesFieldBuilder() { - if (partialMatchingImagesBuilder_ == null) { - partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( - partialMatchingImages_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - partialMatchingImages_ = null; - } - return partialMatchingImagesBuilder_; - } - - private java.util.List pagesWithMatchingImages_ = - java.util.Collections.emptyList(); - private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - pagesWithMatchingImages_ = new java.util.ArrayList(pagesWithMatchingImages_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; - - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List getPagesWithMatchingImagesList() { - if (pagesWithMatchingImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } else { - return pagesWithMatchingImagesBuilder_.getMessageList(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public int getPagesWithMatchingImagesCount() { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.size(); - } else { - return pagesWithMatchingImagesBuilder_.getCount(); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); - } else { - return pagesWithMatchingImagesBuilder_.getMessage(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder setPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { - if (pagesWithMatchingImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, value); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addPagesWithMatchingImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder addAllPagesWithMatchingImages( - java.lang.Iterable values) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pagesWithMatchingImages_); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder clearPagesWithMatchingImages() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public Builder removePagesWithMatchingImages(int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - ensurePagesWithMatchingImagesIsMutable(); - pagesWithMatchingImages_.remove(index); - onChanged(); - } else { - pagesWithMatchingImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index) { - if (pagesWithMatchingImagesBuilder_ == null) { - return pagesWithMatchingImages_.get(index); } else { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesOrBuilderList() { - if (pagesWithMatchingImagesBuilder_ != null) { - return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); - } - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder( - int index) { - return getPagesWithMatchingImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); - } - /** - *
-     * Web pages containing the matching images from the Internet.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - public java.util.List - getPagesWithMatchingImagesBuilderList() { - return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> - getPagesWithMatchingImagesFieldBuilder() { - if (pagesWithMatchingImagesBuilder_ == null) { - pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder>( - pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - pagesWithMatchingImages_ = null; - } - return pagesWithMatchingImagesBuilder_; - } - - private java.util.List visuallySimilarImages_ = - java.util.Collections.emptyList(); - private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - visuallySimilarImages_ = new java.util.ArrayList(visuallySimilarImages_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; - - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List getVisuallySimilarImagesList() { - if (visuallySimilarImagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } else { - return visuallySimilarImagesBuilder_.getMessageList(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public int getVisuallySimilarImagesCount() { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.size(); - } else { - return visuallySimilarImagesBuilder_.getCount(); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); - } else { - return visuallySimilarImagesBuilder_.getMessage(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder setVisuallySimilarImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.set(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { - if (visuallySimilarImagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, value); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addVisuallySimilarImages( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.add(index, builderForValue.build()); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder addAllVisuallySimilarImages( - java.lang.Iterable values) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, visuallySimilarImages_); - onChanged(); - } else { - visuallySimilarImagesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder clearVisuallySimilarImages() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - visuallySimilarImagesBuilder_.clear(); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public Builder removeVisuallySimilarImages(int index) { - if (visuallySimilarImagesBuilder_ == null) { - ensureVisuallySimilarImagesIsMutable(); - visuallySimilarImages_.remove(index); - onChanged(); - } else { - visuallySimilarImagesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().getBuilder(index); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index) { - if (visuallySimilarImagesBuilder_ == null) { - return visuallySimilarImages_.get(index); } else { - return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesOrBuilderList() { - if (visuallySimilarImagesBuilder_ != null) { - return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(visuallySimilarImages_); - } - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder( - int index) { - return getVisuallySimilarImagesFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); - } - /** - *
-     * The visually similar image results.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - public java.util.List - getVisuallySimilarImagesBuilderList() { - return getVisuallySimilarImagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> - getVisuallySimilarImagesFieldBuilder() { - if (visuallySimilarImagesBuilder_ == null) { - visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( - visuallySimilarImages_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - visuallySimilarImages_ = null; - } - return visuallySimilarImagesBuilder_; - } - - private java.util.List bestGuessLabels_ = - java.util.Collections.emptyList(); - private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - bestGuessLabels_ = new java.util.ArrayList(bestGuessLabels_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; - - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List getBestGuessLabelsList() { - if (bestGuessLabelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } else { - return bestGuessLabelsBuilder_.getMessageList(); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public int getBestGuessLabelsCount() { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.size(); - } else { - return bestGuessLabelsBuilder_.getCount(); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); - } else { - return bestGuessLabelsBuilder_.getMessage(index); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder setBestGuessLabels( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.set(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { - if (bestGuessLabelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, value); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addBestGuessLabels( - int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.add(index, builderForValue.build()); - onChanged(); - } else { - bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder addAllBestGuessLabels( - java.lang.Iterable values) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bestGuessLabels_); - onChanged(); - } else { - bestGuessLabelsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder clearBestGuessLabels() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - bestGuessLabelsBuilder_.clear(); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public Builder removeBestGuessLabels(int index) { - if (bestGuessLabelsBuilder_ == null) { - ensureBestGuessLabelsIsMutable(); - bestGuessLabels_.remove(index); - onChanged(); - } else { - bestGuessLabelsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().getBuilder(index); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index) { - if (bestGuessLabelsBuilder_ == null) { - return bestGuessLabels_.get(index); } else { - return bestGuessLabelsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsOrBuilderList() { - if (bestGuessLabelsBuilder_ != null) { - return bestGuessLabelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bestGuessLabels_); - } - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { - return getBestGuessLabelsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder( - int index) { - return getBestGuessLabelsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); - } - /** - *
-     * The service's best guess as to the topic of the request image.
-     * Inferred from similar images on the open web.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - public java.util.List - getBestGuessLabelsBuilderList() { - return getBestGuessLabelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> - getBestGuessLabelsFieldBuilder() { - if (bestGuessLabelsBuilder_ == null) { - bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder>( - bestGuessLabels_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - bestGuessLabels_ = null; - } - return bestGuessLabelsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection) - private static final com.google.cloud.vision.v1p4beta1.WebDetection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java deleted file mode 100644 index a82240253f43..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionOrBuilder.java +++ /dev/null @@ -1,293 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/web_detection.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface WebDetectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - int getWebEntitiesCount(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - java.util.List - getWebEntitiesOrBuilderList(); - /** - *
-   * Deduced entities from similar images on the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( - int index); - - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - int getFullMatchingImagesCount(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - java.util.List - getFullMatchingImagesOrBuilderList(); - /** - *
-   * Fully matching images from the Internet.
-   * Can include resized copies of the query image.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( - int index); - - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - int getPartialMatchingImagesCount(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - java.util.List - getPartialMatchingImagesOrBuilderList(); - /** - *
-   * Partial matching images from the Internet.
-   * Those images are similar enough to share some key-point features. For
-   * example an original image will likely have partial matching for its crops.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder( - int index); - - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages(int index); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - int getPagesWithMatchingImagesCount(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - java.util.List - getPagesWithMatchingImagesOrBuilderList(); - /** - *
-   * Web pages containing the matching images from the Internet.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder( - int index); - - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages(int index); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - int getVisuallySimilarImagesCount(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - java.util.List - getVisuallySimilarImagesOrBuilderList(); - /** - *
-   * The visually similar image results.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder( - int index); - - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsList(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - int getBestGuessLabelsCount(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - java.util.List - getBestGuessLabelsOrBuilderList(); - /** - *
-   * The service's best guess as to the topic of the request image.
-   * Inferred from similar images on the open web.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; - */ - com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java deleted file mode 100644 index e49a16c72f84..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * Parameters for web detection request.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetectionParams} - */ -public final class WebDetectionParams extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetectionParams) - WebDetectionParamsOrBuilder { -private static final long serialVersionUID = 0L; - // Use WebDetectionParams.newBuilder() to construct. - private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WebDetectionParams() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WebDetectionParams(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WebDetectionParams( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - includeGeoResults_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetectionParams.class, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder.class); - } - - public static final int INCLUDE_GEO_RESULTS_FIELD_NUMBER = 2; - private boolean includeGeoResults_; - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (includeGeoResults_ != false) { - output.writeBool(2, includeGeoResults_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGeoResults_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeGeoResults_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetectionParams)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.WebDetectionParams other = (com.google.cloud.vision.v1p4beta1.WebDetectionParams) obj; - - if (getIncludeGeoResults() - != other.getIncludeGeoResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + INCLUDE_GEO_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeGeoResults()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetectionParams prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Parameters for web detection request.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetectionParams} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetectionParams) - com.google.cloud.vision.v1p4beta1.WebDetectionParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.WebDetectionParams.class, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.WebDetectionParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - includeGeoResults_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p4beta1_WebDetectionParams_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParams build() { - com.google.cloud.vision.v1p4beta1.WebDetectionParams result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParams buildPartial() { - com.google.cloud.vision.v1p4beta1.WebDetectionParams result = new com.google.cloud.vision.v1p4beta1.WebDetectionParams(this); - result.includeGeoResults_ = includeGeoResults_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetectionParams) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetectionParams)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetectionParams other) { - if (other == com.google.cloud.vision.v1p4beta1.WebDetectionParams.getDefaultInstance()) return this; - if (other.getIncludeGeoResults() != false) { - setIncludeGeoResults(other.getIncludeGeoResults()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.WebDetectionParams parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetectionParams) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean includeGeoResults_ ; - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - @java.lang.Override - public boolean getIncludeGeoResults() { - return includeGeoResults_; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @param value The includeGeoResults to set. - * @return This builder for chaining. - */ - public Builder setIncludeGeoResults(boolean value) { - - includeGeoResults_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether to include results derived from the geo information in the image.
-     * 
- * - * bool include_geo_results = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeGeoResults() { - - includeGeoResults_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetectionParams) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetectionParams) - private static final com.google.cloud.vision.v1p4beta1.WebDetectionParams DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetectionParams(); - } - - public static com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WebDetectionParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WebDetectionParams(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.WebDetectionParams getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java deleted file mode 100644 index 7e3a25f12c8b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParamsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/image_annotator.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface WebDetectionParamsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetectionParams) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Whether to include results derived from the geo information in the image.
-   * 
- * - * bool include_geo_results = 2; - * @return The includeGeoResults. - */ - boolean getIncludeGeoResults(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java deleted file mode 100644 index 41a4814bd698..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionProto.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/web_detection.proto - -package com.google.cloud.vision.v1p4beta1; - -public final class WebDetectionProto { - private WebDetectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/vision/v1p4beta1/web_dete" + - "ction.proto\022\035google.cloud.vision.v1p4bet" + - "a1\"\214\007\n\014WebDetection\022K\n\014web_entities\030\001 \003(" + - "\01325.google.cloud.vision.v1p4beta1.WebDet" + - "ection.WebEntity\022R\n\024full_matching_images" + - "\030\002 \003(\01324.google.cloud.vision.v1p4beta1.W" + - "ebDetection.WebImage\022U\n\027partial_matching" + - "_images\030\003 \003(\01324.google.cloud.vision.v1p4" + - "beta1.WebDetection.WebImage\022W\n\032pages_wit" + - "h_matching_images\030\004 \003(\01323.google.cloud.v" + - "ision.v1p4beta1.WebDetection.WebPage\022U\n\027" + - "visually_similar_images\030\006 \003(\01324.google.c" + - "loud.vision.v1p4beta1.WebDetection.WebIm" + - "age\022O\n\021best_guess_labels\030\010 \003(\01324.google." + - "cloud.vision.v1p4beta1.WebDetection.WebL" + - "abel\032B\n\tWebEntity\022\021\n\tentity_id\030\001 \001(\t\022\r\n\005" + - "score\030\002 \001(\002\022\023\n\013description\030\003 \001(\t\032&\n\010WebI" + - "mage\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\032\344\001\n\007Web" + - "Page\022\013\n\003url\030\001 \001(\t\022\r\n\005score\030\002 \001(\002\022\022\n\npage" + - "_title\030\003 \001(\t\022R\n\024full_matching_images\030\004 \003" + - "(\01324.google.cloud.vision.v1p4beta1.WebDe" + - "tection.WebImage\022U\n\027partial_matching_ima" + - "ges\030\005 \003(\01324.google.cloud.vision.v1p4beta" + - "1.WebDetection.WebImage\0320\n\010WebLabel\022\r\n\005l" + - "abel\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\tB\207\001\n!co" + - "m.google.cloud.vision.v1p4beta1B\021WebDete" + - "ctionProtoP\001ZCgoogle.golang.org/genproto" + - "/googleapis/cloud/vision/v1p4beta1;visio" + - "n\370\001\001\242\002\004GCVNb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor, - new java.lang.String[] { "WebEntities", "FullMatchingImages", "PartialMatchingImages", "PagesWithMatchingImages", "VisuallySimilarImages", "BestGuessLabels", }); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor = - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor, - new java.lang.String[] { "EntityId", "Score", "Description", }); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor = - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor, - new java.lang.String[] { "Url", "Score", }); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor = - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor, - new java.lang.String[] { "Url", "Score", "PageTitle", "FullMatchingImages", "PartialMatchingImages", }); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor = - internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor, - new java.lang.String[] { "Label", "LanguageCode", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java deleted file mode 100644 index e27b6e943d61..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java +++ /dev/null @@ -1,1617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -/** - *
- * A word representation.
- * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Word} - */ -public final class Word extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.Word) - WordOrBuilder { -private static final long serialVersionUID = 0L; - // Use Word.newBuilder() to construct. - private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Word() { - symbols_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Word(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Word( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder subBuilder = null; - if (property_ != null) { - subBuilder = property_.toBuilder(); - } - property_ = input.readMessage(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(property_); - property_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = input.readMessage(com.google.cloud.vision.v1p4beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - symbols_.add( - input.readMessage(com.google.cloud.vision.v1p4beta1.Symbol.parser(), extensionRegistry)); - break; - } - case 37: { - - confidence_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Word.class, com.google.cloud.vision.v1p4beta1.Word.Builder.class); - } - - public static final int PROPERTY_FIELD_NUMBER = 1; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - @java.lang.Override - public boolean hasProperty() { - return property_ != null; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - return getProperty(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 2; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - @java.lang.Override - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SYMBOLS_FIELD_NUMBER = 3; - private java.util.List symbols_; - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List getSymbolsList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - @java.lang.Override - public java.util.List - getSymbolsOrBuilderList() { - return symbols_; - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - @java.lang.Override - public int getSymbolsCount() { - return symbols_.size(); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index) { - return symbols_.get(index); - } - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - return symbols_.get(index); - } - - public static final int CONFIDENCE_FIELD_NUMBER = 4; - private float confidence_; - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (property_ != null) { - output.writeMessage(1, getProperty()); - } - if (boundingBox_ != null) { - output.writeMessage(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - output.writeMessage(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - output.writeFloat(4, confidence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (property_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProperty()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getBoundingBox()); - } - for (int i = 0; i < symbols_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, symbols_.get(i)); - } - if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, confidence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.vision.v1p4beta1.Word)) { - return super.equals(obj); - } - com.google.cloud.vision.v1p4beta1.Word other = (com.google.cloud.vision.v1p4beta1.Word) obj; - - if (hasProperty() != other.hasProperty()) return false; - if (hasProperty()) { - if (!getProperty() - .equals(other.getProperty())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox() - .equals(other.getBoundingBox())) return false; - } - if (!getSymbolsList() - .equals(other.getSymbolsList())) return false; - if (java.lang.Float.floatToIntBits(getConfidence()) - != java.lang.Float.floatToIntBits( - other.getConfidence())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProperty()) { - hash = (37 * hash) + PROPERTY_FIELD_NUMBER; - hash = (53 * hash) + getProperty().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - if (getSymbolsCount() > 0) { - hash = (37 * hash) + SYMBOLS_FIELD_NUMBER; - hash = (53 * hash) + getSymbolsList().hashCode(); - } - hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getConfidence()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Word parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Word parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.vision.v1p4beta1.Word parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.Word prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A word representation.
-   * 
- * - * Protobuf type {@code google.cloud.vision.v1p4beta1.Word} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.Word) - com.google.cloud.vision.v1p4beta1.WordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.vision.v1p4beta1.Word.class, com.google.cloud.vision.v1p4beta1.Word.Builder.class); - } - - // Construct using com.google.cloud.vision.v1p4beta1.Word.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSymbolsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (propertyBuilder_ == null) { - property_ = null; - } else { - property_ = null; - propertyBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - symbolsBuilder_.clear(); - } - confidence_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.vision.v1p4beta1.TextAnnotationProto.internal_static_google_cloud_vision_v1p4beta1_Word_descriptor; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Word getDefaultInstanceForType() { - return com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Word build() { - com.google.cloud.vision.v1p4beta1.Word result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Word buildPartial() { - com.google.cloud.vision.v1p4beta1.Word result = new com.google.cloud.vision.v1p4beta1.Word(this); - int from_bitField0_ = bitField0_; - if (propertyBuilder_ == null) { - result.property_ = property_; - } else { - result.property_ = propertyBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - symbols_ = java.util.Collections.unmodifiableList(symbols_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.symbols_ = symbols_; - } else { - result.symbols_ = symbolsBuilder_.build(); - } - result.confidence_ = confidence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.vision.v1p4beta1.Word) { - return mergeFrom((com.google.cloud.vision.v1p4beta1.Word)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.Word other) { - if (other == com.google.cloud.vision.v1p4beta1.Word.getDefaultInstance()) return this; - if (other.hasProperty()) { - mergeProperty(other.getProperty()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (symbolsBuilder_ == null) { - if (!other.symbols_.isEmpty()) { - if (symbols_.isEmpty()) { - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSymbolsIsMutable(); - symbols_.addAll(other.symbols_); - } - onChanged(); - } - } else { - if (!other.symbols_.isEmpty()) { - if (symbolsBuilder_.isEmpty()) { - symbolsBuilder_.dispose(); - symbolsBuilder_ = null; - symbols_ = other.symbols_; - bitField0_ = (bitField0_ & ~0x00000001); - symbolsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSymbolsFieldBuilder() : null; - } else { - symbolsBuilder_.addAllMessages(other.symbols_); - } - } - } - if (other.getConfidence() != 0F) { - setConfidence(other.getConfidence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.vision.v1p4beta1.Word parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.vision.v1p4beta1.Word) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> propertyBuilder_; - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - public boolean hasProperty() { - return propertyBuilder_ != null || property_ != null; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty() { - if (propertyBuilder_ == null) { - return property_ == null ? com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } else { - return propertyBuilder_.getMessage(); - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - property_ = value; - onChanged(); - } else { - propertyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder setProperty( - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder builderForValue) { - if (propertyBuilder_ == null) { - property_ = builderForValue.build(); - onChanged(); - } else { - propertyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder mergeProperty(com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty value) { - if (propertyBuilder_ == null) { - if (property_ != null) { - property_ = - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.newBuilder(property_).mergeFrom(value).buildPartial(); - } else { - property_ = value; - } - onChanged(); - } else { - propertyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public Builder clearProperty() { - if (propertyBuilder_ == null) { - property_ = null; - onChanged(); - } else { - property_ = null; - propertyBuilder_ = null; - } - - return this; - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder getPropertyBuilder() { - - onChanged(); - return getPropertyFieldBuilder().getBuilder(); - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder() { - if (propertyBuilder_ != null) { - return propertyBuilder_.getMessageOrBuilder(); - } else { - return property_ == null ? - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.getDefaultInstance() : property_; - } - } - /** - *
-     * Additional information detected for the word.
-     * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder> - getPropertyFieldBuilder() { - if (propertyBuilder_ == null) { - propertyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder>( - getProperty(), - getParentForChildren(), - isClean()); - property_ = null; - } - return propertyBuilder_; - } - - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> boundingBoxBuilder_; - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null ? com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder setBoundingBox( - com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder mergeBoundingBox(com.google.cloud.vision.v1p4beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.vision.v1p4beta1.BoundingPoly.newBuilder(boundingBox_).mergeFrom(value).buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null ? - com.google.cloud.vision.v1p4beta1.BoundingPoly.getDefaultInstance() : boundingBox_; - } - } - /** - *
-     * The bounding box for the word.
-     * The vertices are in the order of top-left, top-right, bottom-right,
-     * bottom-left. When a rotation of the bounding box is detected the rotation
-     * is represented as around the top-left corner as defined when the text is
-     * read in the 'natural' orientation.
-     * For example:
-     *   * when the text is horizontal it might look like:
-     *      0----1
-     *      |    |
-     *      3----2
-     *   * when it's rotated 180 degrees around the top-left corner it becomes:
-     *      2----3
-     *      |    |
-     *      1----0
-     *   and the vertex order will still be (0, 1, 2, 3).
-     * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( - getBoundingBox(), - getParentForChildren(), - isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private java.util.List symbols_ = - java.util.Collections.emptyList(); - private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - symbols_ = new java.util.ArrayList(symbols_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder> symbolsBuilder_; - - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public java.util.List getSymbolsList() { - if (symbolsBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbols_); - } else { - return symbolsBuilder_.getMessageList(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public int getSymbolsCount() { - if (symbolsBuilder_ == null) { - return symbols_.size(); - } else { - return symbolsBuilder_.getCount(); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); - } else { - return symbolsBuilder_.getMessage(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p4beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.set(index, value); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder setSymbols( - int index, com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.set(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder addSymbols(com.google.cloud.vision.v1p4beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(value); - onChanged(); - } else { - symbolsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p4beta1.Symbol value) { - if (symbolsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSymbolsIsMutable(); - symbols_.add(index, value); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder addSymbols( - int index, com.google.cloud.vision.v1p4beta1.Symbol.Builder builderForValue) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.add(index, builderForValue.build()); - onChanged(); - } else { - symbolsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder addAllSymbols( - java.lang.Iterable values) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbols_); - onChanged(); - } else { - symbolsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder clearSymbols() { - if (symbolsBuilder_ == null) { - symbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - symbolsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public Builder removeSymbols(int index) { - if (symbolsBuilder_ == null) { - ensureSymbolsIsMutable(); - symbols_.remove(index); - onChanged(); - } else { - symbolsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p4beta1.Symbol.Builder getSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index) { - if (symbolsBuilder_ == null) { - return symbols_.get(index); } else { - return symbolsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsOrBuilderList() { - if (symbolsBuilder_ != null) { - return symbolsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(symbols_); - } - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p4beta1.Symbol.Builder addSymbolsBuilder() { - return getSymbolsFieldBuilder().addBuilder( - com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public com.google.cloud.vision.v1p4beta1.Symbol.Builder addSymbolsBuilder( - int index) { - return getSymbolsFieldBuilder().addBuilder( - index, com.google.cloud.vision.v1p4beta1.Symbol.getDefaultInstance()); - } - /** - *
-     * List of symbols in the word.
-     * The order of the symbols follows the natural reading order.
-     * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - public java.util.List - getSymbolsBuilderList() { - return getSymbolsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder> - getSymbolsFieldBuilder() { - if (symbolsBuilder_ == null) { - symbolsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - symbols_ = null; - } - return symbolsBuilder_; - } - - private float confidence_ ; - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return The confidence. - */ - @java.lang.Override - public float getConfidence() { - return confidence_; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @param value The confidence to set. - * @return This builder for chaining. - */ - public Builder setConfidence(float value) { - - confidence_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of the OCR results for the word. Range [0, 1].
-     * 
- * - * float confidence = 4; - * @return This builder for chaining. - */ - public Builder clearConfidence() { - - confidence_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.Word) - } - - // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Word) - private static final com.google.cloud.vision.v1p4beta1.Word DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.Word(); - } - - public static com.google.cloud.vision.v1p4beta1.Word getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Word parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Word(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.vision.v1p4beta1.Word getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java deleted file mode 100644 index 47ef3d774c70..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WordOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/vision/v1p4beta1/text_annotation.proto - -package com.google.cloud.vision.v1p4beta1; - -public interface WordOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.Word) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return Whether the property field is set. - */ - boolean hasProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - * @return The property. - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty getProperty(); - /** - *
-   * Additional information detected for the word.
-   * 
- * - * .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1; - */ - com.google.cloud.vision.v1p4beta1.TextAnnotation.TextPropertyOrBuilder getPropertyOrBuilder(); - - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - * @return The boundingBox. - */ - com.google.cloud.vision.v1p4beta1.BoundingPoly getBoundingBox(); - /** - *
-   * The bounding box for the word.
-   * The vertices are in the order of top-left, top-right, bottom-right,
-   * bottom-left. When a rotation of the bounding box is detected the rotation
-   * is represented as around the top-left corner as defined when the text is
-   * read in the 'natural' orientation.
-   * For example:
-   *   * when the text is horizontal it might look like:
-   *      0----1
-   *      |    |
-   *      3----2
-   *   * when it's rotated 180 degrees around the top-left corner it becomes:
-   *      2----3
-   *      |    |
-   *      1----0
-   *   and the vertex order will still be (0, 1, 2, 3).
-   * 
- * - * .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2; - */ - com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p4beta1.Symbol getSymbols(int index); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - int getSymbolsCount(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - java.util.List - getSymbolsOrBuilderList(); - /** - *
-   * List of symbols in the word.
-   * The order of the symbols follows the natural reading order.
-   * 
- * - * repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3; - */ - com.google.cloud.vision.v1p4beta1.SymbolOrBuilder getSymbolsOrBuilder( - int index); - - /** - *
-   * Confidence of the OCR results for the word. Range [0, 1].
-   * 
- * - * float confidence = 4; - * @return The confidence. - */ - float getConfidence(); -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto deleted file mode 100644 index d2ab72f0cded..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/face.proto +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - -import "google/cloud/vision/v1p4beta1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "CelebrityProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// Parameters for a celebrity recognition request. -message FaceRecognitionParams { - // The resource names for one or more - // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity - // set is preloaded and can be specified as "builtin/default". If this is - // specified, the algorithm will try to match the faces detected in the input - // image to the Celebrities in the CelebritySets. - repeated string celebrity_set = 1; -} - -// A Celebrity is a group of Faces with an identity. -message Celebrity { - // The resource name of the preloaded Celebrity. Has the format - // `builtin/{mid}`. - string name = 1; - - // The Celebrity's display name. - string display_name = 2; - - // The Celebrity's description. - string description = 3; -} - -// Information about a face's identity. -message FaceRecognitionResult { - // The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was - // matched to. - Celebrity celebrity = 1; - - // Recognition confidence. Range [0, 1]. - float confidence = 2; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto deleted file mode 100644 index 877fd8972dfe..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/geometry.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// A vertex represents a 2D point in the image. -// NOTE: the vertex coordinates are in the same scale as the original image. -message Vertex { - // X coordinate. - int32 x = 1; - - // Y coordinate. - int32 y = 2; -} - -// A vertex represents a 2D point in the image. -// NOTE: the normalized vertex coordinates are relative to the original image -// and range from 0 to 1. -message NormalizedVertex { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; -} - -// A bounding polygon for the detected image annotation. -message BoundingPoly { - // The bounding polygon vertices. - repeated Vertex vertices = 1; - - // The bounding polygon normalized vertices. - repeated NormalizedVertex normalized_vertices = 2; -} - -// A 3D position in the image, used primarily for Face detection landmarks. -// A valid Position must have both x and y coordinates. -// The position coordinates are in the same scale as the original image. -message Position { - // X coordinate. - float x = 1; - - // Y coordinate. - float y = 2; - - // Z coordinate (or depth). - float z = 3; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto deleted file mode 100644 index cc7836974588..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/image_annotator.proto +++ /dev/null @@ -1,967 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/vision/v1p4beta1/face.proto"; -import "google/cloud/vision/v1p4beta1/geometry.proto"; -import "google/cloud/vision/v1p4beta1/product_search.proto"; -import "google/cloud/vision/v1p4beta1/text_annotation.proto"; -import "google/cloud/vision/v1p4beta1/web_detection.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/color.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ImageAnnotatorProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// Service that performs Google Cloud Vision API detection tasks over client -// images, such as face, landmark, logo, label, and text detection. The -// ImageAnnotator service returns detected entities from the images. -service ImageAnnotator { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { - option (google.api.http) = { - post: "/v1p4beta1/images:annotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - } - - // Service that performs image detection and annotation for a batch of files. - // Now only "application/pdf", "image/tiff" and "image/gif" are supported. - // - // This service will extract at most 5 (customers can specify which 5 in - // AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - // file provided and perform detection and annotation for each image - // extracted. - rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) - returns (BatchAnnotateFilesResponse) { - option (google.api.http) = { - post: "/v1p4beta1/files:annotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - } - - // Run asynchronous image detection and annotation for a list of images. - // - // Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - // - // This service will write image annotation outputs to json files in customer - // GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p4beta1/images:asyncBatchAnnotate" - body: "*" - }; - option (google.api.method_signature) = "requests,output_config"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateImagesResponse" - metadata_type: "OperationMetadata" - }; - } - - // Run asynchronous image detection and annotation for a list of generic - // files, such as PDF files, which may contain multiple pages and multiple - // images per page. Progress and results can be retrieved through the - // `google.longrunning.Operations` interface. - // `Operation.metadata` contains `OperationMetadata` (metadata). - // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p4beta1/files:asyncBatchAnnotate" - body: "*" - }; - option (google.api.method_signature) = "requests"; - option (google.longrunning.operation_info) = { - response_type: "AsyncBatchAnnotateFilesResponse" - metadata_type: "OperationMetadata" - }; - } -} - -// The type of Google Cloud Vision API detection to perform, and the maximum -// number of results to return for that type. Multiple `Feature` objects can -// be specified in the `features` list. -message Feature { - // Type of Google Cloud Vision API feature to be extracted. - enum Type { - // Unspecified feature type. - TYPE_UNSPECIFIED = 0; - - // Run face detection. - FACE_DETECTION = 1; - - // Run landmark detection. - LANDMARK_DETECTION = 2; - - // Run logo detection. - LOGO_DETECTION = 3; - - // Run label detection. - LABEL_DETECTION = 4; - - // Run text detection / optical character recognition (OCR). Text detection - // is optimized for areas of text within a larger image; if the image is - // a document, use `DOCUMENT_TEXT_DETECTION` instead. - TEXT_DETECTION = 5; - - // Run dense text document OCR. Takes precedence when both - // `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - DOCUMENT_TEXT_DETECTION = 11; - - // Run Safe Search to detect potentially unsafe - // or undesirable content. - SAFE_SEARCH_DETECTION = 6; - - // Compute a set of image properties, such as the - // image's dominant colors. - IMAGE_PROPERTIES = 7; - - // Run crop hints. - CROP_HINTS = 9; - - // Run web detection. - WEB_DETECTION = 10; - - // Run Product Search. - PRODUCT_SEARCH = 12; - - // Run localizer for object detection. - OBJECT_LOCALIZATION = 19; - } - - // The feature type. - Type type = 1; - - // Maximum number of results of this type. Does not apply to - // `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - int32 max_results = 2; - - // Model to use for the feature. - // Supported values: "builtin/stable" (the default if unset) and - // "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - // support "builtin/weekly" for the bleeding edge release updated weekly. - string model = 3; -} - -// External image source (Google Cloud Storage or web URL image location). -message ImageSource { - // **Use `image_uri` instead.** - // - // The Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - string gcs_image_uri = 1; - - // The URI of the source image. Can be either: - // - // 1. A Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. See - // [Google Cloud Storage Request - // URIs](https://cloud.google.com/storage/docs/reference-uris) for more - // info. - // - // 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - // HTTP/HTTPS URLs, Google cannot guarantee that the request will be - // completed. Your request may fail if the specified host denies the - // request (e.g. due to request throttling or DOS prevention), or if Google - // throttles requests to the site for abuse prevention. You should not - // depend on externally-hosted images for production applications. - // - // When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - // precedence. - string image_uri = 2; -} - -// Client image to perform Google Cloud Vision API tasks over. -message Image { - // Image content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - bytes content = 1; - - // Google Cloud Storage image location, or publicly-accessible image - // URL. If both `content` and `source` are provided for an image, `content` - // takes precedence and is used to perform the image annotation request. - ImageSource source = 2; -} - -// A bucketized representation of likelihood, which is intended to give clients -// highly stable results across model upgrades. -enum Likelihood { - // Unknown likelihood. - UNKNOWN = 0; - - // It is very unlikely. - VERY_UNLIKELY = 1; - - // It is unlikely. - UNLIKELY = 2; - - // It is possible. - POSSIBLE = 3; - - // It is likely. - LIKELY = 4; - - // It is very likely. - VERY_LIKELY = 5; -} - -// A face annotation object contains the results of face detection. -message FaceAnnotation { - // A face-specific landmark (for example, a face feature). - message Landmark { - // Face landmark (feature) type. - // Left and right are defined from the vantage of the viewer of the image - // without considering mirror projections typical of photos. So, `LEFT_EYE`, - // typically, is the person's right eye. - enum Type { - // Unknown face landmark detected. Should not be filled. - UNKNOWN_LANDMARK = 0; - - // Left eye. - LEFT_EYE = 1; - - // Right eye. - RIGHT_EYE = 2; - - // Left of left eyebrow. - LEFT_OF_LEFT_EYEBROW = 3; - - // Right of left eyebrow. - RIGHT_OF_LEFT_EYEBROW = 4; - - // Left of right eyebrow. - LEFT_OF_RIGHT_EYEBROW = 5; - - // Right of right eyebrow. - RIGHT_OF_RIGHT_EYEBROW = 6; - - // Midpoint between eyes. - MIDPOINT_BETWEEN_EYES = 7; - - // Nose tip. - NOSE_TIP = 8; - - // Upper lip. - UPPER_LIP = 9; - - // Lower lip. - LOWER_LIP = 10; - - // Mouth left. - MOUTH_LEFT = 11; - - // Mouth right. - MOUTH_RIGHT = 12; - - // Mouth center. - MOUTH_CENTER = 13; - - // Nose, bottom right. - NOSE_BOTTOM_RIGHT = 14; - - // Nose, bottom left. - NOSE_BOTTOM_LEFT = 15; - - // Nose, bottom center. - NOSE_BOTTOM_CENTER = 16; - - // Left eye, top boundary. - LEFT_EYE_TOP_BOUNDARY = 17; - - // Left eye, right corner. - LEFT_EYE_RIGHT_CORNER = 18; - - // Left eye, bottom boundary. - LEFT_EYE_BOTTOM_BOUNDARY = 19; - - // Left eye, left corner. - LEFT_EYE_LEFT_CORNER = 20; - - // Right eye, top boundary. - RIGHT_EYE_TOP_BOUNDARY = 21; - - // Right eye, right corner. - RIGHT_EYE_RIGHT_CORNER = 22; - - // Right eye, bottom boundary. - RIGHT_EYE_BOTTOM_BOUNDARY = 23; - - // Right eye, left corner. - RIGHT_EYE_LEFT_CORNER = 24; - - // Left eyebrow, upper midpoint. - LEFT_EYEBROW_UPPER_MIDPOINT = 25; - - // Right eyebrow, upper midpoint. - RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - - // Left ear tragion. - LEFT_EAR_TRAGION = 27; - - // Right ear tragion. - RIGHT_EAR_TRAGION = 28; - - // Left eye pupil. - LEFT_EYE_PUPIL = 29; - - // Right eye pupil. - RIGHT_EYE_PUPIL = 30; - - // Forehead glabella. - FOREHEAD_GLABELLA = 31; - - // Chin gnathion. - CHIN_GNATHION = 32; - - // Chin left gonion. - CHIN_LEFT_GONION = 33; - - // Chin right gonion. - CHIN_RIGHT_GONION = 34; - } - - // Face landmark type. - Type type = 3; - - // Face landmark position. - Position position = 4; - } - - // The bounding polygon around the face. The coordinates of the bounding box - // are in the original image's scale. - // The bounding box is computed to "frame" the face in accordance with human - // expectations. It is based on the landmarker results. - // Note that one or more x and/or y coordinates may not be generated in the - // `BoundingPoly` (the polygon will be unbounded) if only a partial face - // appears in the image to be annotated. - BoundingPoly bounding_poly = 1; - - // The `fd_bounding_poly` bounding polygon is tighter than the - // `boundingPoly`, and encloses only the skin part of the face. Typically, it - // is used to eliminate the face from any image analysis that detects the - // "amount of skin" visible in an image. It is not based on the - // landmarker results, only on the initial face detection, hence - // the fd (face detection) prefix. - BoundingPoly fd_bounding_poly = 2; - - // Detected face landmarks. - repeated Landmark landmarks = 3; - - // Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - // of the face relative to the image vertical about the axis perpendicular to - // the face. Range [-180,180]. - float roll_angle = 4; - - // Yaw angle, which indicates the leftward/rightward angle that the face is - // pointing relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - float pan_angle = 5; - - // Pitch angle, which indicates the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - float tilt_angle = 6; - - // Detection confidence. Range [0, 1]. - float detection_confidence = 7; - - // Face landmarking confidence. Range [0, 1]. - float landmarking_confidence = 8; - - // Joy likelihood. - Likelihood joy_likelihood = 9; - - // Sorrow likelihood. - Likelihood sorrow_likelihood = 10; - - // Anger likelihood. - Likelihood anger_likelihood = 11; - - // Surprise likelihood. - Likelihood surprise_likelihood = 12; - - // Under-exposed likelihood. - Likelihood under_exposed_likelihood = 13; - - // Blurred likelihood. - Likelihood blurred_likelihood = 14; - - // Headwear likelihood. - Likelihood headwear_likelihood = 15; - - // Additional recognition information. Only computed if - // image_context.face_recognition_params is provided, **and** a match is found - // to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input - // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is - // sorted in order of decreasing confidence values. - repeated FaceRecognitionResult recognition_result = 16; -} - -// Detected entity location information. -message LocationInfo { - // lat/long location coordinates. - google.type.LatLng lat_lng = 1; -} - -// A `Property` consists of a user-supplied name/value pair. -message Property { - // Name of the property. - string name = 1; - - // Value of the property. - string value = 2; - - // Value of numeric properties. - uint64 uint64_value = 3; -} - -// Set of detected entity features. -message EntityAnnotation { - // Opaque entity ID. Some IDs may be available in - // [Google Knowledge Graph Search - // API](https://developers.google.com/knowledge-graph/). - string mid = 1; - - // The language code for the locale in which the entity textual - // `description` is expressed. - string locale = 2; - - // Entity textual description, expressed in its `locale` language. - string description = 3; - - // Overall score of the result. Range [0, 1]. - float score = 4; - - // **Deprecated. Use `score` instead.** - // The accuracy of the entity detection in an image. - // For example, for an image in which the "Eiffel Tower" entity is detected, - // this field represents the confidence that there is a tower in the query - // image. Range [0, 1]. - float confidence = 5 [deprecated = true]; - - // The relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of "tower" is likely higher to an image - // containing the detected "Eiffel Tower" than to an image containing a - // detected distant towering building, even though the confidence that - // there is a tower in each image may be the same. Range [0, 1]. - float topicality = 6; - - // Image region to which this entity belongs. Not produced - // for `LABEL_DETECTION` features. - BoundingPoly bounding_poly = 7; - - // The location information for the detected entity. Multiple - // `LocationInfo` elements can be present because one location may - // indicate the location of the scene in the image, and another location - // may indicate the location of the place where the image was taken. - // Location information is usually present for landmarks. - repeated LocationInfo locations = 8; - - // Some entities may have optional user-supplied `Property` (name/value) - // fields, such a score or string that qualifies the entity. - repeated Property properties = 9; -} - -// Set of detected objects with bounding boxes. -message LocalizedObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - - // Image region to which this object belongs. This must be populated. - BoundingPoly bounding_poly = 5; -} - -// Set of features pertaining to the image, computed by computer vision -// methods over safe-search verticals (for example, adult, spoof, medical, -// violence). -message SafeSearchAnnotation { - // Represents the adult content likelihood for the image. Adult content may - // contain elements such as nudity, pornographic images or cartoons, or - // sexual activities. - Likelihood adult = 1; - - // Spoof likelihood. The likelihood that an modification - // was made to the image's canonical version to make it appear - // funny or offensive. - Likelihood spoof = 2; - - // Likelihood that this is a medical image. - Likelihood medical = 3; - - // Likelihood that this image contains violent content. - Likelihood violence = 4; - - // Likelihood that the request image contains racy content. Racy content may - // include (but is not limited to) skimpy or sheer clothing, strategically - // covered nudity, lewd or provocative poses, or close-ups of sensitive - // body areas. - Likelihood racy = 9; -} - -// Rectangle determined by min and max `LatLng` pairs. -message LatLongRect { - // Min lat/long pair. - google.type.LatLng min_lat_lng = 1; - - // Max lat/long pair. - google.type.LatLng max_lat_lng = 2; -} - -// Color information consists of RGB channels, score, and the fraction of -// the image that the color occupies in the image. -message ColorInfo { - // RGB components of the color. - google.type.Color color = 1; - - // Image-specific score for this color. Value in range [0, 1]. - float score = 2; - - // The fraction of pixels the color occupies in the image. - // Value in range [0, 1]. - float pixel_fraction = 3; -} - -// Set of dominant colors and their corresponding scores. -message DominantColorsAnnotation { - // RGB color values with their score and pixel fraction. - repeated ColorInfo colors = 1; -} - -// Stores image properties, such as dominant colors. -message ImageProperties { - // If present, dominant colors completed successfully. - DominantColorsAnnotation dominant_colors = 1; -} - -// Single crop hint that is used to generate a new crop when serving an image. -message CropHint { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale. - BoundingPoly bounding_poly = 1; - - // Confidence of this being a salient region. Range [0, 1]. - float confidence = 2; - - // Fraction of importance of this salient region with respect to the original - // image. - float importance_fraction = 3; -} - -// Set of crop hints that are used to generate new crops when serving images. -message CropHintsAnnotation { - // Crop hint results. - repeated CropHint crop_hints = 1; -} - -// Parameters for crop hints annotation request. -message CropHintsParams { - // Aspect ratios in floats, representing the ratio of the width to the height - // of the image. For example, if the desired aspect ratio is 4/3, the - // corresponding float value should be 1.33333. If not specified, the - // best possible crop is returned. The number of provided aspect ratios is - // limited to a maximum of 16; any aspect ratios provided after the 16th are - // ignored. - repeated float aspect_ratios = 1; -} - -// Parameters for web detection request. -message WebDetectionParams { - // Whether to include results derived from the geo information in the image. - bool include_geo_results = 2; -} - -// Parameters for text detections. This is used to control TEXT_DETECTION and -// DOCUMENT_TEXT_DETECTION features. -message TextDetectionParams { - - // By default, Cloud Vision API only includes confidence score for - // DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - // score for TEXT_DETECTION as well. - bool enable_text_detection_confidence_score = 9; - - // A list of advanced OCR options to fine-tune OCR behavior. - repeated string advanced_ocr_options = 11; -} - -// Image context and/or feature-specific parameters. -message ImageContext { - // Not used. - LatLongRect lat_long_rect = 1; - - // List of languages to use for TEXT_DETECTION. In most cases, an empty value - // yields the best results since it enables automatic language detection. For - // languages based on the Latin alphabet, setting `language_hints` is not - // needed. In rare cases, when the language of the text in the image is known, - // setting a hint will help get better results (although it will be a - // significant hindrance if the hint is wrong). Text detection returns an - // error if one or more of the specified languages is not one of the - // [supported languages](https://cloud.google.com/vision/docs/languages). - repeated string language_hints = 2; - - // Parameters for crop hints annotation request. - CropHintsParams crop_hints_params = 4; - - // Parameters for face recognition. - FaceRecognitionParams face_recognition_params = 10; - - // Parameters for product search. - ProductSearchParams product_search_params = 5; - - // Parameters for web detection. - WebDetectionParams web_detection_params = 6; - - // Parameters for text detection and document text detection. - TextDetectionParams text_detection_params = 12; -} - -// Request for performing Google Cloud Vision API tasks over a user-provided -// image, with user-requested features, and with context information. -message AnnotateImageRequest { - // The image to be processed. - Image image = 1; - - // Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image. - ImageContext image_context = 3; -} - -// If an image was produced from a file (e.g. a PDF), this message gives -// information about the source of that image. -message ImageAnnotationContext { - // The URI of the file used to produce the image. - string uri = 1; - - // If the file was a PDF or TIFF, this field gives the page number within - // the file used to produce the image. - int32 page_number = 2; -} - -// Response to an image annotation request. -message AnnotateImageResponse { - // If present, face detection has completed successfully. - repeated FaceAnnotation face_annotations = 1; - - // If present, landmark detection has completed successfully. - repeated EntityAnnotation landmark_annotations = 2; - - // If present, logo detection has completed successfully. - repeated EntityAnnotation logo_annotations = 3; - - // If present, label detection has completed successfully. - repeated EntityAnnotation label_annotations = 4; - - // If present, localized object detection has completed successfully. - // This will be sorted descending by confidence score. - repeated LocalizedObjectAnnotation localized_object_annotations = 22; - - // If present, text (OCR) detection has completed successfully. - repeated EntityAnnotation text_annotations = 5; - - // If present, text (OCR) detection or document (OCR) text detection has - // completed successfully. - // This annotation provides the structural hierarchy for the OCR detected - // text. - TextAnnotation full_text_annotation = 12; - - // If present, safe-search annotation has completed successfully. - SafeSearchAnnotation safe_search_annotation = 6; - - // If present, image properties were extracted successfully. - ImageProperties image_properties_annotation = 8; - - // If present, crop hints have completed successfully. - CropHintsAnnotation crop_hints_annotation = 11; - - // If present, web detection has completed successfully. - WebDetection web_detection = 13; - - // If present, product search has completed successfully. - ProductSearchResults product_search_results = 14; - - // If set, represents the error message for the operation. - // Note that filled-in image annotations are guaranteed to be - // correct, even when `error` is set. - google.rpc.Status error = 9; - - // If present, contextual information is needed to understand where this image - // comes from. - ImageAnnotationContext context = 21; -} - -// Multiple image annotation requests are batched into a single service call. -message BatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to a batch image annotation request. -message BatchAnnotateImagesResponse { - // Individual responses to image annotation requests within the batch. - repeated AnnotateImageResponse responses = 1; -} - -// A request to annotate one single file, e.g. a PDF, TIFF or GIF file. -message AnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Pages of the file to perform image annotation. - // - // Pages starts from 1, we assume the first page of the file is page 1. - // At most 5 pages are supported per request. Pages can be negative. - // - // Page 1 means the first page. - // Page 2 means the second page. - // Page -1 means the last page. - // Page -2 means the second to the last page. - // - // If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - // - // If this field is empty, by default the service performs image annotation - // for the first 5 pages of the file. - repeated int32 pages = 4; -} - -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. This field will be - // empty if the `error` field is set. - repeated AnnotateImageResponse responses = 2; - - // This field gives the total number of pages in the file. - int32 total_pages = 3; - - // If set, represents the error message for the failed request. The - // `responses` field will not be set in this case. - google.rpc.Status error = 4; -} - -// A list of requests to annotate files using the BatchAnnotateFiles API. -message BatchAnnotateFilesRequest { - // Required. The list of file annotation requests. Right now we support only - // one AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// A list of file annotation responses. -message BatchAnnotateFilesResponse { - // The list of file annotation responses, each response corresponding to each - // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileResponse responses = 1; -} - -// An offline file annotation request. -message AsyncAnnotateFileRequest { - // Required. Information about the input file. - InputConfig input_config = 1; - - // Required. Requested features. - repeated Feature features = 2; - - // Additional context that may accompany the image(s) in the file. - ImageContext image_context = 3; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 4; -} - -// The response for a single offline file annotation request. -message AsyncAnnotateFileResponse { - // The output location and metadata from AsyncAnnotateFileRequest. - OutputConfig output_config = 1; -} - -// Request for async image annotation for a list of images. -message AsyncBatchAnnotateImagesRequest { - // Required. Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response to an async batch image annotation request. -message AsyncBatchAnnotateImagesResponse { - // The output location and metadata from AsyncBatchAnnotateImagesRequest. - OutputConfig output_config = 1; -} - -// Multiple async file annotation requests are batched into a single service -// call. -message AsyncBatchAnnotateFilesRequest { - // Required. Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1 - [(google.api.field_behavior) = REQUIRED]; -} - -// Response to an async batch file annotation request. -message AsyncBatchAnnotateFilesResponse { - // The list of file annotation responses, one for each request in - // AsyncBatchAnnotateFilesRequest. - repeated AsyncAnnotateFileResponse responses = 1; -} - -// The desired input location and metadata. -message InputConfig { - // The Google Cloud Storage location to read the input from. - GcsSource gcs_source = 1; - - // File content, represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - // - // Currently, this field only works for BatchAnnotateFiles requests. It does - // not work for AsyncBatchAnnotateFiles requests. - bytes content = 3; - - // The type of the file. Currently only "application/pdf", "image/tiff" and - // "image/gif" are supported. Wildcards are not supported. - string mime_type = 2; -} - -// The desired output location and metadata. -message OutputConfig { - // The Google Cloud Storage location to write the output(s) to. - GcsDestination gcs_destination = 1; - - // The max number of response protos to put into each output JSON file on - // Google Cloud Storage. - // The valid range is [1, 100]. If not specified, the default value is 20. - // - // For example, for one pdf file with 100 pages, 100 response protos will - // be generated. If `batch_size` = 20, then 5 json files each - // containing 20 response protos will be written under the prefix - // `gcs_destination`.`uri`. - // - // Currently, batch_size only applies to GcsDestination, with potential future - // support for other output configurations. - int32 batch_size = 2; -} - -// The Google Cloud Storage location where the input will be read from. -message GcsSource { - // Google Cloud Storage URI for the input file. This must only be a - // Google Cloud Storage object. Wildcards are not currently supported. - string uri = 1; -} - -// The Google Cloud Storage location where the output will be written to. -message GcsDestination { - // Google Cloud Storage URI prefix where the results will be stored. Results - // will be in JSON format and preceded by its corresponding input URI prefix. - // This field can either represent a gcs file prefix or gcs directory. In - // either case, the uri should be unique because in order to get all of the - // output files, you will need to do a wildcard gcs search on the uri prefix - // you provide. - // - // Examples: - // - // * File Prefix: gs://bucket-name/here/filenameprefix The output files - // will be created in gs://bucket-name/here/ and the names of the - // output files will begin with "filenameprefix". - // - // * Directory Prefix: gs://bucket-name/some/location/ The output files - // will be created in gs://bucket-name/some/location/ and the names of the - // output files could be anything because there was no filename prefix - // specified. - // - // If multiple outputs, each response is still AnnotateFileResponse, each of - // which contains some subset of the full list of AnnotateImageResponse. - // Multiple outputs can happen if, for example, the output JSON is too large - // and overflows into multiple sharded files. - string uri = 1; -} - -// Contains metadata for the BatchAnnotateImages operation. -message OperationMetadata { - // Batch operation states. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is received. - CREATED = 1; - - // Request is actively being processed. - RUNNING = 2; - - // The batch processing is done. - DONE = 3; - - // The batch processing was cancelled. - CANCELLED = 4; - } - - // Current state of the batch operation. - State state = 1; - - // The time when the batch request was received. - google.protobuf.Timestamp create_time = 5; - - // The time when the operation result was last updated. - google.protobuf.Timestamp update_time = 6; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto deleted file mode 100644 index ebb428acc800..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search.proto +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - -import "google/api/resource.proto"; -import "google/cloud/vision/v1p4beta1/geometry.proto"; -import "google/cloud/vision/v1p4beta1/product_search_service.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// Parameters for a product search request. -message ProductSearchParams { - // The bounding polygon around the area of interest in the image. - // If it is not specified, system discretion will be applied. - BoundingPoly bounding_poly = 9; - - // The resource name of a - // [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for - // similar images. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6 [(google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - }]; - - // The list of product categories to search in. Currently, we only consider - // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - // "packagedgoods-v1", or "general-v1" should be specified. The legacy - // categories "homegoods", "apparel", and "toys" are still supported but will - // be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - // or "toys-v2" for better product search accuracy. It is recommended to - // migrate existing products to these categories as well. - repeated string product_categories = 7; - - // The filtering expression. This can be used to restrict search results based - // on Product labels. We currently support an AND of OR of key-value - // expressions, where each expression within an OR must have the same key. An - // '=' should be used to connect the key and value. - // - // For example, "(color = red OR color = blue) AND brand = Google" is - // acceptable, but "(color = red OR brand = Google)" is not acceptable. - // "color: red" is not acceptable because it uses a ':' instead of an '='. - string filter = 8; -} - -// Results for a product search request. -message ProductSearchResults { - // Information about a product. - message Result { - // The Product. - Product product = 1; - - // A confidence level on the match, ranging from 0 (no confidence) to - // 1 (full confidence). - float score = 2; - - // The resource name of the image from the product that is the closest match - // to the query. - string image = 3; - } - - // Prediction for what the object in the bounding box is. - message ObjectAnnotation { - // Object ID that should align with EntityAnnotation mid. - string mid = 1; - - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - - // Object name, expressed in its `language_code` language. - string name = 3; - - // Score of the result. Range [0, 1]. - float score = 4; - } - - // Information about the products similar to a single product in a query - // image. - message GroupedResult { - // The bounding polygon around the product detected in the query image. - BoundingPoly bounding_poly = 1; - - // List of results, one for each product match. - repeated Result results = 2; - - // List of generic predictions for the object in the bounding box. - repeated ObjectAnnotation object_annotations = 3; - } - - // Timestamp of the index which provided these results. Products added to the - // product set and products removed from the product set after this time are - // not reflected in the current results. - google.protobuf.Timestamp index_time = 2; - - // List of results, one for each product match. - repeated Result results = 5; - - // List of results grouped by products detected in the query image. Each entry - // corresponds to one bounding polygon in the query image, and contains the - // matching products specific to that region. There may be duplicate product - // matches in the union of all the per-product results. - repeated GroupedResult product_grouped_results = 6; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto deleted file mode 100644 index df7bc7a38a4d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/product_search_service.proto +++ /dev/null @@ -1,1039 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/vision/v1p4beta1/geometry.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "ProductSearchServiceProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// Manages Products and ProductSets of reference images for use in product -// search. It uses the following resource model: -// -// - The API has a collection of -// [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named -// `projects/*/locations/*/productSets/*`, which acts as a way to put different -// products into groups to limit identification. -// -// In parallel, -// -// - The API has a collection of -// [Product][google.cloud.vision.v1p4beta1.Product] resources, named -// `projects/*/locations/*/products/*` -// -// - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of -// [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, -// named -// `projects/*/locations/*/products/*/referenceImages/*` -service ProductSearch { - option (google.api.default_host) = "vision.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform," - "https://www.googleapis.com/auth/cloud-vision"; - - // Creates and returns a new ProductSet resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - // 4096 characters. - rpc CreateProductSet(CreateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" - body: "product_set" - }; - option (google.api.method_signature) = "parent,product_set,product_set_id"; - } - - // Lists ProductSets in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - // than 1. - rpc ListProductSets(ListProductSetsRequest) - returns (ListProductSetsResponse) { - option (google.api.http) = { - get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - rpc GetProductSet(GetProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a ProductSet resource. - // Only display_name can be updated currently. - // - // Possible errors: - // - // * Returns NOT_FOUND if the ProductSet does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but - // missing from the request or longer than 4096 characters. - rpc UpdateProductSet(UpdateProductSetRequest) returns (ProductSet) { - option (google.api.http) = { - patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}" - body: "product_set" - }; - option (google.api.method_signature) = "product_set,update_mask"; - } - - // Permanently deletes a ProductSet. Products and ReferenceImages in the - // ProductSet are not deleted. - // - // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteProductSet(DeleteProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new product resource. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is missing or invalid. - rpc CreateProduct(CreateProductRequest) returns (Product) { - option (google.api.http) = { - post: "/v1p4beta1/{parent=projects/*/locations/*}/products" - body: "product" - }; - option (google.api.method_signature) = "parent,product,product_id"; - } - - // Lists products in an unspecified order. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { - option (google.api.http) = { - get: "/v1p4beta1/{parent=projects/*/locations/*}/products" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a Product. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - rpc GetProduct(GetProductRequest) returns (Product) { - option (google.api.http) = { - get: "/v1p4beta1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Makes changes to a Product resource. - // Only the `display_name`, `description`, and `labels` fields can be updated - // right now. - // - // If labels are updated, the change will not be reflected in queries until - // the next index time. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product does not exist. - // * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - // missing from the request or longer than 4096 characters. - // * Returns INVALID_ARGUMENT if description is present in update_mask but is - // longer than 4096 characters. - // * Returns INVALID_ARGUMENT if product_category is present in update_mask. - rpc UpdateProduct(UpdateProductRequest) returns (Product) { - option (google.api.http) = { - patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}" - body: "product" - }; - option (google.api.method_signature) = "product,update_mask"; - } - - // Permanently deletes a product and its reference images. - // - // Metadata of the product and all its images will be deleted right away, but - // search queries against ProductSets containing the product may still work - // until all related caches are refreshed. - rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p4beta1/{name=projects/*/locations/*/products/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates and returns a new ReferenceImage resource. - // - // The `bounding_poly` field is optional. If `bounding_poly` is not specified, - // the system will try to detect regions of interest in the image that are - // compatible with the product_category on the parent product. If it is - // specified, detection is ALWAYS skipped. The system converts polygons into - // non-rotated rectangles. - // - // Note that the pipeline will resize the image if the image resolution is too - // large to process (above 50MP). - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - // characters. - // * Returns INVALID_ARGUMENT if the product does not exist. - // * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - // compatible with the parent product's product_category is detected. - // * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - rpc CreateReferenceImage(CreateReferenceImageRequest) - returns (ReferenceImage) { - option (google.api.http) = { - post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" - body: "reference_image" - }; - option (google.api.method_signature) = - "parent,reference_image,reference_image_id"; - } - - // Permanently deletes a reference image. - // - // The image metadata will be deleted right away, but search queries - // against ProductSets containing the image may still work until all related - // caches are refreshed. - // - // The actual image files are not deleted from Google Cloud Storage. - rpc DeleteReferenceImage(DeleteReferenceImageRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists reference images. - // - // Possible errors: - // - // * Returns NOT_FOUND if the parent product does not exist. - // * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - // than 1. - rpc ListReferenceImages(ListReferenceImagesRequest) - returns (ListReferenceImagesResponse) { - option (google.api.http) = { - get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets information associated with a ReferenceImage. - // - // Possible errors: - // - // * Returns NOT_FOUND if the specified image does not exist. - rpc GetReferenceImage(GetReferenceImageRequest) returns (ReferenceImage) { - option (google.api.http) = { - get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Adds a Product to the specified ProductSet. If the Product is already - // present, no change is made. - // - // One Product can be added to at most 100 ProductSets. - // - // Possible errors: - // - // * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - rpc AddProductToProductSet(AddProductToProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Removes a Product from the specified ProductSet. - rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" - body: "*" - }; - option (google.api.method_signature) = "name,product"; - } - - // Lists the Products in a ProductSet, in an unspecified order. If the - // ProductSet does not exist, the products field of the response will be - // empty. - // - // Possible errors: - // - // * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - rpc ListProductsInProductSet(ListProductsInProductSetRequest) - returns (ListProductsInProductSetResponse) { - option (google.api.http) = { - get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" - }; - option (google.api.method_signature) = "name"; - } - - // Asynchronous API that imports a list of reference images to specified - // product sets based on a list of image information. - // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be - // used to keep track of the progress and results of the request. - // `Operation.metadata` contains `BatchOperationMetadata`. (progress) - // `Operation.response` contains `ImportProductSetsResponse`. (results) - // - // The input source of this method is a csv file on Google Cloud Storage. - // For the format of the csv file please see - // [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - rpc ImportProductSets(ImportProductSetsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import" - body: "*" - }; - option (google.api.method_signature) = "parent,input_config"; - option (google.longrunning.operation_info) = { - response_type: "ImportProductSetsResponse" - metadata_type: "BatchOperationMetadata" - }; - } - - // Asynchronous API to delete all Products in a ProductSet or all Products - // that are in no ProductSet. - // - // If a Product is a member of the specified ProductSet in addition to other - // ProductSets, the Product will still be deleted. - // - // It is recommended to not delete the specified ProductSet until after this - // operation has completed. It is also recommended to not add any of the - // Products involved in the batch delete to a new ProductSet while this - // operation is running because those Products may still end up deleted. - // - // It's not possible to undo the PurgeProducts operation. Therefore, it is - // recommended to keep the csv files used in ImportProductSets (if that was - // how you originally built the Product Set) before starting PurgeProducts, in - // case you need to re-import the data after deletion. - // - // If the plan is to purge all of the Products from a ProductSet and then - // re-use the empty ProductSet to re-import new Products into the empty - // ProductSet, you must wait until the PurgeProducts operation has finished - // for that ProductSet. - // - // The [google.longrunning.Operation][google.longrunning.Operation] API can be - // used to keep track of the progress and results of the request. - // `Operation.metadata` contains `BatchOperationMetadata`. (progress) - rpc PurgeProducts(PurgeProductsRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p4beta1/{parent=projects/*/locations/*}/products:purge" - body: "*" - }; - option (google.api.method_signature) = "parent"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "BatchOperationMetadata" - }; - } -} - -// A Product contains ReferenceImages. -message Product { - option (google.api.resource) = { - type: "vision.googleapis.com/Product" - pattern: "projects/{project}/locations/{location}/products/{product}" - }; - - // A product label represented as a key-value pair. - message KeyValue { - // The key of the label attached to the product. Cannot be empty and cannot - // exceed 128 bytes. - string key = 1; - - // The value of the label attached to the product. Cannot be empty and - // cannot exceed 128 bytes. - string value = 2; - } - - // The resource name of the product. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - // - // This field is ignored when creating a product. - string name = 1; - - // The user-provided name for this Product. Must not be empty. Must be at most - // 4096 characters long. - string display_name = 2; - - // User-provided metadata to be stored with this product. Must be at most 4096 - // characters long. - string description = 3; - - // Immutable. The category for the product identified by the reference image. - // This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The - // legacy categories "homegoods", "apparel", and "toys" are still supported, - // but these should not be used for new products. - string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; - - // Key-value pairs that can be attached to a product. At query time, - // constraints can be specified based on the product_labels. - // - // Note that integer values can be provided as strings, e.g. "1199". Only - // strings with integer values can match a range-based restriction which is - // to be supported soon. - // - // Multiple values can be assigned to the same key. One product may have up to - // 500 product_labels. - // - // Notice that the total number of distinct product_labels over all products - // in one ProductSet cannot exceed 1M, otherwise the product search pipeline - // will refuse to work for that ProductSet. - repeated KeyValue product_labels = 5; -} - -// A ProductSet contains Products. A ProductSet can contain a maximum of 1 -// million reference images. If the limit is exceeded, periodic indexing will -// fail. -message ProductSet { - option (google.api.resource) = { - type: "vision.googleapis.com/ProductSet" - pattern: "projects/{project}/locations/{location}/productSets/{product_set}" - }; - - // The resource name of the ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - // - // This field is ignored when creating a ProductSet. - string name = 1; - - // The user-provided name for this ProductSet. Must not be empty. Must be at - // most 4096 characters long. - string display_name = 2; - - // Output only. The time at which this ProductSet was last indexed. Query - // results will reflect all updates before this time. If this ProductSet has - // never been indexed, this timestamp is the default value - // "1970-01-01T00:00:00Z". - // - // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If there was an error with indexing the product set, the field - // is populated. - // - // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A `ReferenceImage` represents a product image and its associated metadata, -// such as bounding boxes. -message ReferenceImage { - option (google.api.resource) = { - type: "vision.googleapis.com/ReferenceImage" - pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" - }; - - // The resource name of the reference image. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - // - // This field is ignored when creating a reference image. - string name = 1; - - // Required. The Google Cloud Storage URI of the reference image. - // - // The URI must start with `gs://`. - string uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Bounding polygons around the areas of interest in the reference - // image. If this field is empty, the system will try to detect regions of - // interest. At most 10 bounding polygons will be used. - // - // The provided shape is converted into a non-rotated rectangle. Once - // converted, the small edge of the rectangle must be greater than or equal - // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - // is not). - repeated BoundingPoly bounding_polys = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for the `CreateProduct` method. -message CreateProductRequest { - // Required. The project in which the Product should be created. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The product to create. - Product product = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this Product. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_id = 3; -} - -// Request message for the `ListProducts` method. -message ListProductsRequest { - // Required. The project OR ProductSet from which Products should be listed. - // - // Format: - // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProducts` method. -message ListProductsResponse { - // List of products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProduct` method. -message GetProductRequest { - // Required. Resource name of the Product to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; -} - -// Request message for the `UpdateProduct` method. -message UpdateProductRequest { - // Required. The Product resource which replaces the one on the server. - // product.name is immutable. - Product product = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields - // to update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask paths include `product_labels`, `display_name`, and - // `description`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProduct` method. -message DeleteProductRequest { - // Required. Resource name of product to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; -} - -// Request message for the `CreateProductSet` method. -message CreateProductSetRequest { - // Required. The project in which the ProductSet should be created. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The ProductSet to create. - ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for this ProductSet. If set, the server will - // attempt to use this value as the resource id. If it is already in use, an - // error is returned with code ALREADY_EXISTS. Must be at most 128 characters - // long. It cannot contain the character `/`. - string product_set_id = 3; -} - -// Request message for the `ListProductSets` method. -message ListProductSetsRequest { - // Required. The project from which ProductSets should be listed. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductSets` method. -message ListProductSetsResponse { - // List of ProductSets. - repeated ProductSet product_sets = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// Request message for the `GetProductSet` method. -message GetProductSetRequest { - // Required. Resource name of the ProductSet to get. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `UpdateProductSet` method. -message UpdateProductSetRequest { - // Required. The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; - - // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - // update. - // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask path is `display_name`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for the `DeleteProductSet` method. -message DeleteProductSetRequest { - // Required. Resource name of the ProductSet to delete. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; -} - -// Request message for the `CreateReferenceImage` method. -message CreateReferenceImageRequest { - // Required. Resource name of the product in which to create the reference - // image. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; - - // Required. The reference image to create. - // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; - - // A user-supplied resource id for the ReferenceImage to be added. If set, - // the server will attempt to use this value as the resource id. If it is - // already in use, an error is returned with code ALREADY_EXISTS. Must be at - // most 128 characters long. It cannot contain the character `/`. - string reference_image_id = 3; -} - -// Request message for the `ListReferenceImages` method. -message ListReferenceImagesRequest { - // Required. Resource name of the product containing the reference images. - // - // Format is - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // A token identifying a page of results to be returned. This is the value - // of `nextPageToken` returned in a previous reference image list request. - // - // Defaults to the first page if not specified. - string page_token = 3; -} - -// Response message for the `ListReferenceImages` method. -message ListReferenceImagesResponse { - // The list of reference images. - repeated ReferenceImage reference_images = 1; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string next_page_token = 3; -} - -// Request message for the `GetReferenceImage` method. -message GetReferenceImageRequest { - // Required. The resource name of the ReferenceImage to get. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `DeleteReferenceImage` method. -message DeleteReferenceImageRequest { - // Required. The resource name of the reference image to delete. - // - // Format is: - // - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ReferenceImage" - } - ]; -} - -// Request message for the `AddProductToProductSet` method. -message AddProductToProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be added to this ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; -} - -// Request message for the `RemoveProductFromProductSet` method. -message RemoveProductFromProductSetRequest { - // Required. The resource name for the ProductSet to modify. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // Required. The resource name for the Product to be removed from this - // ProductSet. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } - ]; -} - -// Request message for the `ListProductsInProductSet` method. -message ListProductsInProductSetRequest { - // Required. The ProductSet resource for which to retrieve Products. - // - // Format is: - // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "vision.googleapis.com/ProductSet" - } - ]; - - // The maximum number of items to return. Default 10, maximum 100. - int32 page_size = 2; - - // The next_page_token returned from a previous List request, if any. - string page_token = 3; -} - -// Response message for the `ListProductsInProductSet` method. -message ListProductsInProductSetResponse { - // The list of Products. - repeated Product products = 1; - - // Token to retrieve the next page of results, or empty if there are no more - // results in the list. - string next_page_token = 2; -} - -// The Google Cloud Storage location for a csv file which preserves a list of -// ImportProductSetRequests in each line. -message ImportProductSetsGcsSource { - // The Google Cloud Storage URI of the input csv file. - // - // The URI must start with `gs://`. - // - // The format of the input csv file should be one image per line. - // In each line, there are 8 columns. - // - // 1. image-uri - // 2. image-id - // 3. product-set-id - // 4. product-id - // 5. product-category - // 6. product-display-name - // 7. labels - // 8. bounding-poly - // - // The `image-uri`, `product-set-id`, `product-id`, and `product-category` - // columns are required. All other columns are optional. - // - // If the `ProductSet` or `Product` specified by the `product-set-id` and - // `product-id` values does not exist, then the system will create a new - // `ProductSet` or `Product` for the image. In this case, the - // `product-display-name` column refers to - // [display_name][google.cloud.vision.v1p4beta1.Product.display_name], the - // `product-category` column refers to - // [product_category][google.cloud.vision.v1p4beta1.Product.product_category], - // and the `labels` column refers to - // [product_labels][google.cloud.vision.v1p4beta1.Product.product_labels]. - // - // The `image-id` column is optional but must be unique if provided. If it is - // empty, the system will automatically assign a unique id to the image. - // - // The `product-display-name` column is optional. If it is empty, the system - // sets the [display_name][google.cloud.vision.v1p4beta1.Product.display_name] - // field for the product to a space (" "). You can update the `display_name` - // later by using the API. - // - // If a `Product` with the specified `product-id` already exists, then the - // system ignores the `product-display-name`, `product-category`, and `labels` - // columns. - // - // The `labels` column (optional) is a line containing a list of - // comma-separated key-value pairs, in the following format: - // - // "key_1=value_1,key_2=value_2,...,key_n=value_n" - // - // The `bounding-poly` column (optional) identifies one region of - // interest from the image in the same manner as `CreateReferenceImage`. If - // you do not specify the `bounding-poly` column, then the system will try to - // detect regions of interest automatically. - // - // At most one `bounding-poly` column is allowed per line. If the image - // contains multiple regions of interest, add a line to the CSV file that - // includes the same product information, and the `bounding-poly` values for - // each region of interest. - // - // The `bounding-poly` column must contain an even number of comma-separated - // numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - // non-negative integers for absolute bounding polygons, and float values - // in [0, 1] for normalized bounding polygons. - // - // The system will resize the image if the image resolution is too - // large to process (larger than 20MP). - string csv_file_uri = 1; -} - -// The input content for the `ImportProductSets` method. -message ImportProductSetsInputConfig { - // The source of the input. - oneof source { - // The Google Cloud Storage location for a csv file which preserves a list - // of ImportProductSetRequests in each line. - ImportProductSetsGcsSource gcs_source = 1; - } -} - -// Request message for the `ImportProductSets` method. -message ImportProductSetsRequest { - // Required. The project in which the ProductSets should be imported. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for the `ImportProductSets` method. -// -// This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] -// method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// field. -message ImportProductSetsResponse { - // The list of reference_images that are imported successfully. - repeated ReferenceImage reference_images = 1; - - // The rpc status for each ImportProductSet request, including both successes - // and errors. - // - // The number of statuses here matches the number of lines in the csv file, - // and statuses[i] stores the success or failure status of processing the i-th - // line of the csv, starting from line 0. - repeated google.rpc.Status statuses = 2; -} - -// Metadata for the batch operations such as the current state. -// -// This is included in the `metadata` field of the `Operation` returned by the -// `GetOperation` call of the `google::longrunning::Operations` service. -message BatchOperationMetadata { - // Enumerates the possible states that the batch request can be in. - enum State { - // Invalid. - STATE_UNSPECIFIED = 0; - - // Request is actively being processed. - PROCESSING = 1; - - // The request is done and at least one item has been successfully - // processed. - SUCCESSFUL = 2; - - // The request is done and no item has been successfully processed. - FAILED = 3; - - // The request is done after the longrunning.Operations.CancelOperation has - // been called by the user. Any records that were processed before the - // cancel command are output as specified in the request. - CANCELLED = 4; - } - - // The current state of the batch operation. - State state = 1; - - // The time when the batch request was submitted to the server. - google.protobuf.Timestamp submit_time = 2; - - // The time when the batch request is finished and - // [google.longrunning.Operation.done][google.longrunning.Operation.done] is - // set to true. - google.protobuf.Timestamp end_time = 3; -} - -// Config to control which ProductSet contains the Products to be deleted. -message ProductSetPurgeConfig { - // The ProductSet that contains the Products to delete. If a Product is a - // member of product_set_id in addition to other ProductSets, the Product will - // still be deleted. - string product_set_id = 1; -} - -// Request message for the `PurgeProducts` method. -message PurgeProductsRequest { - // The Products to delete. - oneof target { - // Specify which ProductSet contains the Products to be deleted. - ProductSetPurgeConfig product_set_purge_config = 2; - - // If delete_orphan_products is true, all Products that are not in any - // ProductSet will be deleted. - bool delete_orphan_products = 3; - } - - // Required. The project and location in which the Products should be deleted. - // - // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The default value is false. Override this value to true to actually perform - // the purge. - bool force = 4; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto deleted file mode 100644 index 233c4c689e4f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/text_annotation.proto +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - -import "google/cloud/vision/v1p4beta1/geometry.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "TextAnnotationProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure is like this: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have their own -// properties. Properties describe detected languages, breaks etc.. Please refer -// to the -// [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty] -// message definition below for more detail. -message TextAnnotation { - // Detected language for a structural component. - message DetectedLanguage { - // The BCP-47 language code, such as "en-US" or "sr-Latn". For more - // information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 1; - - // Confidence of detected language. Range [0, 1]. - float confidence = 2; - } - - // Detected start or end of a structural component. - message DetectedBreak { - // Enum to denote the type of break found. New line, space etc. - enum BreakType { - // Unknown break label type. - UNKNOWN = 0; - - // Regular space. - SPACE = 1; - - // Sure space (very wide). - SURE_SPACE = 2; - - // Line-wrapping break. - EOL_SURE_SPACE = 3; - - // End-line hyphen that is not present in text; does not co-occur with - // `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - HYPHEN = 4; - - // Line break that ends a paragraph. - LINE_BREAK = 5; - } - - // Detected break type. - BreakType type = 1; - - // True if break prepends the element. - bool is_prefix = 2; - } - - // Additional information detected on the structural component. - message TextProperty { - // A list of detected languages together with confidence. - repeated DetectedLanguage detected_languages = 1; - - // Detected start or end of a text segment. - DetectedBreak detected_break = 2; - } - - // List of pages detected by OCR. - repeated Page pages = 1; - - // UTF-8 text detected on the pages. - string text = 2; -} - -// Detected page from OCR. -message Page { - // Additional information detected on the page. - TextAnnotation.TextProperty property = 1; - - // Page width. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 width = 2; - - // Page height. For PDFs the unit is points. For images (including - // TIFFs) the unit is pixels. - int32 height = 3; - - // List of blocks of text, images etc on this page. - repeated Block blocks = 4; - - // Confidence of the OCR results on the page. Range [0, 1]. - float confidence = 5; -} - -// Logical element on the page. -message Block { - // Type of a block (text, image etc) as identified by OCR. - enum BlockType { - // Unknown block type. - UNKNOWN = 0; - - // Regular text block. - TEXT = 1; - - // Table block. - TABLE = 2; - - // Image block. - PICTURE = 3; - - // Horizontal/vertical line box. - RULER = 4; - - // Barcode block. - BARCODE = 5; - } - - // Additional information detected for the block. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // - // * when the text is horizontal it might look like: - // - // 0----1 - // | | - // 3----2 - // - // * when it's rotated 180 degrees around the top-left corner it becomes: - // - // 2----3 - // | | - // 1----0 - // - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of paragraphs in this block (if this blocks is of type text). - repeated Paragraph paragraphs = 3; - - // Detected block type (text, image etc) for this block. - BlockType block_type = 4; - - // Confidence of the OCR results on the block. Range [0, 1]. - float confidence = 5; -} - -// Structural unit of text representing a number of words in certain order. -message Paragraph { - // Additional information detected for the paragraph. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of all words in this paragraph. - repeated Word words = 3; - - // Confidence of the OCR results for the paragraph. Range [0, 1]. - float confidence = 4; -} - -// A word representation. -message Word { - // Additional information detected for the word. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - repeated Symbol symbols = 3; - - // Confidence of the OCR results for the word. Range [0, 1]. - float confidence = 4; -} - -// A single symbol representation. -message Symbol { - // Additional information detected for the symbol. - TextAnnotation.TextProperty property = 1; - - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertex order will still be (0, 1, 2, 3). - BoundingPoly bounding_box = 2; - - // The actual UTF-8 representation of the symbol. - string text = 3; - - // Confidence of the OCR results for the symbol. Range [0, 1]. - float confidence = 4; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto b/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto deleted file mode 100644 index 7d716570f45d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/proto-google-cloud-vision-v1p4beta1/src/main/proto/google/cloud/vision/v1p4beta1/web_detection.proto +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.vision.v1p4beta1; - - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; -option java_multiple_files = true; -option java_outer_classname = "WebDetectionProto"; -option java_package = "com.google.cloud.vision.v1p4beta1"; -option objc_class_prefix = "GCVN"; - -// Relevant information for the image from the Internet. -message WebDetection { - // Entity deduced from similar images on the Internet. - message WebEntity { - // Opaque entity ID. - string entity_id = 1; - - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - float score = 2; - - // Canonical description of the entity, in English. - string description = 3; - } - - // Metadata for online images. - message WebImage { - // The result image URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the image. - float score = 2; - } - - // Metadata for web pages. - message WebPage { - // The result web page URL. - string url = 1; - - // (Deprecated) Overall relevancy score for the web page. - float score = 2; - - // Title for the web page, may contain HTML markups. - string page_title = 3; - - // Fully matching images on the page. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 4; - - // Partial matching images on the page. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its - // crops. - repeated WebImage partial_matching_images = 5; - } - - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - - // Deduced entities from similar images on the Internet. - repeated WebEntity web_entities = 1; - - // Fully matching images from the Internet. - // Can include resized copies of the query image. - repeated WebImage full_matching_images = 2; - - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - repeated WebImage partial_matching_images = 3; - - // Web pages containing the matching images from the Internet. - repeated WebPage pages_with_matching_images = 4; - - // The visually similar image results. - repeated WebImage visually_similar_images = 6; - - // The service's best guess as to the topic of the request image. - // Inferred from similar images on the open web. - repeated WebLabel best_guess_labels = 8; -} diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index 3560b383184f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFiles(); - } - - public static void asyncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java deleted file mode 100644 index fe9f4bcd280d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/AsyncAsyncBatchAnnotateFilesLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateFilesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateFilesLRO(); - } - - public static void asyncAsyncBatchAnnotateFilesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java deleted file mode 100644 index a7f94cf4cf38..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] -import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFiles(); - } - - public static void syncAsyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateFilesRequest request = - AsyncBatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java deleted file mode 100644 index cca207531cdc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotatefiles/SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] -import com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateFilesListasyncannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateFilesListasyncannotatefilerequest(); - } - - public static void syncAsyncBatchAnnotateFilesListasyncannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - AsyncBatchAnnotateFilesResponse response = - imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotatefiles_listasyncannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java deleted file mode 100644 index f0b8de781153..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImages.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.OutputConfig; -import com.google.longrunning.Operation; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateImages(); - } - - public static void asyncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - ApiFuture future = - imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java deleted file mode 100644 index 8b8c67b8d86b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/AsyncAsyncBatchAnnotateImagesLRO.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.OperationMetadata; -import com.google.cloud.vision.v1p4beta1.OutputConfig; -import java.util.ArrayList; - -public class AsyncAsyncBatchAnnotateImagesLRO { - - public static void main(String[] args) throws Exception { - asyncAsyncBatchAnnotateImagesLRO(); - } - - public static void asyncAsyncBatchAnnotateImagesLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - OperationFuture future = - imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request); - // Do something. - AsyncBatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java deleted file mode 100644 index 9e5abd57b143..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImages.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.OutputConfig; -import java.util.ArrayList; - -public class SyncAsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateImages(); - } - - public static void syncAsyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - AsyncBatchAnnotateImagesRequest request = - AsyncBatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .build(); - AsyncBatchAnnotateImagesResponse response = - imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java deleted file mode 100644 index ac9ad1dff5ee..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/asyncbatchannotateimages/SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.OutputConfig; -import java.util.ArrayList; -import java.util.List; - -public class SyncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig { - - public static void main(String[] args) throws Exception { - syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig(); - } - - public static void syncAsyncBatchAnnotateImagesListannotateimagerequestOutputconfig() - throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - AsyncBatchAnnotateImagesResponse response = - imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_asyncbatchannotateimages_listannotateimagerequestoutputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java deleted file mode 100644 index dcbc6b6d15ea..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/AsyncBatchAnnotateFiles.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateFiles(); - } - - public static void asyncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request); - // Do something. - BatchAnnotateFilesResponse response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java deleted file mode 100644 index 36ebcb7fd2ea..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFiles.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateFiles { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateFiles(); - } - - public static void syncBatchAnnotateFiles() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateFilesRequest request = - BatchAnnotateFilesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java deleted file mode 100644 index 6d2cb3d4faef..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotatefiles/SyncBatchAnnotateFilesListannotatefilerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateFileRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateFilesListannotatefilerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateFilesListannotatefilerequest(); - } - - public static void syncBatchAnnotateFilesListannotatefilerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotatefiles_listannotatefilerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java deleted file mode 100644 index d3be582406ed..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/AsyncBatchAnnotateImages.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class AsyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - asyncBatchAnnotateImages(); - } - - public static void asyncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - ApiFuture future = - imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request); - // Do something. - BatchAnnotateImagesResponse response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 77c4afa9fb95..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - BatchAnnotateImagesRequest request = - BatchAnnotateImagesRequest.newBuilder() - .addAllRequests(new ArrayList()) - .build(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java deleted file mode 100644 index a68569dbd06e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/batchannotateimages/SyncBatchAnnotateImagesListannotateimagerequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] -import com.google.cloud.vision.v1p4beta1.AnnotateImageRequest; -import com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import java.util.ArrayList; -import java.util.List; - -public class SyncBatchAnnotateImagesListannotateimagerequest { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImagesListannotateimagerequest(); - } - - public static void syncBatchAnnotateImagesListannotateimagerequest() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { - List requests = new ArrayList<>(); - BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); - } - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_batchannotateimages_listannotateimagerequest_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 81361ed4fc17..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p4beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 76b3f9bd4ab0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder() - .setTransportChannelProvider( - ImageAnnotatorSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index ebf53528ca10..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorClient; -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; -import com.google.cloud.vision.v1p4beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings imageAnnotatorSettings = - ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build(); - ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings); - } -} -// [END vision_v1p4beta1_generated_imageannotatorclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index 76f5c4e198ac..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/imageannotatorsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_imageannotatorsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p4beta1.ImageAnnotatorSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p4beta1_generated_imageannotatorsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java deleted file mode 100644 index 826b621f04a2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/AsyncAddProductToProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - asyncAddProductToProductSet(); - } - - public static void asyncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.addProductToProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java deleted file mode 100644 index 73fa23f52b2b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_sync] -import com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSet { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSet(); - } - - public static void syncAddProductToProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - AddProductToProductSetRequest request = - AddProductToProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.addProductToProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java deleted file mode 100644 index 8b5f8d7c5023..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameProductname(); - } - - public static void syncAddProductToProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java deleted file mode 100644 index 1afa9bb839cc..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetProductsetnameString(); - } - - public static void syncAddProductToProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java deleted file mode 100644 index 1fe7ef4254f0..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringProductname(); - } - - public static void syncAddProductToProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java deleted file mode 100644 index 61a46026adee..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/addproducttoproductset/SyncAddProductToProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncAddProductToProductSetStringString { - - public static void main(String[] args) throws Exception { - syncAddProductToProductSetStringString(); - } - - public static void syncAddProductToProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.addProductToProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_addproducttoproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index c95d346c734c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; -import com.google.cloud.vision.v1p4beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 3a95805781f5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder() - .setTransportChannelProvider( - ProductSearchSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p4beta1_generated_productsearchclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 3f394b403dd7..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_create_setendpoint_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; -import com.google.cloud.vision.v1p4beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings productSearchSettings = - ProductSearchSettings.newBuilder().setEndpoint(myEndpoint).build(); - ProductSearchClient productSearchClient = ProductSearchClient.create(productSearchSettings); - } -} -// [END vision_v1p4beta1_generated_productsearchclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java deleted file mode 100644 index 07650db00def..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/AsyncCreateProduct.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class AsyncCreateProduct { - - public static void main(String[] args) throws Exception { - asyncCreateProduct(); - } - - public static void asyncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - ApiFuture future = productSearchClient.createProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java deleted file mode 100644 index 84bd73a29378..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProduct.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproduct_sync] -import com.google.cloud.vision.v1p4beta1.CreateProductRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncCreateProduct { - - public static void main(String[] args) throws Exception { - syncCreateProduct(); - } - - public static void syncCreateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductRequest request = - CreateProductRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProduct(Product.newBuilder().build()) - .setProductId("productId-1051830678") - .build(); - Product response = productSearchClient.createProduct(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java deleted file mode 100644 index 15d8dc4c863c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductLocationnameProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncCreateProductLocationnameProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductLocationnameProductString(); - } - - public static void syncCreateProductLocationnameProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproduct_locationnameproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java deleted file mode 100644 index f7fad35f7074..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproduct/SyncCreateProductStringProductString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproduct_stringproductstring_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncCreateProductStringProductString { - - public static void main(String[] args) throws Exception { - syncCreateProductStringProductString(); - } - - public static void syncCreateProductStringProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Product product = Product.newBuilder().build(); - String productId = "productId-1051830678"; - Product response = productSearchClient.createProduct(parent, product, productId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproduct_stringproductstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java deleted file mode 100644 index b128072caf92..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/AsyncCreateProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class AsyncCreateProductSet { - - public static void main(String[] args) throws Exception { - asyncCreateProductSet(); - } - - public static void asyncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ApiFuture future = - productSearchClient.createProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java deleted file mode 100644 index dd81ded3f2c2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproductset_sync] -import com.google.cloud.vision.v1p4beta1.CreateProductSetRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateProductSetRequest request = - CreateProductSetRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setProductSet(ProductSet.newBuilder().build()) - .setProductSetId("productSetId1003042158") - .build(); - ProductSet response = productSearchClient.createProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java deleted file mode 100644 index fc9ca3591107..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetLocationnameProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncCreateProductSetLocationnameProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetLocationnameProductsetString(); - } - - public static void syncCreateProductSetLocationnameProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproductset_locationnameproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java deleted file mode 100644 index d4a7ec2fde40..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createproductset/SyncCreateProductSetStringProductsetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncCreateProductSetStringProductsetString { - - public static void main(String[] args) throws Exception { - syncCreateProductSetStringProductsetString(); - } - - public static void syncCreateProductSetStringProductsetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ProductSet productSet = ProductSet.newBuilder().build(); - String productSetId = "productSetId1003042158"; - ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createproductset_stringproductsetstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java deleted file mode 100644 index 3172b3b3f90d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/AsyncCreateReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class AsyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - asyncCreateReferenceImage(); - } - - public static void asyncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ApiFuture future = - productSearchClient.createReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java deleted file mode 100644 index 533d6344ab01..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_sync] -import com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncCreateReferenceImage { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImage(); - } - - public static void syncCreateReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - CreateReferenceImageRequest request = - CreateReferenceImageRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setReferenceImage(ReferenceImage.newBuilder().build()) - .setReferenceImageId("referenceImageId1224107531") - .build(); - ReferenceImage response = productSearchClient.createReferenceImage(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java deleted file mode 100644 index f5f00ef3a16f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageProductnameReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncCreateReferenceImageProductnameReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageProductnameReferenceimageString(); - } - - public static void syncCreateReferenceImageProductnameReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_productnamereferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java deleted file mode 100644 index 5882fd385d67..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/createreferenceimage/SyncCreateReferenceImageStringReferenceimageString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncCreateReferenceImageStringReferenceimageString { - - public static void main(String[] args) throws Exception { - syncCreateReferenceImageStringReferenceimageString(); - } - - public static void syncCreateReferenceImageStringReferenceimageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - ReferenceImage referenceImage = ReferenceImage.newBuilder().build(); - String referenceImageId = "referenceImageId1224107531"; - ReferenceImage response = - productSearchClient.createReferenceImage(parent, referenceImage, referenceImageId); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_createreferenceimage_stringreferenceimagestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java deleted file mode 100644 index f1b9e84c8b7c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/AsyncDeleteProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteProduct { - - public static void main(String[] args) throws Exception { - asyncDeleteProduct(); - } - - public static void asyncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java deleted file mode 100644 index 4812dd1df924..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_sync] -import com.google.cloud.vision.v1p4beta1.DeleteProductRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProduct { - - public static void main(String[] args) throws Exception { - syncDeleteProduct(); - } - - public static void syncDeleteProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductRequest request = - DeleteProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.deleteProduct(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java deleted file mode 100644 index ad0bae7d6672..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_productname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductProductname { - - public static void main(String[] args) throws Exception { - syncDeleteProductProductname(); - } - - public static void syncDeleteProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java deleted file mode 100644 index 10cd71d23b80..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproduct/SyncDeleteProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproduct_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncDeleteProductString { - - public static void main(String[] args) throws Exception { - syncDeleteProductString(); - } - - public static void syncDeleteProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.deleteProduct(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java deleted file mode 100644 index efe3a25c5858..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/AsyncDeleteProductSet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class AsyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - asyncDeleteProductSet(); - } - - public static void asyncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = productSearchClient.deleteProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java deleted file mode 100644 index e44c89e7db0c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_sync] -import com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSet { - - public static void main(String[] args) throws Exception { - syncDeleteProductSet(); - } - - public static void syncDeleteProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteProductSetRequest request = - DeleteProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - productSearchClient.deleteProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java deleted file mode 100644 index e582d2735c93..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_productsetname_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetProductsetname(); - } - - public static void syncDeleteProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java deleted file mode 100644 index ad1e731dc973..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deleteproductset/SyncDeleteProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deleteproductset_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncDeleteProductSetString { - - public static void main(String[] args) throws Exception { - syncDeleteProductSetString(); - } - - public static void syncDeleteProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - productSearchClient.deleteProductSet(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deleteproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java deleted file mode 100644 index f1aecab1b8d6..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/AsyncDeleteReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class AsyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - asyncDeleteReferenceImage(); - } - - public static void asyncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.deleteReferenceImageCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java deleted file mode 100644 index 6395f93a0b5a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_sync] -import com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImage { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImage(); - } - - public static void syncDeleteReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - DeleteReferenceImageRequest request = - DeleteReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - productSearchClient.deleteReferenceImage(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java deleted file mode 100644 index 46352b0a6f2d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageReferenceimagename(); - } - - public static void syncDeleteReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java deleted file mode 100644 index b917ac1570fd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/deletereferenceimage/SyncDeleteReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; -import com.google.protobuf.Empty; - -public class SyncDeleteReferenceImageString { - - public static void main(String[] args) throws Exception { - syncDeleteReferenceImageString(); - } - - public static void syncDeleteReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - productSearchClient.deleteReferenceImage(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_deletereferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java deleted file mode 100644 index fe223c94d35c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/AsyncGetProduct.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class AsyncGetProduct { - - public static void main(String[] args) throws Exception { - asyncGetProduct(); - } - - public static void asyncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = productSearchClient.getProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java deleted file mode 100644 index d882ff04c1aa..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProduct.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproduct_sync] -import com.google.cloud.vision.v1p4beta1.GetProductRequest; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncGetProduct { - - public static void main(String[] args) throws Exception { - syncGetProduct(); - } - - public static void syncGetProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductRequest request = - GetProductRequest.newBuilder() - .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - Product response = productSearchClient.getProduct(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java deleted file mode 100644 index b2d76a567e04..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductProductname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproduct_productname_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncGetProductProductname { - - public static void main(String[] args) throws Exception { - syncGetProductProductname(); - } - - public static void syncGetProductProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproduct_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java deleted file mode 100644 index bb02aba4f7d8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproduct/SyncGetProductString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproduct_string_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncGetProductString { - - public static void main(String[] args) throws Exception { - syncGetProductString(); - } - - public static void syncGetProductString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - Product response = productSearchClient.getProduct(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproduct_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java deleted file mode 100644 index 85f4202dcc99..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/AsyncGetProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class AsyncGetProductSet { - - public static void main(String[] args) throws Exception { - asyncGetProductSet(); - } - - public static void asyncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ApiFuture future = - productSearchClient.getProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java deleted file mode 100644 index 538605a99b1c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproductset_sync] -import com.google.cloud.vision.v1p4beta1.GetProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncGetProductSet { - - public static void main(String[] args) throws Exception { - syncGetProductSet(); - } - - public static void syncGetProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetProductSetRequest request = - GetProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .build(); - ProductSet response = productSearchClient.getProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java deleted file mode 100644 index 4555b7710b05..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetProductsetname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproductset_productsetname_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncGetProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncGetProductSetProductsetname(); - } - - public static void syncGetProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java deleted file mode 100644 index 0ce7f569f705..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getproductset/SyncGetProductSetString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getproductset_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncGetProductSetString { - - public static void main(String[] args) throws Exception { - syncGetProductSetString(); - } - - public static void syncGetProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductSet response = productSearchClient.getProductSet(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java deleted file mode 100644 index 14bd71a62a72..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/AsyncGetReferenceImage.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; - -public class AsyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - asyncGetReferenceImage(); - } - - public static void asyncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ApiFuture future = - productSearchClient.getReferenceImageCallable().futureCall(request); - // Do something. - ReferenceImage response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java deleted file mode 100644 index 3ad5a3db5f20..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_sync] -import com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; - -public class SyncGetReferenceImage { - - public static void main(String[] args) throws Exception { - syncGetReferenceImage(); - } - - public static void syncGetReferenceImage() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - GetReferenceImageRequest request = - GetReferenceImageRequest.newBuilder() - .setName( - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString()) - .build(); - ReferenceImage response = productSearchClient.getReferenceImage(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java deleted file mode 100644 index 15738a52dbb4..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageReferenceimagename.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; - -public class SyncGetReferenceImageReferenceimagename { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageReferenceimagename(); - } - - public static void syncGetReferenceImageReferenceimagename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ReferenceImageName name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]"); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_referenceimagename_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java deleted file mode 100644 index b4f16dc3601c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/getreferenceimage/SyncGetReferenceImageString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_getreferenceimage_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.cloud.vision.v1p4beta1.ReferenceImageName; - -public class SyncGetReferenceImageString { - - public static void main(String[] args) throws Exception { - syncGetReferenceImageString(); - } - - public static void syncGetReferenceImageString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = - ReferenceImageName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]", "[REFERENCE_IMAGE]") - .toString(); - ReferenceImage response = productSearchClient.getReferenceImage(name); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_getreferenceimage_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java deleted file mode 100644 index 3c466d78b02d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSets.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.longrunning.Operation; - -public class AsyncImportProductSets { - - public static void main(String[] args) throws Exception { - asyncImportProductSets(); - } - - public static void asyncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.importProductSetsCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java deleted file mode 100644 index e69236bd1210..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/AsyncImportProductSetsLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class AsyncImportProductSetsLRO { - - public static void main(String[] args) throws Exception { - asyncImportProductSetsLRO(); - } - - public static void asyncImportProductSetsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - OperationFuture future = - productSearchClient.importProductSetsOperationCallable().futureCall(request); - // Do something. - ImportProductSetsResponse response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java deleted file mode 100644 index 98d8717a5618..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSets.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_sync] -import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncImportProductSets { - - public static void main(String[] args) throws Exception { - syncImportProductSets(); - } - - public static void syncImportProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ImportProductSetsRequest request = - ImportProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setInputConfig(ImportProductSetsInputConfig.newBuilder().build()) - .build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(request).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java deleted file mode 100644 index 06350d69882d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsLocationnameImportproductsetsinputconfig.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncImportProductSetsLocationnameImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsLocationnameImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsLocationnameImportproductsetsinputconfig() - throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_locationnameimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java deleted file mode 100644 index d61be7abb0c2..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/importproductsets/SyncImportProductSetsStringImportproductsetsinputconfig.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] -import com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig; -import com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncImportProductSetsStringImportproductsetsinputconfig { - - public static void main(String[] args) throws Exception { - syncImportProductSetsStringImportproductsetsinputconfig(); - } - - public static void syncImportProductSetsStringImportproductsetsinputconfig() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - ImportProductSetsInputConfig inputConfig = ImportProductSetsInputConfig.newBuilder().build(); - ImportProductSetsResponse response = - productSearchClient.importProductSetsAsync(parent, inputConfig).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_importproductsets_stringimportproductsetsinputconfig_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java deleted file mode 100644 index 530baf6cf05a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProducts.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproducts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class AsyncListProducts { - - public static void main(String[] args) throws Exception { - asyncListProducts(); - } - - public static void asyncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproducts_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java deleted file mode 100644 index 4a10769b4e03..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/AsyncListProductsPaged.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproducts_paged_async] -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.common.base.Strings; - -public class AsyncListProductsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsPaged(); - } - - public static void asyncListProductsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsResponse response = productSearchClient.listProductsCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproducts_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java deleted file mode 100644 index f8803d503432..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProducts.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproducts_sync] -import com.google.cloud.vision.v1p4beta1.ListProductsRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncListProducts { - - public static void main(String[] args) throws Exception { - syncListProducts(); - } - - public static void syncListProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsRequest request = - ListProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProducts(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java deleted file mode 100644 index 6403e8c13eaf..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproducts_locationname_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncListProductsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductsLocationname(); - } - - public static void syncListProductsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java deleted file mode 100644 index 606953592de3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproducts/SyncListProductsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproducts_string_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; - -public class SyncListProductsString { - - public static void main(String[] args) throws Exception { - syncListProductsString(); - } - - public static void syncListProductsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Product element : productSearchClient.listProducts(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java deleted file mode 100644 index f2c73fed2e06..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSets.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class AsyncListProductSets { - - public static void main(String[] args) throws Exception { - asyncListProductSets(); - } - - public static void asyncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductSetsPagedCallable().futureCall(request); - // Do something. - for (ProductSet element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java deleted file mode 100644 index 05ef50702322..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/AsyncListProductSetsPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_paged_async] -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.ListProductSetsResponse; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.common.base.Strings; - -public class AsyncListProductSetsPaged { - - public static void main(String[] args) throws Exception { - asyncListProductSetsPaged(); - } - - public static void asyncListProductSetsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductSetsResponse response = - productSearchClient.listProductSetsCallable().call(request); - for (ProductSet element : response.getProductSetsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java deleted file mode 100644 index d2866996e864..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSets.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_sync] -import com.google.cloud.vision.v1p4beta1.ListProductSetsRequest; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncListProductSets { - - public static void main(String[] args) throws Exception { - syncListProductSets(); - } - - public static void syncListProductSets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductSetsRequest request = - ListProductSetsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ProductSet element : productSearchClient.listProductSets(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java deleted file mode 100644 index 01f5b5a7ffa1..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_locationname_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncListProductSetsLocationname { - - public static void main(String[] args) throws Exception { - syncListProductSetsLocationname(); - } - - public static void syncListProductSetsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java deleted file mode 100644 index 2be635726289..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsets/SyncListProductSetsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsets_string_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; - -public class SyncListProductSetsString { - - public static void main(String[] args) throws Exception { - syncListProductSetsString(); - } - - public static void syncListProductSetsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (ProductSet element : productSearchClient.listProductSets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsets_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java deleted file mode 100644 index 00a1e318e919..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSet.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class AsyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSet(); - } - - public static void asyncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listProductsInProductSetPagedCallable().futureCall(request); - // Do something. - for (Product element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java deleted file mode 100644 index 7b5f873cb776..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/AsyncListProductsInProductSetPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_paged_async] -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.common.base.Strings; - -public class AsyncListProductsInProductSetPaged { - - public static void main(String[] args) throws Exception { - asyncListProductsInProductSetPaged(); - } - - public static void asyncListProductsInProductSetPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListProductsInProductSetResponse response = - productSearchClient.listProductsInProductSetCallable().call(request); - for (Product element : response.getProductsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java deleted file mode 100644 index 97832d7cbe38..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSet.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_sync] -import com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncListProductsInProductSet { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSet(); - } - - public static void syncListProductsInProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListProductsInProductSetRequest request = - ListProductsInProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Product element : productSearchClient.listProductsInProductSet(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java deleted file mode 100644 index 0c656c2ed6f5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetProductsetname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncListProductsInProductSetProductsetname { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetProductsetname(); - } - - public static void syncListProductsInProductSetProductsetname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_productsetname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java deleted file mode 100644 index 7febaade01d8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listproductsinproductset/SyncListProductsInProductSetString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_string_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; - -public class SyncListProductsInProductSetString { - - public static void main(String[] args) throws Exception { - syncListProductsInProductSetString(); - } - - public static void syncListProductsInProductSetString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - for (Product element : productSearchClient.listProductsInProductSet(name).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listproductsinproductset_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java deleted file mode 100644 index b54425a43cdd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImages.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class AsyncListReferenceImages { - - public static void main(String[] args) throws Exception { - asyncListReferenceImages(); - } - - public static void asyncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - productSearchClient.listReferenceImagesPagedCallable().futureCall(request); - // Do something. - for (ReferenceImage element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java deleted file mode 100644 index 53b128c781b6..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/AsyncListReferenceImagesPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_paged_async] -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; -import com.google.common.base.Strings; - -public class AsyncListReferenceImagesPaged { - - public static void main(String[] args) throws Exception { - asyncListReferenceImagesPaged(); - } - - public static void asyncListReferenceImagesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListReferenceImagesResponse response = - productSearchClient.listReferenceImagesCallable().call(request); - for (ReferenceImage element : response.getReferenceImagesList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_paged_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java deleted file mode 100644 index 8b6e2f9b7fcd..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImages.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_sync] -import com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncListReferenceImages { - - public static void main(String[] args) throws Exception { - syncListReferenceImages(); - } - - public static void syncListReferenceImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ListReferenceImagesRequest request = - ListReferenceImagesRequest.newBuilder() - .setParent(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (ReferenceImage element : productSearchClient.listReferenceImages(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java deleted file mode 100644 index e307423e9801..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_productname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncListReferenceImagesProductname { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesProductname(); - } - - public static void syncListReferenceImagesProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductName parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_productname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java deleted file mode 100644 index 0e5dbc6f2b0b..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/listreferenceimages/SyncListReferenceImagesString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_listreferenceimages_string_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ReferenceImage; - -public class SyncListReferenceImagesString { - - public static void main(String[] args) throws Exception { - syncListReferenceImagesString(); - } - - public static void syncListReferenceImagesString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - for (ReferenceImage element : productSearchClient.listReferenceImages(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_listreferenceimages_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java deleted file mode 100644 index f573a4788e3a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProducts.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.longrunning.Operation; - -public class AsyncPurgeProducts { - - public static void main(String[] args) throws Exception { - asyncPurgeProducts(); - } - - public static void asyncPurgeProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - ApiFuture future = productSearchClient.purgeProductsCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java deleted file mode 100644 index ec01509dcd3f..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/AsyncPurgeProductsLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.vision.v1p4beta1.BatchOperationMetadata; -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.protobuf.Empty; - -public class AsyncPurgeProductsLRO { - - public static void main(String[] args) throws Exception { - asyncPurgeProductsLRO(); - } - - public static void asyncPurgeProductsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - OperationFuture future = - productSearchClient.purgeProductsOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_lro_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java deleted file mode 100644 index 91ae2175daf7..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProducts.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.PurgeProductsRequest; -import com.google.protobuf.Empty; - -public class SyncPurgeProducts { - - public static void main(String[] args) throws Exception { - syncPurgeProducts(); - } - - public static void syncPurgeProducts() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - PurgeProductsRequest request = - PurgeProductsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setForce(true) - .build(); - productSearchClient.purgeProductsAsync(request).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java deleted file mode 100644 index 990682c1ef37..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsLocationname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_locationname_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncPurgeProductsLocationname { - - public static void main(String[] args) throws Exception { - syncPurgeProductsLocationname(); - } - - public static void syncPurgeProductsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - productSearchClient.purgeProductsAsync(parent).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_locationname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java deleted file mode 100644 index d2b09229c08e..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/purgeproducts/SyncPurgeProductsString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_purgeproducts_string_sync] -import com.google.cloud.vision.v1p4beta1.LocationName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.Empty; - -public class SyncPurgeProductsString { - - public static void main(String[] args) throws Exception { - syncPurgeProductsString(); - } - - public static void syncPurgeProductsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - productSearchClient.purgeProductsAsync(parent).get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_purgeproducts_string_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java deleted file mode 100644 index 90a8d41259b5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/AsyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class AsyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - asyncRemoveProductFromProductSet(); - } - - public static void asyncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - ApiFuture future = - productSearchClient.removeProductFromProductSetCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java deleted file mode 100644 index 6b9a54798872..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSet.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSet { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSet(); - } - - public static void syncRemoveProductFromProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - RemoveProductFromProductSetRequest request = - RemoveProductFromProductSetRequest.newBuilder() - .setName(ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString()) - .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) - .build(); - productSearchClient.removeProductFromProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java deleted file mode 100644 index 804f5772d2d8..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameProductname(); - } - - public static void syncRemoveProductFromProductSetProductsetnameProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnameproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java deleted file mode 100644 index 2943c3dba374..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetProductsetnameString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetProductsetnameString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetProductsetnameString(); - } - - public static void syncRemoveProductFromProductSetProductsetnameString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]"); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_productsetnamestring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java deleted file mode 100644 index 50201fa1e716..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringProductname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringProductname { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringProductname(); - } - - public static void syncRemoveProductFromProductSetStringProductname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - ProductName product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringproductname_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java deleted file mode 100644 index 2acbf86656d5..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/removeproductfromproductset/SyncRemoveProductFromProductSetStringString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] -import com.google.cloud.vision.v1p4beta1.ProductName; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSetName; -import com.google.protobuf.Empty; - -public class SyncRemoveProductFromProductSetStringString { - - public static void main(String[] args) throws Exception { - syncRemoveProductFromProductSetStringString(); - } - - public static void syncRemoveProductFromProductSetStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - String name = ProductSetName.of("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]").toString(); - String product = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); - productSearchClient.removeProductFromProductSet(name, product); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_removeproductfromproductset_stringstring_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java deleted file mode 100644 index d868c9b5d1a4..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/AsyncUpdateProduct.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProduct { - - public static void main(String[] args) throws Exception { - asyncUpdateProduct(); - } - - public static void asyncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = productSearchClient.updateProductCallable().futureCall(request); - // Do something. - Product response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java deleted file mode 100644 index 103e182d4272..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProduct.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.UpdateProductRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProduct { - - public static void main(String[] args) throws Exception { - syncUpdateProduct(); - } - - public static void syncUpdateProduct() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductRequest request = - UpdateProductRequest.newBuilder() - .setProduct(Product.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Product response = productSearchClient.updateProduct(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java deleted file mode 100644 index 14ed817ce21d..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproduct/SyncUpdateProductProductFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] -import com.google.cloud.vision.v1p4beta1.Product; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductProductFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductProductFieldmask(); - } - - public static void syncUpdateProductProductFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - Product product = Product.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Product response = productSearchClient.updateProduct(product, updateMask); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproduct_productfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java deleted file mode 100644 index f075fe2694e3..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/AsyncUpdateProductSet.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - asyncUpdateProductSet(); - } - - public static void asyncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - productSearchClient.updateProductSetCallable().futureCall(request); - // Do something. - ProductSet response = future.get(); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_async] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java deleted file mode 100644 index 1f5f451318be..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSet.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSet { - - public static void main(String[] args) throws Exception { - syncUpdateProductSet(); - } - - public static void syncUpdateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - UpdateProductSetRequest request = - UpdateProductSetRequest.newBuilder() - .setProductSet(ProductSet.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ProductSet response = productSearchClient.updateProductSet(request); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java deleted file mode 100644 index 9ae891af3586..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchclient/updateproductset/SyncUpdateProductSetProductsetFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchClient; -import com.google.cloud.vision.v1p4beta1.ProductSet; -import com.google.protobuf.FieldMask; - -public class SyncUpdateProductSetProductsetFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateProductSetProductsetFieldmask(); - } - - public static void syncUpdateProductSetProductsetFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { - ProductSet productSet = ProductSet.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - ProductSet response = productSearchClient.updateProductSet(productSet, updateMask); - } - } -} -// [END vision_v1p4beta1_generated_productsearchclient_updateproductset_productsetfieldmask_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index 1434aed48845..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/productsearchsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.samples; - -// [START vision_v1p4beta1_generated_productsearchsettings_createproductset_sync] -import com.google.cloud.vision.v1p4beta1.ProductSearchSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1p4beta1_generated_productsearchsettings_createproductset_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java deleted file mode 100644 index d1c22650ed1a..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/imageannotatorstubsettings/batchannotateimages/SyncBatchAnnotateImages.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub.samples; - -// [START vision_v1p4beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] -import com.google.cloud.vision.v1p4beta1.stub.ImageAnnotatorStubSettings; -import java.time.Duration; - -public class SyncBatchAnnotateImages { - - public static void main(String[] args) throws Exception { - syncBatchAnnotateImages(); - } - - public static void syncBatchAnnotateImages() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder = - ImageAnnotatorStubSettings.newBuilder(); - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .setRetrySettings( - imageAnnotatorSettingsBuilder - .batchAnnotateImagesSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build(); - } -} -// [END vision_v1p4beta1_generated_imageannotatorstubsettings_batchannotateimages_sync] diff --git a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java b/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java deleted file mode 100644 index f47575caf07c..000000000000 --- a/owl-bot-staging/java-vision/v1p4beta1/samples/snippets/generated/com/google/cloud/vision/v1p4beta1/stub/productsearchstubsettings/createproductset/SyncCreateProductSet.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.vision.v1p4beta1.stub.samples; - -// [START vision_v1p4beta1_generated_productsearchstubsettings_createproductset_sync] -import com.google.cloud.vision.v1p4beta1.stub.ProductSearchStubSettings; -import java.time.Duration; - -public class SyncCreateProductSet { - - public static void main(String[] args) throws Exception { - syncCreateProductSet(); - } - - public static void syncCreateProductSet() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ProductSearchStubSettings.Builder productSearchSettingsBuilder = - ProductSearchStubSettings.newBuilder(); - productSearchSettingsBuilder - .createProductSetSettings() - .setRetrySettings( - productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build(); - } -} -// [END vision_v1p4beta1_generated_productsearchstubsettings_createproductset_sync]